mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
Improved key handling in swaylock
Make escape clear buffer Add indicator states for ctrl,shift,super et al Add CapsLock indicator
This commit is contained in:
parent
38c44f2f27
commit
2d884d4e4f
5 changed files with 49 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ static void keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard,
|
|||
xkb_mod_mask_t mask = xkb_state_serialize_mods(state->xkb.state,
|
||||
XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED);
|
||||
state->xkb.modifiers = 0;
|
||||
state->xkb.caps_lock = xkb_state_mod_name_is_active(state->xkb.state, XKB_MOD_NAME_CAPS, XKB_STATE_MODS_LOCKED);
|
||||
for (uint32_t i = 0; i < MASK_LAST; ++i) {
|
||||
if (mask & state->xkb.masks[i]) {
|
||||
state->xkb.modifiers |= XKB_MODS[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue