Last active
October 29, 2024 07:12
-
-
Save slice/512a50e13037de7db49e3ab21caa04ce to your computer and use it in GitHub Desktop.
adds a custom qmk keycode to send apple's globe key (tested with qmk/qmk_firmware@c134822486, 2024-08-26)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … | |
// https://github.com/qmk/qmk_firmware/blob/master/docs/custom_quantum_functions.md#defining-a-new-keycode | |
enum my_keycodes { | |
// apple globe key | |
AP_GLOB = SAFE_RANGE, | |
}; | |
// https://gist.github.com/fauxpark/010dcf5d6377c3a71ac98ce37414c6c4?permalink_comment_id=4722673#gistcomment-4722673 | |
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
switch (keycode) { | |
case AP_GLOB: | |
if (record->event.pressed) { | |
host_consumer_send(AC_NEXT_KEYBOARD_LAYOUT_SELECT); | |
} else { | |
host_consumer_send(0); | |
} | |
return false; | |
} | |
return true; | |
} | |
// … |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … | |
# needed for globe+… shortcuts | |
# https://gist.github.com/fauxpark/010dcf5d6377c3a71ac98ce37414c6c4?permalink_comment_id=4723854#gistcomment-4723854 | |
KEYBOARD_SHARED_EP = yes | |
// … |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment