rhysd / neovim-component

<neovim-editor> WebComponent to embed Neovim to your app with great ease
https://github.com/rhysd/NyaoVim
MIT License
193 stars 18 forks source link

Meta/Alt chords input shifted variant to neovim #6

Closed romgrk closed 8 years ago

romgrk commented 8 years ago

Steps:

rhysd commented 8 years ago

Hi, thank you for the report.

But it is expected behavior. Neovim/Vim ignores letter cases in input. So <A-J> is equivalent to <A-j>. Please try below:

" Set from command line
:nnoremap <C-L> :echo 'blah, blah, blah'<CR>

" Then enter Ctrl + l (not shifted).  I think 'blah, blah, blah' is input.
rhysd commented 8 years ago

Ah, sorry, <C- has different behavior from <A-. I got it.

rhysd commented 8 years ago

I usually use Vim so I know that Neovim can handle Alt + Shift at first time.

rhysd commented 8 years ago

@romgrk

I fixed. If you find this bug is still there, please reopen this issue.

romgrk commented 8 years ago

Yes, this one should still be open.

romgrk commented 8 years ago

But I cannot seem to reopen this issue, the button is not appearing.

Anyway, here is the report:

As you can see from the screenshot above the only 2 keys pressed are 18 and 74, which is alt+j.

If you need some inspiration for keyEvents handling and KBEvent to VimKey translation, take a look at my https://github.com/romgrk/keykit. (It's the worst code I've ever written but it does work)

rhysd commented 8 years ago

Hmm... OK, I'll check it later again.

KeyEvent.keyCode is too complecated (but Chrome doesn't implement KeyEvent.key yet...). Thank you for the pointer to handling key events.

rhysd commented 8 years ago

@romgrk

I tried again and it seems to work well. (I used <A-e> instead of <A-j> because I already assign other OS feature to <A-j>. Could you try again after pulling master branch and building again?

2015-12-16 2 09 50

romgrk commented 8 years ago

All good doctor.

rhysd commented 8 years ago

OK, thanks.