WSA
WSA copied to clipboard
KeyEvent.getRepeatCount() always returns 0
Steps to reproduce
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
Log.d("KEY", "ACTION_DOWN");
}
return super.dispatchKeyEvent(event);
}
✔️ Expected Behavior
The event should be displayed only once when the key is held down.
❌ Actual Behavior
The event is displayed many times, which causes unexpected effects.
Other Software
No response
Please specify the version of Windows Subsystem for Android
2208.40000.5.0
Thanks for bringing this to our attention. We should be able to fix this issue.
I checked in a fix. It will be available in WSA's 2301 build early next year.