Let a stray both-Shifts Caps Lock clear itself
CapsLock is the compose key, so Caps Lock has to live somewhere else, and both Shifts together is where it went. That combination is easy to hit by accident while typing, and the lock then sticks until you notice it and hit both Shifts again. shift:both_capslock_cancel sets the lock exactly the same way, but types the Shift keys as ALPHABETIC rather than TWO_LEVEL, so the next lone Shift releases it. Since a misfire happens while reaching for Shift anyway, it clears itself almost immediately. Compose is untouched: <CAPS> stays [Multi_key, Multi_key], so the ~/.XCompose emoji sequences work as before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
a439069b0d
commit
63e57e1bd5
@@ -7,7 +7,7 @@
|
||||
-- input = {
|
||||
-- -- Use multiple keyboard layouts and switch between them with Left Alt + Right Alt.
|
||||
-- kb_layout = "us,dk,eu",
|
||||
-- kb_options = "compose:caps,shift:both_capslock,grp:alts_toggle",
|
||||
-- kb_options = "compose:caps,shift:both_capslock_cancel,grp:alts_toggle",
|
||||
--
|
||||
-- -- Use a specific keyboard variant if needed (e.g. intl for international keyboards).
|
||||
-- kb_variant = "intl",
|
||||
|
||||
@@ -30,7 +30,11 @@ local vconsole = read_vconsole()
|
||||
|
||||
local kb_layout = vconsole.XKBLAYOUT or "us"
|
||||
local kb_variant = vconsole.XKBVARIANT or ""
|
||||
local kb_options = "compose:caps,shift:both_capslock"
|
||||
-- CapsLock is the compose key, so Caps Lock itself has to live somewhere else.
|
||||
-- Both Shifts together is the usual home for it, but it's easy to hit by
|
||||
-- accident while typing. The _cancel variant sets Caps Lock the same way and
|
||||
-- releases it on the next lone Shift, so a misfire clears itself.
|
||||
local kb_options = "compose:caps,shift:both_capslock_cancel"
|
||||
|
||||
-- Hyprland resolves keybindings against the first entry in kb_layout, not the
|
||||
-- layout that's currently active, so Omarchy's Latin-keysym bindings (SUPER + W
|
||||
|
||||
@@ -55,7 +55,7 @@ assert_input() {
|
||||
pass "$description"
|
||||
}
|
||||
|
||||
base_options="compose:caps,shift:both_capslock"
|
||||
base_options="compose:caps,shift:both_capslock_cancel"
|
||||
toggle_options="$base_options,grp:alts_toggle"
|
||||
|
||||
assert_input "missing vconsole.conf falls back to us" "[us] [] [$base_options]"
|
||||
|
||||
Reference in New Issue
Block a user