Commit eb70fe4
fix(keyboard): filter NumLock modifier for non-numpad keys in scrcpy (#1844)
* Initial plan
* Fix NumLock being sent with space/backspace in scrcpy
Filter out NumLock modifier for non-numpad keys to prevent it from being incorrectly sent to Rime when using scrcpy. This fixes the issue where space key and backspace key were not working properly in scrcpy because NumLock was being sent along with them.
Co-authored-by: WhiredPlanck <47623588+WhiredPlanck@users.noreply.github.com>
* Add missing KeyModifier import
Co-authored-by: WhiredPlanck <47623588+WhiredPlanck@users.noreply.github.com>
* Use explicit bitwise operation to clear NumLock modifier
Address code review feedback to use KeyModifier.Mod2.modifier explicitly with bitwise AND and inversion instead of the minus operator.
Co-authored-by: WhiredPlanck <47623588+WhiredPlanck@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: WhiredPlanck <47623588+WhiredPlanck@users.noreply.github.com>1 parent 18ae23d commit eb70fe4
File tree
1 file changed
+7
-1
lines changed- app/src/main/java/com/osfans/trime/ime/core
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
668 | 669 | | |
669 | 670 | | |
670 | 671 | | |
671 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
672 | 678 | | |
673 | 679 | | |
674 | 680 | | |
| |||
0 commit comments