mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-04-18 23:06:48 +02:00
Simplest key_mood
This commit is contained in:
parent
e58e63f2da
commit
9eee270dfd
@ -167,12 +167,11 @@ kbd_unpress_key(struct kbd *kb, uint32_t time) {
|
||||
|
||||
void
|
||||
kbd_press_key(struct kbd *kb, struct key *k, uint32_t time) {
|
||||
uint8_t mods_before;
|
||||
switch (k->type) {
|
||||
case Code:
|
||||
if (k->code_mod) {
|
||||
mods_before = kb->mods;
|
||||
kb->mods = k->code_mod;
|
||||
zwp_virtual_keyboard_v1_modifiers(kb->vkbd, k->code_mod, 0, 0, 0);
|
||||
} else {
|
||||
zwp_virtual_keyboard_v1_modifiers(kb->vkbd, kb->mods, 0, 0, 0);
|
||||
}
|
||||
if (compose == 1) {
|
||||
@ -195,10 +194,6 @@ kbd_press_key(struct kbd *kb, struct key *k, uint32_t time) {
|
||||
compose++;
|
||||
}
|
||||
}
|
||||
if (k->code_mod) {
|
||||
kb->mods = mods_before;
|
||||
zwp_virtual_keyboard_v1_modifiers(kb->vkbd, kb->mods, 0, 0, 0);
|
||||
}
|
||||
break;
|
||||
case Mod:
|
||||
kb->mods ^= k->code;
|
||||
|
Loading…
x
Reference in New Issue
Block a user