Allow switching VTs

This commit is contained in:
Isaac Freund
2020-04-06 22:23:30 +02:00
parent aef2245272
commit 5c320c0b8c
4 changed files with 42 additions and 9 deletions

View File

@ -115,7 +115,9 @@ pub const Server = struct {
/// Handle all compositor keybindings
/// Note: this is a hacky initial implementation for testing and will be rewritten eventually
pub fn handleKeybinding(self: *Self, sym: c.xkb_keysym_t, modifiers: u32) bool {
// This function assumes the proper modifier is held down.
if (modifiers & @intCast(u32, c.WLR_MODIFIER_LOGO) == 0) {
return false;
}
if (modifiers & @intCast(u32, c.WLR_MODIFIER_SHIFT) != 0) {
switch (sym) {
c.XKB_KEY_H => {