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

Right alt/option key on macOS setting different to left one possible? #1022

Closed
james-gonzalez opened this issue Sep 26, 2018 · 8 comments
Closed

Comments

@james-gonzalez
Copy link

On my iTerm2 terminal, I have the following settings for my alt keys, which give me everything I need.

image

I want to be able to use alt/option to for example do. alt + 3 == # OR alt . == (would toggle through the last arguments/params I passed in the previous commands)

Is this possible in Kitty?

The only option I see is macos_option_as_alt yes/no

Can you somehow make a new option to distinguish between the left/right alt/option keys?

Thanks!!!!!

@james-gonzalez james-gonzalez changed the title Right alt/option key on macOS as Right alt/option key on macOS setting different to left one possible? Sep 26, 2018
@kovidgoyal
Copy link
Owner

I'm afraid this is too much work for me, sorry. But patches are welcome.

@kovidgoyal
Copy link
Owner

Actually on second thoughts there might be an easy way to accomplish this, I'll look into it when I have a moment.

@kovidgoyal kovidgoyal reopened this Sep 26, 2018
@james-gonzalez
Copy link
Author

@kovidgoyal - That would be amazing and would allow me to use this terminal as my main terminal.

@hauleth
Copy link

hauleth commented Nov 5, 2018

Right now I have problem with this as I cannot enter national letters due to fact that Kitty register RALT and LALT as the same characters and do not handles them via the OS, which mean that I cannot enter letters like ą (RALT-a) in the terminal.

@kovidgoyal
Copy link
Owner

Simply set macos_option_as_alt to no in your kitty.conf

@hauleth
Copy link

hauleth commented Nov 5, 2018

Still it, this cuts me from all ALT chords. Ideal would be to use one ALT as Escape code prefix and second as a AltGr.

@robertnorenberg
Copy link

robertnorenberg commented Nov 7, 2018

@hauleth Not sure if this is acceptable to you (not the "ideal" case I guess), but as I only use Alt+b|f|t the following works just fine for me:

map alt+a send_text all \u0105
map alt+c send_text all \u0107
map alt+e send_text all \u0119
map alt+l send_text all \u0142
map alt+n send_text all \u0144
map alt+o send_text all \u00F3
map alt+s send_text all \u015B
map alt+x send_text all \u017A
map alt+z send_text all \u017C

map alt+shift+a send_text all \u0104
map alt+shift+c send_text all \u0106
map alt+shift+e send_text all \u0118
map alt+shift+l send_text all \u0141
map alt+shift+n send_text all \u0143
map alt+shift+o send_text all \u00d3
map alt+shift+s send_text all \u015a
map alt+shift+x send_text all \u0179
map alt+shift+z send_text all \u017b

@jacwah
Copy link
Contributor

jacwah commented Dec 20, 2018

@robertnorenberg Thanks for the tip! I never use alt for "unicode symbols", but the key is required for normal symbols like []{}|\$@ with my keyboard layout. This is the setup I am trying out right now:

macos_option_as_alt yes

# combinations where I want the "option" behavior
map alt+2 send_text all @
map alt+4 send_text all $
map alt+7 send_text all |
map alt+8 send_text all [
map alt+9 send_text all ]
map shift+alt+7 send_text all \\
map shift+alt+8 send_text all {
map shift+alt+9 send_text all }

# readline bindings I can't type with this layout
map alt+' send_text all \x1b*
map alt+plus send_text all \x1b?

Unfortunately (emacs/readline) prefix arguments aren't possible with this configuration. Maybe it's time to learn to use a US keyboard...

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

5 participants