Skip to content
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

Fix Again KP_X Issue #1542

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Fix Again KP_X Issue #1542

merged 2 commits into from
Jan 2, 2025

Conversation

goofyz
Copy link
Collaborator

@goofyz goofyz commented Jan 2, 2025

Pull request

Issue tracker

Fixes will automatically close the related issues

Fixes #1524

Feature

My bad. Previous fix in f83d28c will cause KP_X keys not working in normal text field.
This fix will let KP_X working correctly in normal & number text field.

Code of conduct

Code style

Build pass

  • make debug

Manually test

  • Done

Code Review

  1. No wildcards import
  2. Manual build and test pass
  3. GitHub Action CI pass
  4. At least one contributor review and approve
  5. Merged clean without conflicts
  6. PR will be merged by rebase upstream base

Daily build

Login and download artifact at https://github.com/osfans/trime/actions

Additional Info

goofyz added 2 commits January 2, 2025 10:13
Those keys are already handled in `CommonKeyboardActionListener`, so ignoring those keys here.
Removing the related codes in `CommonKeyboardActionListener` will make `KP_X` keys not working
in normal text field.
@goofyz goofyz requested a review from WhiredPlanck January 2, 2025 02:54
sendDownKeyEvent(eventTime, keyCode, it.modifiers.metaState)

if (keyCode in KeyEvent.KEYCODE_NUMPAD_0..KeyEvent.KEYCODE_NUMPAD_EQUALS) {
// ignore KP_X keys, which is handled in `CommonKeyboardActionListener`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This may cause IMS cannot reponse the corresponding keyevent from physical keyboard, maybe we should tell if the keyevent is from virtual keyboard or physical keyboard. But now, let us workaround for virtual keyboard first.

@goofyz goofyz merged commit 46916af into osfans:develop Jan 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

使用 KP_* 定义的数字键盘会重复输入
2 participants