[Keymap] Fix handling of RV_LOCK and RV_SNAP for windows (#12498)
Co-authored-by: Robert Verst <robert.verst@tobit.com>
This commit is contained in:
parent
81be065fa5
commit
2274631c8f
@ -197,15 +197,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
// Lock computer
|
// Lock computer
|
||||||
case RV_LOCK:
|
case RV_LOCK:
|
||||||
if (mode == MAC || mode == MAC_UNI) {
|
if (mode == MAC || mode == MAC_UNI) {
|
||||||
register_code(KC_LGUI);
|
tap_code16(G(C(KC_Q)));
|
||||||
register_code(KC_LCTL);
|
|
||||||
tap_code(KC_Q);
|
|
||||||
unregister_code(KC_LCTL);
|
|
||||||
unregister_code(KC_LGUI);
|
|
||||||
} else if (mode == WINDOWS || mode == WINDOWS_UNI) {
|
} else if (mode == WINDOWS || mode == WINDOWS_UNI) {
|
||||||
register_code(KC_LGUI);
|
tap_code16(G(KC_L));
|
||||||
tap_code(KC_L);
|
|
||||||
register_code(KC_LGUI);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -215,23 +209,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (ls) unregister_code(KC_LSFT);
|
if (ls) unregister_code(KC_LSFT);
|
||||||
if (rs) unregister_code(KC_RSFT);
|
if (rs) unregister_code(KC_RSFT);
|
||||||
|
|
||||||
register_code(KC_LGUI);
|
tap_code16(G(S(as ? KC_4 : KC_5)));
|
||||||
register_code(KC_LSFT);
|
|
||||||
if (as)
|
|
||||||
tap_code(KC_5);
|
|
||||||
else
|
|
||||||
tap_code(KC_4);
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
unregister_code(KC_LGUI);
|
|
||||||
|
|
||||||
if (ls) register_code(KC_LSFT);
|
if (ls) register_code(KC_LSFT);
|
||||||
if (rs) register_code(KC_RSFT);
|
if (rs) register_code(KC_RSFT);
|
||||||
} else if (mode == WINDOWS || mode == WINDOWS_UNI) {
|
} else if (mode == WINDOWS || mode == WINDOWS_UNI) {
|
||||||
register_code(KC_LGUI);
|
tap_code16(G(S(KC_S)));
|
||||||
register_code(KC_LSFT);
|
|
||||||
tap_code(KC_S);
|
|
||||||
register_code(KC_LSFT);
|
|
||||||
register_code(KC_LGUI);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -260,9 +243,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (ls) unregister_code(KC_LSFT);
|
if (ls) unregister_code(KC_LSFT);
|
||||||
if (rs) unregister_code(KC_RSFT);
|
if (rs) unregister_code(KC_RSFT);
|
||||||
|
|
||||||
register_code(KC_LALT);
|
tap_code16(A(KC_U));
|
||||||
tap_code(KC_U);
|
|
||||||
unregister_code(KC_LALT);
|
|
||||||
|
|
||||||
if (as) register_code(KC_LSFT);
|
if (as) register_code(KC_LSFT);
|
||||||
if (keycode == RV_AUML) {
|
if (keycode == RV_AUML) {
|
||||||
@ -318,11 +299,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (is_unicode(mode)) {
|
if (is_unicode(mode)) {
|
||||||
send_unicode_string("€");
|
send_unicode_string("€");
|
||||||
} else if (mode == MAC) {
|
} else if (mode == MAC) {
|
||||||
register_code(KC_LALT);
|
tap_code16(S(A(KC_2)));
|
||||||
register_code(KC_LSFT);
|
|
||||||
tap_code(KC_2);
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
unregister_code(KC_LALT);
|
|
||||||
} else if (mode == WINDOWS) {
|
} else if (mode == WINDOWS) {
|
||||||
register_code(KC_RALT);
|
register_code(KC_RALT);
|
||||||
tap_code(KC_0);
|
tap_code(KC_0);
|
||||||
@ -343,9 +320,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
send_unicode_string("ß");
|
send_unicode_string("ß");
|
||||||
}
|
}
|
||||||
} else if (mode == MAC) {
|
} else if (mode == MAC) {
|
||||||
register_code(KC_LALT);
|
tap_code16(A(KC_S));
|
||||||
tap_code(KC_S);
|
|
||||||
unregister_code(KC_LALT);
|
|
||||||
} else if (mode == WINDOWS) {
|
} else if (mode == WINDOWS) {
|
||||||
register_code(KC_RALT);
|
register_code(KC_RALT);
|
||||||
tap_code(KC_2);
|
tap_code(KC_2);
|
||||||
|
Loading…
Reference in New Issue
Block a user