mpv/player
wm4 b36e8569a1 lua: make later key bindings always have higher priority
Later calls to mp.add_key_binding() should take priority over previous
calls with the same key. Until now, the order was random (due to using
table pairs() iteration order).

Do this by simply sorting by a counter that is never reset. Since
input.c also gives later bindings priority, this works out.

Calling mp.remove_key_binding() on a newer binding makes an older still
existing binding with the same key active again. New bindings override
older ones, but do not overwrite them. I think these are good semantics
for most use cases.

(Note that the Lua code cannot determine whether two bindings use the
same key. Keys are strings, and two different strings could refer to the
same key. The code does not have access to input.c's key name
normalization, so it cannot compare them.)
2019-12-07 14:53:33 +01:00
..
javascript js: mp.add_key_binding: allow false-y name (match 311cc5b) 2019-11-30 12:23:47 +02:00
lua lua: make later key bindings always have higher priority 2019-12-07 14:53:33 +01:00
audio.c command: shuffle some crap around 2019-11-25 00:26:36 +01:00
client.c player: remove mechanisms for better logging with repl.lua 2019-11-18 00:44:54 +01:00
client.h client API: remove unused global event mask 2019-10-24 16:27:24 +02:00
command.c command: fix unintended reset of filters 2019-12-06 19:27:45 +01:00
command.h player: change m_config to use new option handling mechanisms 2019-11-29 12:49:15 +01:00
configfiles.c player: Optionally validate st_mtime when restoring playback state 2019-11-20 15:11:33 +01:00
core.h command: shuffle some crap around 2019-11-25 00:26:36 +01:00
external_files.c external_files: add .lrc subtitle extension 2019-09-02 01:25:43 +03:00
external_files.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
javascript.c js: don't pre-filter log level argument in mp.enable_messages() 2019-11-19 18:13:39 +02:00
loadfile.c player: loadfile overrides previous stop command 2019-12-06 19:21:14 +01:00
lua.c lua: don't pre-filter log level argument in mp.enable_messages() 2019-11-18 00:44:54 +01:00
main.c player: change m_config to use new option handling mechanisms 2019-11-29 12:49:15 +01:00
misc.c player: simplify --stream-dump code 2019-10-31 11:05:55 +01:00
osd.c player: format low cache duration with more decimals 2019-10-11 19:18:43 +02:00
playloop.c options: move cursor autohiding opts to mp_vo_opts 2019-12-04 00:47:05 +00:00
screenshot.c screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
screenshot.h screenshot, vo_image: use global swscale/zimg parameters 2019-10-31 15:44:09 +01:00
scripting.c scripting: change when/how player waits for scripts being loaded 2018-04-18 01:17:41 +03:00
sub.c player: ensure backward playback state is propagated on track switching 2019-09-19 20:37:05 +02:00
video.c player: don't apply weird timestamp tolerance on backstep 2019-12-03 21:43:32 +01:00