Files
LLeMbas-TTY/docs/config/lua/keyassignment/ActivateCommandPalette.md
T
mgpinf 9606fa2569 Add font configuration option for ActivateCommandPalette, CharSelect, PaneSelect (#6696)
* feat: option to configure font for ActivateCommandPalette, CharSelect, PaneSelect

Add configuration option for font for the below entities:
- ActivateCommandPalette
- CharSelect
- PaneSelect

For the above entities, if the font is not set in configuration, it
defaults to the font resolved in config.window_frame.font. This is in
order to maintain existing behavior of using the font resolved in
config.window_frame.font

* docs: documentation for added configuration options

Add documentation for below configuration options:
- command_palette_font
- char_select_font
- pane_select_font

* refactor: rename EntityFont to Entity

* docs: add example configuration in char_select_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* docs: add example configuration in pane_select_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* docs: add example configuration in command_palette_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* refactor: calculate make_bold in make_entity_font_impl method

* refactor: resolve font_size based on Entity

Since we can fetch font_size based on entity, we resolve it in
'make_entity_font_impl'. This removes the need to pass the pref_size
parameter

Apply changes mentioned in suggestions:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085350
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085949
2025-03-09 15:34:32 -07:00

49 lines
1.5 KiB
Markdown

# `ActivateCommandPalette`
{{since('20230320-124340-559cb7b0')}}
Activates the Command Palette, a modal overlay that enables discovery and activation of various commands.
```lua
config.keys = {
{
key = 'P',
mods = 'CTRL',
action = wezterm.action.ActivateCommandPalette,
},
}
```
<kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> is the default key assignment for `ActivateCommandPalette`.
The command palette shows a list of possible actions ranked by
[frecency](https://en.wikipedia.org/wiki/Frecency) of use from the command
palette.
![Command Palette](../../../screenshots/command-palette.png)
### Key Assignments
| Action | Key Assignment |
|--------|----------------|
|Exit command palette| <kbd>Esc</kbd> |
|Highlight previous item| <kbd>UpArrow</kbd> |
|Highlight next item| <kbd>DownArrow</kbd> |
|Clear the selection| <kbd>CTRL</kbd> + <kbd>u</kbd> |
|Activate the selection| <kbd>Enter</kbd> |
Typing text (and using <kbd>Backspace</kbd>) allows you to fuzzy match possible
actions. Each keystroke will reduce the list of candidate actions to those that
fuzzy match, ranked in decreasing order of the match score.
Activating the selected item will close the command palette and then invoke the
action.
See also:
* [command_palette_font](../config/command_palette_font.md)
* [command_palette_font_size](../config/command_palette_font_size.md)
* [command_palette_fg_color](../config/command_palette_fg_color.md)
* [command_palette_bg_color](../config/command_palette_bg_color.md)
* [ui_key_cap_rendering](../config/ui_key_cap_rendering.md)