diff options
| author | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-01-28 17:09:58 -0800 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-01-28 17:09:58 -0800 |
| commit | 02180c87f2618d6be33f0c171b48418e2b88c800 (patch) | |
| tree | 319fc0ff3824c55f3a9fadec8b8494bf0672f42a | |
| parent | 03d9e3fe799ff70bba2c30b3cc160811c363dce6 (diff) | |
| download | qmk_firmware-02180c87f2618d6be33f0c171b48418e2b88c800.tar.gz qmk_firmware-02180c87f2618d6be33f0c171b48418e2b88c800.zip | |
handwired/space_oddity: refactor, Configurator support and readme cleanup (#4977)
* handwired/space_oddity: refactor
- config.h: updated to use #pragma once include guard
- rules.mk: replace `?=` with `=`
- space_oddity.h:
- updated to use #pragma once include guard
- layout macro KEYMAP renamed to LAYOUT
- default keymap:
- updated to use #include QMK_KEYBOARD_H
- replace references to Planck keycodes
- replace fn_actions-powered layer switch keycode
- rebuild keymap block comments
- keymap layers now use short-form keycodes
- refactor action_get_macro keycodes into process_record_user
* handwired/space_oddity: Configurator support
* handwired/space_oddity: readme cleanup
- update readme to better conform with QMK template
- fixed the make command.
| -rw-r--r-- | keyboards/handwired/space_oddity/config.h | 5 | ||||
| -rw-r--r-- | keyboards/handwired/space_oddity/info.json | 78 | ||||
| -rw-r--r-- | keyboards/handwired/space_oddity/keymaps/default/keymap.c | 334 | ||||
| -rw-r--r-- | keyboards/handwired/space_oddity/readme.md | 23 | ||||
| -rw-r--r-- | keyboards/handwired/space_oddity/rules.mk | 22 | ||||
| -rw-r--r-- | keyboards/handwired/space_oddity/space_oddity.h | 7 |
6 files changed, 273 insertions, 196 deletions
diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h index aae53e981..832216423 100644 --- a/keyboards/handwired/space_oddity/config.h +++ b/keyboards/handwired/space_oddity/config.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #ifndef CONFIG_H | 1 | #pragma once |
| 2 | #define CONFIG_H | ||
| 3 | 2 | ||
| 4 | #include "config_common.h" | 3 | #include "config_common.h" |
| 5 | 4 | ||
| @@ -51,5 +50,3 @@ | |||
| 51 | #define RGBLIGHT_SAT_STEP 8 | 50 | #define RGBLIGHT_SAT_STEP 8 |
| 52 | #define RGBLIGHT_VAL_STEP 8 | 51 | #define RGBLIGHT_VAL_STEP 8 |
| 53 | #endif | 52 | #endif |
| 54 | |||
| 55 | #endif | ||
diff --git a/keyboards/handwired/space_oddity/info.json b/keyboards/handwired/space_oddity/info.json new file mode 100644 index 000000000..37e24b33c --- /dev/null +++ b/keyboards/handwired/space_oddity/info.json | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Space Oddity", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 14, | ||
| 6 | "height": 6, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"Macro 0", "x":0, "y":0, "w":2}, | ||
| 11 | {"label":"Macro 1", "x":2, "y":0, "w":2}, | ||
| 12 | {"label":"Macro 2", "x":4, "y":0, "w":2}, | ||
| 13 | {"label":"Macro 3", "x":6, "y":0, "w":2}, | ||
| 14 | {"label":"Macro 4", "x":8, "y":0, "w":2}, | ||
| 15 | {"label":"Dynamic Macro 1", "x":10, "y":0, "w":2}, | ||
| 16 | {"label":"Dynamic Macro 2", "x":12, "y":0, "w":2}, | ||
| 17 | {"label":"~", "x":0, "y":1, "w":2}, | ||
| 18 | {"label":"!", "x":2, "y":1}, | ||
| 19 | {"label":"@", "x":3, "y":1}, | ||
| 20 | {"label":"#", "x":4, "y":1}, | ||
| 21 | {"label":"$", "x":5, "y":1}, | ||
| 22 | {"label":"%", "x":6, "y":1}, | ||
| 23 | {"label":"^", "x":7, "y":1}, | ||
| 24 | {"label":"&", "x":8, "y":1}, | ||
| 25 | {"label":"*", "x":9, "y":1}, | ||
| 26 | {"label":"(", "x":10, "y":1}, | ||
| 27 | {"label":")", "x":11, "y":1}, | ||
| 28 | {"label":"Backspace", "x":12, "y":1, "w":2}, | ||
| 29 | {"label":"Tab", "x":0, "y":2, "w":2}, | ||
| 30 | {"label":"Q", "x":2, "y":2}, | ||
| 31 | {"label":"W", "x":3, "y":2}, | ||
| 32 | {"label":"E", "x":4, "y":2}, | ||
| 33 | {"label":"R", "x":5, "y":2}, | ||
| 34 | {"label":"T", "x":6, "y":2}, | ||
| 35 | {"label":"Y", "x":7, "y":2}, | ||
| 36 | {"label":"U", "x":8, "y":2}, | ||
| 37 | {"label":"I", "x":9, "y":2}, | ||
| 38 | {"label":"O", "x":10, "y":2}, | ||
| 39 | {"label":"P", "x":11, "y":2}, | ||
| 40 | {"label":"_", "x":12, "y":2, "w":2}, | ||
| 41 | {"label":"Esc (Ctrl)", "x":0, "y":3, "w":2}, | ||
| 42 | {"label":"A", "x":2, "y":3}, | ||
| 43 | {"label":"S", "x":3, "y":3}, | ||
| 44 | {"label":"D", "x":4, "y":3}, | ||
| 45 | {"label":"F", "x":5, "y":3}, | ||
| 46 | {"label":"G", "x":6, "y":3}, | ||
| 47 | {"label":"H", "x":7, "y":3}, | ||
| 48 | {"label":"J", "x":8, "y":3}, | ||
| 49 | {"label":"K", "x":9, "y":3}, | ||
| 50 | {"label":"L", "x":10, "y":3}, | ||
| 51 | {"label":":", "x":11, "y":3}, | ||
| 52 | {"label":"\"", "x":12, "y":3, "w":2}, | ||
| 53 | {"label":"Caps Lock (Shift)", "x":0.25, "y":4, "w":1.75}, | ||
| 54 | {"label":"Z", "x":2, "y":4}, | ||
| 55 | {"label":"X", "x":3, "y":4}, | ||
| 56 | {"label":"C", "x":4, "y":4}, | ||
| 57 | {"label":"V", "x":5, "y":4}, | ||
| 58 | {"label":"B", "x":6, "y":4}, | ||
| 59 | {"label":"N", "x":7, "y":4}, | ||
| 60 | {"label":"M", "x":8, "y":4}, | ||
| 61 | {"label":"<", "x":9, "y":4}, | ||
| 62 | {"label":">", "x":10, "y":4}, | ||
| 63 | {"label":"?", "x":11, "y":4}, | ||
| 64 | {"label":"Enter (Shift)", "x":12, "y":4, "w":1.75}, | ||
| 65 | {"label":"MO(2)", "x":1, "y":5}, | ||
| 66 | {"label":"MO(1)", "x":2, "y":5}, | ||
| 67 | {"label":"GUI", "x":3, "y":5}, | ||
| 68 | {"label":"Alt", "x":4, "y":5}, | ||
| 69 | {"label":"Ctrl", "x":5, "y":5, "w":2}, | ||
| 70 | {"label":"Space", "x":7, "y":5, "w":2}, | ||
| 71 | {"label":"Left (Alt)", "x":9, "y":5}, | ||
| 72 | {"label":"Right (Hyper)", "x":10, "y":5}, | ||
| 73 | {"label":"Up (MO(1))", "x":11, "y":5}, | ||
| 74 | {"label":"Down (MO(2))", "x":12, "y":5} | ||
| 75 | ] | ||
| 76 | } | ||
| 77 | } | ||
| 78 | } | ||
diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index 4230cdf8d..6e42a2815 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c | |||
| @@ -15,12 +15,16 @@ | |||
| 15 | along with this program. If not, see <https://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "space_oddity.h" | 18 | #include QMK_KEYBOARD_H |
| 19 | 19 | ||
| 20 | // Planck keycodes needed for dynamic macros. | 20 | // Custom keycodes needed for dynamic macros. |
| 21 | enum planck_keycodes { | 21 | enum custom_keycodes { |
| 22 | 22 | ||
| 23 | QWERTY = SAFE_RANGE, | 23 | QWERTY = SAFE_RANGE, |
| 24 | PAIR_PR, | ||
| 25 | PAIR_BR, | ||
| 26 | PAIR_CB, | ||
| 27 | LAMBDA, | ||
| 24 | DYNAMIC_MACRO_RANGE, | 28 | DYNAMIC_MACRO_RANGE, |
| 25 | 29 | ||
| 26 | }; | 30 | }; |
| @@ -36,13 +40,6 @@ enum { | |||
| 36 | 40 | ||
| 37 | #define MOUSE_LAYER 2 | 41 | #define MOUSE_LAYER 2 |
| 38 | 42 | ||
| 39 | // Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions. | ||
| 40 | const uint16_t PROGMEM fn_actions[] = { | ||
| 41 | |||
| 42 | [2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER), | ||
| 43 | |||
| 44 | }; | ||
| 45 | |||
| 46 | // Tap dance actions - double tap for Caps Lock. | 43 | // Tap dance actions - double tap for Caps Lock. |
| 47 | qk_tap_dance_action_t tap_dance_actions[] = { | 44 | qk_tap_dance_action_t tap_dance_actions[] = { |
| 48 | 45 | ||
| @@ -52,141 +49,105 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
| 52 | 49 | ||
| 53 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 50 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 54 | 51 | ||
| 55 | /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. | 52 | /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. |
| 56 | 53 | * | |
| 57 | ___________________________________________________________________________________ | 54 | * ___________________________________________________________________________________ |
| 58 | | | | | | | Dynamic | Dynamic | | 55 | * | | | | | | Dynamic | Dynamic | |
| 59 | | Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 | | 56 | * | () | [] | {} | NO OP | NO OP | Macro 1 | Macro 2 | |
| 60 | |___________|___________|___________|___________|___________|___________|___________| | 57 | * |___________|___________|___________|___________|___________|___________|___________| |
| 61 | | | | | | | | | | | | | | | 58 | * | | | | | | | | | | | | | |
| 62 | | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | 59 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | |
| 63 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | 60 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| |
| 64 | | | | | | | | | | | | | | | 61 | * | | | | | | | | | | | | | |
| 65 | | TAB | Q | W | E | R | T | Y | U | I | O | P | - | | 62 | * | TAB | Q | W | E | R | T | Y | U | I | O | P | - | |
| 66 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | 63 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| |
| 67 | | | | | | | | | | | | | | | 64 | * | | | | | | | | | | | | | |
| 68 | |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | | 65 | * |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | |
| 69 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | 66 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| |
| 70 | | | | | | | | | | | | | | | 67 | * | | | | | | | | | | | | | |
| 71 | | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| | 68 | * | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| |
| 72 | |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| | 69 | * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| |
| 73 | | | | | | | | ALT | HYP | LT 1| LT 2| | 70 | * | | | | | | | ALT | HYP | LT 1| LT 2| |
| 74 | | M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| | 71 | * |MO(2)|MO(1)| GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| |
| 75 | |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| | 72 | * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| |
| 76 | */ | ||
| 77 | |||
| 78 | KEYMAP( | ||
| 79 | M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, | ||
| 80 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
| 81 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, | ||
| 82 | CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 83 | TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), | ||
| 84 | MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)), | ||
| 85 | |||
| 86 | /* Function layer. | ||
| 87 | Blank keys correspond to the KC_TRNS keycode. | ||
| 88 | |||
| 89 | ___________________________________________________________________________________ | ||
| 90 | | | | | | | DYN REC | DYN REC | | ||
| 91 | | Macro 7 | | | | | 1 | 2 | | ||
| 92 | |___________|___________|___________|___________|___________|___________|___________| | ||
| 93 | | DYN REC | | | | | | | | | | | | | ||
| 94 | | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | | ||
| 95 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 96 | | | | | | | | | | | | | | | ||
| 97 | | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | | ||
| 98 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 99 | | | | | | | | | | | | | | | ||
| 100 | | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | | ||
| 101 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 102 | | | | | | | | | | | | | | | ||
| 103 | | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | | ||
| 104 | |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| | ||
| 105 | | | | | | | | | | | | | ||
| 106 | | | | | | | | | | | | | ||
| 107 | |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| | ||
| 108 | |||
| 109 | */ | 73 | */ |
| 110 | |||
| 111 | KEYMAP( | ||
| 112 | M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, | ||
| 113 | DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, | ||
| 114 | KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, | ||
| 115 | KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, | ||
| 116 | KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, | ||
| 117 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 118 | |||
| 119 | /* Mouse layer. | ||
| 120 | |||
| 121 | ___________________________________________________________________________________ | ||
| 122 | | | | | | | | | | ||
| 123 | | | | | | | | | | ||
| 124 | |___________|___________|___________|___________|___________|___________|___________| | ||
| 125 | | | | | MS | | | | | | | | | | ||
| 126 | | | | | UP | | | | | | | | | | ||
| 127 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 128 | | | | MS | MS | MS | | | | | | | | | ||
| 129 | | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | | ||
| 130 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 131 | | | | | | | | | | | | | | | ||
| 132 | | | | | | | | | | | | | | | ||
| 133 | |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 134 | | | | | | | | | | | | | | | ||
| 135 | | |RESET| | | | | | | | | | | | ||
| 136 | |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| | ||
| 137 | | | | | | | | | | | | | ||
| 138 | | | | | | | | | | | F(2)| | ||
| 139 | |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| | ||
| 140 | 74 | ||
| 75 | [0] = LAYOUT( \ | ||
| 76 | PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \ | ||
| 77 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 78 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ | ||
| 79 | CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | ||
| 80 | TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ | ||
| 81 | MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN) \ | ||
| 82 | ), | ||
| 83 | |||
| 84 | /* Function layer. | ||
| 85 | * Blank keys correspond to the KC_TRNS keycode. | ||
| 86 | * | ||
| 87 | * ___________________________________________________________________________________ | ||
| 88 | * | | | | | | DYN REC | DYN REC | | ||
| 89 | * | LAMBDA | | | | | 1 | 2 | | ||
| 90 | * |___________|___________|___________|___________|___________|___________|___________| | ||
| 91 | * | DYN REC | | | | | | | | | | | | | ||
| 92 | * | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | | ||
| 93 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 94 | * | | | | | | | | | | | | | | ||
| 95 | * | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | | ||
| 96 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 97 | * | | | | | | | | | | | | | | ||
| 98 | * | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | | ||
| 99 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | ||
| 100 | * | | | | | | | | | | | | | | ||
| 101 | * | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | | ||
| 102 | * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| | ||
| 103 | * | | | | | | | | | | | | ||
| 104 | * | | | | | | | | | | | | ||
| 105 | * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| | ||
| 106 | * | ||
| 141 | */ | 107 | */ |
| 142 | |||
| 143 | KEYMAP( | ||
| 144 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 145 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 146 | KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_TRNS, KC_TRNS, | ||
| 147 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 148 | KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 149 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(2)) | ||
| 150 | }; | ||
| 151 | 108 | ||
| 152 | // Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of | 109 | [1] = LAYOUT( \ |
| 153 | // delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, | 110 | LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \ |
| 154 | // you can have some convenient coding "helpers" even when not using Emacs. It is also nice for | 111 | DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \ |
| 155 | // LaTeX editing. | 112 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \ |
| 156 | // | 113 | KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \ |
| 157 | // Customize to your heart's content! | 114 | _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \ |
| 158 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | 115 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ |
| 159 | 116 | ), | |
| 160 | switch (id) { | 117 | |
| 161 | case 0: | 118 | /* Mouse layer. |
| 162 | if (record->event.pressed) { | 119 | * |
| 163 | SEND_STRING("()"SS_TAP(X_LEFT)); | 120 | * ___________________________________________________________________________________ |
| 164 | } | 121 | * | | | | | | | | |
| 165 | break; | 122 | * | | | | | | | | |
| 166 | 123 | * |___________|___________|___________|___________|___________|___________|___________| | |
| 167 | case 1: | 124 | * | | | | MS | | | | | | | | | |
| 168 | if (record->event.pressed) { | 125 | * | | | | UP | | | | | | | | | |
| 169 | SEND_STRING("[]"SS_TAP(X_LEFT)); | 126 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| |
| 170 | } | 127 | * | | | MS | MS | MS | | | | | | | | |
| 171 | break; | 128 | * | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | |
| 172 | 129 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| | |
| 173 | case 2: | 130 | * | | | | | | | | | | | | | |
| 174 | if (record->event.pressed) { | 131 | * | | | | | | | | | | | | | |
| 175 | SEND_STRING("{}"SS_TAP(X_LEFT)); | 132 | * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| |
| 176 | } | 133 | * | | | | | | | | | | | | | |
| 177 | break; | 134 | * | |RESET| | | | | | | | | | | |
| 178 | 135 | * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| | |
| 179 | // Probably something only Lisp users will appreciate... | 136 | * | | | | | | | | | | | |
| 180 | case 7: | 137 | * | | | | | | | | | | F(2)| |
| 181 | if (record->event.pressed) { | 138 | * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| |
| 182 | SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); | 139 | * |
| 183 | } | 140 | */ |
| 184 | break; | ||
| 185 | } | ||
| 186 | 141 | ||
| 187 | return MACRO_NONE; | 142 | [2] = LAYOUT( \ |
| 188 | 143 | _______, _______, _______, _______, _______, _______, _______, \ | |
| 189 | } | 144 | _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 145 | _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, \ | ||
| 146 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 147 | _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 148 | _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(2) \ | ||
| 149 | ) | ||
| 150 | }; | ||
| 190 | 151 | ||
| 191 | void matrix_init_user(void) { | 152 | void matrix_init_user(void) { |
| 192 | } | 153 | } |
| @@ -194,44 +155,79 @@ void matrix_init_user(void) { | |||
| 194 | void matrix_scan_user(void) { | 155 | void matrix_scan_user(void) { |
| 195 | } | 156 | } |
| 196 | 157 | ||
| 158 | // Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of | ||
| 159 | // delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, | ||
| 160 | // you can have some convenient coding "helpers" even when not using Emacs. It is also nice for | ||
| 161 | // LaTeX editing. | ||
| 162 | // | ||
| 163 | // Customize to your heart's content! | ||
| 197 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 164 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 198 | 165 | ||
| 199 | if (!process_record_dynamic_macro(keycode, record)) { | 166 | if (!process_record_dynamic_macro(keycode, record)) { |
| 200 | return false; | 167 | return false; |
| 201 | } | 168 | } |
| 169 | |||
| 170 | switch (keycode) { | ||
| 171 | |||
| 172 | case PAIR_PR: | ||
| 173 | if (record->event.pressed) { | ||
| 174 | SEND_STRING("()"SS_TAP(X_LEFT)); | ||
| 175 | } | ||
| 176 | return false; | ||
| 177 | |||
| 178 | case PAIR_BR: | ||
| 179 | if (record->event.pressed) { | ||
| 180 | SEND_STRING("[]"SS_TAP(X_LEFT)); | ||
| 181 | } | ||
| 182 | return false; | ||
| 183 | |||
| 184 | case PAIR_CB: | ||
| 185 | if (record->event.pressed) { | ||
| 186 | SEND_STRING("{}"SS_TAP(X_LEFT)); | ||
| 187 | } | ||
| 188 | return false; | ||
| 189 | |||
| 190 | // Probably something only Lisp users will appreciate... | ||
| 191 | case LAMBDA: | ||
| 192 | if (record->event.pressed) { | ||
| 193 | SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); | ||
| 194 | } | ||
| 195 | return false; | ||
| 196 | } | ||
| 197 | |||
| 202 | return true; | 198 | return true; |
| 203 | } | 199 | } |
| 204 | 200 | ||
| 205 | void led_set_user(uint8_t usb_led) { | 201 | void led_set_user(uint8_t usb_led) { |
| 206 | 202 | ||
| 207 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { | 203 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { |
| 208 | 204 | ||
| 209 | } else { | 205 | } else { |
| 210 | 206 | ||
| 211 | } | 207 | } |
| 212 | 208 | ||
| 213 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | 209 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { |
| 214 | 210 | ||
| 215 | } else { | 211 | } else { |
| 216 | 212 | ||
| 217 | } | 213 | } |
| 218 | 214 | ||
| 219 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { | 215 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { |
| 220 | 216 | ||
| 221 | } else { | 217 | } else { |
| 222 | 218 | ||
| 223 | } | 219 | } |
| 224 | 220 | ||
| 225 | if (usb_led & (1 << USB_LED_COMPOSE)) { | 221 | if (usb_led & (1 << USB_LED_COMPOSE)) { |
| 226 | 222 | ||
| 227 | } else { | 223 | } else { |
| 228 | 224 | ||
| 229 | } | 225 | } |
| 230 | 226 | ||
| 231 | if (usb_led & (1 << USB_LED_KANA)) { | 227 | if (usb_led & (1 << USB_LED_KANA)) { |
| 232 | 228 | ||
| 233 | } else { | 229 | } else { |
| 234 | 230 | ||
| 235 | } | 231 | } |
| 236 | 232 | ||
| 237 | } | 233 | } |
diff --git a/keyboards/handwired/space_oddity/readme.md b/keyboards/handwired/space_oddity/readme.md index 07ec957fa..2997833f0 100644 --- a/keyboards/handwired/space_oddity/readme.md +++ b/keyboards/handwired/space_oddity/readme.md | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | Space Oddity Keyboard | 1 | # Space Oddity Keyboard |
| 2 | ===================== | 2 | |
| 3 |  | ||
| 3 | 4 | ||
| 4 | This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro. | 5 | This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro. |
| 5 | 6 | ||
| @@ -7,7 +8,10 @@ As originally designed, the top row consists of 2u keys which are used for user- | |||
| 7 | 8 | ||
| 8 | Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section. | 9 | Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section. |
| 9 | 10 | ||
| 10 | A picture of the finished product can be found here: https://imgur.com/dE9Y4XK | 11 | This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! |
| 12 | |||
| 13 | Keyboard Maintainer: [James Taylor](https://github.com/broken-username) | ||
| 14 | Hardware Supported: Arduino Pro Micro | ||
| 11 | 15 | ||
| 12 | ## Pinout | 16 | ## Pinout |
| 13 | 17 | ||
| @@ -15,11 +19,16 @@ The following pins are used: | |||
| 15 | - Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 | 19 | - Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 |
| 16 | - Rows 1-6: F4, F5, F6, F7, B1, B3 | 20 | - Rows 1-6: F4, F5, F6, F7, B1, B3 |
| 17 | 21 | ||
| 18 | ## Compiling and loading the firmware | 22 | ## Flashing |
| 23 | |||
| 24 | Make example for this keyboard (after setting up your build environment): | ||
| 19 | 25 | ||
| 20 | To build the firmware, run `make handwired/space_oddity` from the toplevel directory. | 26 | make handwired/space_oddity:default |
| 21 | 27 | ||
| 22 | On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different. | 28 | On GNU/Linux, you can flash the default layout onto the microcontroller by using |
| 23 | 29 | ||
| 30 | avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex | ||
| 31 | |||
| 32 | Note that the device name under `/dev` may be different. | ||
| 24 | 33 | ||
| 25 | This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! \ No newline at end of file | 34 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index 4dc93fad9..b597ef2b0 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk | |||
| @@ -35,7 +35,7 @@ F_USB = $(F_CPU) | |||
| 35 | 35 | ||
| 36 | # Bootloader | 36 | # Bootloader |
| 37 | # This definition is optional, and if your keyboard supports multiple bootloaders of | 37 | # This definition is optional, and if your keyboard supports multiple bootloaders of |
| 38 | # different sizes, comment this out, and the correct address will be loaded | 38 | # different sizes, comment this out, and the correct address will be loaded |
| 39 | # automatically (+60). See bootloader.mk for all options. | 39 | # automatically (+60). See bootloader.mk for all options. |
| 40 | BOOTLOADER = caterina | 40 | BOOTLOADER = caterina |
| 41 | 41 | ||
| @@ -45,14 +45,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
| 45 | # Build Options | 45 | # Build Options |
| 46 | # comment out to disable the options. | 46 | # comment out to disable the options. |
| 47 | # | 47 | # |
| 48 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) | 48 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) |
| 49 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | 49 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 50 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | 50 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 51 | CONSOLE_ENABLE ?= no # Console for debug(+400) | 51 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 52 | COMMAND_ENABLE ?= no # Commands for debug and configuration | 52 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 53 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | 53 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 54 | NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 54 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 55 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality | 55 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 56 | AUDIO_ENABLE ?= no | 56 | AUDIO_ENABLE = no |
| 57 | RGBLIGHT_ENABLE ?= no | 57 | RGBLIGHT_ENABLE = no |
| 58 | TAP_DANCE_ENABLE = yes | 58 | TAP_DANCE_ENABLE = yes |
diff --git a/keyboards/handwired/space_oddity/space_oddity.h b/keyboards/handwired/space_oddity/space_oddity.h index e9270d044..d35bfea58 100644 --- a/keyboards/handwired/space_oddity/space_oddity.h +++ b/keyboards/handwired/space_oddity/space_oddity.h | |||
| @@ -1,9 +1,8 @@ | |||
| 1 | #ifndef KB_H | 1 | #pragma once |
| 2 | #define KB_H | ||
| 3 | 2 | ||
| 4 | #include "quantum.h" | 3 | #include "quantum.h" |
| 5 | 4 | ||
| 6 | #define KEYMAP( \ | 5 | #define LAYOUT( \ |
| 7 | K000, K002, K004, K006, K008, K010, K011, \ | 6 | K000, K002, K004, K006, K008, K010, K011, \ |
| 8 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ | 7 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ |
| 9 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ | 8 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ |
| @@ -18,5 +17,3 @@ | |||
| 18 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ | 17 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ |
| 19 | { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \ | 18 | { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \ |
| 20 | } | 19 | } |
| 21 | |||
| 22 | #endif \ No newline at end of file | ||
