alevchuk / vim-clutch

A hardware pedal for improved text editing in Vim
3.55k stars 53 forks source link

ESC mapping alternative #19

Open fritz-c opened 8 years ago

fritz-c commented 8 years ago

You wrote that you mapped an extra ESC keypress to the button pressing action, but if you entered insert mode through something like ciw, and then wanted to escape, a press-and-release of your pedal would send the keys ESC, i, ESC, which would as a side effect move the cursor back one extra character than if you had just pressed ESC.

To avoid unnecessary movement like this, you could use an alternate key to get back to normal mode. The one I know of is ALT+L. So a mapping of ALT+L, i to the press-down action might work best for consistent mode-changing.

panamantis commented 6 years ago

Auto-hotkey mapping alternative suggestions?

I've got my CapsLock as Ctrl (which saves my emacs pinky). Alt-*something sounds like a good idea...hmmm.