summaryrefslogtreecommitdiff
path: root/users/miles2go/milestogo.c
diff options
context:
space:
mode:
authormilestogo <milestogo@users.noreply.github.com>2021-03-14 12:23:30 -0700
committerGitHub <noreply@github.com>2021-03-14 12:23:30 -0700
commit7b7689d30796c977b95197091c16e8bb97000101 (patch)
treedc81a91d109041e34a90940fdceaeede7d512e4f /users/miles2go/milestogo.c
parentaa73411c14487465d7af9d9f1ca7cb5d157e9343 (diff)
downloadqmk_firmware-7b7689d30796c977b95197091c16e8bb97000101.tar.gz
qmk_firmware-7b7689d30796c977b95197091c16e8bb97000101.zip
[Keymap] miles2go userspace update, add functions for babblepaste library, add prime_e keybard keymap (#9196)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'users/miles2go/milestogo.c')
-rw-r--r--users/miles2go/milestogo.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/users/miles2go/milestogo.c b/users/miles2go/milestogo.c
index f1da2f4d7a..1c7f174e4a 100644
--- a/users/miles2go/milestogo.c
+++ b/users/miles2go/milestogo.c
@@ -9,6 +9,8 @@ __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *
bool move_is_on = false; // track if we are in _MOV layer
bool sym_is_on = false; // track if we are in _SYM layer
+
+
// Defines actions for global custom keycodes
// Then runs the _keymap's record handier if not processed here
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -16,24 +18,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef USE_BABBLEPASTE
if (keycode > BABBLE_START && keycode < BABBLE_END_RANGE) {
- if (record->event.pressed) { // is there a case where this isn't desired?
- babblePaste(keycode);
+ if (record->event.pressed) {
+ babblePaste(keycode, 1);
} else {
- return true;
+ babblePaste(keycode, 0);
}
}
#endif
switch (keycode) {
- case _QWERTY:
+ case KC_QWERTY:
if (record->event.pressed) {
- set_single_persistent_default_layer(_QWERTY);
+ layer_off(_CDH);
+ default_layer_set(_QWERTY);
}
break;
- case _CDH:
+ case KC_CDH:
if (record->event.pressed) {
- set_single_persistent_default_layer(_CDH);
+ layer_on(_CDH);
+ default_layer_set(_CDH);
}
break;
@@ -71,9 +75,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return process_record_keymap(keycode, record);
}
-void babble_led_user(void) {
+void babble_modeswitch_user(uint8_t mode) {
#ifdef USE_BABLPASTE
- extern uint8_t babble_mode;
+ extern uint8_t babble_mode; // still using global. why?
# ifdef BABL_WINDOWS
if (babble_mode == BABL_WINDOWS_MODE) {
@@ -140,3 +144,10 @@ void babble_led_user(void) {
# endif
#endif // bablepaste
}
+
+
+// we always return true here, so that each keyboard can use it's own
+// led_update_kb() function
+bool led_update_user(led_t led_state ) {
+ return true;
+} \ No newline at end of file