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

When Kitty key disambiguation protocol is in use, shifted symbols show up as non-shifted. #2695

Closed
Spritetm opened this issue Jan 20, 2023 · 3 comments
Assignees
Labels
bug Something isn't working input readin' dem bytes
Milestone

Comments

@Spritetm
Copy link
Contributor

What I would like is to get a hold of the keysym that is pressed when taking into account modifier keys, specifically 'shift'. When not using the Kitty key disambiguation protocol, ncurses-input returns this (from what I can see in the id and/or utf8 fields). When using the protocol, ncurses-input returns the expected output for alphabetical keys (shift-a returns 'A') but not for other keys (shift-1 returns '1' rather than '!').

(An easy way to test this is to run notcurses-input both on Kitty and some other terminal, e.g. screen, and compare what happens when you press shift-1.)

Because it's impossible to calculate the shifted symbol from the non-shifted one (as I don't think there's a way to know the keyboard layout in use), I'd like some way to have the shifted symbol returned in the ncinput event struct. From what I can tell, kitty does return this so the info is available.

Note that this also affects widgets like ncreader, to the point of making it impossible to enter symbols like @#$%^&*() in this widget when using kitty. As such, I'm filing this as a bug rather than a feature request.

Please include the following data:

  • export | egrep 'LANG|LC_CTYPE|TERM'
    declare -x COLORTERM="truecolor"
    declare -x LANG="en_US.UTF-8"
    declare -x LANGUAGE="en_US:en"
    declare -x TERM="xterm-kitty"

  • notcurses version (available from notcurses-demo i)
    Latest master (v3.0.9-4-g90135203e)

  • terminal name + version
    kitty 0.21.2 created by Kovid Goyal

@Spritetm Spritetm added the bug Something isn't working label Jan 20, 2023
@dankamongmen dankamongmen self-assigned this Jan 20, 2023
@dankamongmen dankamongmen added this to the 3.1.0 milestone Jan 20, 2023
@dankamongmen dankamongmen added the input readin' dem bytes label Jan 20, 2023
@dankamongmen
Copy link
Owner

thanks for the great writeup! i haven't been as responsive to notcurses issues of late as i was when i was developing it fulltime, but i hope to address this soon.

@dankamongmen
Copy link
Owner

so we're done here, yes? outstanding work, thank you so much! i hope you're enjoying the library otherwise.

@Spritetm
Copy link
Contributor Author

Yes :) Library is great otherwise, it's really nice to have a non-antique abstraction over all the things a terminal can do.

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

No branches or pull requests

2 participants