[Spice-devel] [PATCH spice-gtk] keymap: Add missing keys for XF86 and X11

Pavel Grunt pgrunt at redhat.com
Mon Jan 16 12:31:26 UTC 2017


On Mon, 2017-01-16 at 07:25 -0500, Frediano Ziglio wrote:
> > 
> > Resolves:
> > https://bugs.freedesktop.org/show_bug.cgi?id=99407
> > ---
> >  src/keymaps.csv | 29 +++++++++++++++++++++++++----
> >  1 file changed, 25 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/keymaps.csv b/src/keymaps.csv
> > index 9052e3b..08af269 100644
> > --- a/src/keymaps.csv
> > +++ b/src/keymaps.csv
> > @@ -2,17 +2,29 @@
> >  KEY_RESERVED,0,,,,,,,,,,,,,,
> >  KEY_ESC,1,Escape,0x35,1,118,8,1,1,41,VK_ESCAPE,0x1b,1,1,XK_Escape
> > ,0xff1b
> >  KEY_1,2,ANSI_1,0x12,2,22,22,2,2,30,VK_1,0x31,2,2,XK_1,0x0031
> > +KEY_1,2,ANSI_1,0x12,2,22,22,2,2,30,VK_1,0x31,2,2,XK_exclam,0x0021
> >  KEY_2,3,ANSI_2,0x13,3,30,30,3,3,31,VK_2,0x32,3,3,XK_2,0x0032
> > +KEY_2,3,ANSI_2,0x13,3,30,30,3,3,31,VK_2,0x32,3,3,XK_at,0x0040
> >  KEY_3,4,ANSI_3,0x14,4,38,38,4,4,32,VK_3,0x33,4,4,XK_3,0x0033
> > +KEY_3,4,ANSI_3,0x14,4,38,38,4,4,32,VK_3,0x33,4,4,XK_numbersign,0x
> > 0023
> >  KEY_4,5,ANSI_4,0x15,5,37,37,5,5,33,VK_4,0x34,5,5,XK_4,0x0034
> > +KEY_4,5,ANSI_4,0x15,5,37,37,5,5,33,VK_4,0x34,5,5,XK_dollar,0x0024
> >  KEY_5,6,ANSI_5,0x17,6,46,46,6,6,34,VK_5,0x35,6,6,XK_5,0x0035
> > +KEY_5,6,ANSI_5,0x17,6,46,46,6,6,34,VK_5,0x35,6,6,XK_percent,0x002
> > 5
> >  KEY_6,7,ANSI_6,0x16,7,54,54,7,7,35,VK_6,0x36,7,7,XK_6,0x0036
> > +KEY_6,7,ANSI_6,0x16,7,54,54,7,7,35,VK_6,0x36,7,7,XK_asciicircum,0
> > x005e
> >  KEY_7,8,ANSI_7,0x1a,8,61,61,8,8,36,VK_7,0x37,8,8,XK_7,0x0037
> > +KEY_7,8,ANSI_7,0x1a,8,61,61,8,8,36,VK_7,0x37,8,8,XK_ampersand,0x0
> > 026
> >  KEY_8,9,ANSI_8,0x1c,9,62,62,9,9,37,VK_8,0x38,9,9,XK_8,0x0038
> > +KEY_8,9,ANSI_8,0x1c,9,62,62,9,9,37,VK_8,0x38,9,9,XK_asterisk,0x00
> > 2a
> >  KEY_9,10,ANSI_9,0x19,10,70,70,10,10,38,VK_9,0x39,10,10,XK_9,0x003
> > 9
> > +KEY_9,10,ANSI_9,0x19,10,70,70,10,10,38,VK_9,0x39,10,10,XK_parenle
> > ft,0x0028
> >  KEY_0,11,ANSI_0,0x1d,11,69,69,11,11,39,VK_0,0x30,11,11,XK_0,0x003
> > 0
> > +KEY_0,11,ANSI_0,0x1d,11,69,69,11,11,39,VK_0,0x30,11,11,XK_parenri
> > ght,0x0029
> >  KEY_MINUS,12,ANSI_Minus,0x1b,12,78,78,12,12,45,VK_OEM_MINUS,0xbd,
> > 12,12,XK_minus,0x002d
> > +KEY_MINUS,12,ANSI_Minus,0x1b,12,78,78,12,12,45,VK_OEM_MINUS,0xbd,
> > 12,12,XK_underscore,0x005f
> >  KEY_EQUAL,13,ANSI_Equal,0x18,13,85,85,13,13,46,VK_OEM_PLUS,0xbb,1
> > 3,13,XK_equal,0x003d
> > +KEY_EQUAL,13,ANSI_Equal,0x18,13,85,85,13,13,46,VK_OEM_PLUS,0xbb,1
> > 3,13,XK_plus,0x002b
> >  KEY_BACKSPACE,14,Delete,0x33,14,102,102,14,14,42,VK_BACK,0x08,14,
> > 14,XK_BackSpace,0xff08
> >  KEY_TAB,15,Tab,0x30,15,13,13,15,15,43,VK_TAB,0x09,15,15,XK_Tab,0x
> > ff09
> >  KEY_Q,16,ANSI_Q,0xc,16,21,21,16,16,20,VK_Q,0x51,16,16,XK_Q,0x0051
> > @@ -36,7 +48,9 @@
> > KEY_O,24,ANSI_O,0x1f,24,68,68,24,24,18,VK_O,0x4f,24,24,XK_o,0x006f
> >  KEY_P,25,ANSI_P,0x23,25,77,77,25,25,19,VK_P,0x50,25,25,XK_P,0x005
> > 0
> >  KEY_P,25,ANSI_P,0x23,25,77,77,25,25,19,VK_P,0x50,25,25,XK_p,0x007
> > 0
> >  KEY_LEFTBRACE,26,ANSI_LeftBracket,0x21,26,84,84,26,26,47,VK_OEM_4
> > ,0xdb,26,26,XK_bracketleft,0x005b
> > +KEY_LEFTBRACE,26,ANSI_LeftBracket,0x21,26,84,84,26,26,47,VK_OEM_4
> > ,0xdb,26,26,XK_braceleft,0x007b
> >  KEY_RIGHTBRACE,27,ANSI_RightBracket,0x1e,27,91,91,27,27,48,VK_OEM
> > _6,0xdd,27,27,XK_bracketright,0x005d
> > +KEY_RIGHTBRACE,27,ANSI_RightBracket,0x1e,27,91,91,27,27,48,VK_OEM
> > _6,0xdd,27,27,XK_braceright,0x007d
> >  KEY_ENTER,28,Return,0x24,28,90,90,28,28,40,VK_RETURN,0x0d,28,28,X
> > K_Return,0xff0d
> >  KEY_LEFTCTRL,29,Control,0x3b,29,20,17,29,29,224,VK_LCONTROL,0xa2,
> > 29,29,XK_Control_L,0xffe3
> >  KEY_LEFTCTRL,29,Control,0x3b,29,20,17,29,29,224,VK_CONTROL,0x11,2
> > 9,29,XK_Control_L,0xffe3
> > @@ -55,15 +69,19 @@
> > KEY_H,35,ANSI_H,0x4,35,51,51,35,35,11,VK_H,0x48,35,35,XK_h,0x0068
> >  KEY_J,36,ANSI_J,0x26,36,59,59,36,36,13,VK_J,0x4a,36,36,XK_J,0x004
> > a
> >  KEY_J,36,ANSI_J,0x26,36,59,59,36,36,13,VK_J,0x4a,36,36,XK_j,0x006
> > a
> >  KEY_K,37,ANSI_K,0x28,37,66,66,37,37,14,VK_K,0x4b,37,37,XK_K,0x004
> > b
> > -KEY_K,37,ANSI_K,0x28,37,66,66,37,37,14,VK_K,0x4b,37,37,XK_K,0x006
> > b
> > +KEY_K,37,ANSI_K,0x28,37,66,66,37,37,14,VK_K,0x4b,37,37,XK_k,0x006
> > b
> >  KEY_L,38,ANSI_L,0x25,38,75,75,38,38,15,VK_L,0x4c,38,38,XK_L,0x004
> > c
> >  KEY_L,38,ANSI_L,0x25,38,75,75,38,38,15,VK_L,0x4c,38,38,XK_l,0x006
> > c
> >  KEY_SEMICOLON,39,ANSI_Semicolon,0x29,39,76,76,39,39,51,VK_OEM_1,0
> > xba,39,39,XK_semicolon,0x003b
> > +KEY_SEMICOLON,39,ANSI_Semicolon,0x29,39,76,76,39,39,51,VK_OEM_1,0
> > xba,39,39,XK_colon,0x003a
> >  KEY_APOSTROPHE,40,ANSI_Quote,0x27,40,82,82,40,40,52,VK_OEM_7,0xde
> > ,40,40,XK_apostrophe,0x0027
> > +KEY_APOSTROPHE,40,ANSI_Quote,0x27,40,82,82,40,40,52,VK_OEM_7,0xde
> > ,40,40,XK_quotedbl,0x0022
> >  KEY_GRAVE,41,ANSI_Grave,0x32,41,14,14,41,41,53,VK_OEM_3,0xc0,41,4
> > 1,XK_grave,0x0060
> > +KEY_GRAVE,41,ANSI_Grave,0x32,41,14,14,41,41,53,VK_OEM_3,0xc0,41,4
> > 1,XK_asciitilde,0x007e
> >  KEY_SHIFT,42,Shift,0x38,42,18,18,42,42,225,VK_SHIFT,0x10,42,42,XK
> > _Shift_L,0xffe1
> >  KEY_LEFTSHIFT,42,Shift,0x38,42,18,18,42,42,225,VK_LSHIFT,0xa0,42,
> > 42,XK_Shift_L,0xffe1
> >  KEY_BACKSLASH,43,ANSI_Backslash,0x2a,43,93,93,43,43,50,VK_OEM_5,0
> > xdc,43,43,XK_backslash,0x005c
> > +KEY_BACKSLASH,43,ANSI_Backslash,0x2a,43,93,93,43,43,50,VK_OEM_5,0
> > xdc,43,43,XK_bar,0x007c
> >  KEY_Z,44,ANSI_Z,0x6,44,26,26,44,44,29,VK_Z,0x5a,44,44,XK_Z,0x005a
> >  KEY_Z,44,ANSI_Z,0x6,44,26,26,44,44,29,VK_Z,0x5a,44,44,XK_z,0x007a
> >  KEY_X,45,ANSI_X,0x7,45,34,34,45,45,27,VK_X,0x58,45,45,XK_X,0x0058
> > @@ -79,8 +97,11 @@
> > KEY_N,49,ANSI_N,0x2d,49,49,49,49,49,17,VK_N,0x4e,49,49,XK_n,0x006e
> >  KEY_M,50,ANSI_M,0x2e,50,58,58,50,50,16,VK_M,0x4d,50,50,XK_M,0x004
> > d
> >  KEY_M,50,ANSI_M,0x2e,50,58,58,50,50,16,VK_M,0x4d,50,50,XK_m,0x006
> > d
> >  KEY_COMMA,51,ANSI_Comma,0x2b,51,65,65,51,51,54,VK_OEM_COMMA,0xbc,
> > 51,51,XK_comma,0x002c
> > +KEY_COMMA,51,ANSI_Comma,0x2b,51,65,65,51,51,54,VK_OEM_COMMA,0xbc,
> > 51,51,XK_less,0x003c
> >  KEY_DOT,52,ANSI_Period,0x2f,52,73,73,52,52,55,VK_OEM_PERIOD,0xbe,
> > 52,52,XK_period,0x002e
> > +KEY_DOT,52,ANSI_Period,0x2f,52,73,73,52,52,55,VK_OEM_PERIOD,0xbe,
> > 52,52,XK_greater,0x003e
> >  KEY_SLASH,53,ANSI_Slash,0x2c,53,74,74,53,53,56,VK_OEM_2,0xbf,53,5
> > 3,XK_slash,0x002f
> > +KEY_SLASH,53,ANSI_Slash,0x2c,53,74,74,53,53,56,VK_OEM_2,0xbf,53,5
> > 3,XK_question,0x003f
> >  KEY_RIGHTSHIFT,54,RightShift,0x3c,54,89,89,54,54,229,VK_RSHIFT,0x
> > a1,54,54,XK_Shift_R,0xffe2
> >  KEY_KPASTERISK,55,ANSI_KeypadMultiply,0x43,55,124,126,55,55,85,VK
> > _MULTIPLY,0x6a,55,55,XK_multiply,0x00d7
> >  KEY_LEFTALT,56,Option,0x3a,56,17,25,56,56,226,VK_LMENU,0xa4,56,56
> > ,XK_Alt_L,0xffe9
> > @@ -114,9 +135,9 @@
> > KEY_KP0,82,ANSI_Keypad0,0x52,82,112,112,82,82,98,VK_NUMPAD0,0x60,8
> > 2,82,XK_KP_0,0
> >  KEY_KPDOT,83,ANSI_KeypadDecimal,0x41,83,113,113,83,83,99,VK_DECIM
> > AL,0x6e,83,83,XK_KP_Decimal,0xffae
> >  ,84,,,,,,,84,,,,,
> >  KEY_ZENKAKUHANKAKU,85,,,118,95,,,118,148,,,,
> > -KEY_102ND,86,,,86,97,19,,86,100,VK_OEM_102,0xe1,,
> > -KEY_F11,87,F11,0x67,87,120,86,101,87,68,VK_F11,0x7a,,
> > -KEY_F12,88,F12,0x6f,88,7,94,102,88,69,VK_F12,0x7b,,
> > +KEY_102ND,86,,,86,97,19,,86,100,VK_OEM_102,0xe1,86,86,,
> > +KEY_F11,87,F11,0x67,87,120,86,101,87,68,VK_F11,0x7a,87,87,XK_F11,
> > 0xffc8
> > +KEY_F12,88,F12,0x6f,88,7,94,102,88,69,VK_F12,0x7b,88,88,XK_F12,0x
> > ffc9
> >  KEY_RO,89,,,115,81,,,115,135,,,,
> >  KEY_KATAKANA,90,JIS_Kana????,0x68,120,99,,,120,146,VK_KANA,0x15,,
> >  KEY_HIRAGANA,91,,,119,98,,,119,147,,,,
> 
> I don't know how this file works 

it translates keycodes to "hardware" codes

> but looks like there are lot of shift
> keys which are supposed to be layout bound.
> Why without all these shift codes keyboard was working?

It wasn't working, keycodes were missing. One can check for instance
using GDK_BACKEND=broadway

broadwayd & GDK_BACKEND=broadway spicy

> Your shift keys for instance match English keyboard but not a German
> like
> https://commons.wikimedia.org/wiki/User:Karl432#/media/File:German-K
> eyboard-Layout-T2-Version2-large.png
> 
> Frediano


More information about the Spice-devel mailing list