forked from extern/Unexpected-Keyboard
Fix Android's builtin shortcut not working
The 'repeat' field of generated key events was incorrectly set to '1'.
This commit is contained in:
parent
cca832954e
commit
58e37b484c
@ -265,7 +265,7 @@ public class Keyboard2 extends InputMethodService
|
||||
metaState |= KeyEvent.META_ALT_LEFT_ON | KeyEvent.META_ALT_ON;
|
||||
if ((flags & KeyValue.FLAG_SHIFT) != 0)
|
||||
metaState |= KeyEvent.META_SHIFT_LEFT_ON | KeyEvent.META_SHIFT_ON;
|
||||
event = new KeyEvent(1, 1, KeyEvent.ACTION_DOWN, key.eventCode, 1, metaState);
|
||||
event = new KeyEvent(1, 1, KeyEvent.ACTION_DOWN, key.eventCode, 0, metaState);
|
||||
getCurrentInputConnection().sendKeyEvent(event);
|
||||
getCurrentInputConnection().sendKeyEvent(KeyEvent.changeAction(event, KeyEvent.ACTION_UP));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user