1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 23:04:49 +03:00
wezterm/docs/examples/default-search-mode-key-table.markdown
Wez Furlong 3f7443f4c1 showkeys/docs: generate copy_mode defaults from the code
Uses `wezterm show-keys --lua --key-table copy_mode` to dump the
actual copy mode key table.  Include that in the docs.

Same for search_mode.
2022-08-04 06:28:32 -07:00

987 B

local wezterm = require 'wezterm'
local act = wezterm.action

return {
  key_tables = {
    search_mode = {
      { key = 'Enter', mods = 'NONE', action = act.CopyMode 'PriorMatch' },
      { key = 'Escape', mods = 'NONE', action = act.CopyMode 'Close' },
      { key = 'n', mods = 'CTRL', action = act.CopyMode 'NextMatch' },
      { key = 'p', mods = 'CTRL', action = act.CopyMode 'PriorMatch' },
      { key = 'r', mods = 'CTRL', action = act.CopyMode 'CycleMatchType' },
      { key = 'u', mods = 'CTRL', action = act.CopyMode 'ClearPattern' },
      {
        key = 'PageUp',
        mods = 'NONE',
        action = act.CopyMode 'PriorMatchPage',
      },
      {
        key = 'PageDown',
        mods = 'NONE',
        action = act.CopyMode 'NextMatchPage',
      },
      { key = 'UpArrow', mods = 'NONE', action = act.CopyMode 'PriorMatch' },
      {
        key = 'DownArrow',
        mods = 'NONE',
        action = act.CopyMode 'NextMatch',
      },
    },
  },
}