diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-06-21 13:40:09 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-06-21 13:40:09 +1200 |
commit | d87574948e839afe6ec0224183c59b633ad0c9a0 (patch) | |
tree | ab935777fb413666dab388b67be6c37e45cfca88 /example/pointer.c | |
parent | fa6b3b290ce33ac0ce9d18c1671c374baba81738 (diff) |
Added VT switching to every example
Diffstat (limited to 'example/pointer.c')
-rw-r--r-- | example/pointer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/example/pointer.c b/example/pointer.c index 8735c61e..9aeb41a7 100644 --- a/example/pointer.c +++ b/example/pointer.c @@ -50,6 +50,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); } } |