dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.43k stars 113 forks source link

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

Closed Spritetm closed 1 year ago

Spritetm commented 1 year ago

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:

dankamongmen commented 1 year ago

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 commented 1 year ago

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

Spritetm commented 1 year ago

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