I'd like to swap RETURN (scroll  forward  N  lines,  default one window) and SPACE (scroll forward N lines, default 1) in less to get a for me more natural way to page through man pages.I saw years ago a colleague having this setup during a telnet session to a router while he was skimming through a config file, so I don't actually know if this setting was on his SSH client, on the node or wherever.Anyway, I'd like to achieve this to the most extent possible, be it locally or remotely.I checked less man page's key bindings section and found a reference to lesskey.Unfortunately, Darwin doesn't have this program.
How to change pager key bindings
osx;keyboard shortcuts;pager
Since Darwin lacks lesskey (see here and here) I installed less 458 via MacPorts and added the bindings using the defaults path for my system. lesskey will take $HOME/.lesskey and output $HOME/.less. You can also use LESSKEY or LESSKEY_SYSTEM.~ $ vi .lesskey#command\n        forw-screen\40       forw-line~ $ lesskey~ $ ls -d .less*.less       .lesshst    .lesskey