docs/src/config/keybindings.md
55 lines · 1620 bytes
Keybindings config
The keybindings config binds each key to an action, or multiple keys for the same action. It can be found in ~/.config/youtube-tui/keybindings.yml.
Example keybindings config
Up:
0: MoveUp
Down:
0: MoveDown
Right:
0: MoveRight
Left:
0: MoveLeft
4: Back
Esc:
0: Deselect
Backspace:
0: Back
Enter:
0: Select
Keys
Keys are the name of the keys that are pressed in the keyboard, all keys are avaliable here.
Key modifiers
Key modifiers are the modifier keys that are pressed along with the actual key, for instance in Ctrl + C would have the modifier Ctrl and the key C.
Each modifier has its own code, for instance Shift would be 1 and Ctrl would be 2. The final modifier will be the sum of all modifier keys. (Ctrl + Shift would be a 3).
Keys reference
All possible keys can be found here.
Enums are represented using the character
!, for example theqkey would be!Char 'q'
Shift + Qhowever would be!Char 'Q'with0as modifier code asShiftturnsqinto an upper case character.
Modifiers reference
| Modifier | Code |
|---|---|
| None | 0 |
Shift |
1 |
Ctrl |
2 |
Alt |
4 |
Super/"Windows" key |
8 |
Hyper |
16 |
Meta |
32 |
All key modifiers (if any are added) will be in the code.