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

Can't bind "option+[KEY]" using MacOS. #849

Open
homedirectory opened this issue Mar 16, 2022 · 3 comments
Open

Can't bind "option+[KEY]" using MacOS. #849

homedirectory opened this issue Mar 16, 2022 · 3 comments

Comments

@homedirectory
Copy link

I have the following commands in my .vrapperrc:

inoremap <M-i> <ESC>
nnoremap <M-i> a
inoremap <A-i> <ESC>
nnoremap <A-i> a

And the official documentation says: Similarly, Alt (meta) characters are mapped by using <A-x> or <M-x>.

However, this is what's happening upon pressing "option+I". Pressing any other key afterwards undoes it.

зображення

@keforbes
Copy link
Contributor

Can you try something for me? Hit qq to start recording into register q (the bottom-right of Eclipse will say recording: q). Then hit your option+[KEY] mapping, then hit escape a couple times to ensure you're back into command mode. Then hit q again to stop recording. After that, type :reg and hit enter to list the registers. There should be a register named "q which contains the keys you hit while recording the q register.

Can you tell me if it shows <A-i> or some other key mapping? I wonder if Eclipse is registering that option key as something else.

@keforbes
Copy link
Contributor

Also, it's possible Eclipse (or MacOS) already has something bound to the Alt+i key shortcut. If that's the case, Vrapper won't receive the keypress at all. I don't see anything online that says Alt+i is already bound in Mac or Eclipse but that could also be a factor.

@homedirectory
Copy link
Author

@keforbes

  1. Nothing else is boud to the Alt+i shortcut. Works in vim.
  2. Below are the sequences of keys I pressed and the resulting contentes of "q register.

q, q, option+i, ESC, q

"q contains <ESC>


q, q, option+i, q

"q contains ˆ (not ^, i literally typed it using option+i)

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

2 participants