Skip to content

Conversation

@mgi166
Copy link

@mgi166 mgi166 commented Nov 12, 2016

Fix the issue #67.
This PR works in Chrome 54 for now.

Summary

  • KeyboardEvent.keyIdentifier is deprecated in Chrome M54. Use KeyboardEvent.key instead.
  • KeyboardEvent.key returns the charcator you entered. so remove the keycode maps and fix some logics.
  • For compatibility of settings in mac, aliases special characters with option key to original key.
  • There is still a useless implementation, but I made only minimal modifications.

Because KeyboardEvent.keyIdentifier is deprecated in chrome 54.
* ESC -> Escape
* UP -> ArrowUp
* DOWN -> ArrowDown
* RIGHT -> ArrowRight
* LEFT -> ArrowLeft
* TAB -> Tab
* SHIFT -> Shift
* BS -> Backspace
* ALT -> Alt
* CTRL -> Control
* META -> Meta
* DEL -> Delete
* CR -> Enter
* SPACE -> Space
Because KeyboardEvent.key can get original key name,
so not need to conversion.
* You can enter special code with ALT + {any key} in mac
* `KeyboardEvent.key` returns special codes when you enter ALT + {any key}
   * e.g. you write settings file `A-≈` instead of `A-x`
* The specification breaks old settings. so convert special codes.
* KeyboardEvent.code return `Enter` string when you enter the `Enter` key.
@citypops
Copy link

citypops commented Dec 7, 2016

@mgi166 Works well in chrome 54(except binding Space in nmap) but unfortunately not working properly in chrome 55. Vichrome works only after refreshing page and searching in history or bookmarks doesn't show hints, tablist is also not working. :-(
Anyway, thanks for fixing this for 54.

@mgi166
Copy link
Author

mgi166 commented Jan 11, 2017

@citypops I'm sorry. too late response.

Works well in chrome 54(except binding Space in nmap)

Oh, I don't notify this behavior. But I don't understand the reason that is not working binding with space.
Please give me some time.

but unfortunately not working properly in chrome 55.

I use chrome 55, but I wasn't able to replicate this bug.
Using macOS Sierra, it's replicated.

I will resource this problem.

@mgi166
Copy link
Author

mgi166 commented Jan 21, 2017

Using macOS Sierra, it's replicated.

Sorry, I mistake simply.
Change branch work-in-chrome54 and works chrome 55 in macOS Sierra.

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

Successfully merging this pull request may close these issues.

2 participants