commit a029bba712585ddb46283aa88a53953cd189cc61
parent d51388c63ceb1646753878810e4b40f7dfb3c0bc
Author: Louis Burda <quent.burda@gmail.com>
Date: Thu, 4 Jan 2024 00:40:00 +0100
Add qemu macro
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.gitmodules b/.gitmodules
@@ -1,6 +1,7 @@
[submodule "lib/tinyusb"]
path = lib/tinyusb
url = https://github.com/hathach/tinyusb.git
+ shallow = true
[submodule "lib/picosdk"]
path = lib/picosdk
url = https://github.com/raspberrypi/pico-sdk.git
diff --git a/src/keymap.c b/src/keymap.c
@@ -114,7 +114,7 @@
)
#define LAYER_META_DE KEYMAP( \
- _______ , SX(KVM1), SX(KVM2), _______ , _______ , _______ , \
+ _______ , SX(KVM1), SX(KVM2), SX(QMSW), _______ , _______ , \
_______ , _______ , _______ , _______ , _______ , _______ , \
KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , \
RB(BASE), _______ , RB(GAME), \
@@ -178,6 +178,7 @@ enum {
enum {
KVM1,
KVM2,
+ QMSW,
QUSW,
TTY1,
TTY2,
@@ -217,6 +218,10 @@ static const uint32_t macro_kvm2[] = {
KC_LEFT_CTRL, KC_LEFT_CTRL, KC_2
};
+static const uint32_t macro_qemu_switch[] = {
+ HOLD(KC_LEFT_CTRL), KC_RIGHT_CTRL
+};
+
static const uint32_t ttysw_lut[] = {
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
@@ -235,6 +240,9 @@ process_user_keypress(uint8_t sym, uint x, uint y)
case KVM2:
hid_send_macro(macro_kvm2, ARRLEN(macro_kvm2));
break;
+ case QMSW:
+ hid_send_macro(macro_qemu_switch, ARRLEN(macro_qemu_switch));
+ break;
case QUSW:
if (keymat[7][3]) {
hid_force_release(3, 7);