command: support repeating keyboard mappings

Repeating mappings are created using the -repeat option to the map
command:

    % riverctl map normal $mod+Mod1 K -repeat move up 10

- repeating is only supported for key press (not -release) mappings
- unlike -release, -repeat does not create distinct mappings: mapping a
  key with -repeat will replace an existing bare mapping and vice-versa

Resolves #306
This commit is contained in:
Keith Hubbard
2021-08-15 08:49:11 -04:00
committed by GitHub
parent 6e51a8fcdd
commit 2bdf9e20a5
9 changed files with 92 additions and 22 deletions
+2
View File
@@ -81,6 +81,8 @@ fn handleKey(listener: *wl.Listener(*wlr.Keyboard.event.Key), event: *wlr.Keyboa
self.seat.handleActivity();
self.seat.clearRepeatingMapping();
// Translate libinput keycode -> xkbcommon
const keycode = event.keycode + 8;