~ruther/dwl

bab3fdadf31fcd56fc0f4562b7fc3d28022cea39 — Guido Cella 2 months ago 0f86302
don't run keybindings twice when the shift keysym is the same

For keys like F1-F12 the keysym with the shift is the same as without.
Avoid running keybindings bound to these keys twice.
1 files changed, 4 insertions(+), 1 deletions(-)

M dwl.c
M dwl.c => dwl.c +4 -1
@@ 1749,6 1749,7 @@ keypress(struct wl_listener *listener, void *data)
				consumed[event->keycode] = 1;
				key->func(&key->arg);
				handled = 1;
				break;
			}
		}
	}


@@ 1807,8 1808,10 @@ keyrepeat(void *data)

	for (i = 0; i < group->nsyms; i++) {
		const Key *key = keybinding(group->mods, group->keysyms[i]);
		if (key)
		if (key) {
			key->func(&key->arg);
			break;
		}
	}

	return 0;