mirror of
https://github.com/wizbright/waybox.git
synced 2025-10-29 05:40:20 -04:00
Add keyboard shortcuts for switching VT
This commit is contained in:
parent
e938552d15
commit
3f2a6f7b6c
1 changed files with 12 additions and 0 deletions
|
|
@ -58,6 +58,18 @@ static bool handle_keybinding(struct wb_server *server, xkb_keysym_t sym, uint32
|
|||
* Returns true if the keybinding is handled, false to send it to the
|
||||
* client.
|
||||
*/
|
||||
|
||||
struct wlr_session *session = wlr_backend_get_session (server->backend);
|
||||
|
||||
if (modifiers & (WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT) &&
|
||||
sym >= XKB_KEY_XF86Switch_VT_1 &&
|
||||
sym <= XKB_KEY_XF86Switch_VT_12) {
|
||||
unsigned int vt = sym - XKB_KEY_XF86Switch_VT_1 + 1;
|
||||
wlr_session_change_vt (session, vt);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!server->config) {
|
||||
/* Some default key bindings, when the rc.xml file can't be
|
||||
* parsed. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue