Rodolfo Medina <rodolfo.med...@gmail.com> writes:

> David Wright <deb...@lionunicorn.co.uk> writes:
>
>> Quoting Rodolfo Medina (rodolfo.med...@gmail.com):
>>
>>> Sorry!  I wrote Shift-Backspace but I meant Shift-Tab.
>>> 
>>> Thanks.  I appended that code to /etc/console-setup/remap.inc, then ran
>>> 
>>>  # dpkg-reconfigure console-setup ; dpkg-reconfigure keyboard-configuration
>>> 
>>> , but the problem remained.  In Xterm, with Ctrl-left-arrow and
>>> Ctrl-right-arrow I jump from word to word, and with Shift-Tab I go one tab
>>> back.  I want to do the same in VC, outside X, but they don't work.
>>
>> Do you have the matching instructions in .inputrc?
>>
>> # Ctrl-Right arrow
>> "\e[1;5C": forward-word
>> # Ctrl-Left arrow
>> "\e[1;5D": backward-word
>
> That works fine!  Thanks.  But what about Shift-Tab?


It seems to be done adding to /etc/console-setup/remap.inc also:

keycode  15 = Tab   F91
        alt     keycode  15 = Meta_Tab        
        shift   alt     keycode  15 = F92

# backtab and M-backtab
string F91 = "\033[Z"
string F92 = "\033\033[Z"

and then run, again,

 # dpkg-reconfigure console-setup ; dpkg-reconfigure keyboard-configuration

-------------------------------------------------------------------------------
.  Summing up, in order to enable Ctrl-arrows and Shift-Tab in tty* consoles:
append to /etc/console-setup/remap.inc the follwoing code:

# Ctrl-arrow keys need to send the same codes as in X/xterm.
Control keycode 105 = F51
string F51 = "\033[1;5D"
Control keycode 106 = F52
string F52 = "\033[1;5C"
Control keycode 108 = F53
string F53 = "\033[1;5B"
Control keycode 103 = F54
string F54 = "\033[1;5A"

# Alt-space may as well produce a space rather than
# nul Meta_nul or Meta_space
alt keycode 57 = F41
string F41 = " "

keycode  15 = Tab   F91
        alt     keycode  15 = Meta_Tab        
        shift   alt     keycode  15 = F92

# backtab and M-backtab
string F91 = "\033[Z"
string F92 = "\033\033[Z"

, and in ~/.inputrc the following:

# Ctrl-Right arrow
"\e[1;5C": forward-word
# Ctrl-Left arrow
"\e[1;5D": backward-word

, then run
 # dpkg-reconfigure console-setup ; dpkg-reconfigure keyboard-configuration
-------------------------------------------------------------------------------

Rodolfo

Reply via email to