WSA icon indicating copy to clipboard operation
WSA copied to clipboard

KeyEvent.getRepeatCount() always returns 0

Open hgourvest opened this issue 2 years ago • 1 comments

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

hgourvest avatar Oct 28 '22 12:10 hgourvest

Thanks for bringing this to our attention. We should be able to fix this issue.

kevinkieselbach avatar Nov 02 '22 22:11 kevinkieselbach

I checked in a fix. It will be available in WSA's 2301 build early next year.

kevinkieselbach avatar Dec 02 '22 17:12 kevinkieselbach