Parse Kitty Keyboard Protocol esc codes to suport Ctrl-Shift-<Key> shortcuts - #887
Parse Kitty Keyboard Protocol esc codes to suport Ctrl-Shift-<Key> shortcuts#887Cal (UnnaturalTwilight) wants to merge 4 commits into
Conversation
|
@microsoft-github-policy-service agree |
Leonard Hecker (lhecker)
left a comment
There was a problem hiding this comment.
...but you aren't enabling the Kitty Keyboard Protocol on startup?
|
Per the spec, any key sequence that can't be represented without the Kitty Keyboard Protocol is sent using it regardless if it is requested. I was trying to avoid affecting any of the current parsing logic but if you think it is better to enable it I can add that. |
|
Since nothing is using Ctrl-Shift combinations yet we can take our time to do this properly: Implement a full Kitty Keyboard Protocol integration. One of the problems here is that this PR is using |
eb7c7cb to
0bc514c
Compare
|
I have now done a more complete implementation of the first level of progressive enhancement for the protocol. I don't think higher levels of enhancement are necessary for what edit dose. I was not able to find a relevant vk constant for numpad equals which is why it stands out in the list. I have also now tested this with a french keyboard layout to confirm that non-ascii characters work properly. |
|
Funny enough, the "menu" key is |
0bc514c to
6bc7652
Compare
|
I have rebased this pr and added parsing for the menu key and super/win/command as a modifier. I have bound the menu key to focus the menubar, same as F10, as that seems to be standard behavior when there isn't a r-click menu. I have not implemented any shortcuts on super as they would primarily be for macos and I do not have a mac, but they should be easy to add in the future by anyone who wants to. |
this is needed to parse ctrl+shift+<a...z> and other unprintable modifier combos I have only tested this with en-us querty and it may have weird behavor with non latin layouts due to casting the codepoint to u8
menu is bound to focus the menubar super as a mod is unused for now but is needed for cmd bindings on macos in the future
6bc7652 to
1992041
Compare
Adds parsing for the most basic form of Kitty keyboard events. This fixes the existing Ctrl-Shift-z shortcut for redo when using a terminal that implements the kitty keyboard protocol. I have also add Ctrl-Shift-c as an additional shortcut for copy since that is often used in terminals.
Not a full implementation but solves some of: #29
I have tested this in Kitty on linux and in Windows Terminal through WSL.
I have only tested this with an en-us qwerty keyboard layout.