From b00a4275f0f7d5d608db21fbffadc6d225e3d7c7 Mon Sep 17 00:00:00 2001 From: Hisam Fahri Date: Sat, 28 Dec 2024 13:31:57 +0700 Subject: [PATCH] Update Config.zig --- src/config/Config.zig | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/config/Config.zig b/src/config/Config.zig index c6702bb742..490a00afaa 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -769,7 +769,25 @@ class: ?[:0]const u8 = null, /// the documentation or using the `ghostty +list-actions` command. /// /// Trigger: `+`-separated list of keys and modifiers. Example: `ctrl+a`, -/// `ctrl+shift+b`, `up`. Some notes: +/// `ctrl+shift+b`, `up`. +/// +/// Valid keys are currently only listed in the +/// [Ghostty source code](https://github.com/ghostty-org/ghostty/blob/d6e76858164d52cff460fedc61ddf2e560912d71/src/input/key.zig#L255). +/// This is a documentation limitation and we will improve this in the future. +/// A common gotcha is that numeric keys are written as words: i.e. `one`, +/// `two`, `three`, etc. and not `1`, `2`, `3`. This will also be improved in +/// the future. +/// +/// Valid modifiers are `shift`, `ctrl` (alias: `control`), `alt` (alias: `opt`, +/// `option`), and `super` (alias: `cmd`, `command`). You may use the modifier +/// or the alias. When debugging keybinds, the non-aliased modifier will always +/// be used in output. +/// +/// Note: The fn or "globe" key on keyboards are not supported as a +/// modifier. This is a limitation of the operating systems and GUI toolkits +/// that Ghostty uses. +/// +/// Some additional notes for triggers: /// /// * modifiers cannot repeat, `ctrl+ctrl+a` is invalid. /// @@ -783,15 +801,6 @@ class: ?[:0]const u8 = null, /// mapping responds to the hardware keycode and not the keycode /// translated by any system keyboard layouts. Example: "ctrl+physical:a" /// -/// Valid modifiers are `shift`, `ctrl` (alias: `control`), `alt` (alias: `opt`, -/// `option`), and `super` (alias: `cmd`, `command`). You may use the modifier -/// or the alias. When debugging keybinds, the non-aliased modifier will always -/// be used in output. -/// -/// Note: The fn or "globe" key on keyboards are not supported as a -/// modifier. This is a limitation of the operating systems and GUI toolkits -/// that Ghostty uses. -/// /// You may also specify multiple triggers separated by `>` to require a /// sequence of triggers to activate the action. For example, /// `ctrl+a>n=new_window` will only trigger the `new_window` action if the