# First get rid of defaults keymap K NULL keymap J NULL keymap SPC NULL keymap - NULL keymap + NULL keymap C-v NULL keymap ESC-v NULL keymap C-f NULL keymap C-b NULL keymap C-n NULL keymap C-p NULL keymap < NULL keymap > NULL keymap . NULL keymap , NULL keymap ^ NULL keymap C-a NULL keymap W NULL keymap ^[[6~ NULL keymap ^[[5~ NULL keymap g NULL keymap ^[[1~ NULL keymap ^[[4~ NULL keymap ESC-< NULL keymap ESC-> NULL keymap [ NULL keymap ] NULL #keymap ^[[Z NULL #This is shift+tab keymap ESC-m NULL keymap ( NULL keymap ) NULL keymap C-j NULL keymap C-m NULL keymap ESC-C-j NULL keymap ESC-C-m NULL keymap ESC-w NULL keymap ESC-W NULL keymap C-s NULL keymap = NULL keymap ESC-l NULL keymap U NULL keymap V NULL keymap v NULL keymap R NULL keymap ESC-s NULL keymap : NULL keymap C-q NULL keymap T NULL keymap } NULL keymap { NULL keymap ESC-a NULL keymap ESC-b NULL keymap c NULL keymap ESC-: NULL keymap C-h NULL keymap q NULL keymap Q NULL keymap C-w NULL keymap C-d NULL keymap C-u NULL keymap C-e NULL keymap C-y NULL keymap 0 NULL keymap $ NULL keymap Z NULL keymap z NULL keymap ESC-g NULL keymap gg NULL keymap G NULL keymap w NULL keymap b NULL keymap C-n NULL keymap C-p NULL #keymap ESC-TAB NULL keymap f NULL keymap C-o NULL #keymap TAB NULL keymap C-j NULL keymap C-] NULL keymap I NULL keymap ESC-I NULL keymap ESC-C-j NULL keymap y NULL keymap u NULL keymap i NULL keymap gC-g NULL keymap C-g NULL keymap ";" NULL keymap M NULL keymap ESC-M NULL keymap F NULL keymap ESC-u NULL keymap t NULL keymap @ NULL keymap "#" NULL keymap | NULL keymap B NULL keymap L NULL keymap H NULL keymap s NULL keymap gf NULL keymap S NULL keymap E NULL keymap ESC-e NULL keymap C-r NULL keymap r NULL keymap C-l NULL keymap C-t NULL keymap d NULL keymap gt NULL keymap gT NULL keymap ESC-t NULL keymap C-wL NULL keymap C-wH NULL keymap a NULL keymap n NULL keymap N NULL keymap / NULL keymap ? NULL keymap C-@ NULL keymap ESC-n NULL keymap ESC-p NULL keymap \" NULL keymap ^[[2~ NULL keymap ^[[28~ NULL keymap ^[[E NULL keymap ^[[L NULL keymap o NULL keymap C-k NULL keymap D NULL keymap m NULL keymap ESC-c NULL keymap ESC-o NULL keymap ESC-k NULL keymap \\ NULL keymap ! NULL #keymap C-z NULL keymap ZZ NULL keymap ZQ NULL #urls operations................................................................ #keymap PEEK #Show current page url. #Focus in address bar. keymap o GOTO keymap C-l GOTO #Focus in address bar. Open in new tab. keymap O TAB_GOTO keymap ef PEEK_LINK #Show link under cursor. #Execute external browser = open current link in $BROWSER #tip: number(2-9) + external browser shortcut(M-o) executes executes the #external browser command linked to the prefix number. #See "External Program Settings" in "Option Setting Panel"(OPTIONS) #Open current link with external browser = sensible browser keymap M-o EXTERN #copy current url and remove newline at the end. #keymap yy EXTERN copy_url.sh keymap yy EXTERN "echo -n %s | xclip -i -selection clipboard" #keymap yy EXTERN "echo -n %s | xsel -b" #open link under cursor with external browser = sensible browser keymap M-p EXTERN_LINK #Copy link under cursor, It does not copy images urls keymap yf EXTERN_LINK 'env printf %s "$0" | xsel -b' #keymap yf EXTERN_LINK copy_url.sh #follow link in clipboard in the current tab. keymap p GOTO /usr/lib/w3m/cgi-bin/goto_clipboard.cgi #follow link in clipboard in new foreground tab. keymap P TAB_GOTO /usr/lib/w3m/cgi-bin/goto_clipboard.cgi keymap F TAB_LINK #Follow link in a new foreground tab #follow link under cursor in new background tab #keymap COMMAND "TAB_LINK ; PREV_TAB" keymap f GOTO_LINK #Follow link in current tab keymap C-j GOTO_LINK #Follow link (Enter = Ctrl+j) #scrolling.................................................................... #pager-like scrolling. keymap gg BEGIN #Go to the top. #go to line number 5 "5G" keymap G END #Go to the end. #keymap C-d NEXT_PAGE #keymap C-u PREV_PAGE #Av. Pag = M-[6~ Re. Pag = M-[5~ keymap SPC NEXT_PAGE #map Shift + space PREV_PAGE note: this is not present in default keymap #Remap PageUp to Shitf + Space #URxvt.keysym.Shift-space: \033[5~ keymap zz CENTER_V #center vertical-screen in cursor position keymap J PREV_TAB keymap K NEXT_TAB keymap d CLOSE_TAB #-bookmarks.................................................................... keymap C-d ADD_BOOKMARK #Add current page to bookmarks keymap gb VIEW_BOOKMARK #Show bookmarks keymap :b VIEW_BOOKMARK #Show bookmarks keymap C-b VIEW_BOOKMARK #Show bookmarks #-search....................................................................... keymap / ISEARCH #Enter find mode keymap C-f ISEARCH #Enter find mode keymap ? ISEARCH_BACK #Enter find mode backwards (incremental) #support regex expressions keymap n SEARCH_NEXT #Find next keymap N SEARCH_PREV #Find previous #-Commands.................................................................... #Execute w3m functions. keymap ! COMMAND keymap + HELP #View help keymap * OPTIONS #Option setting panel #keymap EXEC_SHELL #Execute shell command #Send rendered document to pipe keymap | PIPE_BUF #Execute shell command and browse #keymap PIPE_SHELL #Reload configuration files. keymap M-r REINIT keymap q QUIT #Quit w3m with confirmation. keymap ZZ EXIT #Quit w3m without confirmation. keymap r RELOAD #Reload current page. #keymap S INTERRUPT #Send w3m to background=C-z in bash #-save/load..................................................................... #Save document source (html), sometimes download a gzip file (without extention) keymap :w DOWNLOAD keymap C-s DOWNLOAD #Save redered document keymap :W PRINT #keymap ESC-C-J SUBMIT #e.g. execute search in google #Load local file. keymap C-o LOAD #-miscellany.................................................................... keymap C-Y DOWNLOAD_LIST #Show download menu keymap C-y DOWNLOAD_LIST #Show download menu keymap :E EDIT_SCREEN #Edit current rendered document with sensible-editor keymap :e EDIT #Edit current local file wtih sensible-editor keymap M-u LIST #Show list of all links, anchors and images keymap M-m MOUSE_TOGGLE #Toggle activity of mouse keymap M-i VIEW_IMAGE #pendant change SC.View image in extern viewer keymap M-I DISPLAY_IMAGE #Show Context menu. It has specific option for links under the cursor. keymap M-c MENU #-word operations............................................................... #send word interactively to specified dictionary #keymap DICT_WORD #send the word under cursor and send it to specified dictionary #goldendict must be opened before if not w3m freezes. #keymap a DICT_WORD_AT #tests.......................................................................... #Folding lines for plain text files keymap C-x COMMAND "SET_OPTION fold_line=toggle ; RESHAPE" #keymap C-x DISPLAY_IMAGE #keymap C-v MARK_URL #keymap ; MARK_URL #keymap C-z MAIN_MENU #Execute search in search camp (useful when are no buttons to search #in the non-javascript version) e.g., Youtube. #keymap C-z SUBMIT #keymap C-x MOUSE_TOGGLE #keymap C-v PIPE_SHELL # # # My custom bindings keymap C-p COMMAND "SAVE_SCREEN /home/lxf/inbox/output.txt && mutt -s 'output test' sng@luxagraf.net < /home/lxf/inbox/output.txt" keymap M-p COMMAND "SAVE_SCREEN /home/lxf/inbox/%s.txt" ## fzf search of commands keymap xx COMMAND "READ_SHELL ~/.w3m/cgi-bin/fnx_fzfmiru.cgi ; BACK ; GOTO file:/cgi-bin/fnx_execute.cgi ; BACK" keymap sg COMMAND "SET_OPTION dictcommand=file:///cgi-bin/omnibar_google.cgi ; DICT_WORD" keymap sb COMMAND "SET_OPTION dictcommand=file:///cgi-bin/omnibar_brave.cgi ; DICT_WORD" # Navigate back without deleting current buffer keymap H PREV keymap < PREV keymap LEFT PREV # Navigate forward without deleting current buffer keymap > NEXT keymap RIGHT NEXT # Display current buffer URL keymap c PEEK # Pop-up menu with open buffers keymap b SELECT_MENU #### toggle hinting mode (vimium similar) keymap f-SPC COMMAND "SET_OPTION display_link_number=toggle ; RESHAPE" #### jump to link number (e.g press 3ff) and hide hinting mode (similar to gg in vim) keymap ff COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN" #### open current cursor link in new tab and hide hinting mode keymap ft COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; TAB_LINK" #### copy link to clipboard (e.g press f-SPC then 4fy to yank url) keymap fy COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN ; EXTERN_LINK 'url=%s ; printf "%b" "$url" > /tmp/clipbrd.txt ; printf "%b" "$url" | xsel -b 2>/dev/null ; printf "%b" "$url" | tmux load-buffer - ; printf '%s' "$url" | wl-copy 2>/dev/null ; printf '%s' "$url" | clip 2>/dev/null ; printf '%s' "$url" > /dev/clipboard 2>/dev/null ; printf '%s' "$url" | pbcopy 2>/dev/null ; printf '%s' "$url" | termux-clipboard-set 2>/dev/null'" #### jump to link number and open it keymap fo COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN ; GOTO_LINK" #### jump to link number and open it in new tab keymap fn COMMAND "SET_OPTION display_link_number=0 ; RESHAPE ; LINK_BEGIN ; TAB_LINK" # yank url to multiple clipboard (under cursor) #keymap yy EXTERN_LINK "url=%s ; printf "%b" "$url" > /tmp/clipbrd.txt ; printf "%b" "$url" | xsel -b 2>/dev/null ; printf "%b" "$url" | tmux load-buffer - ; printf '%s' "$url" | wl-copy 2>/dev/null ; printf '%s' "$url" | clip 2>/dev/null ; printf '%s' "$url" > /dev/clipboard 2>/dev/null ; printf '%s' "$url" | pbcopy 2>/dev/null ; printf '%s' "$url" | termux-clipboard-set 2>/dev/null" # yank url to multiple clipboard (current page) #keymap YY EXTERN "url=%s ; printf "%b" "$url" > /tmp/clipbrd.txt ; printf "%b" "$url" | xsel -b 2>/dev/null ; printf "%b" "$url" | tmux load-buffer - ; printf '%s' "$url" | wl-copy 2>/dev/null ; printf '%s' "$url" | clip 2>/dev/null ; printf '%s' "$url" > /dev/clipboard 2>/dev/null ; printf '%s' "$url" | pbcopy 2>/dev/null ; printf '%s' "$url" | termux-clipboard-set 2>/dev/null" keymap Q COMMAND "EXTERN 'echo %s > ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; READ_SHELL ~/.w3m/cgi-bin/restore_session.cgi ; EXIT"