[dev] less keys for w3m

From: Greg Reagle <list_AT_speedpost.net>
Date: Tue, 16 Apr 2024 16:39:08 -0400

This took me a long time to do. I made any key that has a function in less that is also available in w3m have the same key in w3m (2nd paragraph), with a few exceptions, that are in my 1st paragraph. I am posting this here for feedback, suggestions, improvements, etc. And in case anyone wants to try it. I did not do anything with Meta/Alt keys because some of them clash with my dwm keys.

I am fairly confident in my 1st through 3rd and 5th paragraphs. I am not so confident in my 4th paragraph (w3m features not in less). I tried to make it somewhat mnemonic and to keep similar functions on similar keys. For example:
  x and X are NEXT and PREV
  t and T and C-t all deal with tabs
  p & P and o & O have similar functionality

Here it is following:

# w3m defaults incompatible with less, but fundamental to w3m and very convenient
keymap C-j GOTO_LINK
keymap h MOVE_LEFT
keymap j MOVE_DOWN
keymap k MOVE_UP
keymap l MOVE_RIGHT

# w3m defaults not compatible with less
# ASCII hyphen-dash
keymap - SET_OPTION
keymap < BEGIN
keymap > END
keymap C-b PREV_PAGE
keymap C-e UP
keymap C-f NEXT_PAGE
keymap C-k DOWN
keymap C-m UP
keymap C-n UP
keymap C-p DOWN
keymap C-r REDRAW
keymap C-y DOWN
keymap DOWN UP
keymap e UP
keymap E LOAD
keymap f NEXT_PAGE
keymap LEFT SHIFT_LEFT
keymap m MARK
keymap r REDRAW
keymap RIGHT SHIFT_RIGHT
keymap s SAVE_SCREEN
keymap UP DOWN
keymap v EDIT
keymap V VERSION
keymap w PREV_PAGE
keymap y DOWN
keymap Y DOWN
keymap z NEXT_PAGE
keymap \' NEXT_MARK
# underscore
keymap _ OPTIONS

# w3m defaults already compatible with less
keymap ! SHELL
keymap / SEARCH
keymap = INFO
keymap ? SEARCH_BACK
keymap b PREV_PAGE
keymap C-g LINE_INFO
keymap C-l REDRAW
keymap C-s ISEARCH
keymap C-t TAB_LINK
keymap C-v NEXT_PAGE
keymap C-z SUSPEND
keymap g BEGIN
keymap G END
keymap H HELP
keymap J UP
keymap K DOWN
keymap n SEARCH_NEXT
keymap N SEARCH_PREV
keymap Q EXIT
keymap q QUIT
keymap R RELOAD
keymap SPC NEXT_PAGE
keymap | PIPE_BUF
# Home key
keymap M-[1~ BEGIN
# Insert key
keymap M-[2~ MENU
# End key
keymap M-[4~ END
# Page Up key
keymap M-[5~ PREV_PAGE
# Page Down key
keymap M-[6~ NEXT_PAGE
# F10 function key
keymap M-[21~ MENU

# w3m features not in less
keymap , TAB_LEFT
keymap . TAB_RIGHT
keymap a SAVE_LINK
keymap A ADD_BOOKMARK
keymap B BACK
keymap C COMMAND
keymap C-d BOOKMARK
keymap C-o COOKIE
keymap C-t TAB_LINK
keymap C-u GOTO_RELATIVE
keymap C-x ISEARCH_BACK
keymap C-] TAB_MENU
keymap d NEXT_WORD
keymap o LIST_MENU
keymap O MOVE_LIST_MENU
keymap p SELECT
keymap P SELECT_MENU
keymap t TAB_GOTO
keymap T NEW_TAB
keymap U GOTO
keymap x NEXT
keymap X PREV
keymap \" MOUSE_TOGGLE
keymap \\ VIEW
keymap { PREV_TAB
keymap } NEXT_TAB
keymap ~ LINK_MENU
# F10 function key
keymap M-[21~ MENU

# extra keys
keymap ^? PREV_PAGE
Received on Tue Apr 16 2024 - 22:39:08 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 23:24:08 CEST