diff options
author | Xyverz <xyverz@gmail.com> | 2017-02-20 23:54:09 -0800 |
---|---|---|
committer | Xyverz <xyverz@gmail.com> | 2017-02-20 23:54:09 -0800 |
commit | bf6f7a623dbe4e3bba4bcc6d86ac28b842226825 (patch) | |
tree | 59ce47b0d4b21a2606e1f6d367317af8bdbd06ae /quantum/quantum.c | |
parent | ca1ec7b121c973fae614e69093f40ee9ba25e629 (diff) | |
parent | 7ff41df32c29bca4e3a6efc3047b8fa93bb99b92 (diff) | |
download | qmk_firmware-bf6f7a623dbe4e3bba4bcc6d86ac28b842226825.tar.gz |
Merge remote-tracking branch 'upstream/master'
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 @@ #define TAPPING_TERM 200 #endif +#ifdef FAUXCLICKY_ENABLE +#include "fauxclicky.h" +#endif + static void do_code16 (uint16_t code, void (*f) (uint8_t)) { switch (code) { case QK_MODS ... QK_MODS_MAX: @@ -196,6 +200,26 @@ bool process_record_quantum(keyrecord_t *record) { } return false; break; + #ifdef FAUXCLICKY_ENABLE + case FC_TOG: + if (record->event.pressed) { + FAUXCLICKY_TOGGLE; + } + return false; + break; + case FC_ON: + if (record->event.pressed) { + FAUXCLICKY_ON; + } + return false; + break; + case FC_OFF: + if (record->event.pressed) { + FAUXCLICKY_OFF; + } + return false; + break; + #endif #ifdef RGBLIGHT_ENABLE case RGB_TOG: if (record->event.pressed) { @@ -948,6 +972,19 @@ void send_nibble(uint8_t number) { } } + +__attribute__((weak)) +uint16_t hex_to_keycode(uint8_t hex) +{ + if (hex == 0x0) { + return KC_0; + } else if (hex < 0xA) { + return KC_1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + void api_send_unicode(uint32_t unicode) { #ifdef API_ENABLE uint8_t chunk[4]; |