aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-01-04 00:40:00 +0100
committerLouis Burda <quent.burda@gmail.com>2024-01-04 00:40:00 +0100
commita029bba712585ddb46283aa88a53953cd189cc61 (patch)
tree3fa69b24b74404688d8c508c95d2979045dd2f9b /src
parentd51388c63ceb1646753878810e4b40f7dfb3c0bc (diff)
downloadsxkbd-a029bba712585ddb46283aa88a53953cd189cc61.tar.gz
sxkbd-a029bba712585ddb46283aa88a53953cd189cc61.zip
Add qemu macro
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 250fa24..6af371b 100644
--- 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);