Files
LLeMbas-TTY/docs/config/lua/window/composition_status.md
T
Wez Furlong 327984d1d1 docs: add info about key tables. break key binding apart
The keys section was way too big; this splits it up into more
manageable pieces, adds a nice flow chart to show how key events
are processed and adds an example of using the new key tables feature.
2022-04-04 09:30:04 -07:00

33 lines
796 B
Markdown

# window:composition_status()
*Since: 20220319-142410-0fcdea07*
Returns a string holding the current dead key or IME composition text,
or `nil` if the input layer is not in a composition state.
This is the same text that is shown at the cursor position when composing.
This example shows how to show the composition status in the status area.
The cursor color is also changed to `orange` when in this state.
```lua
local wezterm = require 'wezterm';
wezterm.on("update-right-status", function(window, pane)
local compose = window:composition_status()
if compose then
compose = "COMPOSING: " .. compose
end
window:set_right_status(compose or "")
end);
return {
colors = {
compose_cursor = "orange",
},
}
```
See also: [window:leader_is_active()](leader_is_active.md).