mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
feat(vinput): open the command palette with right Ctrl
Pin keyd's right-hand modifiers (rightcontrol/rightshift/rightmeta) to their own keycodes; keyd otherwise folds them into the left keys. Set Vinput's MenuKey to right Ctrl and clear CommandKeys, which would shadow it.
This commit is contained in:
1 parent
5e5707dd13
commit
8e3f12aa19
4 files changed
+33
-5
No files matched your search
@@ -36,6 +36,7 @@ A setting that works around a bug or a hardware quirk.
|
||||
| WA-009 | USB-SATA bridge mitigations (`usbcore.autosuspend=-1`, `usb-storage.delay_use=10`) — `hosts/12kingdoms-youko/default.nix` | flaky JMicron JMS567 resets with UDMA-CRC and I/O errors | Drop once the bridge/controller is replaced; the signal is smartctl CRC/media errors | 2026-09-21 | on hardware change or CRC errors | active |
|
||||
| WA-010 | Insta360 Link USB reset on S3 resume — `hosts/idols-ai/default.nix` | the camera stays enumerated with a stalled UVC endpoint after resume | Drop after the Insta360 firmware or the kernel `uvcvideo` fixes it | 2026-08-01 | on kernel or firmware change | active |
|
||||
| WA-011 | Kernel module blacklist (`esp4`, `esp6`, `rxrpc`) — `hardening/kernel-hardening.nix` | attack surface for the Dirty Frag LPE (CVE-2026-43284 / CVE-2026-43500) | Kept as defence in depth; drop only if something needs those modules | 2026-10-03 | rarely | active |
|
||||
| WA-017 | keyd right-hand modifier passthrough — `modules/nixos/desktop/peripherals.nix` | keyd folds right Ctrl/Shift/Meta into their left keys | Drop once keyd or fcitx5 keeps right-hand modifiers distinct | 2026-10-05 | on keyd bump | active |
|
||||
|
||||
If WA-008 freezes recur, the fallback is to restore
|
||||
`nvme_core.default_ps_max_latency_us=0 nvme_core.io_timeout=4294967295 pcie_aspm=off`; this is a
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Fcitx5 Vinput
|
||||
|
||||
On `ai` and `shoukei`, install a Sherpa-ONNX model, then hold and release **right Alt** to dictate.
|
||||
**Right Shift** toggles Chinese/English; **left Shift** remains a normal modifier. Open Vinput from
|
||||
the application launcher for settings.
|
||||
Voice input on `ai` and `shoukei`, backed by a Sherpa-ONNX model. Open Vinput from the application
|
||||
launcher for settings.
|
||||
|
||||
## Key bindings
|
||||
|
||||
- Right Alt: record. Hold and release to dictate.
|
||||
- Right Ctrl: open the command palette (`/model /asr /scene /proc`).
|
||||
|
||||
Vinput resolves `TriggerKey` > `CommandKeys` > `MenuKey`. `TriggerKey` is right Alt by default; the
|
||||
config sets `MenuKey` to right Ctrl and clears `CommandKeys`, which otherwise defaults to right Ctrl
|
||||
and would shadow `MenuKey`. The addon reads list options as `[Option]` plus `0=`, not the
|
||||
`[Trigger]` shorthand in upstream's `vinput-config(5)` man page.
|
||||
|
||||
## One-time setup (CLI)
|
||||
|
||||
|
||||
@@ -15,11 +15,18 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
i18n.inputMethod.fcitx5.addons = [ vinput ];
|
||||
|
||||
# MenuKey opens the command palette; set it to right Ctrl. `CommandKeys`
|
||||
# (voice command on the selection) defaults to right Ctrl and outranks
|
||||
# `MenuKey`, so clear it or the palette never opens. List options use
|
||||
# fcitx5's `[Option]` + `0=` form, not upstream's `[Trigger]` shorthand.
|
||||
xdg.configFile."fcitx5/conf/vinput.conf" = {
|
||||
text = ''
|
||||
[Trigger]
|
||||
MenuKey=Super_R
|
||||
[MenuKey]
|
||||
0=Control_R
|
||||
|
||||
[CommandKeys]
|
||||
'';
|
||||
# fcitx5 rewrites this file at runtime, like `profile` and `config`.
|
||||
force = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -64,6 +64,17 @@
|
||||
# overloads the capslock key to function as both escape (when tapped) and control (when held)
|
||||
capslock = "overload(control, esc)";
|
||||
esc = "capslock";
|
||||
|
||||
# keyd rewrites right-hand modifiers as their left counterparts, so
|
||||
# pin them to their own keycodes. Vinput's MenuKey is right Ctrl and
|
||||
# Rime's right Shift switches CN/EN.
|
||||
rightcontrol = "rightcontrol";
|
||||
rightshift = "rightshift";
|
||||
rightmeta = "rightmeta";
|
||||
|
||||
# Right Alt is AltGr, the third-level shift on many European layouts
|
||||
# (e.g. `AltGr+2` is `@` in Spanish); keyd forwards it as-is.
|
||||
rightalt = "layer(altgr)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user