lambda-term icon indicating copy to clipboard operation
lambda-term copied to clipboard

allow specifying Alt key combinations

Open agarwal opened this issue 9 years ago • 5 comments

The key sequence parser only supports C-, M-, and S-. Would it be possible to support Alt- (I'm not sure what is the standard abbreviation for Alt). I'm still unable to make use of utop's autocompletion because of issues as reported in: diml/utop#25, diml/utop#43, and diml/utop#42.

agarwal avatar Oct 22 '14 19:10 agarwal

Alt- is the same as M-

Drup avatar Oct 22 '14 20:10 Drup

Alt- is the same as M-

Is that true by definition, or is it just usually the case? If I set M-left, M-right, and M-down in my .lambda-term-inputrc, I still can't use Alt key combinations to navigate the completion bar.

agarwal avatar Oct 22 '14 20:10 agarwal

Well, I found an option in Mac's Terminal app to "Use Option as Meta key", and further the Option and Alt key are the same on my Apple keyboard. I set this option, which presumably assures that my Alt key is the Meta key, but still no luck. The problem is the same when I'm connected to Linux systems and when I use xterm.

agarwal avatar Oct 22 '14 21:10 agarwal

I tried and the Mac's terminals returns M-b, M-f, ... for Option+Arrow. I'll add these bindings by default when running on the Mac's terminal. In the meantime you can bind M-b, M-f, ... You can use the script print_sequences to find out the exact characters.

ghost avatar Oct 23 '14 06:10 ghost

@diml thanks! I used print_sequences before but somehow managed to not get the settings correct. Now, finally, it works with:

$ cat ~/.lambda-term-inputrc 
[read-line]
M-b: complete-bar-prev
M-f: complete-bar-next

agarwal avatar Oct 23 '14 17:10 agarwal