Giter Site home page Giter Site logo

rydeen's Introduction

Rydeen

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.

Configuration

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 keysyms 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.