Add configuration slider for double tapping

This commit is contained in:
2026-03-01 20:45:23 +01:00
parent ef97d8f32a
commit f155d16399
8 changed files with 248 additions and 52 deletions
+32
View File
@@ -89,6 +89,38 @@
</div>
</div>
<div class="section-label">Tap Configuration</div>
<div class="card">
<div class="param">
<div><div class="param-label">Tap Threshold</div><div class="param-desc">Impact force needed · 1 LSB ≈ 62.5 mg at ±2g</div></div>
<input type="range" id="slTapThreshold" min="1" max="31" step="1" value="12"
oninput="updateDisplay('tapThreshold',this.value)" onchange="writeConfigBlob()">
<div class="param-value" id="valTapThreshold">750 mg</div>
</div>
<div class="param" style="border-bottom:none;padding-bottom:0">
<div><div class="param-label">Double-Tap Action</div><div class="param-desc">What a double-tap sends</div></div>
<div class="segmented" style="grid-column:2/4">
<button class="seg-btn active" id="tapActLeft" onclick="setTapAction(0)" disabled>LEFT</button>
<button class="seg-btn" id="tapActRight" onclick="setTapAction(1)" disabled>RIGHT</button>
<button class="seg-btn" id="tapActMiddle" onclick="setTapAction(2)" disabled>MIDDLE</button>
<button class="seg-btn" id="tapActKey" onclick="setTapAction(3)" disabled>KEY</button>
</div>
</div>
<div class="tap-key-row" id="tapKeyRow" style="display:none">
<div class="param-label" style="font-size:11px">HID Keycode (hex)</div>
<input type="text" id="tapKeyHex" placeholder="e.g. 28 = Enter" maxlength="4"
style="font-family:var(--mono);font-size:12px;background:var(--bg);color:var(--text);border:1px solid var(--border);padding:4px 8px;width:110px"
oninput="onTapKeyInput()" disabled>
<div class="param-label" style="font-size:11px;margin-left:12px">Modifier</div>
<div style="display:flex;gap:6px;flex-wrap:wrap">
<label class="mod-btn"><input type="checkbox" id="tapModCtrl" onchange="writeConfigBlob()" disabled><span>Ctrl</span></label>
<label class="mod-btn"><input type="checkbox" id="tapModShift" onchange="writeConfigBlob()" disabled><span>Shift</span></label>
<label class="mod-btn"><input type="checkbox" id="tapModAlt" onchange="writeConfigBlob()" disabled><span>Alt</span></label>
<label class="mod-btn"><input type="checkbox" id="tapModGui" onchange="writeConfigBlob()" disabled><span>GUI</span></label>
</div>
</div>
</div>
<div class="section-label">Axis Configuration</div>
<div class="card">
<div class="flip-row">