tags:

views:

54

answers:

1

I want to map a key in Vim such that i would hold down a key, say a, and then press some other key, say b. And then the holding down of the a would change what the pressing of b does.
Like the way we use shift, just with all the normal characters of the keyboard.

Is that possible? And if so, how?

+2  A: 

The only way to do this would be to turn A into a normal modifier via xmodmap or the like, and the only modifiers vim supports are Ctrl, Alt, and Meta, so not only do you lose normal functionality of the key, but you also add it to a set which contains one or more keys already.

Ignacio Vazquez-Abrams
Loosing normal functionality of the key is fine for i gain 24 other keys instead.What's bad about adding to a set which contains one or more keys already?Is it not possible?And if it is possible, do you know where I can find how to do it?
Hermann Ingjaldsson
As mentioned, the only modifiers you get are those 3, and Alt and Meta are treated the same. Anyways, you can use `xmodmap` to remap the keys in X (e.g. `xmodmap -e 'add Control = a'`). Don't know how for any other situations though.
Ignacio Vazquez-Abrams

related questions