Unix less – problem with Enter key on numeric keypad

lessunix

When I use the unix command 'less' I am constantly frustrated that using the Enter key on the numeric keypad doesn't work but instead types 'ESCOM'.

Is there a way to fix that?

Best Answer

This is because the number pad's Enter key sends a different command then the keyboard Enter key. You could globally re-map the key to send the normal Return/Enter command, but understand that it will effect how the key works in all the other programs too.

Here are some tips on how to remap the key in X-Windows using xmodmap, or in the console/terminal using loadkeys. You probably want to map keycode 104 ("KP_Enter") to the "Return" command.

Related Question