diff options
author | wm4 <wm4@nowhere> | 2019-11-21 23:01:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-22 01:15:08 +0100 |
commit | 21f2468d67e11eff7ede0d85fa6f4ab5c4f7de84 (patch) | |
tree | 0eccc529be050bdfe602ccbbcebdc04f4f193e71 /player/command.c | |
parent | eab5457e47389d5eeb79010f2f35e4d6613df86f (diff) | |
download | mpv-21f2468d67e11eff7ede0d85fa6f4ab5c4f7de84.tar.bz2 mpv-21f2468d67e11eff7ede0d85fa6f4ab5c4f7de84.tar.xz |
input: add text produced by key to script key events
Particularly for "any_unicode" mappings, so they don't have to
special-case keys like '#' and ' ', which are normally mapped to
symbolic names for input.conf reasons. (Though admittedly, this is a
pretty minor thing, since API users could map these manually.)
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/player/command.c b/player/command.c index 28f48b43e1..00ebddf343 100644 --- a/player/command.c +++ b/player/command.c @@ -5516,9 +5516,10 @@ static void cmd_script_binding(void *p) char state[3] = {'p', incmd->is_mouse_button ? 'm' : '-'}; if (incmd->is_up_down) state[0] = incmd->repeated ? 'r' : (incmd->is_up ? 'u' : 'd'); - event.num_args = 4; - event.args = (const char*[4]){"key-binding", name, state, - incmd->key_name ? incmd->key_name : ""}; + event.num_args = 5; + event.args = (const char*[5]){"key-binding", name, state, + incmd->key_name ? incmd->key_name : "", + incmd->key_text ? incmd->key_text : ""}; if (mp_client_send_event_dup(mpctx, target, MPV_EVENT_CLIENT_MESSAGE, &event) < 0) { |