diff options
Diffstat (limited to 'quantum/quantum.c')
| -rw-r--r-- | quantum/quantum.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 45ea8cb73..4a6d0355f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -7,6 +7,10 @@ | |||
| 7 | #define TAPPING_TERM 200 | 7 | #define TAPPING_TERM 200 |
| 8 | #endif | 8 | #endif |
| 9 | 9 | ||
| 10 | #ifdef FAUXCLICKY_ENABLE | ||
| 11 | #include "fauxclicky.h" | ||
| 12 | #endif | ||
| 13 | |||
| 10 | static void do_code16 (uint16_t code, void (*f) (uint8_t)) { | 14 | static void do_code16 (uint16_t code, void (*f) (uint8_t)) { |
| 11 | switch (code) { | 15 | switch (code) { |
| 12 | case QK_MODS ... QK_MODS_MAX: | 16 | case QK_MODS ... QK_MODS_MAX: |
| @@ -196,6 +200,26 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 196 | } | 200 | } |
| 197 | return false; | 201 | return false; |
| 198 | break; | 202 | break; |
| 203 | #ifdef FAUXCLICKY_ENABLE | ||
| 204 | case FC_TOG: | ||
| 205 | if (record->event.pressed) { | ||
| 206 | FAUXCLICKY_TOGGLE; | ||
| 207 | } | ||
| 208 | return false; | ||
| 209 | break; | ||
| 210 | case FC_ON: | ||
| 211 | if (record->event.pressed) { | ||
| 212 | FAUXCLICKY_ON; | ||
| 213 | } | ||
| 214 | return false; | ||
| 215 | break; | ||
| 216 | case FC_OFF: | ||
| 217 | if (record->event.pressed) { | ||
| 218 | FAUXCLICKY_OFF; | ||
| 219 | } | ||
| 220 | return false; | ||
| 221 | break; | ||
| 222 | #endif | ||
| 199 | #ifdef RGBLIGHT_ENABLE | 223 | #ifdef RGBLIGHT_ENABLE |
| 200 | case RGB_TOG: | 224 | case RGB_TOG: |
| 201 | if (record->event.pressed) { | 225 | if (record->event.pressed) { |
| @@ -948,6 +972,19 @@ void send_nibble(uint8_t number) { | |||
| 948 | } | 972 | } |
| 949 | } | 973 | } |
| 950 | 974 | ||
| 975 | |||
| 976 | __attribute__((weak)) | ||
| 977 | uint16_t hex_to_keycode(uint8_t hex) | ||
| 978 | { | ||
| 979 | if (hex == 0x0) { | ||
| 980 | return KC_0; | ||
| 981 | } else if (hex < 0xA) { | ||
| 982 | return KC_1 + (hex - 0x1); | ||
| 983 | } else { | ||
| 984 | return KC_A + (hex - 0xA); | ||
| 985 | } | ||
| 986 | } | ||
| 987 | |||
| 951 | void api_send_unicode(uint32_t unicode) { | 988 | void api_send_unicode(uint32_t unicode) { |
| 952 | #ifdef API_ENABLE | 989 | #ifdef API_ENABLE |
| 953 | uint8_t chunk[4]; | 990 | uint8_t chunk[4]; |
