Tidy up the parsing logic and make everything valid c11
while we are at it :P.
The patch also eliminates the optional macro argument from swap(),
replacing it with a dedicated function (swap2()).
This breaks compatibility with a small number of configs,
but makes things more consistent.
The stock XCompose file which ships with most distros isn't exhaustive
and uses a number of layout specific keysyms intended to be easy to
memorize (rather than globally accessible). To circumvent this problem
we ship our own set of simplified compose definitions.
If we encounter a utf8 sequence corresponding to a glyph for which a
known XKB compose sequence exists, we replace the glyph with the
corresponding sequence. This allows non-english users to easilly specify
alternate glyphs without having to memorize the appropriate macros.
This is a major release which breaks backward compatibility for
non-trivial configs. (we are still in beta after all :P).
In the absence of too much blowback this will probably become the final
v2 design.
Much of this harkens back to the v1, with some additional simplifications
and enhancements.
See DESIGN.md for a more detailed account.
The end result should (hopefully) be a little more robust (and systemd independent).
I no longer remember what possessed me to switch away from the original
inotify implementation, but udev detection seems to have caused
enough grief to warrant switching back.
This will probably break FreeBSD support without some kind of
inotify glue and/or a kqueue implementation. If any FreeBSD
users see this feel free to open an issue or submit a PR :P.
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.
- Introduces support for modifier layers.
- Simplifies config format.
- Improves consistency/expected key behaviour.
This breaks existing configs. Moving forward the config format is expected to
remain backwards compatible.
Most display servers ignore repeat events but VTs seem to require them.
For simplicity a repeat event is generated for each depressed virtual
key every time a repeat event is generated by hardware. This potentially
generates superfluous repeat events when multiple keys are held but is
mostly unnoticeable in practice (and only present on VTs).