diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-12-19 12:12:20 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-12-20 19:02:24 +0200 |
commit | 67fd58d6f01ad84387421e2fc861c28dcf5c4f3c (patch) | |
tree | f1b93bc0ac9effc590771ce86aacc09eb050fbc1 /osdep/keycodes.h | |
parent | b4564c2d4fdc14f1fcb6987b8f57a2c27a08bf54 (diff) | |
download | mpv-67fd58d6f01ad84387421e2fc861c28dcf5c4f3c.tar.bz2 mpv-67fd58d6f01ad84387421e2fc861c28dcf5c4f3c.tar.xz |
input: support bindings with modifier keys for X input
Add support for binding commands to modifier+key combinations like
"Shift+Left" or "Ctrl+Alt+x", and support reading such combinations
from the output window of X VOs.
The recognized modifier names are Shift, Ctrl, Alt and Meta. Any
combination of those and then a non-modifier key name, separated by
'+', is accepted as a key name in input.conf. For non-special keys
that produce characters shift is ignored as a modifier. For example
"A" is handled as a key without modifiers even if you use shift to
write the capital letter; 'a' vs 'A' already distinguishes the
combinations with a normal keymap, and having separate 'a', 'Shift+A'
and 'A' (written with caps lock for example) would bring more
confusion than benefit.
Currently reading the modifier+key combinations is only supported in
the output window of those VOs that use x11_common.c event
handling. It's not possible to input the key combinations in other VOs
or in a terminal window.
Diffstat (limited to 'osdep/keycodes.h')
-rw-r--r-- | osdep/keycodes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/keycodes.h b/osdep/keycodes.h index 4d153a24aa..d197c8e3e9 100644 --- a/osdep/keycodes.h +++ b/osdep/keycodes.h @@ -94,4 +94,10 @@ #define KEY_INTERN (0x1000) #define KEY_CLOSE_WIN (KEY_INTERN+0) +/* Modifiers added to individual keys */ +#define KEY_MODIFIER_SHIFT 0x2000 +#define KEY_MODIFIER_CTRL 0x4000 +#define KEY_MODIFIER_ALT 0x8000 +#define KEY_MODIFIER_META 0x10000 + #endif /* MPLAYER_KEYCODES_H */ |