Go into insert mode and hit ^V and the key in question, for each <PgDn>
and <shf><PgDn> and see what gets returned. Might be that the g version
can discern the two, but the console version might not.
Sounds like the same complaint when people want to use, eg, ^g for one
thing, then shift it and use ^G for something else. Both ^g and ^G
"look the same", as both return the char \007 to the keyboard handler.
[...]
> I use these mappings to make selections using the shift key as in regular
> editors, but no one og them do nothing in the terminal.
> The thing that is strange for me is that these other maps works:
> nnoremap <C-S-Left> vb
> nnoremap <C-S-Right> ve
> vnoremap <C-S-Left> b
> vnoremap <C-S-Right> e
> inoremap <C-S-Left> <Esc><Left>vb
> inoremap <C-S-Right> <Esc><Right>ve
>
> So I guess that meybe the problem is with the PageDown/Up and Home/End keys
> and not with the Shift.
> Any ideas????
GUI programs such as gvim receive keyboard input in the form of
keycodes, that is, some indication of which key was typed along with
any modifier keys that were being pressed at the time. Terminal
emulators also receive keyboard input in this form, but they send to
their client programs (such as vim) only 8-bit characters. Some
keys such as the arrow keys and the function keys (f1, et al.) are
indicated to the clients by sequences of 7-bit (ASCII) characters.
For example, when I press the left arrow on this keyboard, the
terminal emulator sends <esc>OD to vim, where <esc> is the ASCII
Escape character, decimal value 27.
Terminal emulators typically send unique characters or sequences of
characters beginning with the Escape character (escape sequences)
only for symbols visible on the keyboard, not for arbitrary
combinations of keys and modifiers. Notable exceptions, as you have
discovered, are the arrow keys with Shift and/or Ctrl modifiers to
allow terminal-based editors to adopt popular GUI editor paradigms.
So, you're not going to be able to use with vim in a terminal all
the mappings you can use with gvim. Which ones you can use depends
on the particular terminal emulator you're using. To find out what
character or charter sequence your terminal is emitting for a given
key, put vim into insert mode, type Ctrl-V, then type the key in
question. If Home and Shift-Home, for example, generate the same
character sequence, then vim won't be able to distinguish them.
HTH,
Gary
HTH,
Gary