{"action":"closed","issue":{"url":"https://api.github.com/repos/LWJGL/lwjgl/issues/28","labels_url":"https://api.github.com/repos/LWJGL/lwjgl/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/LWJGL/lwjgl/issues/28/comments","events_url":"https://api.github.com/repos/LWJGL/lwjgl/issues/28/events","html_url":"https://github.com/LWJGL/lwjgl/issues/28","id":14097528,"number":28,"title":"Key-Locking Behaviour (keysym/keycode-error on keyrelease)","user":{"login":"Drezil","id":961186,"avatar_url":"https://avatars.githubusercontent.com/u/961186?v=3","gravatar_id":"","url":"https://api.github.com/users/Drezil","html_url":"https://github.com/Drezil","followers_url":"https://api.github.com/users/Drezil/followers","following_url":"https://api.github.com/users/Drezil/following{/other_user}","gists_url":"https://api.github.com/users/Drezil/gists{/gist_id}","starred_url":"https://api.github.com/users/Drezil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drezil/subscriptions","organizations_url":"https://api.github.com/users/Drezil/orgs","repos_url":"https://api.github.com/users/Drezil/repos","events_url":"https://api.github.com/users/Drezil/events{/privacy}","received_events_url":"https://api.github.com/users/Drezil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2013-05-08T12:26:14Z","updated_at":"2015-05-22T20:49:05Z","closed_at":"2015-05-22T20:49:05Z","body":"redirected from: https://mojang.atlassian.net/browse/MC-15142\r\n\r\nMinecraft uses KeySym under linux to determine which key was pressed. KeySym by definition only has its value set correctly at keyPRESS - not keyRELEASE.\r\nTo get the real values use the KeyCode.\r\ne.g. having de_de set as default layout yields (in xev):\r\n> KeyPress event, serial 40, synthetic NO, window 0x4600001,\r\n> root 0xa9, subw 0x0, time 1668220, (670,378), root:(672,401),\r\n> state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,\r\n> XLookupString gives 0 bytes: \r\n> XmbLookupString gives 0 bytes: \r\n> XFilterEvent returns: False\r\n> KeyRelease event, serial 40, synthetic NO, window 0x4600001,\r\n> root 0xa9, subw 0x0, time 1668345, (616,314), root:(618,337),\r\n> state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,\r\n> XLookupString gives 0 bytes: \r\n> XFilterEvent returns: False\r\n\r\nbut with de_neo you get:\r\n\r\n> KeyPress event, serial 40, synthetic NO, window 0x4600001,\r\n> root 0xa9, subw 0x0, time 1722888, (608,465), root:(610,488),\r\n> state 0x2000, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,\r\n> XLookupString gives 0 bytes: \r\n> XmbLookupString gives 0 bytes: \r\n> XFilterEvent returns: False\r\n> KeyRelease event, serial 40, synthetic NO, window 0x4600001,\r\n> root 0xa9, subw 0x0, time 1723003, (608,465), root:(610,488),\r\n> state 0x2001, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,\r\n> XKeysymToKeycode returns keycode: 66\r\n> XLookupString gives 0 bytes: \r\n> XFilterEvent returns: False\r\n\r\n(This Effect is a side-effect on having both shift-keys (pressed at the same time) act as Caps-Lock - but thats just a guess).\r\nA similar bug was reported to another application ( https://bugzilla.gnome.org/show_bug.cgi?id=683534#c7 ).\r\nWorkaround:\r\nIf you make de_de the default keyboard-layout and just switch to de_neo, minecraft uses the de_de-Keysym (in every menu - so you have wasd \"set\" for walking), but you still have neo in text-chat (thus having vuia as the keys you actually press for walking).\r\nDoing so, however, disables the Mod4-Switch making 2 of the 6 levels of the neo-layout (see http://www.neo-layout.org for reference) unusable.\r\nThis will affect other layouts where similar behaviour is enforced, too.\r\n\r\nEdit: To make the Mod4-Switch (at least AltGr) workable again i could add an override (\"Key to choose 5th level\" set to \"Right Alt chooses 5th level, locks when pressed together with another 5th-level-chooser\") in the keyboard settings under KDE. YMMV."}}