mpv/input
Avi Halachmi (:avih) 2a183c5ca7 input: new option: --no-input-builtin-bindings
This is similar to [no-]input-default-bindings, but affects only
builtin bindings (while input-default-bindings affects anything which
config files can override, like scripting mp.add_key_binding).

Arguably, this is what input-default-binding should have always done,
however, it does not.

The reason we add a new option rather than repurpose/modify the
existing option is that it behaves differently enough to raise
concerns that it will break some use cases for existing users:
- The new option is only applied once on startup, while
  input-default-bindings can be modified effectively at runtime.
- They affects different sets of bindings, and it's possible that
  the set of input-default-bindings is useful enough to keep.

Implementation-wise, both options are trivial, so keeping one or the
other or both doesn't affect code complexity.

It could be argued that it would be useful to make the new option
also effective for runtime changes, however, this opens a can of
worms of how the bindings are stored beyond the initial setup.

TL;DR: it's impossible to differentiate correctly at runtime between
builtin bindings, and those added with mp.add_key_bindings.

The gist is that technically mpv needs/uses two binding "classes":
- weak/builtin bindings - lower priority than config files.
- "user" bindings - config files and "forced" runtime bindings.

input-default-bindings affects the first class trivially, but
input-builtin-bindings would not be able split this class further
at runtime without meaningful changes to a lot of delicate code.

So a new option it is. It should be useful to some libmpv clients
(players) which want to disable mpv's builtin bindings without
breaking mp.add_key_bindings for scripts.

Fixes #8809
(again. the previous fix 8edfe70b only improved the docs, while
now we're actually making the requested behavior possible)
2021-10-11 22:16:51 +03:00
..
cmd.c command: don't hardcode commands list to be repeatable 2021-08-17 22:45:39 +03:00
cmd.h options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
event.c
event.h
input.c input: new option: --no-input-builtin-bindings 2021-10-11 22:16:51 +03:00
input.h command: mouse-pos property: add field "hover" 2020-11-16 20:29:58 +02:00
ipc-dummy.c scripting: add a way to run sub processes as "scripts" 2020-02-19 22:18:15 +01:00
ipc-unix.c ipc: mark client sockets as CLOEXEC 2020-05-15 16:37:41 +02:00
ipc-win.c scripting: add a way to run sub processes as "scripts" 2020-02-19 22:18:15 +01:00
ipc.c ipc: fix recently added memory leak 2020-03-27 00:07:03 +01:00
keycodes.c command: add input-key-list property 2020-05-14 22:22:33 +02:00
keycodes.h command: add input-key-list property 2020-05-14 22:22:33 +02:00
sdl_gamepad.c sdl: prevent concurrent use of SDL in different threads 2019-10-25 22:17:54 +02:00