Files
LLeMbas-TTY/docs/config/lua/wezterm.gui/default_key_tables.md
T
Wez Furlong c0fff4e843 Add wezterm.gui.default_key_tables()
This provides a means for more easily extending the default key
tables without forcing the user to recreate the entire config
for themselves.

wezterm.gui.default_keys is also added by this, but it is likely
not as useful.
2022-09-07 10:21:54 -07:00

827 B

wezterm.gui.default_key_tables()

Since: nightly builds only

Returns a table holding the effective default set of key_tables. That is the set of keys that is used as a base if there was no configuration file.

This is useful in cases where you want to override a key table assignment without replacing the entire set of key tables.

This example shows how to add a key assignment for Backspace to copy_mode, without having to manually specify the entire key table:

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

local copy_mode = nil
if wezterm.gui then
  copy_mode = wezterm.gui.default_key_tables().copy_mode
  table.insert(
    copy_mode,
    { key = 'Backspace', mods = 'NONE', action = act.CopyMode 'MoveLeft' }
  )
end

return {
  key_tables = {
    copy_mode = copy_mode,
  },
}