Fix German keymap, add right/left ctrl/alt keysyms.

This commit is contained in:
Michael Jumper 2013-05-08 14:21:04 -07:00
parent 3e4199f90a
commit 5427c152ba
3 changed files with 94 additions and 43 deletions

View File

@ -51,7 +51,7 @@ const int GUAC_KEYSYMS_CTRL_ALT[] = {0xFFE3, 0xFFE9, 0};
const int GUAC_KEYSYMS_ALL_MODIFIERS[] = { const int GUAC_KEYSYMS_ALL_MODIFIERS[] = {
0xFFE1, 0xFFE2, /* Left and right shift */ 0xFFE1, 0xFFE2, /* Left and right shift */
0xFFE3, 0xFFE4, /* Left and right control */ 0xFFE3, 0xFFE4, /* Left and right control */
0xFFE9, 0xFFEA, /* Left and right alt */ 0xFFE9, 0xFFEA, /* Left and right alt (AltGr) */
0 0
}; };

View File

@ -176,7 +176,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
{ .keysym = 0xffe3, .scancode = 0x1D }, { .keysym = 0xffe3, .scancode = 0x1D },
/* Control_R */ /* Control_R */
{ .keysym = 0xffe4, .scancode = 0x1D }, { .keysym = 0xffe4, .scancode = 0x9D },
/* Caps_Lock */ /* Caps_Lock */
{ .keysym = 0xffe5, .scancode = 0x3A, { .keysym = 0xffe5, .scancode = 0x3A,
@ -186,7 +186,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
{ .keysym = 0xffe9, .scancode = 0x38 }, { .keysym = 0xffe9, .scancode = 0x38 },
/* Alt_R */ /* Alt_R */
{ .keysym = 0xffea, .scancode = 0x38 }, { .keysym = 0xffea, .scancode = 0xB8 },
/* Super_L */ /* Super_L */
{ .keysym = 0xffeb, .scancode = 0x5B, { .keysym = 0xffeb, .scancode = 0x5B,

View File

@ -52,131 +52,147 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* exclam */ /* exclam */
{ .keysym = 0x0021, .scancode = 0x02, { .keysym = 0x0021, .scancode = 0x02,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* quotedbl */ /* quotedbl */
{ .keysym = 0x0022, .scancode = 0x03, { .keysym = 0x0022, .scancode = 0x03,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* numbersign */ /* numbersign */
{ .keysym = 0x0023, .scancode = 0x2b, { .keysym = 0x0023, .scancode = 0x2b,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* dollar */ /* dollar */
{ .keysym = 0x0024, .scancode = 0x05, { .keysym = 0x0024, .scancode = 0x05,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* percent */ /* percent */
{ .keysym = 0x0025, .scancode = 0x06, { .keysym = 0x0025, .scancode = 0x06,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* ampersand */ /* ampersand */
{ .keysym = 0x0026, .scancode = 0x07, { .keysym = 0x0026, .scancode = 0x07,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* quoteright */ /* quoteright */
{ .keysym = 0x0027, .scancode = 0x2b,
{ .keysym = 0x0027, .scancode = 0x2b }, .clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT },
/* parenleft */ /* parenleft */
{ .keysym = 0x0028, .scancode = 0x09, { .keysym = 0x0028, .scancode = 0x09,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* parenright */ /* parenright */
{ .keysym = 0x0029, .scancode = 0x0A, { .keysym = 0x0029, .scancode = 0x0A,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* asterisk */ /* asterisk */
{ .keysym = 0x002a, .scancode = 0x1b, { .keysym = 0x002a, .scancode = 0x1b,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* plus */ /* plus */
{ .keysym = 0x002b, .scancode = 0x1b, { .keysym = 0x002b, .scancode = 0x1b,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* comma */ /* comma */
{ .keysym = 0x002c, .scancode = 0x33, { .keysym = 0x002c, .scancode = 0x33,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* minus */ /* minus */
{ .keysym = 0x002d, .scancode = 0x35, { .keysym = 0x002d, .scancode = 0x35,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* period */ /* period */
{ .keysym = 0x002e, .scancode = 0x34, { .keysym = 0x002e, .scancode = 0x34,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* slash */ /* slash */
{ .keysym = 0x002f, .scancode = 0x08, { .keysym = 0x002f, .scancode = 0x08,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* 0 */ /* 0 */
{ .keysym = 0x0030, .scancode = 0x0B, { .keysym = 0x0030, .scancode = 0x0B,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 1 */ /* 1 */
{ .keysym = 0x0031, .scancode = 0x02, { .keysym = 0x0031, .scancode = 0x02,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 2 */ /* 2 */
{ .keysym = 0x0032, .scancode = 0x03, { .keysym = 0x0032, .scancode = 0x03,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 3 */ /* 3 */
{ .keysym = 0x0033, .scancode = 0x04, { .keysym = 0x0033, .scancode = 0x04,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 4 */ /* 4 */
{ .keysym = 0x0034, .scancode = 0x05, { .keysym = 0x0034, .scancode = 0x05,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 5 */ /* 5 */
{ .keysym = 0x0035, .scancode = 0x06, { .keysym = 0x0035, .scancode = 0x06,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 6 */ /* 6 */
{ .keysym = 0x0036, .scancode = 0x07, { .keysym = 0x0036, .scancode = 0x07,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 7 */ /* 7 */
{ .keysym = 0x0037, .scancode = 0x08, { .keysym = 0x0037, .scancode = 0x08,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 8 */ /* 8 */
{ .keysym = 0x0038, .scancode = 0x09, { .keysym = 0x0038, .scancode = 0x09,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* 9 */ /* 9 */
{ .keysym = 0x0039, .scancode = 0x0A, { .keysym = 0x0039, .scancode = 0x0A,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* colon */ /* colon */
{ .keysym = 0x003a, .scancode = 0x34, { .keysym = 0x003a, .scancode = 0x34,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* semicolon */ /* semicolon */
{ .keysym = 0x003b, .scancode = 0x33, { .keysym = 0x003b, .scancode = 0x33,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* less */ /* less */
{ .keysym = 0x003c, .scancode = 0x56, { .keysym = 0x003c, .scancode = 0x56,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* equal */ /* equal */
{ .keysym = 0x003d, .scancode = 0x0B, { .keysym = 0x003d, .scancode = 0x0B,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* greater */ /* greater */
{ .keysym = 0x003e, .scancode = 0x56, { .keysym = 0x003e, .scancode = 0x56,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* question */ /* question */
{ .keysym = 0x003f, .scancode = 0x0c, { .keysym = 0x003f, .scancode = 0x0c,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* at */ /* at */
{ .keysym = 0x0040, .scancode = 0x03, { .keysym = 0x0040, .scancode = 0x10,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* A */ /* A */
{ .keysym = 0x0041, .scancode = 0x1E, { .keysym = 0x0041, .scancode = 0x1E,
@ -196,6 +212,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* E */ /* E */
{ .keysym = 0x0045, .scancode = 0x12, { .keysym = 0x0045, .scancode = 0x12,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* F */ /* F */
@ -228,6 +245,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* M */ /* M */
{ .keysym = 0x004d, .scancode = 0x32, { .keysym = 0x004d, .scancode = 0x32,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* N */ /* N */
@ -244,6 +262,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* Q */ /* Q */
{ .keysym = 0x0051, .scancode = 0x10, { .keysym = 0x0051, .scancode = 0x10,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* R */ /* R */
@ -284,28 +303,40 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* bracketleft */ /* bracketleft */
{ .keysym = 0x005b, .scancode = 0x09, { .keysym = 0x005b, .scancode = 0x09,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* backslash */ /* backslash */
{ .keysym = 0x005c, .scancode = 0x0c, { .keysym = 0x005c, .scancode = 0x0c,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* bracketright */ /* bracketright */
{ .keysym = 0x005d, .scancode = 0x0a, { .keysym = 0x005d, .scancode = 0x0a,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* asciicircum */
{ .keysym = 0x005e, .scancode = 0x29,
.set_keysyms = GUAC_KEYSYMS_SHIFT },
/* underscore */ /* underscore */
{ .keysym = 0x005f, .scancode = 0x35, { .keysym = 0x005f, .scancode = 0x35,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* quoteleft */ /* dead grave (WRONG) */
{ .keysym = 0x0060, .scancode = 0x2f, { .keysym = 0xfe50, .scancode = 0x0d,
.set_keysyms = GUAC_KEYSYMS_SHIFT },
/* dead acute (WRONG) */
{ .keysym = 0xfe51, .scancode = 0x0d,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT },
/* dead circum */
{ .keysym = 0xfe52, .scancode = 0x29,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT },
/* degree */
{ .keysym = 0x00b0, .scancode = 0x29,
.set_keysyms = GUAC_KEYSYMS_SHIFT },
/* a */ /* a */
{ .keysym = 0x0061, .scancode = 0x1E, { .keysym = 0x0061, .scancode = 0x1E,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT },
@ -324,7 +355,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* e */ /* e */
{ .keysym = 0x0065, .scancode = 0x12, { .keysym = 0x0065, .scancode = 0x12,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* f */ /* f */
{ .keysym = 0x0066, .scancode = 0x21, { .keysym = 0x0066, .scancode = 0x21,
@ -356,7 +387,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* m */ /* m */
{ .keysym = 0x006d, .scancode = 0x32, { .keysym = 0x006d, .scancode = 0x32,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* n */ /* n */
{ .keysym = 0x006e, .scancode = 0x31, { .keysym = 0x006e, .scancode = 0x31,
@ -372,7 +403,7 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
/* q */ /* q */
{ .keysym = 0x0071, .scancode = 0x10, { .keysym = 0x0071, .scancode = 0x10,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* r */ /* r */
{ .keysym = 0x0072, .scancode = 0x13, { .keysym = 0x0072, .scancode = 0x13,
@ -414,42 +445,62 @@ static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = {
{ .keysym = 0x00e4, .scancode = 0x28, { .keysym = 0x00e4, .scancode = 0x28,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT },
/* Ä */
{ .keysym = 0x00c4, .scancode = 0x28, { .keysym = 0x00c4, .scancode = 0x28,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* ö */ /* ö */
{ .keysym = 0x00f6, .scancode = 0x27, { .keysym = 0x00f6, .scancode = 0x27,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT },
/* Ö */
{ .keysym = 0x00d6, .scancode = 0x27, { .keysym = 0x00d6, .scancode = 0x27,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* ü */ /* ü */
{ .keysym = 0x00fc, .scancode = 0x1a, { .keysym = 0x00fc, .scancode = 0x1a,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT },
/* Ü */
{ .keysym = 0x00dc, .scancode = 0x1a, { .keysym = 0x00dc, .scancode = 0x1a,
.clear_keysyms = GUAC_KEYSYMS_CTRL_ALT,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .set_keysyms = GUAC_KEYSYMS_SHIFT },
/* ß */ /* ß */
{ .keysym = 0x00df, .scancode = 0x0c, { .keysym = 0x00df, .scancode = 0x0c,
.clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_MODIFIERS },
/* braceleft */ /* braceleft */
{ .keysym = 0x007b, .scancode = 0x08, { .keysym = 0x007b, .scancode = 0x08,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* bar */ /* bar */
{ .keysym = 0x007c, .scancode = 0x2B, { .keysym = 0x007c, .scancode = 0x2B,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* braceright */ /* braceright */
{ .keysym = 0x007d, .scancode = 0x0b, { .keysym = 0x007d, .scancode = 0x0b,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* asciitilde */ /* dead tilde */
{ .keysym = 0x007e, .scancode = 0x1b, { .keysym = 0xfe53, .scancode = 0x1b,
.set_keysyms = GUAC_KEYSYMS_SHIFT }, .clear_keysyms = GUAC_KEYSYMS_ALL_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* euro */
{ .keysym = 0x10020ac, .scancode = 0x12,
.clear_keysyms = GUAC_KEYSYMS_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
/* mu */
{ .keysym = 0x00b5, .scancode = 0x32,
.clear_keysyms = GUAC_KEYSYMS_SHIFT,
.set_keysyms = GUAC_KEYSYMS_CTRL_ALT },
{0} {0}