While working on IME I noticed this code could be simplified, so I removed the `g_hash_table` usage for a simple struct ordered for binary search (I'm sure it's ordered because I did a simple app to generate it ordered).
This also fixes: - UNKNOWN key codes being sent on KEY_PRESS; - Alt Gr is now working; - Replaced X calls with GDK calls for key locked check for as a small step towards supporting Wayland in the future - Added missing mappings (for F13 - F24 and dead keys) - Linux does not send dead keys as keypress but sends as key release, and they might be used on a robot test, so it's now covered. ------------- Commit messages: - Remove print statement - Use GDK instead of X calls (to ease in a future wayland implementation) - Avoid sending unknown key event - GDK_META_MASK is not ALT - Map Alt Gr key which is named GDK_KEY_ISO_Level3_Shift - Remove duplicated entry - Add missing mappings - Remove unused preprocessor - Add note - Replace g_hash_map for a binary search Changes: https://git.openjdk.org/jfx/pull/1143/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1143&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8308644 Stats: 320 lines in 3 files changed: 31 ins; 55 del; 234 mod Patch: https://git.openjdk.org/jfx/pull/1143.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1143/head:pull/1143 PR: https://git.openjdk.org/jfx/pull/1143