Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remapped keys in X11 have their original value in druid #1633

Closed
SimonTeixidor opened this issue Mar 4, 2021 · 8 comments · Fixed by #1779
Closed

Remapped keys in X11 have their original value in druid #1633

SimonTeixidor opened this issue Mar 4, 2021 · 8 comments · Fixed by #1779
Labels
bug does not behave the way it is supposed to shell/x11 concerns the X11 backend

Comments

@SimonTeixidor
Copy link

I remap my Caps Lock key to Escape using the following file in /etc/X11/xorg.conf.d/00-keyboard.conf:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbOptions" "caps:escape"
EndSection

When I press the escape key in my druid application, using the X11 backend, I receive a KeyEvent where both key and code are mapped to CapsLock.

The remapping works in every other application installed in my system, so this was pretty surprising behaviour.

@luleyleo luleyleo added bug does not behave the way it is supposed to shell/x11 concerns the X11 backend labels Mar 5, 2021
@cmyr
Copy link
Member

cmyr commented Mar 6, 2021

interesting. I'm not sure exactly what the x11 backend is doing for key handling; if you wanted to investigate this a bit further you might check to see what that event_viewer example shows when you use this key; it's possible that we're using a raw scan code or something instead of asking the platform to check the key mapping?

@jneem
Copy link
Collaborator

jneem commented Mar 6, 2021

we're currently using a hard-coded mapping (see druid-shell/src/platform/x11/keycodes.rs) when we should be asking X11 about the keyboard mapping. I don't actually see how to do this easily with the x11rb crate, though (@psychon ?). In Xlib, it's the XKeycodeToKeysym function and in xcb it's apparently xcb_key_symbols_get_keysym

@psychon
Copy link
Contributor

psychon commented Mar 6, 2021

@jneem xkbcommon is the library that does the necessary magic. It is written in C and does some quite non-trivial stuff.

Looking at the "X11 stuff" that gvim does (xtrace -o /tmp/trace.txt gvim), apparently the keyboard map is hidden in stuff like this:

