Pressing an overloaded key while the layer it is bound to is active
causes permanent activation since it is first cleared by the overloaded
key up event and then subsequently reset by the layer key up event.
In most cases the user is unlikely to have multiple keys corresponding
to the same layer active at the same time, however in the case of
overloaded keys it is sometimes desirable to combine the keycodes to
which they are bound with the same modifier layer to which they are also
bound.
To achieve this we toggle on the overload key down/up rather than
explicitly set the layer to achieve the desired effect in the unusual
case where it is combined with another activation key for the same
layer. This is the same technique we use for layer + layert combos
acting on the same layer.
Some keyboards come with a builtin mouse, presently we ignore such
devices altogether. This patch adds support for some of these by passing
EV_REL events through the uinput device unmodified.
It is worth noting that certain touchpads will generate EV_ABS
events which require the device to define the size of
the input area and are consequently unsupported. Fortunately
it seems that most of these devices register as separate input
devices and are ignored by keyd. If this becomes an issue
it may make sense to revisit creating a 1-1 mapping between virtual
and physical devices but this seems unnecessary at present.
man.md: use definition lists for command-line options
man.md: use tab indent for code block and whitespace changes
man.md: use backticks "`" where appropriate
- 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.
When starting keyd the last key event gets dropped. This happens because
keyd grabs the keyboard before the key up event can get generated. In most
cases this is benign and remedied by hitting the last key that was held
(usually enter) but can cause pathological behaviour in certain libinput
configurations. This patch causes keyd to wait for a neutral keyboard
state before proceeding with initialization.
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).