Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 1
    It a really good explanation. As you said, many functions of less bound to esc+something else. It would be cool to setup quit from less by pressing Esc+Esc. Is it possible? Commented Feb 7, 2015 at 9:19
  • Terminal control sequences starting with ESC are sent to the terminal, not received from it. Pressing the Escape key adds keycode 27 to the input stream immediately... You can test this yourself with the code at shtrom.ssji.net/skb/getc.html Commented Feb 7, 2015 at 9:30
  • 1
    @ArturEshenbrener You can bind to ESC+ESC with \e\e. See the lesskey(1) man page. Commented Feb 7, 2015 at 9:33
  • @StephenKitt terminal control sequences starting with ESC are both sent to the terminal and received from the terminal. An example of from the terminal is an arrow key. An example of to the terminal is an instruction to move the cursor. Commented Feb 7, 2015 at 9:36
  • 1
    @Celada See my answer on how to use lesskey. Commented Feb 7, 2015 at 13:21