Open
Conversation
This file contains hidden or 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
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.
Symptom
Given that:
When the user releases the key
Then the user sees that the key is being pressed forever (until esc is pressed or the user switches away from Anthy)
Expected
Given that:
When the user releases the key
Then the user sees that the key press does not automatically repeat itself in the text field
Root Cause
For keys that are neither thumb shift keys nor text keys, only the key press is processed. The key release is ignored by
__process_key_event_thumb().For illustration, please compare the if statements between the pressed handling and the released handling in engine/python3/engine.py.
Key Release:
Key Press:
Hopefully this comparison is clear enough to show that
cmd_exec()does not have a corresponding key release action.Solution
Steps:
a. fire release for the previous key press (if present)
b. reset the key press storage
c. hand the current key release back to IBus
Remarks
Please feel free to let me know about any practice that I should follow for this project.