0
I use VNC, open an xterm, and for example when I press "NumPad7", it completes "Home" command. Also "NumPad1" is mapped to "End". How to fix this?
In fact there is a code for .cshrc that does the work required. But unfortunately I can't translate it into a bash code. Please help me to translate. Here is the code:
if ($?TERM) then
# fix the home, end, ins and del keys
if ($TERM == "xterm" || $TERM == "vt100" || \
$TERM == "vt102" || $TERM !~ "con*") then
# bind keypad keys for xterm, vt100, vt102, console
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[8~" end-of-line # End rxvt
endif
endif
Could you please be more specific? – Narek – 2011-02-20T08:18:15.837
@Narek: Please see my edited answer. – Paused until further notice. – 2011-02-20T14:43:57.857
No, the problem is that my numpad is ON, and the other numbers work correctly. Only 1 and 7 do not work. – Narek – 2011-02-20T15:08:02.057
@Narek: That's really weird. Try running
xev
and see if the output looks right. Check to see if something strange has been set usingxmodmap
. – Paused until further notice. – 2011-02-20T15:36:38.623