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

How to use alt key #27

Closed
concatime opened this issue Oct 11, 2019 · 2 comments
Closed

How to use alt key #27

concatime opened this issue Oct 11, 2019 · 2 comments

Comments

@concatime
Copy link

What do i need to add in lesskey file to map Alt-k ?

@keithbowes
Copy link

I've wondered the same thing. According to the documentation, it seems that the only modifier keys allowed are Ctrl and Esc. That's most unfortunate, as Alt is in a much more convenient location than Esc (I swap my caps, so Ctrl isn't inconvenient either).

@gwsw
Copy link
Owner

gwsw commented Feb 7, 2020

I don't know if there's a way to detect the Alt key. Pressing ALT-x in a mintty window running on Windows 10 just produces two characters ESC x. I believe rxvt does the same thing. I don't know what other terminal emulators do, or what the native cmd interpreter does. I've heard that some terminals set the high bit, but I haven't seen that in any emulator I've used.

In any case, it should be possible to determine what key sequence is sent by ALT-x in the terminal that you are using, and map that sequence using lesskey, using the \ddd octal notation if necessary.

@gwsw gwsw closed this as completed Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants