diff options
author | Gabriel Young <[email protected]> | 2017-02-19 14:34:58 -0800 |
---|---|---|
committer | Gabriel Young <[email protected]> | 2017-02-19 14:34:58 -0800 |
commit | 40a8a88e72c185eec629973580b72dfaaf71b116 (patch) | |
tree | 583330bc173017de5e1d4a10ff7100ebc0f1a34b /quantum/quantum.c | |
parent | 1e97f77278b757d740a800ae228c6202de0679b4 (diff) | |
parent | 49e72632d2200fc3bf71d5ced2aa43058da3b2e0 (diff) | |
download | qmk_firmware-40a8a88e72c185eec629973580b72dfaaf71b116.tar.gz qmk_firmware-40a8a88e72c185eec629973580b72dfaaf71b116.zip |
Merge branch 'qmk/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 45ea8cb73c..4a6d0355fa 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]; |