aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/simple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/simple.c b/example/simple.c
index 16d8d460..34d9c9b1 100644
--- a/example/simple.c
+++ b/example/simple.c
@@ -42,7 +42,7 @@ static void handle_keyboard_key(struct keyboard_state *kbstate,
xkb_keysym_t sym, enum wlr_key_state key_state) {
if (sym == XKB_KEY_Escape) {
kbstate->compositor->exit = true;
- } else if (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
+ } else if (key_state == WLR_KEY_PRESSED && sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1);
}
}