momodalo / vimtouch

vimtouch
Apache License 2.0
348 stars 71 forks source link

Remap Caps Lock from analog keyboard? #76

Closed NQNStudios closed 9 years ago

NQNStudios commented 9 years ago

I'm using VimTouch on an HTC One smartphone. I use a Mac bluetooth keyboard so I can type and edit text files at pretty much the same speed as on my computer when I need to. On my computer I always remap Caps Lock to send an Escape signal, which makes mode shifting so much faster because Caps lock is so close to the home row.

This remapping is a little problematic, even on a PC, because Caps lock doesn't handle input like other keys. I've accomplished it on Windows with AutoHotkey and on Linux with a custom Xmodmap file.

But it gets worse, because now my muscle memory is to hit caps lock when I want to exit insert mode. In VimTouch, this inevitably enables caps lock and causes all sorts of problems due to momentary confusion.

So I don't know if this is the right place to ask (the solution may be beyond the scope of VimTouch), but is there a way I can remap Caps Lock on my analog keyboard while connected to my phone? I would really prefer not to need to maintain two distinct muscle memories (one for Vim editing on my phone, and one for Vim editing on my PC, which allows me to use Caps Lock for escape).

rtfb commented 9 years ago

On Fri, Oct 10, 2014 at 5:32 PM, Nathaniel Nelson notifications@github.com wrote:

So I don't know if this is the right place to ask (the solution may be beyond the scope of VimTouch), but is there a way I can remap Caps Lock on my analog keyboard while connected to my phone? I would really prefer not to need to maintain two distinct muscle memories (one for Vim editing on my phone, and one for Vim editing on my PC, which allows me to use Caps Lock for escape).

I'm using this app to remap Caps Lock to Escape on my Asus transformer: https://play.google.com/store/apps/details?id=com.apedroid.hwkeyboardhelper

Vytautas Šaltenis On the Web: http://rtfb.lt/

NQNStudios commented 9 years ago

Thanks! After doing my own research I was afraid I would have to root my phone to accomplish what I wanted, but that app did the trick just fine.