diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/simple.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/example/simple.c b/example/simple.c index f3a66db9..16d8d460 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 (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) { + wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1); } } |