Commit 4f40912
Let people choose their push-to-talk key (#188)
* Let people choose their push-to-talk key
Push-to-talk was Shift, for everyone, forever. Shift is a key people are
already pressing all day, which is why the gesture needed a 350ms hold
delay and a selection check to tell talking from typing a capital — and
why it still couldn't work at all for anyone whose browser or OS already
spends the key.
It's now a setting: Ctrl+Space (the new default), Shift, Option/Alt, or
off. Presets rather than a free capture, because each one behaves
differently on purpose. A chord is nobody's accident, so it records from
the press — no delay to sit out and nothing to guess. A bare modifier
keeps all the old hedging, because the ambiguity is real.
Everyone who was already here is written down as a Shift user by a
backfill, so no hands have to relearn anything on deploy; "no preference
recorded" now means "arrived after the setting existed".
The mic names its own key on hover and to a screen reader — with the
shortcut configurable, the button is the only thing on the page that can
say which one yours is. The server renders it; the controller rewrites it
knowing whether that key says Option or Alt on this machine.
Also folds the theme switcher's CSS into a shared .segmented control
rather than growing a second copy of it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Say when a hotkey save fails, and fit the picker on a phone
Two things from review.
The PATCH was fire-and-forget: a refused or dropped save left the page
lit up on a key the server never took, discovered only on the next visit
when push-to-talk silently wasn't what the settings said. The click stays
the feedback — no spinner narrating a round trip that takes milliseconds
— but a failure now puts the previous choice back and says so.
And the picker didn't fit a phone. Its no-shrink rule kept the strip at
full width, which crushed the explanation into one word per line and ran
the last option off the screen. Below 640px the row stacks and the strip
takes the width; segments size to content rather than splitting it evenly,
because "Ctrl+Space" has nowhere to break and an equal quarter clips it;
below about 350px the strip wraps to a second line rather than hiding
"Off" off the edge. Fixes the Theme row at those widths too.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 8b2a8c8 commit 4f40912
18 files changed
Lines changed: 635 additions & 40 deletions
File tree
- db
- migrate
- engine
- app
- assets/stylesheets/coplan
- controllers/coplan/settings
- helpers/coplan
- javascript/controllers/coplan
- models/coplan
- views/coplan
- plans
- settings/settings
- config
- db/migrate
- spec
- requests
- system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
835 | 836 | | |
836 | 837 | | |
837 | 838 | | |
| |||
852 | 853 | | |
853 | 854 | | |
854 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
855 | 890 | | |
856 | 891 | | |
857 | 892 | | |
| |||
2468 | 2503 | | |
2469 | 2504 | | |
2470 | 2505 | | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
2471 | 2510 | | |
2472 | 2511 | | |
2473 | 2512 | | |
| |||
2531 | 2570 | | |
2532 | 2571 | | |
2533 | 2572 | | |
2534 | | - | |
2535 | | - | |
| 2573 | + | |
| 2574 | + | |
2536 | 2575 | | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
2537 | 2579 | | |
2538 | 2580 | | |
2539 | 2581 | | |
2540 | 2582 | | |
2541 | 2583 | | |
2542 | | - | |
| 2584 | + | |
2543 | 2585 | | |
2544 | 2586 | | |
2545 | 2587 | | |
2546 | 2588 | | |
2547 | | - | |
| 2589 | + | |
2548 | 2590 | | |
2549 | 2591 | | |
2550 | 2592 | | |
2551 | 2593 | | |
2552 | 2594 | | |
2553 | | - | |
| 2595 | + | |
2554 | 2596 | | |
2555 | 2597 | | |
2556 | 2598 | | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
2557 | 2602 | | |
2558 | 2603 | | |
2559 | 2604 | | |
| |||
2562 | 2607 | | |
2563 | 2608 | | |
2564 | 2609 | | |
2565 | | - | |
| 2610 | + | |
2566 | 2611 | | |
2567 | 2612 | | |
2568 | 2613 | | |
2569 | | - | |
| 2614 | + | |
2570 | 2615 | | |
2571 | 2616 | | |
2572 | 2617 | | |
2573 | | - | |
| 2618 | + | |
2574 | 2619 | | |
2575 | 2620 | | |
2576 | 2621 | | |
2577 | 2622 | | |
2578 | | - | |
| 2623 | + | |
2579 | 2624 | | |
2580 | 2625 | | |
2581 | 2626 | | |
2582 | 2627 | | |
2583 | 2628 | | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
2584 | 2675 | | |
2585 | 2676 | | |
2586 | 2677 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
0 commit comments