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@redhat.com>
This commit is contained in:
Yonit Halperin 2012-02-29 16:58:46 +02:00
parent a50619e733
commit 68cdc5488d
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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,