Skip to content
Myr

fix: shift+space now produces space.

Landed as 815d438

Most layouts inherit the one-level <SPCE> definition from pc(pc), so XKB never reports shift as consumed for the space key. Before, Fuzzel discarded any key event that still has unconsumed modifiers, so shift+space produced nothing at all. Now, we ignore an unconsumed shift when the keysym is space. Layouts that do define shifted levels on <SPCE> consume shift themselves, making this a no-op, and layouts that map shift+space to some other character never reach the special case.

authored by Mark Stosberg · committed by the platform · parent 251550d · Browse files · 2 files+24 added−1 removed
This landing

State

Landed as 815d438

By oscabriel

Diff stats

2 files+24 added−1 removed

  • other:+24 added−1 removed

2 files+24 added−1 removed

modified:CHANGELOG.md+3 added
43 unmodified lines
44* dmenu mode: `--index` returning an index one (or more) lower than45 the selected entry's actual position in the input whenever an46 earlier entry in the input was dropped for being unusable (e.g.47 invalid multibyte data), silently executing the wrong entry.48* Space+Shift producing no output ([#788][788]).4950[788]: https://codeberg.org/dnkl/fuzzel/issues/788515253### Security54### Contributors5556
1194 unmodified lines
modified:wayland.c+21 added-1 removed
1043 unmodified lines
1044 }1045 }1046 }10471048 if ((mods & ~consumed) != 0)1048 xkb_mod_mask_t unconsumed = mods & ~consumed;10491050 /*1051 * Most layouts inherit the one-level <SPCE> definition from pc(pc),1052 * so XKB never reports shift as consumed for the space key, and the1053 * event would be dropped despite resolving to a printable space.1054 *1055 * Layouts that do define shifted levels on <SPCE> consume shift1056 * themselves, making this a no-op, and those that map shift+space to1057 * something else (e.g. fr(bepo), or any layout with nbsp:level2)1058 * resolve to a different keysym and never reach here.1059 */1060 if (sym == XKB_KEY_space || sym == XKB_KEY_KP_Space) {1061 xkb_mod_index_t shift = xkb_keymap_mod_get_index(1062 seat->kbd.xkb_keymap, XKB_MOD_NAME_SHIFT);10631064 if (shift != XKB_MOD_INVALID)1065 unconsumed &= ~(1u << shift);1066 }10671068 if (unconsumed != 0)1069 goto maybe_repeat;10701071 /*1072 * Compose, and maybe emit "normal" character
2506 unmodified lines