Title: unix less - problem with Enter key on numeric keypad
Tags: unix;less
Question: 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?



Here is another 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.

Comment for this answer: The articles contain too much unrelated information. A simple excerpt would  be great!

Here is another answer: Use ```lesskey```.

```~ $ vi .lesskey
#command
\OM        forw-line
~ $ lesskey
```

If this character doesn't match the one in your keyboard try using the escaped octal value.
You can also use another action like ```invalid``` (beeps) or ```noaction```.

Comment for this answer: The commands above should be enough, provided you know `lesskey` or read the linked `man` page.
Comment for this answer: I am still lost. How do I find out the octal value? How can I make this change permanent? What does `\OM` mean? What does `forw-line` mean? Why the comment at the top, has it any relevance?

{'source': 'StackExchangeDataset', 'subset': 'superuser.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 2.5', 'CreationDate': '2010:00:05/18/10', 'FavoriteCount': 2.0, 'PostTypeId': 1, 'Tags': '<unix><less>', 'Title': 'unix less - problem with Enter key on numeric keypad', 'ViewCount': 2874, 'id': 142579, 'user_AboutMe': None, 'user_AccountId': 125043.0, 'user_DisplayName': 'Winter', 'user_Reputation': 263.0, 'user_Views': 41.0, 'user_id': 68200.0}}