X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=quantum%2Fquantum.c;h=4f4cee4e9b380219c745032540e0732a0ebe7a72;hb=303bc6999efc07f38a50c3cdc06503e6fce5fa6a;hp=5a9e771a90c9f7c9974c6988d86a671ba44d4ac2;hpb=7e37daa2ce6edad82de3835384176b51a8081537;p=qmk_firmware.git diff --git a/quantum/quantum.c b/quantum/quantum.c index 5a9e771a9..4f4cee4e9 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,3 +1,19 @@ +/* Copyright 2016-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "quantum.h" #ifdef PROTOCOL_LUFA #include "outputselect.h" @@ -119,7 +135,7 @@ void reset_keyboard(void) { #endif static bool shift_interrupted[2] = {0, 0}; -static uint16_t scs_timer = 0; +static uint16_t scs_timer[2] = {0, 0}; bool process_record_quantum(keyrecord_t *record) { @@ -379,7 +395,7 @@ bool process_record_quantum(keyrecord_t *record) { case KC_LSPO: { if (record->event.pressed) { shift_interrupted[0] = false; - scs_timer = timer_read (); + scs_timer[0] = timer_read (); register_mods(MOD_BIT(KC_LSFT)); } else { @@ -389,7 +405,7 @@ bool process_record_quantum(keyrecord_t *record) { shift_interrupted[1] = true; } #endif - if (!shift_interrupted[0] && timer_elapsed(scs_timer) < TAPPING_TERM) { + if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) { register_code(LSPO_KEY); unregister_code(LSPO_KEY); } @@ -402,7 +418,7 @@ bool process_record_quantum(keyrecord_t *record) { case KC_RSPC: { if (record->event.pressed) { shift_interrupted[1] = false; - scs_timer = timer_read (); + scs_timer[1] = timer_read (); register_mods(MOD_BIT(KC_RSFT)); } else { @@ -412,7 +428,7 @@ bool process_record_quantum(keyrecord_t *record) { shift_interrupted[1] = true; } #endif - if (!shift_interrupted[1] && timer_elapsed(scs_timer) < TAPPING_TERM) { + if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) { register_code(RSPC_KEY); unregister_code(RSPC_KEY); }