diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-03-28 14:12:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-28 14:12:21 -0400 |
commit | 49f547dd8e4179810b808f004783cc3c55248761 (patch) | |
tree | 668d4fb3c99c47c602a66a9cda8cb869b8df4389 | |
parent | 5e4daf1c6db980fad269fe7b013205008bfe701e (diff) | |
parent | 6de7e5d8dce42b56a0424da98408f3cf8f27cfa1 (diff) | |
download | qmk_firmware-49f547dd8e4179810b808f004783cc3c55248761.tar.gz qmk_firmware-49f547dd8e4179810b808f004783cc3c55248761.zip |
Merge pull request #1139 from Swoy/master
Satan Board "Admiral Strokers" keymap and config
-rw-r--r-- | keyboards/satan/keymaps/admiralStrokers/Makefile | 24 | ||||
-rw-r--r-- | keyboards/satan/keymaps/admiralStrokers/config.h | 96 | ||||
-rw-r--r-- | keyboards/satan/keymaps/admiralStrokers/keymap.c | 195 | ||||
-rw-r--r-- | keyboards/satan/keymaps/admiralStrokers/readme.md | 13 |
4 files changed, 328 insertions, 0 deletions
diff --git a/keyboards/satan/keymaps/admiralStrokers/Makefile b/keyboards/satan/keymaps/admiralStrokers/Makefile new file mode 100644 index 000000000..61dfedeb8 --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/Makefile | |||
@@ -0,0 +1,24 @@ | |||
1 | # Build Options | ||
2 | # change to "no" to disable the options, or define them in the Makefile in | ||
3 | # the appropriate keymap folder that will get included automatically | ||
4 | # | ||
5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
8 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
9 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
10 | SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping. | ||
11 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
13 | MIDI_ENABLE = no # MIDI controls | ||
14 | AUDIO_ENABLE = no # Audio output on port C6 | ||
15 | UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X(<unicode>) in your keymap. | ||
16 | UNICODE_ENABLE =no # Unicode | ||
17 | UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). | ||
18 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
19 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
20 | SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend | ||
21 | API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings | ||
22 | ifndef QUANTUM_DIR | ||
23 | include ../../../../Makefile | ||
24 | endif | ||
diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/satan/keymaps/admiralStrokers/config.h new file mode 100644 index 000000000..d0338fb7e --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/config.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #ifndef CONFIG_H_ADMSTROK | ||
19 | #define CONFIG_H_ADMSTROK | ||
20 | |||
21 | #include "config_common.h" | ||
22 | #include "../../config.h" | ||
23 | |||
24 | /* USB Device descriptor parameter */ | ||
25 | #define VENDOR_ID 0xFEED | ||
26 | #define PRODUCT_ID 0x6060 | ||
27 | #define DEVICE_VER 0x0003 | ||
28 | #define MANUFACTURER SATAN | ||
29 | #define PRODUCT GH60 | ||
30 | #define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support | ||
31 | |||
32 | /* key matrix size */ | ||
33 | #define MATRIX_ROWS 5 | ||
34 | #define MATRIX_COLS 14 | ||
35 | |||
36 | // ROWS: Top to bottom, COLS: Left to right | ||
37 | |||
38 | #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } | ||
39 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } | ||
40 | #define UNUSED_PINS | ||
41 | |||
42 | #define BACKLIGHT_PIN B6 | ||
43 | |||
44 | /* COL2ROW or ROW2COL */ | ||
45 | #define DIODE_DIRECTION COL2ROW | ||
46 | |||
47 | /* define if matrix has ghost */ | ||
48 | //#define MATRIX_HAS_GHOST | ||
49 | |||
50 | /* Set 0 if debouncing isn't needed */ | ||
51 | #define DEBOUNCING_DELAY 5 | ||
52 | |||
53 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
54 | #define LOCKING_SUPPORT_ENABLE | ||
55 | /* Locking resynchronize hack */ | ||
56 | #define LOCKING_RESYNC_ENABLE | ||
57 | |||
58 | /* key combination for command */ | ||
59 | #define IS_COMMAND() ( \ | ||
60 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
61 | ) | ||
62 | |||
63 | /* Backlight configuration */ | ||
64 | #define BACKLIGHT_LEVELS 4 | ||
65 | |||
66 | /* Underlight configuration */ | ||
67 | #define RGB_DI_PIN E2 | ||
68 | #define RGBLIGHT_ANIMATIONS | ||
69 | #define RGBLED_NUM 8 // Number of LEDs | ||
70 | #define RGBLIGHT_HUE_STEP 10 | ||
71 | #define RGBLIGHT_SAT_STEP 17 | ||
72 | #define RGBLIGHT_VAL_STEP 17 | ||
73 | |||
74 | #define DISABLE_SPACE_CADET_ROLLOVER | ||
75 | |||
76 | |||
77 | |||
78 | /* | ||
79 | * Feature disable options | ||
80 | * These options are also useful to firmware size reduction. | ||
81 | */ | ||
82 | |||
83 | /* disable debug print */ | ||
84 | //#define NO_DEBUG | ||
85 | |||
86 | /* disable print */ | ||
87 | //#define NO_PRINT | ||
88 | |||
89 | /* disable action features */ | ||
90 | //#define NO_ACTION_LAYER | ||
91 | //#define NO_ACTION_TAPPING | ||
92 | //#define NO_ACTION_ONESHOT | ||
93 | //#define NO_ACTION_MACRO | ||
94 | //#define NO_ACTION_FUNCTION | ||
95 | |||
96 | #endif | ||
diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c new file mode 100644 index 000000000..b6dc29c67 --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c | |||
@@ -0,0 +1,195 @@ | |||
1 | #include "satan.h" | ||
2 | |||
3 | static uint16_t key_timer; | ||
4 | |||
5 | bool checktime(void){ | ||
6 | return (timer_elapsed(key_timer) < 150) ? true : false; | ||
7 | }; | ||
8 | |||
9 | // general keydefs | ||
10 | #define norm 0 // Default layer | ||
11 | #define elev 1 // Layer directional keys | ||
12 | #define supr 2 // F-keys and mediakeys | ||
13 | #define spac 3 // | ||
14 | #define FNO1 4 // | ||
15 | #define FNO2 5 // | ||
16 | #define FNO3 6 // | ||
17 | #define MAC0 M(0) // | ||
18 | #define MAC1 M(1) // | ||
19 | #define MAC2 M(2) // | ||
20 | #define MAC3 M(3) // | ||
21 | #define MAC4 M(4) // | ||
22 | #define MAC5 M(5) // | ||
23 | #define MAC6 M(6) // | ||
24 | #define MAC7 M(7) // | ||
25 | #define MAC8 M(8) // | ||
26 | #define MAC9 M(9) // | ||
27 | #define GRAV KC_GRV // | ||
28 | #define MEDI F(FNO1)// | ||
29 | |||
30 | // General shortenings | ||
31 | #define ESCA KC_ESC | ||
32 | #define MINS KC_MINS | ||
33 | #define EQUL KC_EQL | ||
34 | #define BSPC KC_BSPC | ||
35 | #define DELE KC_DEL | ||
36 | #define LBRC KC_LBRC | ||
37 | #define RBRC KC_RBRC | ||
38 | #define ALTR KC_RALT | ||
39 | #define SCLN KC_SCLN | ||
40 | #define QUOT KC_QUOT | ||
41 | #define NUHS KC_NUHS | ||
42 | #define ENTE KC_ENT | ||
43 | #define NUBS KC_NUBS // Less/ greater sign | ||
44 | #define COMM KC_COMM // Comma | ||
45 | #define FSTO KC_DOT // Full stop | ||
46 | #define SLSH KC_SLSH | ||
47 | #define ALTL KC_LALT | ||
48 | #define GUIL KC_LGUI | ||
49 | #define GUIR KC_RGUI | ||
50 | #define MENO KC_MENU | ||
51 | // The F-row/layer: | ||
52 | #define FK01 KC_F1 | ||
53 | #define FK02 KC_F2 | ||
54 | #define FK03 KC_F3 | ||
55 | #define FK04 KC_F4 | ||
56 | #define FK05 KC_F5 | ||
57 | #define FK06 KC_F6 | ||
58 | #define FK07 KC_F7 | ||
59 | #define FK08 KC_F8 | ||
60 | #define FK09 KC_F9 | ||
61 | #define FK10 KC_F10 | ||
62 | #define FK11 KC_F11 | ||
63 | #define FK12 KC_F12 | ||
64 | #define FK13 KC_F13 | ||
65 | #define FK14 KC_F14 | ||
66 | // Special Actions and Media Keys | ||
67 | #define INSE KC_INS // Insert here | ||
68 | #define HOME KC_HOME // Go to beginning of line | ||
69 | #define ENDI KC_END // go to end of line | ||
70 | #define PSCR KC_PSCR // Print Screen | ||
71 | #define SLCK KC_SLCK // go to end of line | ||
72 | #define PGDN KC_PGDN // go to end of line | ||
73 | #define PGUP KC_PGUP // go to end of line | ||
74 | #define PLPS KC_MPLY // Play/Pause | ||
75 | #define PAUS KC_PAUS // Pause button | ||
76 | #define MUTE KC_MUTE // Mute sound | ||
77 | #define VOLU KC_VOLU // Volume increase | ||
78 | #define VOLD KC_VOLD // Volume decrease | ||
79 | #define MNXT KC_MNXT // next track | ||
80 | #define MPRV KC_MPRV // prev track | ||
81 | #define MSTP KC_MSTP // stop playing | ||
82 | #define MSEL KC_MSEL // Select media (Start playing it) | ||
83 | #define MAIL KC_MAIL // Open default mail app | ||
84 | #define CALC KC_CALC // Open default calculator app | ||
85 | #define MYCM KC_MYCM // Open default file manager | ||
86 | //#define LILO KC_XXXXXX // Reserved for later | ||
87 | //#define LIHI KC_XXXXXX // Reserved for later | ||
88 | |||
89 | |||
90 | // dual-role shortcuts | ||
91 | #define DUTB LT(elev, KC_TAB) // `tabs` layer on hold and tab on tap | ||
92 | #define DUSP LT(spac, KC_SPACE) // `spce` layer on hold and space on tap | ||
93 | #define LOCK LGUI(KC_L) // lock computer (win) | ||
94 | |||
95 | // Space Admiral Strokers | ||
96 | #define SADL MAC0 // Hold for lshift and { on tap | ||
97 | #define SADR MAC1 // Hold for rshift and } on tap | ||
98 | #define CADL MAC2 // Hold for lctrl and [ on tap | ||
99 | #define CADR MAC3 // Hold for rctrl and ] on tap | ||
100 | |||
101 | // arrow cluster duality bottom right corner | ||
102 | #define ARLF ALT_T(KC_LEFT) // Left arrow | ||
103 | #define ARRT CTL_T(KC_RIGHT)// Right arrow | ||
104 | #define ARUP SFT_T(KC_UP) // Up arrow | ||
105 | #define ARDN GUI_T(KC_DOWN) // Down arrow | ||
106 | |||
107 | // brackets | ||
108 | #define NOCL RALT(KC_7) // [ | ||
109 | #define NOCR RALT(KC_0) // ] | ||
110 | #define NOPL LSFT(KC_8) // ( | ||
111 | #define NOPR LSFT(KC_9) // ) | ||
112 | #define NOAL KC_NUBS // < | ||
113 | #define NOAR LSFT(KC_NUBS) // > | ||
114 | #define NOBL RALT(KC_8) // [ | ||
115 | #define NOBR RALT(KC_9) // ] | ||
116 | |||
117 | // increase readability | ||
118 | #define XXXX KC_TRNS | ||
119 | #define DEAD KC_NO | ||
120 | #define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB | ||
121 | |||
122 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
123 | [ norm ] = KEYMAP( // Normal scandinavian mapping (danish has QUOT and SCLN wapped) | ||
124 | GRAV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MINS, EQUL, BSPC, DELE,\ | ||
125 | DUTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, DEAD,\ | ||
126 | ALTR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLN, QUOT, NUHS, ENTE,\ | ||
127 | SADL, NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, COMM, FSTO, SLSH, SADR, DEAD,\ | ||
128 | CADL, ALTL, GUIL, DUSP, GUIR, MEDI, MENO, CADR), | ||
129 | |||
130 | [ elev ] = KEYMAP( // The f-Row (with f13-14), Special keys and media keys | ||
131 | LOCK, FK01, FK02, FK03, FK04, FK05, FK06, FK07, FK08, FK09, FK10, FK11, FK12, FK13, FK14,\ | ||
132 | XXXX, XXXX, XXXX, XXXX, MAIL, XXXX, XXXX, HOME, INSE, PSCR, SLCK, PAUS, PGUP, XXXX,\ | ||
133 | XXXX, XXXX, XXXX, XXXX, MYCM, XXXX, XXXX, MPRV, PAUS, MNXT, XXXX, XXXX, PGDN, ENDI,\ | ||
134 | XXXX, XXXX, XXXX, XXXX, CALC, XXXX, XXXX, XXXX, MUTE, VOLD, VOLU, XXXX, ARUP, DEAD,\ | ||
135 | XXXX, XXXX, XXXX, PLPS, XXXX, ARLF, ARDN, ARRT), | ||
136 | |||
137 | [ spac ] = KEYMAP( // The space controls (by pressing space) | ||
138 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
139 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
140 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
141 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ | ||
142 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX), | ||
143 | |||
144 | [ supr ] = KEYMAP( // Additional layer for later use. | ||
145 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
146 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
147 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
148 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ | ||
149 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX), | ||
150 | }; | ||
151 | |||
152 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function | ||
153 | switch(id) { | ||
154 | case 0: //MAC0 - Hold for lshift and { on tap | ||
155 | if (record->event.pressed) { | ||
156 | key_timer = timer_read(); | ||
157 | return MACRO(D(LSFT), END ); | ||
158 | } else { | ||
159 | return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END); | ||
160 | }; break; | ||
161 | case 1: //MAC1 - Hold for rshift and } on tap | ||
162 | if (record->event.pressed) { | ||
163 | key_timer = timer_read(); | ||
164 | return MACRO(D(RSFT), END ); | ||
165 | } else { | ||
166 | return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END); | ||
167 | }; break; | ||
168 | case 2: //MAC2 - Hold for lctrl and [ on tap | ||
169 | if (record->event.pressed) { | ||
170 | key_timer = timer_read(); | ||
171 | return MACRO(D(LCTL), END ); | ||
172 | } else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END); | ||
173 | }; break; | ||
174 | case 3: //MAC3 - Hold for rctrl and ] on tap | ||
175 | if (record->event.pressed) { | ||
176 | key_timer = timer_read(); | ||
177 | return MACRO(D(RCTL), END ); | ||
178 | } else { | ||
179 | return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END); | ||
180 | }; break; | ||
181 | case 4: //MAC4 reserved for later. | ||
182 | if (record->event.pressed) { } else { }; break; | ||
183 | case 5: //MAC5 reserved for later. | ||
184 | if (record->event.pressed) { } else { }; break; | ||
185 | case 6: //MAC6 reserved for later. | ||
186 | if (record->event.pressed) { } else { }; break; | ||
187 | } return MACRO_NONE; | ||
188 | }; | ||
189 | /* | ||
190 | Later use: | ||
191 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } | ||
192 | enum function_id { }; | ||
193 | const uint16_t PROGMEM fn_actions[] = { }; | ||
194 | |||
195 | */ | ||
diff --git a/keyboards/satan/keymaps/admiralStrokers/readme.md b/keyboards/satan/keymaps/admiralStrokers/readme.md new file mode 100644 index 000000000..9b30caf34 --- /dev/null +++ b/keyboards/satan/keymaps/admiralStrokers/readme.md | |||
@@ -0,0 +1,13 @@ | |||
1 | # Admiral Strokers keymap | ||
2 | ## For the Satan GH60 PCB | ||
3 | The Admiral STN60 is a layout for users of the satan GH60, optimized with some nice features such as mod tap for brackets (Similar to Space Cadett), space mod for F-row/ layer with easy to access media and control keys. The layout below is just as an example and is ISO based, ANSI and JIS layouts will be included later. | ||
4 | |||
5 | `````` | ||
6 | [ _tmp ] = KEYMAP( // Copy this to get started. SCAN is scandinavian layout specific. | ||
7 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\ | ||
8 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ | ||
9 | XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, SCAN, XXXX,\ | ||
10 | XXXX, SCAN, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\ | ||
11 | XXXX, XXXX, XXXX, XXXX, SCAN, XXXX, XXXX, XXXX, XXXX),\ | ||
12 | |||
13 | ``` | ||