afk v0.1.0 AFK.Keymap View Source
A keymap represents the virtual key layout of a keyboard.
It can be made up of multiple layers that can be activated and deactivated by
pressing AFK.Layer
keycodes.
A keymap just needs to be a list of maps, where each map is a mapping of
physical key identifier (usually an atom), to a AFK.Keycode.Keycode
.
For example:
[
# Layer 0 (default)
%{
k001: AFK.Keycode.Key.new(:a),
k002: AFK.Keycode.Modifier.new(:left_control),
k003: AFK.Keycode.Layer.new(:hold, 1),
k004: AFK.Keycode.Key.new(:caps_lock)
},
# Layer 1
%{
k001: AFK.Keycode.Key.new(:z),
k002: AFK.Keycode.Modifier.new(:right_super),
k003: AFK.Keycode.None.new(),
k004: AFK.Keycode.Transparent.new()
}
]
Link to this section Summary
Link to this section Types
Link to this section Functions
Loads a keymap from a file.
Saves a keymap to a file.