RFR: 8308644: [Linux] Simplify and fix small bugs on glass key related events
Thiago Milczarek Sayao
tsayao at openjdk.org
Tue May 23 22:42:02 UTC 2023
On Tue, 23 May 2023 16:30:38 GMT, Martin Fox <duke at openjdk.org> wrote:
>> 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.
>
> modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp line 479:
>
>> 477:
>> 478: // do not send undefined keys
>> 479: if (glassKey > 0) {
>
> I haven't run this code but this looks wrong. There are many keys which don't have key codes including most characters with accents or other diacritic marks (like ñ on a Spanish layout). These have always generated PRESSED and RELEASED events with undefined key codes.
I thought it was better to not generate a KEY_PRESS event if it's a undefined key. Does it have any use?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1143#discussion_r1203109095
More information about the openjfx-dev
mailing list