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

Can not input <C-h> on Windows #45

Closed
jjohnson338 opened this issue Aug 8, 2019 · 13 comments
Closed

Can not input <C-h> on Windows #45

jjohnson338 opened this issue Aug 8, 2019 · 13 comments

Comments

@jjohnson338
Copy link
Contributor

I've the following line in my .vimrc to map h to but it's not seeming to work in fvim.

nnoremap <C-h> <C-w>h

@jjohnson338 jjohnson338 changed the title Can not input <c-h> on Windows Can not input <C-h> on Windows Aug 8, 2019
@yatli
Copy link
Owner

yatli commented Aug 8, 2019

Investigating -- thanks!

@yatli yatli closed this as completed in 6b4c309 Aug 11, 2019
@yatli
Copy link
Owner

yatli commented Aug 11, 2019

@jjohnson338 ^H was translated to backspace -- standard ANSI sequence.
However, just sending over ^H to neovim results in reinterpretation just fine -- same for ^[, ^I, etc -- so I'm removing the translation code.

@jjohnson338
Copy link
Contributor Author

Thanks for investigating this. Unfortunately, the issue still persists. I've tried both v0.2-50-g6b4c309 and v0.2-51-g98b2006 on Windows 10.

For further context I've four remaps in my vimrc for jumping between windows/visible buffers:

" Control+hjkl moves focus to that window
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l

On the current release, only right (<C-l>) and up (<C-k>) are working as expected.

If there is anything I can do to aid in the debugging, please let me know.

@yatli
Copy link
Owner

yatli commented Aug 11, 2019

I've tried the Ctrl+hjkl on my side, <C-h> doesn't work, <C-j> and <C-l> work as expected.
<C-k> works, with delay -- try <C-k> followed by other <C-> keys in insert mode and I've got some interesting mojibakes (some unicode glyphs)

Can you confirm this? Also, could you try to map it in insert mode, and see what will happen? I think neovim simply ignored or misinterpreted these combos.

@yatli yatli reopened this Aug 11, 2019
@yatli
Copy link
Owner

yatli commented Aug 11, 2019

FYI, <C-I> <C-J> <C-M> are not interpreted correctly if sent directly. Translation to the corresponding ANSI code is still necessary -- and I think it is the same case for <C-h>, which translates to <Backspace>

@jjohnson338
Copy link
Contributor Author

Can confirm that <C-k> then another character will insert unicode glyphs:
<C-k>aa resulted in the following character: å

<C-l> (right) and <C-k> (up) work for me, but <C-h> and <C-j> do not. I changed my mappings to insert mode:

inoremap <C-h> <C-w>h
inoremap <C-j> <C-w>j
inoremap <C-k> <C-w>k
inoremap <C-l> <C-w>l

and tested out in a buffer.
<C-h> just enters an 'h' character

<C-j> just enters an 'l' character

<C-k> removes the entire line and then enters an 'k' character (not just backspace, but wipes the line it's entered on if there are preceeding characters, otherwise, will remove the line entirely and append to the previous line

<C-l> does the same as <C-k> (wiping the line, then entering the character)

@yatli
Copy link
Owner

yatli commented Aug 14, 2019

@yatli
Copy link
Owner

yatli commented Aug 14, 2019

nvim-qt seems to handle this correctly.

@jjohnson338
Copy link
Contributor Author

Yeah, these keybinds work on nvim-qt. Was using that as my daily driver before fvim.

@yatli
Copy link
Owner

yatli commented Aug 14, 2019

I'm looking at nvim-qt and hunting for the magic. 0.0

@yatli
Copy link
Owner

yatli commented Aug 14, 2019

@jjohnson338 well there's no magic -- I was doing it right to remove the translation -- only forgetting that I've got some other special treatments on the modifiers that also needs to be removed!

@yatli yatli closed this as completed in fd39a12 Aug 14, 2019
@yatli
Copy link
Owner

yatli commented Aug 14, 2019

try 0.2-56 (when it finishes building)

@jjohnson338
Copy link
Contributor Author

Works great! Thanks so much!

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

2 participants