This repository has been archived by the owner on Apr 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 301
Fix #396, #542 - IME and Dead Key support #716
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Excited to see this being worked on, thanks! |
badosu
reviewed
Sep 27, 2017
browser/src/Editor/NeovimInput.tsx
Outdated
return | ||
} | ||
private _onKeyDown(evt: React.KeyboardEvent<HTMLInputElement>) { | ||
// 'Process' means hand-off to the IME - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
bryphe
changed the title
[WIP] IME and Dead Key support
Fix #396, #542 - IME and Dead Key support
Sep 28, 2017
This was referenced Oct 2, 2017
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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