mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
Added VT switching to every example
This commit is contained in:
parent
fa6b3b290c
commit
d87574948e
4 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,10 @@ static void handle_keyboard_key(struct keyboard_state *kbstate,
|
|||
update_velocities(kbstate->compositor, 0, 16);
|
||||
break;
|
||||
}
|
||||
|
||||
if (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F12) {
|
||||
wlr_session_change_vt(kbstate->compositor->session, sym - XKB_KEY_F1 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue