-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
druid-shell IME api, take two #1619
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
cmyr
force-pushed
the
ime-take-two
branch
2 times, most recently
from
March 5, 2021 17:17
b91c473
to
8d9634d
Compare
cmyr
commented
Mar 6, 2021
cmyr
force-pushed
the
ime-take-two
branch
2 times, most recently
from
March 8, 2021 18:34
648e403
to
846d1d8
Compare
Adds APIs for cross-platform text input, and an initial implementation of text input on macOS that allows for dead keys, IME input for Chinese, Japanese, etc. On other platforms, the text input method calls are simulated from key_down events, as a temporary measure until we can properly implement input methods on those platforms. Also adds a new druid-shell example, `edit_text`, which is a rough, LTR and single-line only implementation of the text input APIs to demonstrate that they work correctly. A massive thanks to yvt's library tcw3 (https://github.com/yvt/Stella2), which was a fantastic blueprint for the structure of this API, as well as indispensable reference when implementing the macOS text input interfaces.
Co-authored-by: Colin Rofls <[email protected]>
Also contains various small API renamings in response to code review comments.
This started out as me wanting to just rewrap everything to 80 columns, and then turned into a few little additional touchups.
We'll need something like this in druid, because we need to know when we have to update the app data.
This isn't great, but it adds tab/return/delete, which feels like the bare minimum; we can implement more as future work.
Okay I'm going to take a self-review on this, it's mostly the same code as #1378, which has already been reviewed. |
Sorry, just saw this! It looks great to me! |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This supersedes #1378; I'm going to use this branch to make some tweaks to the API, and eventually to integrate this into the druid textbox.
cc @lord, in case you'd like to follow along with some of this stuff.
The main change I'm envisioning currently is to have separate
acquire
andrelease
methods for the locking, because druid needs some callback to know if it has to update the app data.