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

Commit e69f4e02ebeebfed7833c14a938fb090ac0b0bee
Parent: f04c54e1adaabb654bde392a9ffa26e7f09c8b30
Author: mcol <mcol@posteo.net>
Date: 2021-01-18 23:24:04 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-01-18 23:24:04 +0000

Add old XKB_KEY_FX keysyms for VT switching for when mod is MOD4

XKB_KEY_XF86Switch_VT_X may be emitted when mod is set to ALT, but when
mod is set to MOD4 then for VT switching, XKB_KEY_FX keys must be used.

src/config.c Modified

@@ -242,7 +242,15 @@
     if (!server->vt_switching)
 	return;
 
+    /* Depending on what the user sets the mod key to, either func keys or
+     * direct VT key combo "keys" will be matched, so configure both. */
     uint32_t func_keys[] = {
+	XKB_KEY_F1,
+	XKB_KEY_F2,
+	XKB_KEY_F3,
+	XKB_KEY_F4,
+	XKB_KEY_F5,
+	XKB_KEY_F6,
 	XKB_KEY_XF86Switch_VT_1,
 	XKB_KEY_XF86Switch_VT_2,
 	XKB_KEY_XF86Switch_VT_3,
@@ -252,13 +260,13 @@
     };
     struct binding *kb;
 
-    for (unsigned i = 0; i < 6; i++) {
+    for (unsigned i = 0; i < 12; i++) {
 	kb = calloc(1, sizeof(struct binding));
 	kb->mods = WLR_MODIFIER_CTRL;
 	kb->key = func_keys[i];
 	kb->action = &change_vt;
 	kb->data = calloc(1, sizeof(unsigned));
-	*(unsigned *)(kb->data) = i + 1;
+	*(unsigned *)(kb->data) = (i + 1) % 6;
 	wl_list_insert(server->key_bindings.prev, &kb->link);
     }
 }