fix: support non-Latin keyboard layouts (e.g., Korean IME) for keybindings
Summary
- Fix keybindings not working when using non-Latin keyboard layouts (e.g., Korean, Japanese, Chinese IME)
Problem
When Kitty keyboard protocol is enabled, pressing Ctrl+C with Korean IME active sends:
\x1b[12618::99;5u(codepoint=12618 which is 'ㅊ', baseCode=99 which is 'c')
The keybind system was only checking name ('ㅊ') and ignoring baseCode ('c'), causing keybindings to fail.
Solution
Use baseCode (base layout codepoint) when available in keybind matching. This correctly identifies the physical key regardless of the active keyboard layout.
Changes
keybind.ts: UsebaseCodewhen available for key name resolutionapp.tsx: AddbaseCodecheck inErrorComponent(renders outsideKeybindProvider, so needs explicit handling)
Future Improvement
After opentui#426 is released, upgrading the @opentui/core dependency will provide this fix at the parser level, making the app.tsx change unnecessary.
Related: https://github.com/sst/opentui/commit/4a8442193e972c7649a195fad5578b511916e5c9
That PR is merged, I'll release and upgrade opentui later.
@kommander Hi, I saw opentui 0.1.63 got released and we're now using it since 7f5e30834f6c541a5abce2f6e7160f2b79c407b7. Maybe we can merge this PR?