000:<:0339: 28: XKEYBOARD-Request(135,8): GetMap deviceSpec=UseCoreKbd(256) full=71 partial=0 firstType=0 nTypes=0 firstKeySym=0 nKeySyms=0 firstKeyAct=0 nKeyActs=0 firstKeyBehavior=0 nKeyBehaviors=0 virtualMods=0
000:>:0339:5828: Reply to GetMap: deviceID=57 minKeyCode=8 maxKeyCode=255 present=71 firstType=0 nTypes=28 totalTypes=28 firstKeySym=8 totalSyms=460 nKeySyms=248 firstKeyAct=0 totalActs=0 nKeyActs=0 firstKeyBehavior=0 nKeyBehaviors=0 totalKeyBehaviors=0 firstKeyExplicit=0 nKeyExplicit=0 totalKeyExplicit=0 firstModMapKey=8 nModMapKeys=248 totalModMapKeys=13 firstVModMapKey=0 nVModMapKeys=0 totalVModMapKeys=0 virtualMods=65535 not-yet-supported=0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x02,0x02,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x11,0x01,0x01,0x00,0x02,0x02,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x10,0x01,0x00,0x01,0x00,0x00,0x00,0x09,0x01,0x02,0x00,0x02,0x01,0x00,0x00,0x01,0x09,0x01,0x01,0x02,0x00,0x00,0x00,0x40,0x40,0x00,0x00,0x02,0x01,0x00,0x00,0x01,0x40,0x01,0x40,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x02,0x01,0x00,0x00,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00,0x08,0x00,0x02,0x00,0x02,0x01,0x00,0x00,0x01,0x08,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x8d,0x05,0x06,0x00,0x05,0x04,0x01,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x0c,0x04,0x04,0x02,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x87,0x07,0x04,0x00,0x08,0x0f,0x00,0x00,0x01,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x83,0x02,0x03,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x82,0x03,0x02,0x04,0x00,0x00,0x00,0x01,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x01,0x07,0x04,0x07,0x00,0x00,0x00,0x00,0x01,0x05,0x05,0x05,0x00,0x00,0x00,0x00,0x01,0x06,0x05,0x06,0x00,0x00,0x00,0x00,0x01,0x84,0x06,0x04,0x04,0x00,0x00,0x00,0x01,0x87,0x06,0x07,0x04,0x00,0x00,0x00,0x01,0x85,0x07,0x05,0x04,0x00,0x00,0x00,0x01,0x86,0x07,0x06,0x04,0x00,0x00,0x00,0x81,0x01,0x04,0x00,0x03,0x03,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x02,0x01,0x04,0x00,0x00,0x00,0x81,0x01,0x04,0x01,0x08,0x07,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x05,0x01,0x00,0x01,0x00,0x00,0x01,0x80,0x06,0x00,0x04,0x01,0x00,0x00,0x01,0x81,0x07,0x01,0x04,0x01,0x00,0x00,0x83,0x03,0x04,0x01,0x08,0x0d,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x82,0x03,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x02,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x05,0x01,0x00,0x01,0x00,0x00,0x00,0x02,0x05,0x02,0x00,0x01,0x00,0x00,0x01,0x80,0x06,0x00,0x04,0x01,0x00,0x00,0x01,0x81,0x07,0x01,0x04,0x01,0x00,0x00,0x01,0x82,0x07,0x02,0x04,0x01,0x00,0x00,0x01,0x83,0x06,0x03,0x04,0x01,0x00,0x00,0x93,0x03,0x05,0x01,0x08,0x1c,0x01,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x05,0x01,0x00,0x01,0x00,0x00,0x01,0x80,0x06,0x00,0x04,0x01,0x00,0x00,0x01,0x81,0x07,0x01,0x04,0x01,0x00,0x00,0x01,0x10,0x04,0x00,0x01,0x00,0x00,0x00,0x01,0x11,0x05,0x01,0x01,0x00,0x00,0x00,0x01,0x90,0x06,0x00,0x05,0x00,0x00,0x00,0x01,0x91,0x07,0x01,0x05,0x00,0x00,0x00,0x01,0x11,0x01,0x01,0x01,0x01,0x00,0x00,0x01,0x90,0x02,0x00,0x05,0x01,0x00,0x00,0x01,0x91,0x03,0x01,0x05,0x01,0x00,0x00,0x01,0x03,0x01,0x03,0x00,0x00,0x00,0x00,0x01,0x82,0x02,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x02,0x04,0x02,0x00,0x01,0x00,0x00,0x00,0x03,0x05,0x03,0x00,0x01,0x00,0x00,0x01,0x82,0x06,0x02,0x04,0x01,0x00,0x00,0x01,0x83,0x07,0x03,0x04,0x01,0x00,0x00,0x01,0x12,0x04,0x02,0x01,0x00,0x00,0x00,0x01,0x13,0x05,0x03,0x01,0x00,0x00,0x00,0x01,0x92,0x06,0x02,0x05,0x00,0x00,0x00,0x01,0x93,0x07,0x03,0x05,0x00,0x00,0x00,0x01,0x13,0x01,0x03,0x01,0x01,0x00,0x00,0x01,0x92,0x02,0x02,0x05,0x01,0x00,0x00,0x01,0x93,0x03,0x03,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x93,0x03,0x05,0x01,0x08,0x1c,0x01,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x05,0x01,0x00,0x01,0x00,0x00,0x01,0x80,0x06,0x00,0x04,0x01,0x00,0x00,0x01,0x81,0x07,0x01,0x04,0x01,0x00,0x00,0x01,0x10,0x04,0x00,0x01,0x00,0x00,0x00,0x01,0x11,0x05,0x01,0x01,0x00,0x00,0x00,0x01,0x90,0x06,0x00,0x05,0x00,0x00,0x00,0x01,0x91,0x07,0x01,0x05,0x00,0x00,0x00,0x01,0x11,0x01,0x01,0x01,0x01,0x00,0x00,0x01,0x90,0x02,0x00,0x05,0x01,0x00,0x00,0x01,0x91,0x03,0x01,0x05,0x01,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x82,0x02,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x02,0x04,0x02,0x00,0x01,0x00,0x00,0x00,0x03,0x05,0x03,0x00,0x01,0x00,0x00,0x01,0x82,0x06,0x02,0x04,0x01,0x00,0x00,0x01,0x83,0x07,0x03,0x04,0x01,0x00,0x00,0x01,0x12,0x04,0x02,0x01,0x00,0x00,0x00,0x01,0x13,0x05,0x03,0x01,0x00,0x00,0x00,0x01,0x92,0x06,0x02,0x05,0x00,0x00,0x00,0x01,0x93,0x07,0x03,0x05,0x00,0x00,0x00,0x01,0x12,0x01,0x02,0x01,0x01,0x00,0x00,0x01,0x92,0x03,0x02,0x05,0x01,0x00,0x00,0x01,0x93,0x02,0x03,0x05,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x03,0x04,0x01,0x08,0x0e,0x01,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x82,0x02,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x05,0x01,0x00,0x01,0x00,0x00,0x00,0x02,0x05,0x02,0x00,0x01,0x00,0x00,0x00,0x03,0x05,0x03,0x00,0x01,0x00,0x00,0x01,0x80,0x06,0x00,0x04,0x01,0x00,0x00,0x01,0x81,0x07,0x01,0x04,0x01,0x00,0x00,0x01,0x82,0x06,0x02,0x04,0x01,0x00,0x00,0x01,0x83,0x07,0x03,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x00,0x00,0x81,0x01,0x04,0x00,0x04,0x03,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x83,0x03,0x04,0x00,0x04,0x06,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x82,0x03,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x02,0x03,0x04,0x00,0x00,0x00,0x83,0x03,0x04,0x00,0x04,0x06,0x01,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x82,0x02,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x03,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x02,0x02,0x00,0x00,0x91,0x01,0x05,0x00,0x04,0x07,0x00,0x00,0x01,0x11,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x10,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x90,0x02,0x00,0x05,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x91,0x03,0x01,0x05,0x00,0x00,0x00,0x8d,0x05,0x06,0x00,0x04,0x03,0x00,0x00,0x01,0x80,0x01,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x02,0x01,0x04,0x00,0x00,0x00,0x01,0x0c,0x03,0x04,0x02,0x00,0x00,0x00,0x83,0x03,0x04,0x00,0x04,0x06,0x01,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x02,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x82,0x02,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x02,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x03,0x04,0x00,0x05,0x07,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x02,0x04,0x02,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x03,0x00,0x00,0x00,0x00,0x01,0x82,0x02,0x02,0x04,0x00,0x00,0x00,0x01,0x83,0x03,0x03,0x04,0x00,0x00,0x00,0x91,0x01,0x05,0x00,0x04,0x06,0x00,0x00,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x10,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x80,0x02,0x00,0x04,0x00,0x00,0x00,0x01,0x81,0x03,0x01,0x04,0x00,0x00,0x00,0x01,0x90,0x03,0x00,0x05,0x00,0x00,0x00,0x01,0x91,0x02,0x01,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x1b,0xff,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x31,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0xb9,0x00,0x00,0x00,0xa1,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x32,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0xb2,0x00,0x00,0x00,0xc3,0x0a,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x33,0x00,0x00,0x00,0xa7,0x00,0x00,0x00,0xb3,0x00,0x00,0x00,0xa3,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x34,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0xbc,0x00,0x00,0x00,0xa4,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x35,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0xbd,0x00,0x00,0x00,0xc4,0x0a,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x36,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0xac,0x00,0x00,0x00,0xc5,0x0a,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x37,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x7b,0x00,0x00,0x00,0xc6,0x0a,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x38,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x5b,0x00,0x00,0x00,0xc9,0x0a,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x39,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x5d,0x00,0x00,0x00,0xb1,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x30,0x00,0x00,0x00,0x3d,0x00,0x00,0x00,0x7d,0x00,0x00,0x00,0xb0,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xdf,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x9e,0x1e,0x00,0x01,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x51,0xfe,0x00,0x00,0x50,0xfe,0x00,0x00,0x5b,0xfe,0x00,0x00,0x5c,0xfe,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0x08,0xff,0x00,0x00,0x08,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd5,0xfe,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x09,0xff,0x00,0x00,0x20,0xfe,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x71,0x00,0x00,0x00,0x51,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xd9,0x07,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x77,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0xb3,0x01,0x00,0x00,0xa3,0x01,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x65,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0xac,0x20,0x00,0x00,0xac,0x20,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x72,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xb6,0x00,0x00,0x00,0xae,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x74,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0xbc,0x03,0x00,0x00,0xac,0x03,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x7a,0x00,0x00,0x00,0x5a,0x00,0x00,0x00,0xfb,0x08,0x00,0x00,0xa5,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x75,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0xfe,0x08,0x00,0x00,0xfc,0x08,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x69,0x00,0x00,0x00,0x49,0x00,0x00,0x00,0xfd,0x08,0x00,0x00,0xb9,0x02,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x6f,0x00,0x00,0x00,0x4f,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xd8,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x70,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0xde,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0xfc,0x00,0x00,0x00,0xdc,0x00,0x00,0x00,0x57,0xfe,0x00,0x00,0x58,0xfe,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x2b,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0xaf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x0d,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xe3,0xff,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x61,0x00,0x00,0x00,0x41,0x00,0x00,0x00,0xe6,0x00,0x00,0x00,0xc6,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x73,0x00,0x00,0x00,0x53,0x00,0x00,0x00,0x7f,0x01,0x00,0x01,0x9e,0x1e,0x00,0x01,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x64,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0xd0,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x66,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xf0,0x01,0x00,0x00,0xaa,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x67,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0xbf,0x03,0x00,0x00,0xbd,0x03,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x68,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0xb1,0x02,0x00,0x00,0xa1,0x02,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x6a,0x00,0x00,0x00,0x4a,0x00,0x00,0x00,0x60,0xfe,0x00,0x00,0x56,0xfe,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x6b,0x00,0x00,0x00,0x4b,0x00,0x00,0x00,0xa2,0x03,0x00,0x00,0x26,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x6c,0x00,0x00,0x00,0x4c,0x00,0x00,0x00,0xb3,0x01,0x00,0x00,0xa3,0x01,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0xf6,0x00,0x00,0x00,0xd6,0x00,0x00,0x00,0x59,0xfe,0x00,0x00,0x60,0xfe,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0xe4,0x00,0x00,0x00,0xc4,0x00,0x00,0x00,0x52,0xfe,0x00,0x00,0x5a,0xfe,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x52,0xfe,0x00,0x00,0xb0,0x00,0x00,0x00,0x32,0x20,0x00,0x01,0x33,0x20,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xe1,0xff,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x23,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0xd1,0x0a,0x00,0x00,0x55,0xfe,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x79,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0xbb,0x00,0x00,0x00,0x3a,0x20,0x00,0x01,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x78,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0xab,0x00,0x00,0x00,0x39,0x20,0x00,0x01,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x63,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0xa2,0x00,0x00,0x00,0xa9,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x76,0x00,0x00,0x00,0x56,0x00,0x00,0x00,0xfe,0x0a,0x00,0x00,0xfd,0x0a,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x62,0x00,0x00,0x00,0x42,0x00,0x00,0x00,0xd2,0x0a,0x00,0x00,0xd0,0x0a,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x6e,0x00,0x00,0x00,0x4e,0x00,0x00,0x00,0xd3,0x0a,0x00,0x00,0xd1,0x0a,0x00,0x00,0x16,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x6d,0x00,0x00,0x00,0x4d,0x00,0x00,0x00,0xb5,0x00,0x00,0x00,0xba,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x2c,0x00,0x00,0x00,0x3b,0x00,0x00,0x00,0xb7,0x00,0x00,0x00,0xd7,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x2e,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x26,0x20,0x00,0x01,0xf7,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x2d,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0xaa,0x0a,0x00,0x00,0xa9,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xe2,0xff,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xaa,0xff,0x00,0x00,0xaa,0xff,0x00,0x00,0xaa,0xff,0x00,0x00,0xaa,0xff,0x00,0x00,0x21,0xfe,0x08,0x10,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0xe9,0xff,0x00,0x00,0xe7,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x08,0xff,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xbe,0xff,0x00,0x00,0xbe,0xff,0x00,0x00,0xbe,0xff,0x00,0x00,0xbe,0xff,0x00,0x00,0x01,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xbf,0xff,0x00,0x00,0xbf,0xff,0x00,0x00,0xbf,0xff,0x00,0x00,0xbf,0xff,0x00,0x00,0x02,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc0,0xff,0x00,0x00,0xc0,0xff,0x00,0x00,0xc0,0xff,0x00,0x00,0xc0,0xff,0x00,0x00,0x03,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc1,0xff,0x00,0x00,0xc1,0xff,0x00,0x00,0xc1,0xff,0x00,0x00,0xc1,0xff,0x00,0x00,0x04,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc2,0xff,0x00,0x00,0xc2,0xff,0x00,0x00,0xc2,0xff,0x00,0x00,0xc2,0xff,0x00,0x00,0x05,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc3,0xff,0x00,0x00,0xc3,0xff,0x00,0x00,0xc3,0xff,0x00,0x00,0xc3,0xff,0x00,0x00,0x06,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc4,0xff,0x00,0x00,0xc4,0xff,0x00,0x00,0xc4,0xff,0x00,0x00,0xc4,0xff,0x00,0x00,0x07,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc5,0xff,0x00,0x00,0xc5,0xff,0x00,0x00,0xc5,0xff,0x00,0x00,0xc5,0xff,0x00,0x00,0x08,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc6,0xff,0x00,0x00,0xc6,0xff,0x00,0x00,0xc6,0xff,0x00,0x00,0xc6,0xff,0x00,0x00,0x09,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc7,0xff,0x00,0x00,0xc7,0xff,0x00,0x00,0xc7,0xff,0x00,0x00,0xc7,0xff,0x00,0x00,0x0a,0xfe,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x14,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x95,0xff,0x00,0x00,0xb7,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x97,0xff,0x00,0x00,0xb8,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x9a,0xff,0x00,0x00,0xb9,0xff,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xad,0xff,0x00,0x00,0xad,0xff,0x00,0x00,0xad,0xff,0x00,0x00,0xad,0xff,0x00,0x00,0x23,0xfe,0x08,0x10,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x96,0xff,0x00,0x00,0xb4,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x9d,0xff,0x00,0x00,0xb5,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x98,0xff,0x00,0x00,0xb6,0xff,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xab,0xff,0x00,0x00,0xab,0xff,0x00,0x00,0xab,0xff,0x00,0x00,0xab,0xff,0x00,0x00,0x22,0xfe,0x08,0x10,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x9c,0xff,0x00,0x00,0xb1,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x99,0xff,0x00,0x00,0xb2,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x9b,0xff,0x00,0x00,0xb3,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x9e,0xff,0x00,0x00,0xb0,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x9f,0xff,0x00,0x00,0xac,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x03,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x04,0x04,0x00,0x3c,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x68,0xfe,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc8,0xff,0x00,0x00,0xc8,0xff,0x00,0x00,0xc8,0xff,0x00,0x00,0xc8,0xff,0x00,0x00,0x0b,0xfe,0x08,0x10,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xc9,0xff,0x00,0x00,0xc9,0xff,0x00,0x00,0xc9,0xff,0x00,0x00,0xc9,0xff,0x00,0x00,0x0c,0xfe,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x26,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x25,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x23,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x27,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x22,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x8d,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xe4,0xff,0x00,0x00,0x0c,0x00,0x00,0x00,0x01,0x05,0x05,0x00,0xaf,0xff,0x00,0x00,0xaf,0xff,0x00,0x00,0xaf,0xff,0x00,0x00,0xaf,0xff,0x00,0x00,0x20,0xfe,0x08,0x10,0x09,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x61,0xff,0x00,0x00,0x15,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x03,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x0a,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x50,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x52,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x55,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x51,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x53,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x57,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x54,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x56,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x63,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x12,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x11,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x13,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x2a,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xbd,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb1,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x13,0xff,0x00,0x00,0x6b,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x4a,0xff,0x08,0x10,0x03,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0xae,0xff,0x00,0x00,0xae,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x31,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x34,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xeb,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xec,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x67,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x69,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x66,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x70,0xff,0x05,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x65,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x71,0xff,0x05,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x57,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x6b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x6d,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x68,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x58,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x6a,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x65,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x1d,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x2f,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x2b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x5d,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x7b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x8a,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x41,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x42,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x2e,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x5a,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x2d,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x74,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x7f,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x19,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x30,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x33,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x26,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x27,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x2c,0xff,0x08,0x10,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x2c,0xff,0x08,0x10,0x2c,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x17,0xff,0x08,0x10,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x14,0xff,0x08,0x10,0x31,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x16,0xff,0x08,0x10,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x15,0xff,0x08,0x10,0x2c,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x1c,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x3e,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x6e,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x81,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x18,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x73,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x56,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x78,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x79,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x68,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x66,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x81,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x45,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x46,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x47,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x48,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x49,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb2,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xa9,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb0,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb1,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x7e,0xff,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0xe9,0xff,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0xe7,0xff,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0xeb,0xff,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0xed,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x14,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x31,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x43,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x44,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x4b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xa7,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x56,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x14,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x97,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x61,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x8f,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb6,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x19,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x8e,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x1b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x5f,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x3c,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x5e,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x36,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x69,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x03,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x02,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x32,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x59,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x04,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x06,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x05,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x7b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x72,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x90,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x77,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x5b,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x93,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x94,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x95,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x07,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb4,0xff,0x08,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0xb5,0xff,0x08,0x10,0x10,0x08,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x40,0x40,0x00,0x00,0x00,0x25,0x04,0x32,0x01,0x3e,0x01,0x40,0x08,0x4d,0x10,0x5c,0x80,0x69,0x04,0x85,0x40,0x86,0x40,0xcb,0x80,0xcd,0x08,0xce,0x40,0xcf,0x40,0x00,0x00;
000:<:033a: 12: XKEYBOARD-Request(135,17): GetNames deviceSpec=3 which=vmods,groups
000:>:033a:88: Reply to GetNames: deviceID=3 which=vmods,groups minKeyCode=8 maxKeyCode=255 nTypes=28 groupNames=1 virtualMods=8191 firstKey=8 nKeys=248 indicators=0x00000000 nRadioGroups=0 nKeyAliases=0 nKTLevels=0 valueList=0xbd,0x00,0x00,0x00,0xbe,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xc1,0x00,0x00,0x00,0xc2,0x00,0x00,0x00,0xc3,0x00,0x00,0x00,0xc4,0x00,0x00,0x00,0xc5,0x00,0x00,0x00,0xc6,0x00,0x00,0x00,0xc7,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0xc9,0x00,0x00,0x00,0x2b,0x01,0x00,0x00;

