[Spice-commits] 2 commits - client/inputs_channel.cpp client/red_key.h client/x11

Yonit Halperin yhalperi at kemper.freedesktop.org
Wed Feb 29 22:59:18 PST 2012


 client/inputs_channel.cpp |    3 +++
 client/red_key.h          |    3 +++
 client/x11/red_window.cpp |    6 ++++++
 3 files changed, 12 insertions(+)

New commits:
commit d2cd7b2b020da1dc7efe778ddfc4525e31784dbb
Author: Yonit Halperin <yhalperi at redhat.com>
Date:   Wed Feb 29 17:02:28 2012 +0200

    client X11: support volume keys when evdev is in use
    
    Add support for sending volume keys scancodes to the guest
    RHBZ #552539
    
    Signed-off-by: Yonit Halperin <yhalperi at redhat.com>

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
 }
 
commit 68cdc5488da1a008fa4e8a4447b85aa8ac9c2735
Author: Yonit Halperin <yhalperi at redhat.com>
Date:   Wed Feb 29 16:58:46 2012 +0200

    client: keyboard - add mapping for volume keys
    
    Add support for sending volume keys scancodes to the guest
    RHBZ #552539
    
    A good reference for mapping keymaps to scancodes can be found in
    spice-gtk/gtk/keymaps.csv
    
    Signed-off-by: Yonit Halperin <yhalperi at redhat.com>

diff --git a/client/inputs_channel.cpp b/client/inputs_channel.cpp
index b6f0220..c148eff 100644
--- a/client/inputs_channel.cpp
+++ b/client/inputs_channel.cpp
@@ -561,7 +561,10 @@ void InputsChannel::init_scan_table()
     init_escape_scan_code(REDKEY_ESCAPE_BASE);
     init_escape_scan_code(REDKEY_PAD_ENTER);
     init_escape_scan_code(REDKEY_R_CTRL);
+    init_escape_scan_code(REDKEY_MUTE);
     init_escape_scan_code(REDKEY_FAKE_L_SHIFT);
+    init_escape_scan_code(REDKEY_VOLUME_DOWN);
+    init_escape_scan_code(REDKEY_VOLUME_UP);
     init_escape_scan_code(REDKEY_PAD_DIVIDE);
     init_escape_scan_code(REDKEY_FAKE_R_SHIFT);
     init_escape_scan_code(REDKEY_CTRL_PRINT_SCREEN);
diff --git a/client/red_key.h b/client/red_key.h
index ea3396a..3789c9a 100644
--- a/client/red_key.h
+++ b/client/red_key.h
@@ -121,7 +121,10 @@ enum RedKey {
     REDKEY_ESCAPE_BASE = 0x100,
     REDKEY_PAD_ENTER = REDKEY_ESCAPE_BASE + 0x1c,
     REDKEY_R_CTRL = REDKEY_ESCAPE_BASE + 0x1d,
+    REDKEY_MUTE = REDKEY_ESCAPE_BASE + 0x20,
     REDKEY_FAKE_L_SHIFT = REDKEY_ESCAPE_BASE + 0x2a,
+    REDKEY_VOLUME_DOWN = REDKEY_ESCAPE_BASE + 0x2e,
+    REDKEY_VOLUME_UP = REDKEY_ESCAPE_BASE + 0x30,
     REDKEY_PAD_DIVIDE = REDKEY_ESCAPE_BASE + 0x35,
     REDKEY_FAKE_R_SHIFT = REDKEY_ESCAPE_BASE + 0x36,
     REDKEY_CTRL_PRINT_SCREEN = REDKEY_ESCAPE_BASE + 0x37,


More information about the Spice-commits mailing list