delete button in console

Polytropon freebsd at edvax.de
Thu Dec 31 19:34:54 UTC 2015


On Thu, 31 Dec 2015 14:11:53 -0500, mfv wrote:
> Hello,
> 
> I have similar keybindings that operate as expected for both the
> tty console and virtual console using xterm or urxvt.
> 
> However, the following keybindings (Ctrl+right_key_pad_arrow and
> Crtrl+left_key_pad_arrow) do not work on the tty console:
> 
>     bindkey "\e[1;5C"   forward-word
>     bindkey "\e[1;5D"   backward-word
> 
> Even though the environment variable for the terminal is identical:
> 
> # printenv | grep TERM
> TERM=xterm

Or simply use "echo $TERM". :-)

It even doesn't work with the traditional (sc-based) console
where TERM=cons25l1 (or cons25 for US preference).

Check the follwing in an X terminal:

	% cat
	^[[1;5D^[[1;5C	<- Ctrl + cursor keye
	^[[D^[[C	<- cursor keys

As expected, it works. And as you can see, it's the same code
sequence you have assigned (Escape [ 1 ; 5 C and D).

But when you do the same in text mode, both cases will (incorrectly)
be the same:

	% cat
	^[[D^[[C	<- Ctrl + cursor keys
	^[[D^[[C	<- cursor keys

So the Control key combination isn't recognized properly.



> Csh is my preferred shell for both console and virutal terminal.

So I'm not the last person actually using it... ;-)



> Any suggestions for a key binding that works on the tty console similar
> to the virtual terminal would be appreciated.  Alternatively, an
> explanation of why it will not work will also be appreciated.

Sorry, no idea _why_ this is, but only _that_ it is.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list