aboutsummaryrefslogtreecommitdiff
path: root/example/touch.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/touch.c')
-rw-r--r--example/touch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/example/touch.c b/example/touch.c
index 1b4233bb..2b6cb173 100644
--- a/example/touch.c
+++ b/example/touch.c
@@ -59,6 +59,8 @@ 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 (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);
}
}