mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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:
parent
bae3244ec6
commit
a026938547
1 changed files with 7 additions and 5 deletions
12
input.c
12
input.c
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue