Commit af88f35
authored
voxtype: overlay_opacity knob + double-tap right-Option toggle (#195)
* feat(voxtype): overlay_opacity knob and double-tap modifier toggle
Two small UX additions:
- overlay_opacity (0.1-1.0, default 1.0): whole-ghost alpha, applied
at the NSPanel level so the drawing keeps its per-element alphas.
For when the ghost hides the text under it.
- double_tap_key / double_tap_ms: a second toggle trigger alongside the
hotkey chord — tap one modifier (e.g. right_alt, the right Option
key) twice on its own. Implemented inside the existing macOS event
tap by observing kCGEventFlagsChanged; the modifier is never
swallowed. Left/right are told apart by keycode + NX_DEVICE* flag
bit (verified against the SDK headers and live on the built-in
keyboard). Clean-tap rules: no other key or modifier during the
taps, press-to-press within double_tap_ms, fires on the second
release so Option-chords never trigger it.
Tests: new tests/test_voxtype_doubletap.py (config bounds, detector
state machine, stubbed event-tap integration, app wiring).
* docs: release note for PR #195 (voxtype opacity + double-tap)
* fix(voxtype): keep the double tap armed when a chord falls back
GitHub Codex on PR #195: an unresolvable chord (e.g. ';' needing Shift
on some layouts) sends the chords to pynput's observing fallback, which
silently dropped the layout-independent double-tap binding. Keep a
chord-less event tap for the double tap in that case (built before the
chord listener starts, so a failure leaks no handle-less listener).1 parent a10835f commit af88f35
8 files changed
Lines changed: 963 additions & 17 deletions
File tree
- docs-site/src/content/docs/tools/voxtype
- packages/voxtype
- src/voxtype
- tests
- release-notes
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
| |||
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
| 248 | + | |
242 | 249 | | |
243 | 250 | | |
244 | 251 | | |
| |||
296 | 303 | | |
297 | 304 | | |
298 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
299 | 323 | | |
300 | 324 | | |
301 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| |||
667 | 668 | | |
668 | 669 | | |
669 | 670 | | |
670 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
671 | 681 | | |
672 | 682 | | |
673 | 683 | | |
674 | | - | |
| 684 | + | |
675 | 685 | | |
676 | 686 | | |
677 | 687 | | |
678 | 688 | | |
679 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
680 | 700 | | |
681 | 701 | | |
682 | 702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
| |||
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
| 128 | + | |
| 129 | + | |
114 | 130 | | |
115 | 131 | | |
116 | 132 | | |
| |||
124 | 140 | | |
125 | 141 | | |
126 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
127 | 151 | | |
128 | 152 | | |
129 | 153 | | |
| |||
165 | 189 | | |
166 | 190 | | |
167 | 191 | | |
| 192 | + | |
168 | 193 | | |
169 | 194 | | |
170 | 195 | | |
171 | 196 | | |
| 197 | + | |
| 198 | + | |
172 | 199 | | |
173 | 200 | | |
174 | 201 | | |
| |||
266 | 293 | | |
267 | 294 | | |
268 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
269 | 330 | | |
270 | 331 | | |
271 | 332 | | |
| |||
427 | 488 | | |
428 | 489 | | |
429 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
430 | 494 | | |
431 | 495 | | |
432 | 496 | | |
| |||
454 | 518 | | |
455 | 519 | | |
456 | 520 | | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
457 | 530 | | |
458 | 531 | | |
459 | 532 | | |
| |||
0 commit comments