mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-08-29 15:22:07 +02:00
added SHIFT_SPACE_IS_TAB as compile time parameter
for the mobile layout, we want shift+space to produce tab , which needed to be implemented in the main code. For the desktop layout, we don't want this though, a config parameter now handles this at compile time. Ref: https://github.com/jjsullivan5196/wvkbd/pull/103
This commit is contained in:
@@ -301,7 +301,7 @@ kbd_unpress_key(struct kbd *kb, uint32_t time)
|
||||
zwp_virtual_keyboard_v1_key(kb->vkbd, time, 127, // COMP key
|
||||
WL_KEYBOARD_KEY_STATE_RELEASED);
|
||||
} else {
|
||||
if ((kb->last_press->code == KEY_SPACE) && (unlatch_shift)) {
|
||||
if ((kb->shift_space_is_tab) && (kb->last_press->code == KEY_SPACE) && (unlatch_shift)) {
|
||||
// shift + space is tab
|
||||
zwp_virtual_keyboard_v1_key(kb->vkbd, time, KEY_TAB,
|
||||
WL_KEYBOARD_KEY_STATE_RELEASED);
|
||||
@@ -404,7 +404,7 @@ kbd_press_key(struct kbd *kb, struct key *k, uint32_t time)
|
||||
}
|
||||
kb->last_swipe = kb->last_press = k;
|
||||
kbd_draw_key(kb, k, Press);
|
||||
if ((k->code == KEY_SPACE) && (kb->mods & Shift)) {
|
||||
if ((kb->shift_space_is_tab) && (k->code == KEY_SPACE) && (kb->mods & Shift)) {
|
||||
// shift space is tab
|
||||
zwp_virtual_keyboard_v1_modifiers(kb->vkbd, 0, 0, 0, 0);
|
||||
zwp_virtual_keyboard_v1_key(kb->vkbd, time, KEY_TAB,
|
||||
|
Reference in New Issue
Block a user