Does anyone have experience with intercepting keyp...
# compose-desktop
s
Does anyone have experience with intercepting keypresses from the numpad? I'm returning false from
Modifier.onPreviewKeyEvent
, but the keypress is still getting through to the
BasicTextField
The each keypress generates multiple events (when the num lock is on). A KEY_PRESSED event and a KEY_TYPED event. I've only handled keyboard input in compose on Android previously. it seems quite different on desktop.
Sorry, I meant to say that I'm returning true from the
Modifier.onPreviewKeyEvent
for the
KEY_PRESSED
event. I'd like to return true from the
KEY_TYPED
event, but there's no clear way to do this. I could maybe remember the keyChar from the
KEY_PRESSED
event, and ignore the next
KEY_TYPED
event if it matches. It really seems like I'm missing something in the API here.