Multi-action keys with tap/long-press/double-tap/hold, gesture timing, display output colors, global font, and display output JSON/color parsing
- Multi-action system: each key supports multiple actions with different triggers (tap, long_press, double_tap, hold_start, hold_end) - GestureEngine: timing-based gesture detection with configurable thresholds - New config types: KeyAction, TimingConfig, DisplayOutput - Display output now supports JSON format (text/background/text_color) and first-line-as-hex-color format for dynamic key backgrounds - Display background colors are reflected in the web UI on the grid - renderUnicodeText/renderUnicodeTextOnImage accept custom text color (fg) - Global font setting (medium/regular) in Settings UI - PageManager.defaultFont used as fallback for per-key font - Alpine.js bundled locally (no CDN dependency) - Web UI: action tabs (Tap/Long Press/Double Tap/Hold), unified More section with appearance + display settings, gesture timing sliders in Settings - Grid: subtle action type icons in top-left corner matching display indicator style - Backward compatible: old config 'action' field auto-migrated to 'actions' array - M+ 1m font files in assets/ for reference - Updated config.example.json and README with all new features
This commit is contained in:
+38
-11
@@ -2,6 +2,7 @@
|
||||
"version": 1,
|
||||
"log_level": "info",
|
||||
"default_page": "main",
|
||||
"font": "medium",
|
||||
"devices": [
|
||||
{
|
||||
"serial": "",
|
||||
@@ -15,23 +16,45 @@
|
||||
{
|
||||
"index": 0,
|
||||
"icon": "fa:terminal",
|
||||
"action": {
|
||||
"type": "command",
|
||||
"command": "kitty",
|
||||
"background": true
|
||||
}
|
||||
"actions": [
|
||||
{
|
||||
"trigger": "tap",
|
||||
"type": "command",
|
||||
"command": "kitty",
|
||||
"background": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"icon": "fab:firefox",
|
||||
"label": "Browser",
|
||||
"font": "medium",
|
||||
"font_size": 11,
|
||||
"action": {
|
||||
"type": "command",
|
||||
"command": "firefox",
|
||||
"background": true
|
||||
}
|
||||
"actions": [
|
||||
{
|
||||
"trigger": "tap",
|
||||
"type": "command",
|
||||
"command": "firefox",
|
||||
"background": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": 7,
|
||||
"icon": "fa:chevron-right",
|
||||
"label": "Next",
|
||||
"actions": [
|
||||
{
|
||||
"trigger": "tap",
|
||||
"type": "builtin",
|
||||
"builtin": "page:next"
|
||||
},
|
||||
{
|
||||
"trigger": "long_press",
|
||||
"type": "builtin",
|
||||
"builtin": "page:prev"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -42,5 +65,9 @@
|
||||
"idle_seconds": 30,
|
||||
"image": "",
|
||||
"brightness": 10
|
||||
},
|
||||
"timing": {
|
||||
"long_press_ms": 500,
|
||||
"double_tap_ms": 300
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user