diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-02-15 23:46:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 23:46:31 -0500 |
commit | 77b6ac831eb58e753cc666c66a67e9a9be369061 (patch) | |
tree | 04e3074214a8415a8b0404477561d990a9ce205c /quantum/quantum.c | |
parent | 7bef285553dee01bbcb1eaadefbfb39ed75baea4 (diff) | |
parent | 58823b4e0324f5b2861fc5a0f74f6faa3673f5dc (diff) |
Merge pull request #1104 from qmk/layer_tap_toggle
Adds layer tap toggle as TT(layer)
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r-- | quantum/quantum.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 2088c10c95..4a6d0355fa 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -972,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]; |