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

Feature plan: A simple way to map custom key to exit global InsertMode #1924

Closed
gdh1995 opened this issue Jan 6, 2016 · 1 comment
Closed

Comments

@gdh1995
Copy link
Contributor

gdh1995 commented Jan 6, 2016

I get an idea of using custom combined keys to exit global InsertMode.

Now Vimium supports extra options,so we may add two options to command enterInsertMode, and they will be like: keyCode=27 and modifiers=0.

  • 27 is used as the only one valid keyCode to exit InsertMode on handling a keydown event
  • 0 represents controller keys's status: altKey | (ctrlKey << 1) | (metaKey << 2) | (shiftKey << 3)

That means, if I map I enterInsertMode keyCode=27 modifiers=8, then

  • <Esc> won't make InsertMode exit and will be passed to the page's other listeners
  • <Shift-Esc> will make InsertMode exit
  • You know, <Shift-Esc> originally shows Task Manager of Chrome, so it does no harm to re-map it.

I suppose that we need just ONE method to exit global InsertMode, but if there has to multi ways, you may map several keys to InsertMode with different options.

@gdh1995
Copy link
Contributor Author

gdh1995 commented May 6, 2016

Closed since #1925 is rejected.

@gdh1995 gdh1995 closed this as completed May 6, 2016
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

1 participant