Skip to content

Commit

Permalink
one more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
unxed committed Jan 28, 2025
1 parent 2b332b1 commit 1273ef9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions far2l/src/vt/vtshell_translation_kitty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,10 @@ std::string VT_TranslateKeyToKitty(const KEY_EVENT_RECORD &KeyEvent, int flags,
if (ctrl) modifiers |= 4;
modifiers++; // bit mask + 1 as spec requres

// this condition is in spec ("Lock modifiers are not reported for text producing keys")
// but it seems that kitty does not do this check,
// see https://github.com/kovidgoyal/kitty/issues/8259
//if ((flags & 8) || !KeyEvent.uChar.UnicodeChar) {
if ((flags & 8) || !is_text_key) {
if (KeyEvent.dwControlKeyState & CAPSLOCK_ON) modifiers |= 64;
if (KeyEvent.dwControlKeyState & NUMLOCK_ON) modifiers |= 128;
//}
}


// generating shifted value
Expand Down

0 comments on commit 1273ef9

Please sign in to comment.