1 /* Copyright 2018 Jarred Steenvoorden
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 __attribute__ ((weak))
21 bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
25 bool lowerPressed, raisePressed;
27 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
32 // Both lower and raise activate the same layer
33 if (record->event.pressed) {
39 // But keep track of each to active adjust layer
40 if (keycode == LOWER) {
41 lowerPressed = record->event.pressed;
43 raisePressed = record->event.pressed;
46 // When both are pressed, activate adjust
47 if (lowerPressed && raisePressed) {
56 if (record->event.pressed) {
64 if (record->event.pressed) {
69 // Release mods set by ALT_TAB and CTL_TAB
70 unregister_code(KC_LALT);
71 unregister_code(KC_LCTL);
75 case VRSN: // Prints firmware version
76 if (record->event.pressed) {
77 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER);
82 if (record->event.pressed) {
83 register_code(KC_LALT);
89 if (record->event.pressed) {
90 register_code(KC_LCTL);
96 return process_record_keymap(keycode, record);