Re: Arrow keys in combination with Fx key
- Hi Tony,
> :map <F2><Left> <C-Left>[snip]
> :map! <F2><Left> <C-Left>
>Note that, unlike with the Ctrl, Shift and Alt keys, the sequence <press
>F2> <release F2> <press Left> <release Left> _will_ activate the mapping.
Does this mean that I can't use a mapping for F2 only?
And why is their a ! behind the map in the second line?
Get FREE company branded e-mail accounts and business Web site from
Microsoft Office Live
- Eric Leenman wrote:
> Hi Tony,Also, <press F2> <Left> <Left> <release F2> is equivalent to <C-Left> <Left>,
>> :map <F2><Left> <C-Left>
>> :map! <F2><Left> <C-Left>
>> Note that, unlike with the Ctrl, Shift and Alt keys, the sequence
>> <press F2> <release F2> <press Left> <release Left> _will_ activate
>> the mapping.
not to <C-Left> <C-Left> (the keyboard generates a "release key" event for F2
but the keyboard driver ignores it).
>>1. If you have a mapping for <F2> and another for <F2><Left>, the former won't
> Does this mean that I can't use a mapping for F2 only?
> And why is their a ! behind the map in the second line?
> Best Regards,
be recognised until you hit a key (other than <Left>) following the F2 key, or
until you wait longer that 'timeoutlen' milliseconds (if 'timeout' is on). It
might be possible to program a single mapping for <F2> invoking the getchar()
function, but IMHO the game is not worth the candle -- mapping the various F2
+ something combinations is easier to understand and therefore less error-prone.
2. ":map" without an exclamation mark applies to Normal and Visual modes. With
an exclamation mark it applies to Insert/Replace and Command-line modes.