gimp but for windows: a wayland compositor
git clone https://github.com/m-col/wimp
Files | Refs | Readme

Commit d592e880797c7010d79ff2f15323576fe021b2de
Parent: 9c6f2f518ca09c7e1fc060e59cd502daf02aa4b1
Author: mcol <mcol@posteo.net>
Date: 2021-01-30 18:00:50 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-01-30 18:00:51 +0000

XF86Switch_VT_X no longer required for vt switching when using alt

Closes #18

src/config.c Modified

@@ -355,9 +355,6 @@
 	return;
     }
 
-    /* If the configured mod key is alt then we have to bind the VT key combos
-     * otherwise they interfere with the alt. With other mods we don't get this
-     * key combo so we have to bind the function keys manually. */
     uint32_t func_keys[] = {
 	XKB_KEY_F1,
 	XKB_KEY_F2,
@@ -366,28 +363,12 @@
 	XKB_KEY_F5,
 	XKB_KEY_F6,
     };
-    uint32_t switch_keys[] = {
-	XKB_KEY_XF86Switch_VT_1,
-	XKB_KEY_XF86Switch_VT_2,
-	XKB_KEY_XF86Switch_VT_3,
-	XKB_KEY_XF86Switch_VT_4,
-	XKB_KEY_XF86Switch_VT_5,
-	XKB_KEY_XF86Switch_VT_6
-    };
-    uint32_t *keys;
-    if (wimp.mod == WLR_MODIFIER_ALT) {
-	keys = switch_keys;
-    } else {
-	keys = func_keys;
-    }
-
     struct binding *kb;
 
     for (unsigned i = 0; i < 6; i++) {
 	kb = calloc(1, sizeof(struct binding));
 	kb->mods = WLR_MODIFIER_CTRL;
-	kb->key = *keys;
-	keys++;
+	kb->key = func_keys[i];
 	kb->action = &change_vt;
 	kb->data = calloc(1, sizeof(unsigned));
 	*(unsigned *)(kb->data) = i + 1;