input: don't hide cursor if key is 'shift'

Since shift is used to enable selecting text in mouse-grabbing
applications, hiding the cursor in this case is counter productive.
This commit is contained in:
Daniel Eklöf 2020-08-01 15:39:25 +02:00
parent bae3244ec6
commit a026938547
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

12
input.c
View file

@ -696,15 +696,17 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
return;
}
if (state == XKB_KEY_DOWN && term->conf->cursor.hide_when_typing) {
seat->pointer.hidden = true;
term_xcursor_update_for_seat(term, seat);
}
key += 8;
bool should_repeat = xkb_keymap_key_repeats(seat->kbd.xkb_keymap, key);
xkb_keysym_t sym = xkb_state_key_get_one_sym(seat->kbd.xkb_state, key);
if (state == XKB_KEY_DOWN && term->conf->cursor.hide_when_typing &&
sym != XKB_KEY_Shift_L && sym != XKB_KEY_Shift_R)
{
seat->pointer.hidden = true;
term_xcursor_update_for_seat(term, seat);
}
#if 0
char foo[100];
xkb_keysym_get_name(sym, foo, sizeof(foo));