diff options
| author | stanrc85 <47038504+stanrc85@users.noreply.github.com> | 2019-03-19 22:45:33 -0400 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-03-19 19:45:33 -0700 |
| commit | 6e7eff47b374fe4fdb550c5554b6438ec626a5f7 (patch) | |
| tree | 98d2709b44882832d8de6534fcbc068a0f97e2d0 | |
| parent | 4b4eba997fd70cf6faf263384f8559c90f6d8529 (diff) | |
| download | qmk_firmware-6e7eff47b374fe4fdb550c5554b6438ec626a5f7.tar.gz qmk_firmware-6e7eff47b374fe4fdb550c5554b6438ec626a5f7.zip | |
[Keymap] Keymap and readme updates (#5449)
* Remove tap dance code from keymap.c
* Add tap dance code to userspace files
* Readme updates
* Update keymap images
| -rw-r--r-- | keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 11 | ||||
| -rw-r--r-- | keyboards/hs60/v2/keymaps/stanrc85/readme.md | 2 | ||||
| -rw-r--r-- | layouts/community/60_ansi/stanrc85-ansi/keymap.c | 11 | ||||
| -rw-r--r-- | layouts/community/60_ansi/stanrc85-ansi/readme.md | 50 | ||||
| -rw-r--r-- | users/stanrc85/stanrc85.c | 5 | ||||
| -rw-r--r-- | users/stanrc85/stanrc85.h | 6 |
6 files changed, 54 insertions, 31 deletions
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index 276adfe29..fed21b7de 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c | |||
| @@ -16,17 +16,6 @@ | |||
| 16 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "stanrc85.h" | 17 | #include "stanrc85.h" |
| 18 | 18 | ||
| 19 | //Tap Dance Declarations | ||
| 20 | enum { | ||
| 21 | TD_WIN = 0, | ||
| 22 | TD_ESC | ||
| 23 | }; | ||
| 24 | |||
| 25 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 26 | [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), | ||
| 27 | [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) | ||
| 28 | }; | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 31 | [0] = LAYOUT_60_ansi( | 20 | [0] = LAYOUT_60_ansi( |
| 32 | TD_TESC, 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_BSPC, | 21 | TD_TESC, 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_BSPC, |
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/keymaps/stanrc85/readme.md index 4e978e771..430d363f3 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/readme.md +++ b/keyboards/hs60/v2/keymaps/stanrc85/readme.md | |||
| @@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.--> | |||
| 42 | - Layer 3 is Backlight control and RESET | 42 | - Layer 3 is Backlight control and RESET |
| 43 | - `Fn2+CAPS` used to toggle Default QWERTY layer on and off | 43 | - `Fn2+CAPS` used to toggle Default QWERTY layer on and off |
| 44 | 44 | ||
| 45 |  | 45 |  |
| 46 | 46 | ||
| 47 | ### Build | 47 | ### Build |
| 48 | To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`. | 48 | To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`. |
diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index 00d6f5ede..7c095faa3 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c | |||
| @@ -16,17 +16,6 @@ | |||
| 16 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "stanrc85.h" | 17 | #include "stanrc85.h" |
| 18 | 18 | ||
| 19 | //Tap Dance Declarations | ||
| 20 | enum { | ||
| 21 | TD_WIN = 0, | ||
| 22 | TD_ESC | ||
| 23 | }; | ||
| 24 | |||
| 25 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 26 | [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), | ||
| 27 | [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) | ||
| 28 | }; | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 31 | [0] = LAYOUT_60_ansi( | 20 | [0] = LAYOUT_60_ansi( |
| 32 | TD_TESC, 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_BSPC, | 21 | TD_TESC, 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_BSPC, |
diff --git a/layouts/community/60_ansi/stanrc85-ansi/readme.md b/layouts/community/60_ansi/stanrc85-ansi/readme.md index 2df5588af..6b5b3ca9f 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/readme.md +++ b/layouts/community/60_ansi/stanrc85-ansi/readme.md | |||
| @@ -1,14 +1,48 @@ | |||
| 1 | # Stanrc85's Standard ANSI 60% Layout | 1 | <!-- Copyright 2019 Stanrc85 |
| 2 | |||
| 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. | ||
| 7 | |||
| 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. | ||
| 2 | 12 | ||
| 3 | Shared keymap between two 60% PCB: | 13 | You should have received a copy of the GNU General Public License |
| 4 | - 1upkeyboards60HSE | 14 | along with this program. If not, see <http://www.gnu.org/licenses/>.--> |
| 5 | - DZ60 (hotswap) | 15 | |
| 16 | # Stanrc85's Standard ANSI 60% Layout | ||
| 6 | 17 | ||
| 7 | ## Keymap Notes | 18 | ## Keymap Notes |
| 8 | - Layer 0 is custom ANSI layout with SpaceFN, CTRL/ESC on CAPS, Tap Dance on Fn1 key for CTRL+ALT+DEL and WIN+L | 19 | - Layer 0 is default QWERTY layout with additional custom features: |
| 9 | - Layer 1 is default ANSI (enable with Fn2+D) | 20 | - SpaceFN to function layer 2 on `Space` |
| 10 | - Layer 2 is F keys, arrows, volume controls and custom shortcuts for AHK | 21 | - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` |
| 11 | - Layer 3 is RGB Underglow control and RESET | 22 | - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` |
| 23 | - Tap Dance on `ESC` for `ESC` and ` ` ` | ||
| 24 | |||
| 25 |  | ||
| 26 | |||
| 27 | - Layer 1 is default QWERTY with no custom features used mostly for gaming | ||
| 28 | - Enabled by `Fn2+CAPS` from base layer | ||
| 29 | |||
| 30 |  | ||
| 31 | |||
| 32 | - Layer 2 is Function layer: | ||
| 33 | - F keys | ||
| 34 | - Arrows | ||
| 35 | - Volume and Media controls | ||
| 36 | - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script | ||
| 37 | - AHK Mic is used to mute/unmute microphone | ||
| 38 | - AHK Speaker switches audio output between headphones and speakers | ||
| 39 | |||
| 40 |  | ||
| 41 | |||
| 42 | - Layer 3 is RGB control and RESET | ||
| 43 | - `Fn2+CAPS` used to toggle Default QWERTY layer on and off | ||
| 44 | |||
| 45 |  | ||
| 12 | 46 | ||
| 13 | ### Build | 47 | ### Build |
| 14 | To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. | 48 | To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. |
diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index bddc14d7e..e8fc5c1df 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c | |||
| @@ -5,6 +5,11 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 5 | return true; | 5 | return true; |
| 6 | } | 6 | } |
| 7 | 7 | ||
| 8 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 9 | [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), | ||
| 10 | [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) | ||
| 11 | }; | ||
| 12 | |||
| 8 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 13 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 9 | switch (keycode) { | 14 | switch (keycode) { |
| 10 | case KC_MAKE: | 15 | case KC_MAKE: |
diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index 1d9602a05..c0a0e8766 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h | |||
| @@ -13,6 +13,12 @@ enum custom_keycodes { | |||
| 13 | NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes | 13 | NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes |
| 14 | }; | 14 | }; |
| 15 | 15 | ||
| 16 | //Tap Dance Declarations | ||
| 17 | enum { | ||
| 18 | TD_WIN = 0, | ||
| 19 | TD_ESC | ||
| 20 | }; | ||
| 21 | |||
| 16 | //Aliases for longer keycodes | 22 | //Aliases for longer keycodes |
| 17 | #define KC_CAD LALT(LCTL(KC_DEL)) | 23 | #define KC_CAD LALT(LCTL(KC_DEL)) |
| 18 | #define KC_LOCK LGUI(KC_L) | 24 | #define KC_LOCK LGUI(KC_L) |