x11rb provides access to these requests and even the full structure of the reply.

I never really looked deeply into xkb. It is the only X11 extension that I know that was designed by a consortium and is documented in a PDF with 168 pages: https://www.x.org/releases/current/doc/kbproto/xkbproto.pdf

xcb_key_symbols_get_keysym

Don't go that way.

Well, actually, if you want, it may be possible and give you 80% keyboard support. xcb-keysyms does not even have much code and can easily be rustified. The downside is that it uses core X11 and not the XKB extension. That means that it more or less will work, but some special cases still will not work. I am not even sure which ones. Keyboard layouts are complicated.

XKeycodeToKeysym

Huh. The source code for that looks almost identical to xcb_key_symbols_get_keysym(). Perhaps the latter is not as bad as I thought? I would have expected to see XKB stuff.

Anyway, just from the API this cannot work for everything: I have a German keyboard layout (de). To enter ^ I first press the key labelled ^ and then the space key. â is entered by pressing a instead of space. Thus, I need to press two keys to enter one character (one unicode codepoint?).

XKeycodeToKeysym cannot support this since it fundamentally assumes that one key corresponds to one key.

xkbcommon has some state struct. You feed it with key codes and you might get some utf8 out or not. This API properly supports dead keys like my ^.

@psychon
Copy link
Contributor

