kotter
kotter copied to clipboard
onKeyPressed doesn't listen for modified (e.g. ctrl-u, alt-a, etc.) characters
Our app has a need to listen to various control-modified keys (ctrl-u, ctrl-f, ctrl-b, etc.). But:
session {
var keyPressed by liveVarOf<Key?>(null)
section {
if (keyPressed != null) {
textLine("key pressed: $keyPressed")
}
}.runUntilKeyPressed(Keys.Q, Keys.ESC) {
onKeyPressed {
keyPressed = key
}
}
}
…shows those keys are ignored.
Is there an API to listen for those keys?
- OS: Linux
- Version 1.1.1
I don't have access to anything except that which the terminal gives me. So depending on what you're expecting, it's probably not possible. See also: https://github.com/varabyte/kotter/issues/57 in case it's related.
I wonder if you could write a raw console app, just like a naked main function and use of readLine, and see if you're getting characters in that case.