Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onKeyPressed doesn't listen for modified (e.g. ctrl-u, alt-a, etc.) characters #104

Open
stephentalley opened this issue Dec 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@stephentalley
Copy link

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
@stephentalley stephentalley added the bug Something isn't working label Dec 17, 2023
@bitspittle
Copy link
Contributor

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: #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants