Commit dd4fa87
committed
Fix non-letter key input in tcore mode
The TIZEN_CORE_WL_EVENT_KEY_DOWN/UP listeners in
TizenWindowTcoreWl::RegisterEventHandlers were passing the wrong
strings into view_delegate_->OnKey(), so punctuation keys
(period, minus, equal, etc.) silently dropped when the IME panel
was hidden.
OnKey's signature is (key, string, compose, ...) where 'string'
is expected to be the printable character produced by the key.
TextInputChannel::HandleKey relies on
`strlen(string) == 1 && IsAsciiPrintableKey(string[0])` to
forward the character to the active TextInputModel.
The ecore_wl2 handler maps:
key <- key_event->key (XKB symbol, e.g. "period")
string <- key_event->string (composed char, e.g. ".")
compose <- key_event->compose
The tcore handler was passing:
key <- keyname (key name, often == keysymbol)
string <- keysymbol (XKB symbol "period", strlen != 1)
compose <- compose
For alphanumeric keys keysymbol is a single character ("a",
"1"), so the fallback in HandleKey() happened to fire. For
punctuation keys keysymbol is the symbol name ("period",
"minus", "equal"), strlen > 1, and the printable-fallback
branch is skipped, so nothing ever reaches the engine.
Pass keysymbol as 'key' and compose (the composed UTF-8 result)
as 'string', matching the ecore_wl2 contract. The IME path keeps
working independently because tizen_core_imf_context_filter_event
does its own keysym -> UTF-8 translation internally.1 parent c5cdbeb commit dd4fa87
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
678 | 686 | | |
679 | 687 | | |
680 | 688 | | |
| |||
718 | 726 | | |
719 | 727 | | |
720 | 728 | | |
721 | | - | |
| 729 | + | |
| 730 | + | |
722 | 731 | | |
723 | 732 | | |
724 | 733 | | |
| |||
0 commit comments