Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Fix #396, #542 - IME and Dead Key support #716

Merged
merged 29 commits into from
Sep 28, 2017

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Sep 26, 2017

Issue: Oni today does not support 'dead keys' or IME on all platforms, and this is a blocker for several users using non-US keyboard layouts.

Defect: The browser (and Electron by extension) does support dead keys and IME out of the box - for form fields, text areas, etc. However, Oni's current input strategy just tacks a keydown handler on the document body. This is sufficient for US keyboard layouts, but for IME / dead-keys, this isn't handled correctly on all platforms.

Fix: Use a hidden input field to support the IME and dead-key scenario. In non-IME/dead key cases, the input will pass-through as it does today (resolving via the strategy in Keyboard.ts). When we detect dead key or IME composition, the text field will become visible, to give feedback on the composition.

Once completed, this would address a class of the issues around keyboard input - like #542, #396, and #638

@badosu
Copy link
Collaborator

badosu commented Sep 26, 2017

Excited to see this being worked on, thanks!

return
}
private _onKeyDown(evt: React.KeyboardEvent<HTMLInputElement>) {
// 'Process' means hand-off to the IME -
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏 👏

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅

@bryphe bryphe changed the title [WIP] IME and Dead Key support Fix #396, #542 - IME and Dead Key support Sep 28, 2017
@bryphe bryphe merged commit 700884b into master Sep 28, 2017
@bryphe bryphe deleted the extr0py/396/ime-and-dead-key-support branch September 28, 2017 02:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants