[Spice-devel] [PATCH 2/2] client X11: support volume keys when evdev is in use
Yonit Halperin
yhalperi at redhat.com
Wed Feb 29 07:28:31 PST 2012
Add support for sending volume keys scancodes to the guest
RHBZ #552539
Signed-off-by: Yonit Halperin <yhalperi at redhat.com>
---
client/x11/red_window.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/client/x11/red_window.cpp b/client/x11/red_window.cpp
index b16249e..fda90d5 100644
--- a/client/x11/red_window.cpp
+++ b/client/x11/red_window.cpp
@@ -186,6 +186,9 @@ enum EvdevKeyCode {
EVDEV_KEYCODE_PAGE_DOWN,
EVDEV_KEYCODE_INSERT,
EVDEV_KEYCODE_DELETE,
+ EVDEV_KEYCODE_MUTE = 121,
+ EVDEV_KEYCODE_VOLUME_DOWN = 122,
+ EVDEV_KEYCODE_VOLUME_UP = 123,
EVDEV_KEYCODE_PAUSE = 127,
EVDEV_KEYCODE_HANGUL = 130,
EVDEV_KEYCODE_HANGUL_HANJA,
@@ -456,6 +459,9 @@ static void init_evdev_map()
{
#define KEYMAP(key_code, red_key) keycode_map[EVDEV_##key_code] = red_key
INIT_MAP;
+ KEYMAP(KEYCODE_MUTE, REDKEY_MUTE);
+ KEYMAP(KEYCODE_VOLUME_DOWN, REDKEY_VOLUME_DOWN);
+ KEYMAP(KEYCODE_VOLUME_UP, REDKEY_VOLUME_UP);
#undef KEYMAP
}
--
1.7.7.6
More information about the Spice-devel
mailing list