How uqqu/cadans works
Cadans is a Windows input-remapping system: users define assignments and combine them with conditions and active layers; keyboard or mouse events are interpreted as taps, holds, chords, or gestures, then trigger actions or continue interaction chains. The README documents this product workflow, while the sampled implementation is the separate C keyboard-hook prototype under c_test. The AutoHotkey runtime and GUI modules are present in the tree but were not sampled, so their internal links are documented at a high level rather than treated as inspected calls.
Main entry points: gesture_processing.ahk Gesture processing · gui.ahk Assignment GUI · keyboard_hook.c Keyboard hook · tdfw.c C prototype entry
Components 24
Configuration interface
- Assignment GUI
gui/gui.ahk - Assignment forms
gui/gui_forms.ahk - Gesture editor
gui/gui_gestures.ahk - Layer editor
gui/gui_layers.ahk
Input runtime
- Runtime entry
main.ahk - Global settings
core/config.ahk - Gesture processing
core/gesture_processing.ahk - Gesture rules
core/gestures.ahk - Key definitions
core/keys.ahk - Process context
core/processes.ahk - Callable actions
core/callable_functions.ahk
Assignment data
- Layer assignments
layers - Custom functions
user_functions.ahk
C hook prototype
- C prototype entry
c_test/tdfw.c - Keyboard hook
c_test/keyboard_hook.c - Mapping parser
c_test/json_parser.c - cJSON parser
c_test/cJSON.c - Mapping structures
c_test/structures.h - Key buffers
c_test/keybuffer.c - Mapping lookup
c_test/utils.c - Prototype mapping
c_test/c_test.json
Other components
- Cadans user
- Keyboard or mouse
- Input and text actions
Connections 24
- Cadans user → Assignment GUI: configures
README.md - Assignment GUI → Assignment forms: edits assignments
- Assignment GUI → Gesture editor: edits gestures
- Assignment GUI → Layer editor: edits layers
- Assignment GUI → Layer assignments: uses presets
README.md - Keyboard or mouse → Runtime entry: provides events
README.md - Runtime entry → Global settings: loads rules
- Runtime entry → Gesture processing: dispatches events
- Gesture processing → Gesture rules: recognizes gestures
- Gesture processing → Key definitions: interprets keys
- Gesture processing → Process context: checks context
- Gesture processing → Layer assignments: selects assignments
README.md - Gesture processing → Callable actions: resolves actions
- Callable actions → Custom functions: calls custom code
- Callable actions → Input and text actions: simulates input
README.md - C prototype entry → Mapping parser: loads mappings
c_test/tdfw.c - C prototype entry → Keyboard hook: installs hook
c_test/tdfw.c - Mapping parser → cJSON parser: parses JSON
c_test/json_parser.c - Mapping parser → Mapping structures: builds mappings
c_test/json_parser.c - C prototype entry → Prototype mapping: reads mapping
- Keyboard hook → Key buffers: tracks pressed keys
c_test/keyboard_hook.c - Keyboard hook → Mapping structures: looks up entries
c_test/keyboard_hook.c - Keyboard hook → Mapping lookup: finds mappings
c_test/keyboard_hook.c - Keyboard hook → Input and text actions: sends values