Page MenuHome

Attempt to fix T47228: Ghost not handling predictably keycodes when first keymap is non-latin
ClosedPublic

Authored by Bastien Montagne (mont29) on Jan 25 2016, 4:08 PM.

Details

Summary

So… This patch seems to work fine here (tested with russian + french layout), but… it makes no sense at all.

Reading XLib source, both XLookupKeysym() and XLookupString() make roughly the same thing to convert a keycode into a keysym (the later being slightly more 'refined' than the former). And yet we get very different results (to summarize, XLookupKeysym() seems to retrieve key_sym matching first defined keymap, while XLookupString() seems to retrieve proper key_sym from current active keymap).

@Sergey Sharybin (sergey), @Campbell Barton (campbellbarton), do you guys have some clue here?

Diff Detail

Repository
rB Blender

Event Timeline

Bastien Montagne (mont29) retitled this revision from to Attempt to fix T47228: Ghost not handling predictably keycodes when first keymap is non-latin.
Bastien Montagne (mont29) updated this object.
Bastien Montagne (mont29) set the repository for this revision to rB Blender.
Campbell Barton (campbellbarton) edited edge metadata.

@Bastien Montagne (mont29), man you play with fire!

Its real hard to guess how these kinds of edits backfire. besides doing simple test (works fine here).

Suggest to commit this under and ifdef like we have for USE_UNITY_WORKAROUND (eg USE_NON_LATIN_KB_WORKAROUND).

This revision is now accepted and ready to land.Jan 28 2016, 7:37 AM
This revision was automatically updated to reflect the committed changes.