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