diff options
author | Will Sturgiss <william.sturgiss@cordatahealth.com> | 2019-07-23 02:59:12 -0400 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-22 23:59:12 -0700 |
commit | c966da89da613fe6f2f28cc23e4acbb1f43559aa (patch) | |
tree | 45c17f52bc59501437f64095ecbae5051b61083e /keyboards/mechmini | |
parent | 8060e52946872a6d8335b323bfe9e4138ac50c81 (diff) | |
download | qmk_firmware-c966da89da613fe6f2f28cc23e4acbb1f43559aa.tar.gz qmk_firmware-c966da89da613fe6f2f28cc23e4acbb1f43559aa.zip |
[Keymap] Added wsturgiss keymap for mechmini2 (#4917)
* basic layout v1.0
* changed KC_TRNS to _______
* most symbols are on double tap, except quote, that was cancer
* better formatting and set toggle for game layer
* added colors to layers to make knowing your current layer easy
* have an empty macro working
* enabled unicode
* moved stuff to my folder and removed edits from communal files
* cleanup
* removed the game layer. Never used it
* made changes requested by drashna and vomindoraan
* got rid of some unnecessary code
* got very basic unicode on mac working
* added ctrl_esc
* more changes as requested by noroadsleft
* more leader additions, removed macros because leader stuff replaces that functionality
* removed an old macro I forgot to remove earlier
* final deletion at noroadsleft request
* changed a line to explicitly specify a purple color.
Diffstat (limited to 'keyboards/mechmini')
-rwxr-xr-x | keyboards/mechmini/v2/keymaps/wsturgiss/config.h | 11 | ||||
-rw-r--r-- | keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c | 106 | ||||
-rwxr-xr-x | keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk | 11 |
3 files changed, 128 insertions, 0 deletions
diff --git a/keyboards/mechmini/v2/keymaps/wsturgiss/config.h b/keyboards/mechmini/v2/keymaps/wsturgiss/config.h new file mode 100755 index 000000000..262c423cc --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/wsturgiss/config.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* tapdance */ | ||
2 | #define TAPPING_TERM 180 | ||
3 | |||
4 | /* space cadet stuff */ | ||
5 | #define LSPO_KEY KC_9 | ||
6 | #define RSPC_KEY KC_0 | ||
7 | #define DISABLE_SPACE_CADET_ROLLOVER | ||
8 | |||
9 | /* leader stuff */ | ||
10 | #define LEADER_TIMEOUT 400 | ||
11 | #define LEADER_PER_KEY_TIMING 300 | ||
diff --git a/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c b/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c new file mode 100644 index 000000000..f6f108720 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c | |||
@@ -0,0 +1,106 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | #define base 0 | ||
4 | #define raise 1 | ||
5 | #define lower 2 | ||
6 | |||
7 | //Tap Dance Declarations | ||
8 | enum { | ||
9 | TD_SEMI_QUOT = 0, | ||
10 | TD_COMM_MINUS = 1, | ||
11 | TD_DOT_EQUAL = 2, | ||
12 | TD_SLASH_BACKSLASH = 3 | ||
13 | }; | ||
14 | |||
15 | //Tap Dance Definitions | ||
16 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
17 | //Tap once for ;, twice for ' -not using this currently | ||
18 | [TD_SEMI_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), | ||
19 | //Tap once for , twice for - | ||
20 | [TD_COMM_MINUS] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINUS), | ||
21 | //Tap once for . twice for = | ||
22 | [TD_DOT_EQUAL] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_EQUAL), | ||
23 | //Tap once for / twice for '\' | ||
24 | [TD_SLASH_BACKSLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS) | ||
25 | }; | ||
26 | |||
27 | #define CTRL_ESC CTL_T(KC_ESC) | ||
28 | |||
29 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
30 | |||
31 | [base] = LAYOUT_2u_space_ortho( | ||
32 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
33 | CTRL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
34 | KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(1), TD(2), TD(3), KC_RSPC, | ||
35 | KC_LCTL, KC_LEAD, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_VOLD, KC_MPLY, KC_VOLU, KC_GRV), | ||
36 | |||
37 | [raise] = LAYOUT_2u_space_ortho( | ||
38 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, | ||
39 | _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_QUOT, _______, | ||
40 | _______, KC_HOME, KC_END, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, | ||
41 | _______, _______, _______, _______, _______, _______, _______, KC_MPRV, _______, KC_MNXT, EEP_RST), | ||
42 | |||
43 | [lower] = LAYOUT_2u_space_ortho( | ||
44 | _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | ||
45 | _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, KC_4, KC_5, KC_6, KC_KP_PLUS, _______, | ||
46 | _______, RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, | ||
47 | _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______) | ||
48 | |||
49 | |||
50 | }; | ||
51 | |||
52 | //Leader maps | ||
53 | |||
54 | |||
55 | LEADER_EXTERNS(); | ||
56 | |||
57 | void matrix_scan_user(void) { | ||
58 | LEADER_DICTIONARY() { | ||
59 | leading = false; | ||
60 | leader_end(); | ||
61 | |||
62 | SEQ_ONE_KEY(KC_F) { | ||
63 | // Anything you can do in a macro. | ||
64 | SEND_STRING("QMK is awesome."); | ||
65 | } | ||
66 | //tableflip (LEADER - TF) | ||
67 | SEQ_TWO_KEYS(KC_T, KC_F) { | ||
68 | set_unicode_input_mode(UC_OSX); | ||
69 | send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); | ||
70 | } | ||
71 | //screencap (LEADER - SC) | ||
72 | SEQ_TWO_KEYS(KC_S, KC_C) { | ||
73 | SEND_STRING(SS_LGUI(SS_LSFT(SS_TAP(X_4)))); | ||
74 | } | ||
75 | //screencap (LEADER - TM) | ||
76 | SEQ_TWO_KEYS(KC_T, KC_M) { | ||
77 | set_unicode_input_mode(UC_OSX); | ||
78 | send_unicode_hex_string("2122"); | ||
79 | } | ||
80 | /* | ||
81 | SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { | ||
82 | SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); | ||
83 | } | ||
84 | */ | ||
85 | } | ||
86 | } | ||
87 | |||
88 | //change colors and rgb modes on layer change | ||
89 | uint32_t layer_state_set_user(uint32_t state) { | ||
90 | switch (biton32(state)) { | ||
91 | case raise: | ||
92 | rgblight_mode_noeeprom(1); | ||
93 | rgblight_setrgb(0xc7, 0x00, 0xf4); | ||
94 | break; | ||
95 | case lower: | ||
96 | rgblight_mode_noeeprom(1); | ||
97 | rgblight_setrgb(0x00, 0xa3, 0x0d); | ||
98 | break; | ||
99 | default: // for any other layers, or the default layer | ||
100 | rgblight_mode_noeeprom(5); | ||
101 | rgblight_setrgb(0xFF, 0xB6, 0x00); | ||
102 | break; | ||
103 | } | ||
104 | return state; | ||
105 | }; | ||
106 | |||
diff --git a/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk b/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk new file mode 100755 index 000000000..a2c78f8db --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk | |||
@@ -0,0 +1,11 @@ | |||
1 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
2 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
3 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
4 | SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
5 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
6 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
7 | AUDIO_ENABLE = no | ||
8 | RGBLIGHT_ENABLE = yes | ||
9 | TAP_DANCE_ENABLE = yes | ||
10 | UNICODE_ENABLE = yes | ||
11 | LEADER_ENABLE = yes | ||