aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2022-01-17 12:38:41 +0100
committerIsaac Freund <mail@isaacfreund.com>2022-01-17 12:38:41 +0100
commitf79c784e84fc857d98ccc86225776bca23c382bc (patch)
tree35e16b4492f9f541b1cca12e5b0b48d8bb4a7de1
parent0bdf3488836c9aad3d8fdc8f4f6433daca9a42cf (diff)
downloadriver-f79c784e84fc857d98ccc86225776bca23c382bc.tar.gz
river-f79c784e84fc857d98ccc86225776bca23c382bc.tar.xz
command/map: add Alt/Super as aliases for Mod1/Mod4
I personally made the mistake of using Alt instead of Mod1 when messing with my config. This change makes things a bit more user friendly/intuitive.
-rw-r--r--doc/riverctl.1.scd11
-rw-r--r--river/command/map.zig2
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/riverctl.1.scd b/doc/riverctl.1.scd
index 7955e36..c1d86f1 100644
--- a/doc/riverctl.1.scd
+++ b/doc/riverctl.1.scd
@@ -162,14 +162,17 @@ is active. It cannot be entered or exited manually.
The following modifiers are available for use in mappings:
- Shift
- - Lock (Caps lock)
- - Control (Ctrl)
+ - Lock
+ - Control
- Mod1 (Alt)
- Mod2
- Mod3
- - Mod4 (Super, Logo, Windows)
+ - Mod4 (Super)
- Mod5
- - None (Create a mapping without modifiers)
+ - None
+
+Alt and Super are aliases for Mod1 and Mod4 respectively. None allows creating
+a mapping without modifiers
Keys are specified by their XKB keysym name. See
_/usr/include/xkbcommon/xkbcommon-keysyms.h_ for the complete list.
diff --git a/river/command/map.zig b/river/command/map.zig
index 13d2ff9..8b0f067 100644
--- a/river/command/map.zig
+++ b/river/command/map.zig
@@ -187,9 +187,11 @@ fn parseModifiers(
.{ .name = "Lock", .field_name = "caps" },
.{ .name = "Control", .field_name = "ctrl" },
.{ .name = "Mod1", .field_name = "alt" },
+ .{ .name = "Alt", .field_name = "alt" },
.{ .name = "Mod2", .field_name = "mod2" },
.{ .name = "Mod3", .field_name = "mod3" },
.{ .name = "Mod4", .field_name = "logo" },
+ .{ .name = "Super", .field_name = "logo" },
.{ .name = "Mod5", .field_name = "mod5" },
}) |def| {
if (std.mem.eql(u8, def.name, mod_name)) {