🤖 AI Summary
Fed up with AI completions hijacking the Tab key (indent vs accept-suggestion), the author converted Caps Lock into a dedicated “accept completion” key and published a cross-platform how‑to. The change makes code completion deterministic: Caps Lock is remapped to an unused function key (F19) and VSCode’s various “Accept Suggestion” bindings are reassigned from Tab to F19. This fixes the UX problem where AI suggestions arrive mid-indent and Tab no longer reliably performs a single function.
Technical approach and caveats: on Windows use Microsoft PowerToys Keyboard Manager to map Caps Lock → F19; on macOS use Karabiner‑Elements (requires low‑level permissions) via Simple Modifications; on Linux use keyd (build from source: git clone, make, sudo make install, enable/start systemd) and set /etc/keyd/default.conf with “capslock = f19”. F19 was chosen for cross‑OS compatibility (macOS tops at F20 and Linux often has F20 colliding with media keys), and Linux users may need to inspect xmodmap if function keys are prebound (e.g., F20 → XF86AudioMicMute). Finally, VSCode doesn’t have a single binding to change — search and adjust completion-related keybindings sorted by precedence. The result is a predictable completion workflow, but be aware of permission trades (Karabiner) and OS keycode quirks when sharing keymaps.
Loading comments...
login to comment
loading comments...
no comments yet