Replies: 2 comments
-
|
AFAIK, Vim (or gvim) cannot tell apart the left and right Ctrl keys, nor can it tell apart Ctrl- and Ctrl-Shift- with A-Z (and possibly @ [ \ ] ^ _). Similarly, AltGr and plain Alt are told apart, not by Vim itself but by some interface beween it and the keyboard (possibly including the console emulator in Vim but not in gvim). For mappings, IMHO the best choices for a {lhs} are the F1 to F12 keys, then Shift-F1 to Shift-F12 if the console doesn't "steal" them (or in gvim); also any characters not put to use by (g)Vim present on your keyboard (for instance ² ³ £ µ § é è ç à ù on my Belgian keyboard). This allows you to program (in your vimrc) a shortcut for any keycode or key combination which you find difficult to produce directly. For instance, the [ on my AZERTY keyboard is the key to the right of the P, when used with AltGr. For a long time I didn't know how to produce a keycode which gvim would recognize as Ctrl-[ (to go to a tag in its help) so I added map <F9> <C-[>in my vimrc. Now if I want to follow a hotlink to a help tag in gvim, presto! place the cursor on it, then hit F9. (Double-click is another possibility but the above mapping uses the keyboard.) Best regards, |
Beta Was this translation helpful? Give feedback.
-
|
It might be possible to detect this on xterm using the xterm-modifier-key feature ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
after trying under xev(x11) and showkey(linux console), it seems that AltGr key isn't "interpreted by keyboard driver" but passed
for example on xev : keycode 108 (keysym 0xfe03, ISO_Level3_Shift)
on console : keycode 100
altGR keycode on both is different from Alt keycode (same for ctrl_left != ctrl_rigth != alt != AltGr != shift_left != shift_right != capslock != windows != menu)
I use the windows key for the window manager
:h key-codesshow that onlycan be linked to some other key....
is there a way for example to have
do some action another <Ctrl_left-V> yet another <Ctrl_right-V> something else? as well as use menu key?
the only key that isn't catched and interpreted by keyboard intenal is the Fn key, but all other seems valid.
I would like, if possible, to have my key shortcut split from other (vim, plugin, window manager...) and alt-gr or menu are perfect for this, but others like ctrl_L and ctrl_R could be also nice
thanks and regards
Beta Was this translation helpful? Give feedback.
All reactions