1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 22:33:52 +03:00
wezterm/docs/config
Wez Furlong 028026049d add window:dead_key_is_active window:leader_is_active
This commit adds a couple of helper methods that provide insight into
the state of the keyboard layer.

The intent is for users to add status information about the keyboard
state.

This commit also ensures that we schedule an update when the leader
key duration expires, and ensures that we close out the leader state
for an invalid key press.

refs: #686
closes: #688

```lua
local wezterm = require 'wezterm';

wezterm.on("update-right-status", function(window, pane)
  local leader = ""
  if window:leader_is_active() then
    leader = "LEADER"
  end
  local dead = ""
  if window:dead_key_active() then
    dead = "DEAD"
  end
  window:set_right_status(leader .. " " .. dead)
end);

return {
  leader = { key="a", mods="CTRL" },
  colors = {
    dead_key_cursor = "orange",
  },
}
```
2022-01-02 19:41:21 -07:00
..
lua add window:dead_key_is_active window:leader_is_active 2022-01-02 19:41:21 -07:00
appearance.md add colors.dead_key_cursor to signal dead and leader key processing 2022-01-02 17:49:32 -07:00
files.md docs: clarify that all config dirs apply on all operating systems 2021-04-02 21:01:13 -07:00
font-shaping.md docs: update for 20220101-133340-7edc5b5a release 2022-01-01 13:36:37 -07:00
fonts.md docs: clean up the font documentation 2021-04-09 21:52:25 -07:00
keys.md docs: fixup Nop example 2021-10-03 09:18:41 -07:00
launch.md docs: update for 20210502-154244-3f7122cb 2021-05-02 16:13:32 -07:00
mouse.md allow left-button-release to copy to selection when shift is held 2021-12-23 12:33:51 -07:00