How keidan/asus-touchpad-numpad works
This is a Linux userspace driver that turns supported ASUS touchpads into configurable numpad overlays. At startup it locates or creates the adjacent configuration, resolves a layout and keymap, and identifies the touchpad; the driver then processes touch gestures and coordinates, emits virtual key events, and controls backlight brightness. The graph also preserves layout defaults and keyboard-layout detection. Main runtime relationships are supported by the excerpts, SOURCE INDEX references, or README; unsampled touchpad details are represented only where the README documents them.
Main entry points: main.rs Application startup · touchpad.rs Touchpad event driver · models.rs Config and layout · parser.rs JSON parser
Components 17
Startup and configuration
- Application startup
src/main.rs - Bundled layouts
src/config/defaults.rs - JSON parser
src/config/parser.rs - Config and layout
src/config/models.rs
Device detection
- Input device scan
src/sys/proc.rs
Touchpad driver
- Touchpad event driver
src/sys/touchpad.rs
Runtime support
- System utilities
src/sys/utils.rs - Keyboard layout detection
src/sys/keyboard.rs - Application logger
src/logger.rs
Other components
- Driver user
- Adjacent config
- Linux input registry
- DMI board identity
- Touchpad input device
- Virtual key device
- I2C backlight controller
- System calculator
Connections 20
- Driver user → Application startup: starts
README.md - Application startup → Adjacent config: creates if missing
src/main.rs - Application startup → Bundled layouts: requests defaults
src/main.rs - Bundled layouts → Adjacent config: writes JSON
src/config/defaults.rs - Application startup → JSON parser: loads configuration
src/main.rs - JSON parser → Adjacent config: reads JSON
src/config/parser.rs - JSON parser → Config and layout: deserializes into
src/config/parser.rs - Application startup → Config and layout: selects and validates
src/main.rs - Config and layout → System utilities: detects auto layout
src/config/parser.rs - System utilities → DMI board identity: reads board name
src/sys/utils.rs - Application startup → Input device scan: scans for touchpad
src/main.rs - Input device scan → Linux input registry: reads device entries
src/sys/proc.rs - Application startup → Touchpad event driver: initializes and runs
src/main.rs - Application startup → Application logger: configures logging
src/main.rs - Touchpad event driver → Config and layout: uses layout settings
src/sys/touchpad.rs - Touchpad event driver → Touchpad input device: reads touch events
README.md - Touchpad event driver → Virtual key device: emits key events
README.md - Touchpad event driver → I2C backlight controller: controls backlight
README.md - Touchpad event driver → System calculator: launches on zone tap
README.md - Touchpad event driver → Keyboard layout detection: uses layout detection
src/sys/touchpad.rs