From 76f1ece0ad66a2ac6cdf205671e5ec23db4a2da7 Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 18 Sep 2026 05:45:48 +0900 Subject: [PATCH] hypr: add AltGr hold-to-talk dictation on rutherford MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The desktop's TypeMatrix has no Copilot key, so bind the guarded hold-start/stop scripts to bare right Alt: Alt_R is the keysym that keycode 108 produces under us,dvorak (the Lua bind helper rejects code:NNN). The release bind carries the ALT modifier because Alt_R is itself Mod1 and still active while its release is processed — a modmask-0 release bind never matches, which left the daemon stuck recording. The se group remaps right Alt to ISO_Level3_Shift and is left alone on purpose so AltGr combos keep working there. --- hypr/hosts/rutherford.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hypr/hosts/rutherford.lua b/hypr/hosts/rutherford.lua index 9b8097b..3dcc928 100644 --- a/hypr/hosts/rutherford.lua +++ b/hypr/hosts/rutherford.lua @@ -7,3 +7,20 @@ hl.monitor({ position = "0x0", scale = 1, }) + +-- Bare AltGr (right Alt on the TypeMatrix) is the hold-to-talk dictation key +-- here. Raw keycode 108 (KEY_RIGHTALT) so it matches in every kb group. Press +-- starts, release stops; the scripts guard the daemon state so stray toggles +-- (key repeat, missed release) can't invert it (see keybindings.lua). +-- Kept per-host so machines that use AltGr for characters aren't affected. +-- Bare AltGr (right Alt on the TypeMatrix) is the hold-to-talk dictation key +-- here. Alt_R is the keysym right Alt produces under us,dvorak (pc's RALT); +-- the se group remaps it to ISO_Level3_Shift for AltGr combos and is left +-- alone on purpose. Press = start (modmask 0: Hyprland excludes the pressed +-- key's own modifier), release = stop (modmask ALT: Alt_R is itself Mod1 and +-- is still active while its release event is processed, so the release bind +-- must carry ALT to match). The scripts guard the daemon state so stray +-- toggles (key repeat, missed release) can't invert it (see keybindings.lua). +-- Kept per-host so machines that use AltGr aren't affected. +hl.bind("Alt_R", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-start.sh")) +hl.bind("ALT + Alt_R", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-stop.sh"), { release = true })