Some keyboards won't send more than two keypresses if shift and enter
are a subset of the pressed keys :/.
Also moved the panic logic into the main event loop to avoid
interference from key logic.
e.g
alt = layer(A) -> alt = layer(alt)
Additionally, left hand modifier names are shorthand
for both associated keycodes as opposed to just
the left one.
e.g:
control = esc
is equivalent to:
leftcontrol = esc
rightcontrol = esc
keyd redux take 1.
A rewrite which simplifies the config format and provides a
solid foundation for incrementally introducing experimental
features.
Internally:
- Modularized and rewrote most of the code
- Added a mini testing framework (t/)
Externally:
- Eliminated layer inheritance in favour of simple types.
(layouts are now defined with `:layout` instead of `:main`)
- Macros are now repeatable.
- Overload now accepts a hold threshold timeout.
- Config files are now vendor/product id oriented.
- SIGUSR1 now triggers a config reload.
- Modifiers are layers by default and can be extended directly.
- Config files now end in `.conf`.
- `layert()` is now `toggle()`.
- All layers are 'modifier layers' (terminological change)
- Eliminated the dedicated modifer layout.
- Modifiers no longer apply to key sequences defined within a layer.
(Layer sequences are now always executed verbatim.)
The old behaviour was unintuitive and can be emulated using nested
layers if necessary.
If an interposed key up event is detected after an overloaded key is
pressed the overloaded key up event is not interpreted as a tap. This is
especially noticeable in cases where the overloaded key is struck
quickly in succession. This patch modifies the behaviour so only an
interposed key down resolves the overloaded key in favour of its
associated layer.
- Disable echo to prevent noise when the terminal is focused.
- Properly distinguish between terminal input and stdout closure.
- Use \t as a delimiter to facilitate easier scripting. (#60)
- Immediately terminate on pipe closures (e.g keyd -m|head -n1).
- Include product/vendor ids.
- Ouptut to STDOUT by default.
The output shouldn't change (maybe, no promises) try to avoid relying on this.