psychon commented Mar 6, 2021

Here is what I replied to the last person looking at xcb-keysyms: psychon/x11rb#316 (comment)

That comment looks into what this library is actually doing and is a "half tutorial" for coding that in Rust. However, I still think that xcb-keysyms is the wrong thing to go to. I think it would actually work for this issue since this is just about "caps lock is now escape", but it cannot properly support dead keys.

And re-writing xkbcommon in Rust is outside of the scope of x11rb. The library is way more than just a thin wrapper around the X11 protocol (well, "thin", the X11 resource stuff really is not thin, but was in scope for x11rb...). That means you need some ffi-based Rust wrapper around the C library.

@cmyr
Copy link
Member

cmyr commented Mar 6, 2021

Anyway, just from the API this cannot work for everything: I have a German keyboard layout (de). To enter ^ I first press the key labelled ^ and then the space key. â is entered by pressing a instead of space. Thus, I need to press two keys to enter one character (one unicode codepoint?).

XKeycodeToKeysym cannot support this since it fundamentally assumes that one key corresponds to one key.

xkbcommon has some state struct. You feed it with key codes and you might get some utf8 out or not. This API properly supports dead keys like my ^.

I would expect the resolution of ^+a to â to happen at a higher level in the API; either in a specific code-path for handling deadkeys or in a full-blown IME, although I don't know anything about how this works in x11.

@psychon
Copy link
Contributor

psychon commented Mar 6, 2021

The proposed wayland backend from #1498 also uses xkbcommon (in fact, AFAIK all wayland clients use xkbcommon; I think xkbcommon was simply created for use with wayland): https://github.com/linebender/druid/pull/1498/files#diff-8fa9b22fdd2f520e900673156a5830f8bda7e68cb9a62eb8d6a1476626924176R200

Perhaps @derekdreery knows a bit more about this xkbcommon stuff.

(There should not be much difference between xkbcommon for wayland and x11, but there are some special x11-specific functions in xkbcommon-x11: https://xkbcommon.org/doc/current/group__x11.html)

@richard-uk1
Copy link
Collaborator

I'm not an expert, but from reading when working on the wayland backend, it seemed that xkbcommon was the way to resolve keys correctly. Note that the wayland backend key mapping isn't fully working yet, and I may learn more as I work on it.

@jneem
Copy link
Collaborator

jneem commented Mar 7, 2021

So I guess the good news is that whatever we do for x11 can be shared with wayland. It also seems like there are rust bindings to xkbcommon. They don't appear to be very actively maintained, though (it's the same maintainer as the xcb crate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug does not behave the way it is supposed to shell/x11 concerns the X11 backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants