aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-06-05 10:54:39 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-06-05 10:54:39 +0200
commit2b10720366a28b1de124c098e13317b26eff981b (patch)
tree840f1e2b9a31454f0b686b4d5968b8147e5047d9
parent321157bde3dd6853d86bf5ee8ec68ad22cd41910 (diff)
downloadriver-2b10720366a28b1de124c098e13317b26eff981b.tar.gz
river-2b10720366a28b1de124c098e13317b26eff981b.tar.xz
map: allow creating mappings with no modifiers
-rw-r--r--doc/riverctl.13
-rw-r--r--river/command/map.zig3
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/riverctl.1 b/doc/riverctl.1
index 530c8c9..4b8e49d 100644
--- a/doc/riverctl.1
+++ b/doc/riverctl.1
@@ -156,6 +156,9 @@ for a list of special key names.
.I command
can be any of the above commands.
+A mapping without modifiers can be created by passing an empty string as the
+modifiers argument.
+
.SH EXAMPLES
Bind bemenu-run to Super+P:
diff --git a/river/command/map.zig b/river/command/map.zig
index 3837a6f..991e651 100644
--- a/river/command/map.zig
+++ b/river/command/map.zig
@@ -27,6 +27,7 @@ const modifier_names = [_]struct {
name: []const u8,
modifier: u32,
}{
+ .{ .name = "", .modifier = 0 },
.{ .name = "Shift", .modifier = c.WLR_MODIFIER_SHIFT },
.{ .name = "Lock", .modifier = c.WLR_MODIFIER_CAPS },
.{ .name = "Control", .modifier = c.WLR_MODIFIER_CTRL },
@@ -40,7 +41,7 @@ const modifier_names = [_]struct {
/// Create a new mapping for a given mode
///
/// Example:
-/// map normal Mod4|Shift Return spawn alacritty
+/// map normal Mod4+Shift Return spawn alacritty
pub fn map(
allocator: *std.mem.Allocator,
seat: *Seat,