You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.0 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2013-08-28 21:37:03 +0000, Daniel Gibson wrote:
Created attachment 1310
Patch to generate SDL_KEYDOWN/UP events for dead keys
Pressing dead keys (e.g. ^ or `) on Linux/X11 doesn't generate SDL_KEYDOWN events, pressing another key afterwards (like for composition) just generates a "The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list sdl@libsdl.org X11 KeyCode 0 (-8), X11 KeySym 0x0 ((null))." message.
This is because XFilterEvent() (at the beginning of X11_DispatchEvent() in SDL_x11events.c) returns True for dead keys, so those events are discarded.
I also found out that XFilterEvents actually changes the events.
(Some more information can be found at http://forums.libsdl.org/viewtopic.php?p=38900# 38900 - note that for some reason the forum transformed "â" to "â")
I wrote a patch that in case of KeyPress/KeyRelease events saves the type and the KeyCode and, if XFilterEvent() decides to filter the event, calls SDL_SendKeyboardKey() accordingly.
This yields a similar behavior like SDL2 on Windows: There is a SDL_TEXTINPUT event with the composed char, but there are also two SDL_KEYDOWN events for the keys.
One small issue is that is that the SDL Keycode isn't the same as with the corresponding nodeadkey layout, but seems to be a direct translation of the Scancode.
E.g. on my (german) layout, The ^ key (below Esc) generates a SDL_SCANCODE_GRAVE (), but a ^ Keycode without dead keys. With dead keys enabled it generates the same Scancode, but a Keycode.
Probably X11 doesn't provide a proper mapping for that key because it's dead anyway, so the default is used.
I think that this is acceptable though and better than no key event at all (like it's the case right now).
On 2013-08-28 21:38:31 +0000, Daniel Gibson wrote:
Created attachment 1311
Small test-program that prints key events
On 2014-01-15 20:15:11 +0000, Daniel Gibson wrote:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2013-08-28 21:37:03 +0000, Daniel Gibson wrote:
On 2013-08-28 21:38:31 +0000, Daniel Gibson wrote:
On 2014-01-15 20:15:11 +0000, Daniel Gibson wrote:
On 2015-02-09 02:53:16 +0000, Daniel Gibson wrote:
On 2015-12-31 05:01:21 +0000, Ryan C. Gordon wrote:
On 2016-10-01 21:11:44 +0000, Sam Lantinga wrote:
On 2016-10-01 21:11:53 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: