#+SUBTITLE: Common Lisp tool to fine-tune your (computer) keyboard to your heart's content
A kmonad-like tool, written and configured in Common Lisp.
Benefits
1. Configuration is code, not data or a cut-down DSL - the full power of Common Lisp is at your disposal. A lot of feature requests in kmonad basically stem from the configuration being data, not code.
2. No need to restart for configuration to take effect - using SLIME or Sly, send Lisp expressions to the running program and make edit-restart-test cycles a thing of the past.
A /translator/ translates input to output. Each translator is associated with one or more predicates; if all the predicates pass, the translator takes effect, and could result in...
3. sending no output, but changing the state of the tool. e.g. change of layers or layout
Layouts are implemented as groups of predicates.
Types of predicates
1. Input pattern - a predicate matched against the raw input events. Could be a key down, a key up, a key up of a specific key received after some time of a key down of a specific key, etc. This makes it a superset of kmonad's "button definition commands".
2. Program/window predicates
3. Device predicates - could be an input device (laptop keyboard, USB keyboard), or a combination of devices (so input from any of those devices will match).
4. or any other Lisp function
We can have macros which apply one or more predicates to all enclosed translators, so that configuration may be arranged in arbitrary ways, e.g. grouped by devices, or by programs, etc.
1.=(make-input-pattern FOO &rest input-pattern-spec)= - DSL to concisely define common input patterns; return an input pattern object. Also define a predicate called =(input-pattern-FOO-p input)=, suitable for association with a translator.
2.=(make-translator input &key predicates output)= - return a translator object converting INPUT to OUTPUT if PREDICATES are true.