-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
kitty kbd: ISO_Level3_Shift not recognized as a modifier #2439
Comments
no idea what these keys are, but i'll look into it =] |
On European(?) layouts, AltGr is mapped to
No idea what |
only four shift levels? we must go deeper |
we now have the necessary definitions, and ought be mapping them up in |
7107c90 should have it saying the correct thing, sorry |
so these are modifiers, and probably ought be reported with [acsX], huh? |
Hmm, not sure what you mean? Is that a literal In any case, I don't see modifiers being reported differently, in neither foot nor kitty. |
sorry, so there's shift, ctrl, and alt; should l[35]shift be treated like a modifier? i.e. ought i be reporting with 'a' that level 3 shift was being held? so the [acsX] prefix on each line would be [acsX35] |
basically do i need add diff --git include/notcurses/notcurses.h include/notcurses/notcurses.h
index 0e44b8e76..23cf1df39 100644
--- include/notcurses/notcurses.h
+++ include/notcurses/notcurses.h
@@ -1120,6 +1120,8 @@ typedef struct ncinput {
bool alt; // was alt held?
bool shift; // was shift held?
bool ctrl; // was ctrl held?
+ bool l3shift; // iso level 3 shift (altgr)
+ bool l5shift; // iso level 5 shift
// FIXME kitty protocol also exposes hyper, meta, caps_lock, num_lock
enum {
NCTYPE_UNKNOWN, are these "Hyper" and "Meta"? |
No, I don't think so. There are other keys (Hyper_{L,R} and Meta_{L,R} that map to the The kitty protocol's encoding of modifiers includes hyper and meta, but not the ISO_LevelX_Shift shift states. So no, I don't think you should treat them as modifiers. On the terminal side (when we generate the CSI), the ISO_LevelX_Shift modifiers are handled slightly different. For example, Alt+Shift+2 would result in a CSI where the base key is '2'. But AltGr+Alt+2 would result in a base key of '@'. |
One important thing here is that there's a very distinct difference between a modifier being enabled, and a specific key being pressed. For example, there's only one So, Put another way, you shouldn't enable/disable modifier state when seeing modifier key press/release events. I.e. just rely on the encoded modifier state in the CSIs. Clear enough? :) |
sounds good! |
It looks like notcurses doesn't recognize the
ISO_Level3_Shift
modifier (and most likely,ISO_Level5_Shift
too): https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions.Instead, it treats the key code as a unicode codepoint:
I believe AltGr is the key usually mapped to
ISO_Level3_Shift
. I don't have a physical key toISO_Level5_Shift
, and have no idea which key it typically corresponds to.(I guess simply calling them ISO_LevelN_Shift, instead of AltG, is fine too).
The text was updated successfully, but these errors were encountered: