Rydeen is a daemon to map keyboard/gesture event to key input/shell command.
Rydeen is built on top of libinput and uinput, with libev for event handling.
The configuration file is either of ./config.yml
or /etc/rydeen/config.yml
.
All detected keyboards are exclusively grabbed by this program and key events are sent instead by an uinput device. Key events that doesn't match any of modifiers or entries automatically transferred identically by uinput.
However, since this program doesn't grab mouse, mouse button events are never transferred except for those described in action
.
The type keysym
is string
that represents XKB's keysym. You can check out the keysym by running xkbcli interactive-evdev [--layout (your keyboard layout)]
.
Additionally, some keysyms for mouse buttons are added: "mouse:left"
, "mouse:right"
, "mouse:middle"
, "mouse:forward"
, "mouse:backward"
.
The type action
is string
| array
that represents a key/command action.
If string
, this node represents a command action and the value is executed by shell (e.g. "brightnessctl s +10%"
).
If array
, this node represents a key action and each element of this node represents a state of a key. Elements are keysym
s possibly prefixed with +
or -
, with each represents pressing and releasing (e.g. ["+Control_L", "w", "-Control_L"]
means "Press left control and click (press and release) W and release left control").
The type swipe_direction
is "up"
| "down"
|"left"
|"right"
.
property | type | default | description |
---|---|---|---|
general |
map |
General configuration | |
general.swipe_threshold |
float |
50.0 |
Distance needed for swipe action to be triggered |
general.pinch_triggered (ignored) |
float |
0.2 |
Scale needed for pinch action (not implemented) to be triggered |
general.key_interval |
float |
0.0 |
Interval of each key signal by key action |
general.key_repeat_delay |
float |
0.5 |
Delay of "repeat" signal by uinput when the key is held |
general.key_repeat_interval |
float |
0.03333 |
Interval of "repeat" signal by uinput when the key is held |
general.shell |
string |
"sh" |
Path/command of shell to execute command action |
general.keyboard |
map |
RMLVO used to convert keysym to keycode |
|
general.keyboard.rules |
string |
NULL |
"rules" of RMLVO |
general.keyboard.model |
string |
NULL |
"model" of RMLVO |
general.keyboard.layout |
string |
NULL |
"layout" of RMLVO |
general.keyboard.variant |
string |
NULL |
"variant" of RMLVO |
general.keyboard.options |
string |
NULL |
"options" of RMLVO |
modifiers |
map |
Modifiers. Each key of this node represents the name of a modifier. | |
modifiers.(name) |
array |
Each element of this node represents a key triggering this modifier. This modifier is triggered if either of the keys in this node is triggered. | |
modifiers.(name)[].key |
keysym |
Keysym triggering this modifier | |
modifiers.(name)[].transfer |
bool | keysym |
true |
How to handle key input triggering this modifier with uinput device. true ...the same key as input is sent. false ...no key is sent. keysym ...specific key is sent.The key sent here doesn't trigger subsequent "repeat" signals as you hold the key. When key is a mouse button, this field is always false regardless of the configured value. |
entries |
array |
Each element of this node represents an entry that maps key+modifier/gesture to key/command action. There are two types of entries: key entry and gesture entry .Entries that comes later in the array are priotized. |
|
entries[] |
map |
||
entries[].key (key entry ) |
keysym |
Keysym of the key triggering this entry. Existence of this node means this entry is key entry . |
|
entries[].modifiers (key entry ) |
array |
The names of the modifier to trigger this entry. This entry is triggered if all of modifier listed here are triggered. | |
entries[].modifiers[] (key entry ) |
string |
The name of the modifier. This must be one with keys of modifiers . |
|
entries[].on_press (key entry ) |
action |
The action executed when this entry is triggered. | |
entries[].on_release (key entry ) |
action |
depends on on_press |
The action executed when this entry is un-triggered. If this node doesn't exist and on_press is a key action that leaves some keys pressed, this node is filled with key action that releases them (e.g. {..., on_press: ["+Control_L", "+Shift_L", "a"]} -> {..., on_press: ["+Control_L", "+Shift_L", "a"], on_release: ["-Shift_L", "-Control_L"]} ). |
entries[].gesture (gesture entry ) |
"swipe" |
The type of gesture triggering this entry. Currently swipe is supported. Existence of this node means this entry is gesture entry . |
|
entries[].fingers (gesture entry ) |
integer |
The number of finger of the gesture. 3 or 4 is supported. |
|
entries[].direction (gesture entry ) |
swipe_direction |
The direction of the gesture | |
entries[].on_start (gesture entry ) |
action |
The action executed when the gesture is triggered. If the action defined here is a key action that leaves some keys pressed, key signals that releases them is automatically appended (e.g. ["+Control_L", "+Shift_L", "a"] -> ["+Control_L", "+Shift_L", "a", "-Shift_L", "-Control_L"] ). |
|
entries[].on_reverse (gesture entry ) |
action |
The action executed when the gesture but with opposite direction is triggered |
|
entries[].repeats (gesture entry ) |
bool |
false |
Whether action defined in on_start and on_reverse is executed more than once as you move your fingers further |