AltGr is itself a modifier, and holding it broke dictation twice: Hyprland drops long-hold release events for modifier keys, so the daemon kept recording after the key went up, and the first phrase injected while the modifier was held never reached the target TUI. Bare Pause (Fn+F12 on the TypeMatrix) holds no modifier, so neither applies. The cheatsheet drops the AltGr mention again.
25 lines
1.3 KiB
Lua
25 lines
1.3 KiB
Lua
-- Host-specific overrides: Rutherford (desktop PC)
|
|
-- Loaded automatically by hyprland.lua via hostname detection.
|
|
|
|
hl.monitor({
|
|
output = "DP-1",
|
|
mode = "2560x1440@74.97",
|
|
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 Pause (Fn+F12 on the TypeMatrix) is the hold-to-talk dictation key
|
|
-- here. It was on bare AltGr before, but a held AltGr is itself a modifier:
|
|
-- Hyprland drops its long-hold release events, and the modifier state made
|
|
-- the first injected phrase disappear from the target TUI. Pause is not a
|
|
-- modifier, so nothing is held while whisrs types. 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 Pause aren't affected.
|
|
hl.bind("Pause", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-start.sh"))
|
|
hl.bind("Pause", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-stop.sh"), { release = true })
|