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

[[ or ]] are activating insert mode (V1.49) #1529

Open
marcelpaulo opened this issue Mar 12, 2015 · 8 comments
Open

[[ or ]] are activating insert mode (V1.49) #1529

marcelpaulo opened this issue Mar 12, 2015 · 8 comments

Comments

@marcelpaulo
Copy link

[[ and ]] are activating insert mode:

mamdouh el gbaly - google search - google chrome_001

I tried mapping goNext to gn, for instance, and it doesn't activate insert mode.

vimium options - google chrome_003

@mrmr1993
Copy link
Contributor

My gut instinct is that we're not detecting the keydown event as [ because of the keyboard layout, and so google is catching it and focusing their input with it instead. Which keyboard layout are you using?

@marcelpaulo
Copy link
Author

I'm using Portuguese (Brazil):

keyboard_004

You nailed it ! Just to confirm, I tested this:

  1. Changed the layout to English (US) and checked which key was generated when pressing ]: it was \
  2. Changed the keyboard back to Portuguese (Brazil)
  3. Mapped goNext to \\
  4. Pressed ]] on the Google page, and the goNext action was run

@smblott-github
Copy link
Collaborator

@marcelpaulo: Could you go here, click in the bottom right frame, and let us know what keyboard events are generated (if any) when you type ]?

@marcelpaulo
Copy link
Author

Here they are @smblott-github:

jquery key events test console - jsfiddle - google chrome_001

@smblott-github
Copy link
Collaborator

Sorry, @marcelpaulo. Was ]] mapped on the options page for that?

Edit: I'm guessing this has something to do with the logic here.

@marcelpaulo
Copy link
Author

Here's the mapping on the options page, @smblott-github:

vimium options - google chrome_002

@smblott-github
Copy link
Collaborator

Thanks, @marcelpaulo. It does indeed look like it's this logic which is at fault. Changing my own keyboard layout to Portuguese, I get the same keydown, keyup events, with no keypress. Hmm, not what can be done...

@mrmr1993
Copy link
Contributor

When this Chromium issue is resolved, we can stop using keypress altogether, reliably get the key from keydown and all this pain will go away.

Until then, we could hook up some mechanism that 'learns' which keydowns corollate with which keypresses as the user types in textboxes, but that's kinda clunky and unreliable. And it's hard to deal with users that regularly switch locales. I don't really like this idea, but it would fix things for some users.

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

3 participants