summaryrefslogtreecommitdiff
path: root/keyboards/acr60/keymaps/default/keymap.c
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-07-17 16:17:48 -0700
committerGitHub <noreply@github.com>2021-07-17 16:17:48 -0700
commit26e64f4fd3d0adfae33a210f429addd78d0e71c2 (patch)
tree6d11ce62473bbe975c3fc494bd4599ccfbcac521 /keyboards/acr60/keymaps/default/keymap.c
parentca0e7e7bd9faf577caa990a0a652ded3e45f742f (diff)
ACR60 Refactor (#13575)
* modernize acr60.h - use #pragma once include guard - add license header - use four-space indent - use QMK three-character notation for layout macro arguments * human-friendly format info.json * remove `key_count` keys from info.json * rename LAYOUT_2_shifts to LAYOUT_all * move LAYOUT_all to top * use QMK three-character notation in info.json * refactor default keymap - add license header - remove third layer (does nothing) - replace Shift-Escape keycode with KC_GESC - use LAYOUT_all macro instead of LAYOUT * modernize readme.md - update header - convert metadata section to list - add flashing and bootloader jump instructions - update Docs links * use #pragma once include guard in config.h * update LED Indicator API * add license headers
Diffstat (limited to 'keyboards/acr60/keymaps/default/keymap.c')
-rw-r--r--keyboards/acr60/keymaps/default/keymap.c93
1 files changed, 32 insertions, 61 deletions
diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c
index aafc1dfe68..e7381c5783 100644
--- a/keyboards/acr60/keymaps/default/keymap.c
+++ b/keyboards/acr60/keymaps/default/keymap.c
@@ -1,67 +1,38 @@
-#include QMK_KEYBOARD_H
-
-#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+/* Copyright 2017 Ryan Mitchell (@newtmitch)
+ * 2021 James Young for QMK (@noroadsleft)
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
-enum custom_keycodes {
- SFT_ESC = SAFE_RANGE
-};
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/*
- * Default keymap with standard 60% layout. Split space possible but entirely optional with this layout, as this
- * layout covers all three split space keys as space keycodes. This also has alt right next to the space bar
- * on both sides (Windows keyboard layout), no right-side system/GUI key, and momentary layer switching on
- * the right modifiers into the 3rd (macro) and 2nd (function/sfx) layers, respectively. This also has the grave
- * accent key set up on the 2nd layer, although on the first layer it includes grave key (tilde) when shift is held down,
- * via the function actions code at the bottom.
- */
- LAYOUT(
- SFT_ESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL),
-
- LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
- KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+ [0] = LAYOUT_all(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ [1] = LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
- LAYOUT(
- KC_TRNS, M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case SFT_ESC:
- if (record->event.pressed) {
- if (get_mods() & MODS_SHIFT_MASK) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (get_mods() & MODS_SHIFT_MASK) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
-
- return false;
-
- default:
- return true;
- }
-}