Adds support for KEY_VOICECOMMAND and drops support for
KEY_ALTERASE to keep keycodes within byte range. A cursory grep
of the kernel sources suggests ALTERASE is not used by any modern
input driver anyway.
REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES are not present
in some older kernels. Since they are presently unhandled,
remove them to allow old (< 2018) kernels to build.
overload() and timeout() rely on being able to store and execute descriptors
without tying them to specific key states. To achieve idempotence, oneshot()
currently neutralizes the upstroke of the activating key if the layer in
question is already active. This can yield an activation asymmetry in the rare
event that the oneshot descriptor is not associated with a physical key and is
activated while the associated layer is already active.
To fix this, we activate the layer for each oneshot depression and keep track
of the oneshot activation depth.
Presently macro_sequence_timeout is strictly an inter-sequence timeout
which does not admit a pause between intra-sequence modifiers. This
patch applies such a pause to accommodate broken input stacks.
Some distros set this flag by default, so it
seems prudent to ensure we can compile with it
set. This should fix master compilation
issues on arch and fedora.
It turns out the linux uinput driver is capable of
automatically generating repeat events if you
flip the right kernel bit, so we can eliminate
the kludgy thread based repeat logic.
This should also fix#397, since said code was relying
on undefined pthread behaviour that caused some systems
to busy wait.
Replace hacky Sway and Hypr application detection logic with a generic
wayland implementation that works for wlroots based compositors.
This also provides the scaffolding for adding Gnome/KDE support
in the future should they decide to implement the requisite
protocols.
Sometimes it is desirable to transition directly from one
toggled layer to another.
This commit extends swap() to work not just with keys bound to layer(),
but also toggle() and oneshot(). For swaps which occur one layer
deep (the anticipated use case), this is rougly equivalent of a
clear() followed by toggle(<target>).
This seems to be a common point of confusion for new users who don't
understand keyd's modifier semantics. Instead of allowing 'leftshift'
and company to be directly assigned and wreak havoc with properly
bound modifier keys, we now just transparently make modifier keys like
leftshift equivalent to their corresponding layers.
This is technically a breaking change since it makes improperly
bound keys subject to reassignments in the default modifier layer,
but one could argue this was undefined (and rare)
behaviour anyway. A warning is also now issued to ward the
user in the right direction.
Simplify the modifier table and reuse config parsing logic to simplify
config initialization. This comes with a small performance
penalty when parsing configs (~50 us), but makes things much
tidier.
The following change in udev seems to incorrectly identify the virtual
pointer as a 'tablet pad'.
https://github.com/systemd/systemd/commit/0855ce6772#diff-e3c18b2fc4f50acbb9f2d66a1daf229fde99a5c8785f17aa6f69e6a9c41ae2c7R261
This patch removes the BTN_[0-9] capability from the virtual pointer (which is
presently unused) to avoid the issue. It is unclear if this behaviour should
be considered pathological in udev, since I can't find any documentation which
suggests it is illegitimate for non tablet devices to make use of these codes.