vhs
vhs copied to clipboard
Fix alt modifier
The alt modifier was not handled correctly for both sending and recording key presses.
To send the key press, the ESC
sequences needs to be transmitted before the key.
For recording, the escape sequences lookup table had to be updated with all alphanumeric combinations.
Syntax highlights had also not been updated.
@maaslalani Can you review this. Thanks.
Thanks so much @mikelorant! ❤️
Does this work for you? It doesn't seem to work correctly for me on MacOS. This is pressing Alt+Left and Alt+Right.
I'm wondering if this comes down to what alt
means?
My own tests were from macOS. Can you install showkey
and see what you get?
@maaslalani Please see issue #442 for the details. I believe you do not have your terminal set correctly and are not actually sending what is considered the alt
key.
Further testing has made things a bit more confusing.
WezTerm
alt
+ b
= <ESC>b
alt
+ ←
= <ESC>[1;3D
macOS Terminal
alt
+ b
= <ESC>b
alt
+ ←
= <ESC>b
May have a solution for you, will test this out tomorrow and update the pull request.
- For
0
to9
anda
toz
sendESC
+ character. - Everything else, hold down
alt
and send the key press (method currently used forenter
andtab
).
In terms of recording, need to do some brainstorming. Only have the tables to lookup against. May need to add all the key presses we can think of.
What terminal are you using?