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

Mapping Navigation Keys to Default Keyboard Navigation Keys #1106

Open
Bonapara opened this issue Mar 7, 2024 · 3 comments
Open

Mapping Navigation Keys to Default Keyboard Navigation Keys #1106

Bonapara opened this issue Mar 7, 2024 · 3 comments
Labels

Comments

@Bonapara
Copy link

Bonapara commented Mar 7, 2024

Desired behavior

My goal is to map Vimium C navigation keys to the default keyboard navigation keys.

For instance, I would love w to be mapped by ⌥→

It seems not to be supported, is there a workaround?

CleanShot 2024-03-07 at 12 44 18

Thanks!

@gdh1995
Copy link
Owner

gdh1995 commented Mar 7, 2024

Sorry I can not get what do you want.

Could you explain the meanings of the two keys and what you wanted by the mapKey rule which was refused by Vimium C?

@Bonapara
Copy link
Author

Bonapara commented Mar 7, 2024

Hi @gdh1995, Thanks for your answer.

What I meant is that I want to use Mac shortcuts instead of Vim shortcuts in Visual/Edit mode.

Here are the shortcuts I'm talking about:
Command–Left Arrow: Move the insertion point to the beginning of the current line.
Command–Right Arrow: Move the insertion point to the end of the current line.
Option–Left Arrow: Move the insertion point to the beginning of the previous word.
Option–Right Arrow: Move the insertion point to the end of the next word.
Shift–Up Arrow: Extend text selection to the nearest character at the same horizontal location on the line above.
https://support.apple.com/en-us/HT201236#:~:text=Option%E2%80%93Left%20Arrow%3A%20Move%20the,the%20beginning%20of%20the%20document.

So I would love to map Vim shortcuts into these Mac Shortcuts in both Visual/Edit mode.

That's what I was trying to achieve with the custom key mapping, in the above example, mapping b in visual mode to ⌥→

(Now I realised I typed j instead of →)

And:

CleanShot 2024-03-07 at 18 57 53

Is not working :)

@gdh1995
Copy link
Owner

gdh1995 commented Mar 9, 2024

No Vimium C can not change how your browser handles pressed keys.

VisualMode in Vimium C has its own shortcuts to move / extend cursors, which are basically borrowed from VIM - see https://github.com/philc/vimium/wiki/Visual-Mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants