Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Escape key caught by Vimium #499

ripdajacker opened this Issue · 24 comments

10 participants


Vimium catches the keystroke for escape, even when out of input mode. The easiest way to show this is on Facebook chat, where you in the old version could press escape twice and close the chat.


Hm, in the old version pressing esc once would close the chat window, and I often found myself not wanting that. I agree that never having the window close is also a bit of an annoyance though. Perhaps we should create some sort of pass-through mode for this.


What about <C-v>, Esc - it would be similar to Vim passthrough mode ?


How about making <Esc> a mapping of sorts? I found myself setting "unmap <Esc>" to try to fix this, planning on using <C-[> to exit out of input mode.

Of course, it didn't work; but this was intuitive for me.


+1 For this bugfix, since it breaks text editor selection reduction such as in CodeMirror Sublime


God this is annoying, have run into it multiple times now. Would be cool if it could be fixed, without I would've been lost.


What behaviour would you like to see from Esc?


Vimium does not allow propagation of any webpage's Escape keyup bound



watch = (type) ->
  document.addEventListener type, (event) ->
    para = document.createElement "p"
    para.innerHTML = type
    document.body.appendChild para

watch "keydown"
watch "keypress"
watch "keyup"

Running here. Looks the same to me with or without Vimium.

To repeat...

What behaviour would you like to see from Esc?

Perhaps it would be helpful if you could point us to a specific page, so we all have a specific use case in mind.


I'm not sure what you want me to do.

I go to which page?
I do what?
What happens?
What do you want to happen?


Yes, that's right. Because, when an input is focused, Vimium does grab and use Esc. Thats a feature.

Now, what do you want to happen? One possibility would be:

  • If the page handles Esc, Vimium doesn't.
  • Otherwise, it does.

But there are problems with this.

  • Currently, Vimium handles the Esc before the page gets a chance to see it. This is nearly always the right thing to do. If it were otherwise, the Vimium UX would be different on different pages.
  • We could wait to see whether the page uses the event. However, it's not clear whether we could reliably detect that.

In fact, taking the case of CodeMirror, we have no way of knowing whether the Esc was handled or not. Their handler returns true regardless of what it did.


Suggest #1372 for this, so <esc> can be a passkey.


Suggest #1372 for this, so can be a passkey.

I don't think so. We're in insert mode, so none of the passkey code comes into play.


I don't think so.

I specifically designed it for this use case, it adds a passkey check to exitInsertMode.


When using the Hangouts extension, Vimium prevents hitting Esc to close a chat window. I would add a "Excluded URLs and keys" rule, but I don't know the "URL" of the chat window. What is the best way to fix this? Thanks.


I thought this would work, but it does not...
1. Open chrome://extensions/ and click "Options" under the Hangouts extension
3. note the URL, something like chrome-extension://sadkjfhaklsjdhfkjhasdfkjh/settingsdialog.html
4. click the Vimium button
5. remove settingsdialog.html from the URL in the first box, keeping the *
6. click the Add Rule button

  1. note the URL, something like chrome-extension://sadkjfhaklsjdhfkjhasdfkjh/settingsdialog.html
  2. click the Vimium button
  3. remove settingsdialog.html from the URL in the first box, keeping the *

Vimium can't run on chrome-extension:// URLs for other extensions, so this will have no effect. If the chat windows do have a chrome-extension:// URL then we're not blocking <esc> (or doing anything else) on them anyway.

  1. don't hit the literal Esc key, but instead type the three letters Esc in the second box

This makes us pass E, s, and c to the page.

Currently we don't support the <esc> key (or any keys that aren't a single character) in the "Excluded URLs and keys" rule. I've created #1372 for this purpose, but it's not available at the moment. If/when it is, entering <esc> (separated by spaces from any other passkeys) should block the <esc> key.

What is the best way to fix this?

If you find out what the chat window URLs are, you could block Vimium completely on them (assuming they're not chrome-extension:// URLs). We don't provide anything else in options that would help at the moment.


Thanks, Matt. Bummer. So no solution here. Would love to see a built-in ignore for Hangout extension chat windows. Cheers.


I would also like to see a way to pass to the list of ignored keys when wanting to ignore on certain sites. (Or maybe remap it universally to something else...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.