Control Keys Failing After System Bell?

48 views
Skip to first unread message

Ian Epperson

unread,
Sep 9, 2020, 4:27:00 PM9/9/20
to iterm2-discuss
I've been trying to chase down a new issue that has cropped up for me while using Vim. This issue is only present when I run vim within iTerm2 beta, and not present within the native terminal app or iTerm2 3.3.12. Therefore, I suspect it's a strange issue with iTerm2 beta.

iTerm2 Build 3.4.0beta5

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep  6 2020 02:21:34)

OSX 10.14.6

In vim, it seems that some of my keybindings fail after a system bell is played. Specifically, it seems as if when a bell is played while I'm holding the ctrl key,  my ctrl key bindings fail until I restart vim. 

I pared down my .vimrc file to just:

noremap <C-K> <C-W><C-K>
noremap <C-J> <C-W><C-J>
noremap <C-H> <C-W><C-H>
noremap <C-L> <C-W><C-L>

If I start vim, then create a split (:vsp) I can navigate left and right by using ctrl-L and ctrl-H as expected. However, if I press an illegal key combination that generates a system bell (ctrl-; or ctrl-.) the ctrl-L and ctrl-H stop working (along with any other mapped ctrl key combination). However, the default vim ctrl-W command still works.

This seems quite a bit like a vim issue, but I can only reproduce it while using iTerm2 beta. I had not installed the shell integration and added it to see if there would be any change, but it made no difference. Downgrading to iTerm2 3.3.12 makes the problem go away.

Thanks for making a fantastic product! Let me know if I can help narrow this down further.

Ian.

George Nachman

unread,
Sep 10, 2020, 2:42:25 AM9/10/20
to iterm2-...@googlegroups.com
This was a failed experiment to allow a control sequence to enable the libticket-style CSI u keyboard reporting. I'm going to remove support for that from 3.4.0beta7. Unfortunately beta 6 just missed picking up the change.

Unfortunately there is no convenient workaround. For now, toggle off Session > Terminal State > Report modifiers with CSI u each time you launch vim. Sorry for the annoyance!

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/85a72c8c-eaf8-4476-aeca-ce4336208bbcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages