This patch reduces the compose sequence size by making use of keysyms a-z.
This is mainly done to improve support for programs with broken XCompose logic
(i.e chrome). A consequence of this is that the user will need to be using
the standard US layout on their display server to make use of unicode support.
Add a new listen command which prints layer state changes in real time. This
makes it possible to write things like custom visual indicators.
E.G
$ keyd listen
Sample output:
+shift
-shift
+layer
-layer
...
Mostly plumbing.
Summary:
- Key processing logic remains untouched.
- Simplified IPC logic.
- Streamlined the event loop.
- Consolidated config and descriptor parsing logic into config.[ch].
- Eliminated internal KEYD_* environment variables in favour of compile time macros.
- Added color coding to the daemon output.
- Load all configuration files on initialization.
The last change increases initialization time (on the order of μs) and resident
memory size, but simplifies the config logic and has the benefit of linting all
files immediately while also allowing for the introduction of in-daemon
reloading. This ultimately results in a net saving for the user since
most service managers are horrendously slow :(.
It also means hotplugged devices will use the in-memory config set (which
probably makes more sense anyway) instead of dynamically scanning the config
directory. This is more efficient for small config directories (<100 files),
but less efficient for large ones (uncommon).
This is technically a backwards incompatible change, but is almost
always a product of the user's misapprehension of the layer model.
Better to just make it illegal and and issue a warning.
This patch introduces a dedicated layout type for defining layers which are
intended to have a higher degree of permanence.
E.G
[dvorak:layout]
a = a
s = o
#etc...
[control]
1 = setlayout(dvorak)
Impetus:
The semantics afforded by normal layers are a common source of
confusion for users, who often try to toggle letter layouts and end up
inadvertently abusing stacking behaviour.
Additionally, while letter layouts can be defined and toggled like any
other layer, it is sometimes desirable to distinguish between these and
transient layers like nav clusters (#253).
To solve this, a new layer type expressly intended for defining layouts
is introduced; the layout. This also allows for dedicated
actions which operate exclusively on either type (e.g clear()).
Layouts have the following properties:
1. Only one may be active at any given time.
2. They cannot have any associated modifiers.
3. They cannot be used by actions which require a layer as an argument.
Swtich from
<name> = <key>
to
<key> = <name>
and confine keys to a single alias. This is arguably more intuitive
and reduces both config and implementation complexity.
While such a race condition mitigated by the commit theoretically
possible, evidence for it has yet to emerge (it didn't fix#162), and
routing events through the virutal keyboard causes the xinput issue
fixed in 88c84757.
To mitigate potential downstream race conditions when key/mouse events are sent
in quick succession (e.g oneshot clear mouse click), we send all button and key
events through the same virtual device.
All movement is still routed through a dedicated virtual pointer to minimize
display server input issues.
Add support for repeat events to the uinput output. This is achieved
using a dedicated thread in the vkbd output logic.
Similar functionality was introduced in 81c3d53f4c before the rewrite. This
solution is a bit cleaner (albeit more expensive) since it confines the
relevant code to the uinput vkbd and more closely simulates behaviour
of the real drivers (e.g by not generating redundant repeat events).