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

better kitty protocol support #2649

Merged
merged 18 commits into from
Feb 16, 2025
Prev Previous commit
Next Next commit
cosmetic
unxed committed Jan 26, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 52aa1eed5e1994c8f5b1fb80b108dc8c8685478c
6 changes: 4 additions & 2 deletions far2l/src/vt/vtshell_translation_kitty.cpp
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@
*/


// todo: support more key combinations in legacy modes, search for "WIP"

// todo: correct keypad handling: separate keycodes in different num lock modes
// KP_BEGIN, 1 E or 57427 ~
// KP_5, 57404 u
@@ -93,11 +95,11 @@ std::string VT_TranslateKeyToKitty(const KEY_EVENT_RECORD &KeyEvent, int flags)
(KeyEvent.wVirtualKeyCode == VK_DECIMAL) ||
(KeyEvent.wVirtualKeyCode == VK_SEPARATOR) ||
((KeyEvent.wVirtualKeyCode == VK_RETURN) && (KeyEvent.dwControlKeyState & ENHANCED_KEY)) || // keypad Enter
// Enter, Tab and Backspace with modifiers only
// Todo: WIP
// See https://github.com/kovidgoyal/kitty/issues/8255
((KeyEvent.wVirtualKeyCode == VK_RETURN) && (ctrl|alt|shift)) ||
((KeyEvent.wVirtualKeyCode == VK_TAB) && (ctrl|alt|shift)) ||
((KeyEvent.wVirtualKeyCode == VK_BACK) && (ctrl|alt|shift)) ||
// Undocumented, see https://github.com/kovidgoyal/kitty/issues/8255
((KeyEvent.wVirtualKeyCode == VK_SPACE) && (ctrl|alt))
))
);