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.
A config file may include *aliases* which can be used as valid left hand values
An *alias* may be assigned to a key and used as a valid left hand value.
in place of one or more keycodes. For example, the default alias *meta* is bound
Multiple keys may be bound to a single alias, but _a given key may only be
to leftmeta and rightmeta. Thus the binding 'meta = a' is equivalent to the
assigned to one alias at a time_. For example, the keys 'leftmeta' and
bindings 'leftmeta = a' and 'rightmeta = a'.
'rightmeta' are bound to the alias *meta* by default. Thus the binding 'meta =
a' is equivalent to the bindings 'leftmeta = a' and 'rightmeta = a'.
Aliases are defined in a special section called 'aliases' where each line takes the form:
Aliases are defined in a special section called 'aliases' where each line takes
the form:
<name> = <key>
<key> = <name>
and _<key>_ must be a valid key name.
where _<key>_ must be a valid key name.
Note that <name> may itself be a valid key, in which case all references to the
Note that <name> may itself be a valid key name, in which case all references
key will be replaced with the new key. When used judiciously, aliases can be
to the key within the config file will be replaced with the new key. When used
used in conjunction with the include directive to share bindings between
judiciously, aliases can be used in conjunction with the include directive to
keyboards with different physical layouts.
share bindings between keyboards with different physical layouts.
For example:
For example:
@ -318,16 +320,18 @@ For example:
004c:0267
004c:0267
[aliases]
[aliases]
meta = leftalt
leftalt = meta
meta = rightalt
rightalt = meta
alt = leftmeta
rightmeta = alt
alt = rightmeta
leftmeta = alt
[main]
[main]
include common
include common
```
```
Allows the user to define a set of universal bindings in /etc/keyd/common without having to explicitly account for the transposed meta and alt keys on an apple keyboard.
Allows the user to define a set of universal bindings in /etc/keyd/common
without having to explicitly account for the transposed meta and alt keys within