docs(config): document binding media keys by xkb keysym name (#53)
- commit
- 3fbf9c73a8ecb1111d9c865f6d7bc591b5e98f43
- author
- bnema · · 2026-09-29 01:48 UTC
- committer
- GitHub · · 2026-09-29 01:48 UTC
- parent
- b3c68fb
- signature
- GPG Unverified
B5690EEEBB952194The key is unknown
2 files · +19 -0
M docs/config.md +9 -0
| @@ -82,6 +82,15 @@ HDR requires DRM HDR connector properties, suitable KMS planes, and Vulkan fp16 | |||
| 82 | 82 | ||
| 83 | 83 | - Keys are what the active layout prints: `cmd+é` on AZERTY. Write `=`, `#` and space by name: `cmd+equal`, `cmd+numbersign`, `cmd+space`. | |
| 84 | 84 | - `code:N` is a physical key (evdev code), the same on every layout: `code:2` to `code:10` are the digit row 1 to 9. | |
| 85 | + | - Other keys use their xkb keysym name, case-sensitive (`wev` shows it). Media keys have no default bind: | |
| 86 | + | ||
| 87 | + | ``` | |
| 88 | + | bind.XF86AudioRaiseVolume = spawn wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ | |
| 89 | + | bind.XF86AudioLowerVolume = spawn wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- | |
| 90 | + | bind.XF86AudioMute = spawn wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle | |
| 91 | + | bind.XF86MonBrightnessUp = spawn brightnessctl set +5% | |
| 92 | + | bind.XF86MonBrightnessDown = spawn brightnessctl set 5%- | |
| 93 | + | ``` | |
| 85 | 94 | - `none` removes a default bind. | |
| 86 | 95 | - `spawn <command>` runs a program without a shell; see [Running commands](desktop.md#running-commands). | |
| 87 | 96 | ||
| @@ -82,6 +82,15 @@ HDR requires DRM HDR connector properties, suitable KMS planes, and Vulkan fp16 | |||||
| 82 | 82 | ||||
| 83 | - Keys are what the active layout prints: `cmd+é` on AZERTY. Write `=`, `#` and space by name: `cmd+equal`, `cmd+numbersign`, `cmd+space`. | 83 | - Keys are what the active layout prints: `cmd+é` on AZERTY. Write `=`, `#` and space by name: `cmd+equal`, `cmd+numbersign`, `cmd+space`. | ||
| 84 | - `code:N` is a physical key (evdev code), the same on every layout: `code:2` to `code:10` are the digit row 1 to 9. | 84 | - `code:N` is a physical key (evdev code), the same on every layout: `code:2` to `code:10` are the digit row 1 to 9. | ||
| 85 | + | - Other keys use their xkb keysym name, case-sensitive (`wev` shows it). Media keys have no default bind: | |||
| 86 | + | ||||
| 87 | + | ``` | |||
| 88 | + | bind.XF86AudioRaiseVolume = spawn wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ | |||
| 89 | + | bind.XF86AudioLowerVolume = spawn wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- | |||
| 90 | + | bind.XF86AudioMute = spawn wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle | |||
| 91 | + | bind.XF86MonBrightnessUp = spawn brightnessctl set +5% | |||
| 92 | + | bind.XF86MonBrightnessDown = spawn brightnessctl set 5%- | |||
| 93 | + | ``` | |||
| 85 | - `none` removes a default bind. | 94 | - `none` removes a default bind. | ||
| 86 | - `spawn <command>` runs a program without a shell; see [Running commands](desktop.md#running-commands). | 95 | - `spawn <command>` runs a program without a shell; see [Running commands](desktop.md#running-commands). | ||
| 87 | 96 | ||||
M examples/config +10 -0
| @@ -164,3 +164,13 @@ bind.cmd+ctrl+shift+l = move-workspace-to-monitor-right | |||
| 164 | 164 | # Zoom: the whole display, live. | |
| 165 | 165 | bind.cmd+code:13 = scale-up | |
| 166 | 166 | bind.cmd+code:12 = scale-down | |
| 167 | + | ||
| 168 | + | # Media keys have no default. Bind them by their exact xkb keysym name | |
| 169 | + | # (case-sensitive; `wev` shows it) to your own tools: | |
| 170 | + | # bind.XF86AudioRaiseVolume = spawn wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ | |
| 171 | + | # bind.XF86AudioLowerVolume = spawn wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- | |
| 172 | + | # bind.XF86AudioMute = spawn wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle | |
| 173 | + | # bind.XF86AudioMicMute = spawn wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle | |
| 174 | + | # bind.XF86MonBrightnessUp = spawn brightnessctl set +5% | |
| 175 | + | # bind.XF86MonBrightnessDown = spawn brightnessctl set 5%- | |
| 176 | + | # bind.XF86AudioPlay = spawn playerctl play-pause | |
| @@ -164,3 +164,13 @@ bind.cmd+ctrl+shift+l = move-workspace-to-monitor-right | |||||
| 164 | # Zoom: the whole display, live. | 164 | # Zoom: the whole display, live. | ||
| 165 | bind.cmd+code:13 = scale-up | 165 | bind.cmd+code:13 = scale-up | ||
| 166 | bind.cmd+code:12 = scale-down | 166 | bind.cmd+code:12 = scale-down | ||
| 167 | + | ||||
| 168 | + | # Media keys have no default. Bind them by their exact xkb keysym name | |||
| 169 | + | # (case-sensitive; `wev` shows it) to your own tools: | |||
| 170 | + | # bind.XF86AudioRaiseVolume = spawn wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ | |||
| 171 | + | # bind.XF86AudioLowerVolume = spawn wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- | |||
| 172 | + | # bind.XF86AudioMute = spawn wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle | |||
| 173 | + | # bind.XF86AudioMicMute = spawn wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle | |||
| 174 | + | # bind.XF86MonBrightnessUp = spawn brightnessctl set +5% | |||
| 175 | + | # bind.XF86MonBrightnessDown = spawn brightnessctl set 5%- | |||
| 176 | + | # bind.XF86AudioPlay = spawn playerctl play-pause | |||