Filter hardware keyboard keys through IMF for Hangul input#178
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors Tizen text input handling by replacing assertions with null-pointer checks on the IMF context, managing the active editing state, and introducing key filtering via ShouldFilterKey to exclude navigation and system keys. It also updates the IMF context reset logic to occur conditionally. Review feedback recommends simplifying a TextRange comparison using the inequality operator and declaring the static array of navigation keys as constexpr.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
a3c0b85 to
c41dd7f
Compare
When a hardware keyboard is connected, the input panel is usually not shown, and key events were never routed to the IMF. As a result, the Hangul/English toggle key was ignored and Hangul composition was impossible. Now key events are filtered through the IMF while a text field is being edited, even when the input panel is hidden. Behavior while the panel is shown is unchanged. Navigation and system keys (direction keys, Return, Select, XF86 keys) always bypass the IMF when the panel is hidden so that app navigation and TV remote control keep working. A TextInputType.none client keeps the IMF context focused with the panel disabled, so it also accepts hardware keyboard composition without showing the on-screen keyboard. Also hardens the surrounding IMF handling: - TextInput.setClient resets the IMF context so that a composition pending from the previous client cannot leak into the new client. - TextInput.setEditingState resets the IMF context only when the new state differs from the current model, so a state echoed back by the framework no longer cancels an ongoing composition. - All TizenInputMethodContext methods are guarded against a null imf_context_ (e.g. on images without an ISE). - The input panel is treated as shown during the WILL_SHOW transition so that keys arriving mid-transition are not misjudged as hidden-path input. - Ecore_Event_Key in HandleNuiKeyEvent is zero-initialized; its compose and dev members were read uninitialized when converting to an Ecore_IMF event.
c41dd7f to
53ae034
Compare
With a hardware keyboard the input panel is usually hidden and key events never reached the IMF, so the Hangul/English toggle key was ignored and Hangul composition was impossible. Route key events through the IMF whenever a text field is being edited, regardless of panel visibility. Navigation and system keys (direction keys, Return, Select, XF86 keys) still bypass the IMF when the panel is hidden so app navigation and TV remote control keep working.
#173