summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-01-28 17:09:58 -0800
committerDrashna Jaelre <drashna@live.com>2019-01-28 17:09:58 -0800
commit02180c87f2618d6be33f0c171b48418e2b88c800 (patch)
tree319fc0ff3824c55f3a9fadec8b8494bf0672f42a
parent03d9e3fe799ff70bba2c30b3cc160811c363dce6 (diff)
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.h5
-rw-r--r--keyboards/handwired/space_oddity/info.json78
-rw-r--r--keyboards/handwired/space_oddity/keymaps/default/keymap.c334
-rw-r--r--keyboards/handwired/space_oddity/readme.md23
-rw-r--r--keyboards/handwired/space_oddity/rules.mk22
-rw-r--r--keyboards/handwired/space_oddity/space_oddity.h7
6 files changed, 273 insertions, 196 deletions
diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h
index aae53e9810..8322164232 100644
--- a/keyboards/handwired/space_oddity/config.h
+++ b/keyboards/handwired/space_oddity/config.h
@@ -1,5 +1,4 @@
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -51,5 +50,3 @@
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
-
-#endif
diff --git a/keyboards/handwired/space_oddity/info.json b/keyboards/handwired/space_oddity/info.json
new file mode 100644
index 0000000000..37e24b33c4
--- /dev/null
+++ b/keyboards/handwired/space_oddity/info.json
@@ -0,0 +1,78 @@
+{
+ "keyboard_name": "Space Oddity",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 14,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"Macro 0", "x":0, "y":0, "w":2},
+ {"label":"Macro 1", "x":2, "y":0, "w":2},
+ {"label":"Macro 2", "x":4, "y":0, "w":2},
+ {"label":"Macro 3", "x":6, "y":0, "w":2},
+ {"label":"Macro 4", "x":8, "y":0, "w":2},
+ {"label":"Dynamic Macro 1", "x":10, "y":0, "w":2},
+ {"label":"Dynamic Macro 2", "x":12, "y":0, "w":2},
+ {"label":"~", "x":0, "y":1, "w":2},
+ {"label":"!", "x":2, "y":1},
+ {"label":"@", "x":3, "y":1},
+ {"label":"#", "x":4, "y":1},
+ {"label":"$", "x":5, "y":1},
+ {"label":"%", "x":6, "y":1},
+ {"label":"^", "x":7, "y":1},
+ {"label":"&", "x":8, "y":1},
+ {"label":"*", "x":9, "y":1},
+ {"label":"(", "x":10, "y":1},
+ {"label":")", "x":11, "y":1},
+ {"label":"Backspace", "x":12, "y":1, "w":2},
+ {"label":"Tab", "x":0, "y":2, "w":2},
+ {"label":"Q", "x":2, "y":2},
+ {"label":"W", "x":3, "y":2},
+ {"label":"E", "x":4, "y":2},
+ {"label":"R", "x":5, "y":2},
+ {"label":"T", "x":6, "y":2},
+ {"label":"Y", "x":7, "y":2},
+ {"label":"U", "x":8, "y":2},
+ {"label":"I", "x":9, "y":2},
+ {"label":"O", "x":10, "y":2},
+ {"label":"P", "x":11, "y":2},
+ {"label":"_", "x":12, "y":2, "w":2},
+ {"label":"Esc (Ctrl)", "x":0, "y":3, "w":2},
+ {"label":"A", "x":2, "y":3},
+ {"label":"S", "x":3, "y":3},
+ {"label":"D", "x":4, "y":3},
+ {"label":"F", "x":5, "y":3},
+ {"label":"G", "x":6, "y":3},
+ {"label":"H", "x":7, "y":3},
+ {"label":"J", "x":8, "y":3},
+ {"label":"K", "x":9, "y":3},
+ {"label":"L", "x":10, "y":3},
+ {"label":":", "x":11, "y":3},
+ {"label":"\"", "x":12, "y":3, "w":2},
+ {"label":"Caps Lock (Shift)", "x":0.25, "y":4, "w":1.75},
+ {"label":"Z", "x":2, "y":4},
+ {"label":"X", "x":3, "y":4},
+ {"label":"C", "x":4, "y":4},
+ {"label":"V", "x":5, "y":4},
+ {"label":"B", "x":6, "y":4},
+ {"label":"N", "x":7, "y":4},
+ {"label":"M", "x":8, "y":4},
+ {"label":"<", "x":9, "y":4},
+ {"label":">", "x":10, "y":4},
+ {"label":"?", "x":11, "y":4},
+ {"label":"Enter (Shift)", "x":12, "y":4, "w":1.75},
+ {"label":"MO(2)", "x":1, "y":5},
+ {"label":"MO(1)", "x":2, "y":5},
+ {"label":"GUI", "x":3, "y":5},
+ {"label":"Alt", "x":4, "y":5},
+ {"label":"Ctrl", "x":5, "y":5, "w":2},
+ {"label":"Space", "x":7, "y":5, "w":2},
+ {"label":"Left (Alt)", "x":9, "y":5},
+ {"label":"Right (Hyper)", "x":10, "y":5},
+ {"label":"Up (MO(1))", "x":11, "y":5},
+ {"label":"Down (MO(2))", "x":12, "y":5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c
index 4230cdf8db..6e42a28151 100644
--- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c
+++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c
@@ -15,12 +15,16 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#include "space_oddity.h"
+#include QMK_KEYBOARD_H
-// Planck keycodes needed for dynamic macros.
-enum planck_keycodes {
+// Custom keycodes needed for dynamic macros.
+enum custom_keycodes {
QWERTY = SAFE_RANGE,
+ PAIR_PR,
+ PAIR_BR,
+ PAIR_CB,
+ LAMBDA,
DYNAMIC_MACRO_RANGE,
};
@@ -36,13 +40,6 @@ enum {
#define MOUSE_LAYER 2
-// Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions.
-const uint16_t PROGMEM fn_actions[] = {
-
- [2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER),
-
-};
-
// Tap dance actions - double tap for Caps Lock.
qk_tap_dance_action_t tap_dance_actions[] = {
@@ -52,141 +49,105 @@ qk_tap_dance_action_t tap_dance_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6.
-
- ___________________________________________________________________________________
- | | | | | | Dynamic | Dynamic |
- | Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 |
- |___________|___________|___________|___________|___________|___________|___________|
- | | | | | | | | | | | | |
- | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | TAB | Q | W | E | R | T | Y | U | I | O | P | - |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)|
- |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
- | | | | | | | ALT | HYP | LT 1| LT 2|
- | M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)|
- |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
- */
-
- KEYMAP(
- M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_MINS,
- 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,
- 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),
- 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)),
-
- /* Function layer.
- Blank keys correspond to the KC_TRNS keycode.
-
- ___________________________________________________________________________________
- | | | | | | DYN REC | DYN REC |
- | Macro 7 | | | | | 1 | 2 |
- |___________|___________|___________|___________|___________|___________|___________|
- | DYN REC | | | | | | | | | | | |
- | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | |
- |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
- | | | | | | | | | | |
- | | | | | | | | | | |
- |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
-
+ /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6.
+ *
+ * ___________________________________________________________________________________
+ * | | | | | | Dynamic | Dynamic |
+ * | () | [] | {} | NO OP | NO OP | Macro 1 | Macro 2 |
+ * |___________|___________|___________|___________|___________|___________|___________|
+ * | | | | | | | | | | | | |
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | TAB | Q | W | E | R | T | Y | U | I | O | P | - |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)|
+ * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
+ * | | | | | | | ALT | HYP | LT 1| LT 2|
+ * |MO(2)|MO(1)| GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)|
+ * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
*/
-
- KEYMAP(
- M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2,
- 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,
- KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL,
- KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE,
- KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
-
- /* Mouse layer.
-
- ___________________________________________________________________________________
- | | | | | | | |
- | | | | | | | |
- |___________|___________|___________|___________|___________|___________|___________|
- | | | | MS | | | | | | | | |
- | | | | UP | | | | | | | | |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | MS | MS | MS | | | | | | | |
- | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | | | | | | | | | | | | |
- |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
- | | | | | | | | | | | | |
- | |RESET| | | | | | | | | | |
- |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
- | | | | | | | | | | |
- | | | | | | | | | | F(2)|
- |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
+ [0] = LAYOUT( \
+ PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_MINS, \
+ 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, \
+ 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), \
+ 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) \
+ ),
+
+ /* Function layer.
+ * Blank keys correspond to the KC_TRNS keycode.
+ *
+ * ___________________________________________________________________________________
+ * | | | | | | DYN REC | DYN REC |
+ * | LAMBDA | | | | | 1 | 2 |
+ * |___________|___________|___________|___________|___________|___________|___________|
+ * | DYN REC | | | | | | | | | | | |
+ * | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | |
+ * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
+ * | | | | | | | | | | |
+ * | | | | | | | | | | |
+ * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
+ *
*/
-
- KEYMAP(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- 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,
- 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,
- 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, 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, KC_TRNS, KC_TRNS, F(2))
-};
-// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of
-// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way,
-// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for
-// LaTeX editing.
-//
-// Customize to your heart's content!
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
-
- switch (id) {
- case 0:
- if (record->event.pressed) {
- SEND_STRING("()"SS_TAP(X_LEFT));
- }
- break;
-
- case 1:
- if (record->event.pressed) {
- SEND_STRING("[]"SS_TAP(X_LEFT));
- }
- break;
-
- case 2:
- if (record->event.pressed) {
- SEND_STRING("{}"SS_TAP(X_LEFT));
- }
- break;
-
- // Probably something only Lisp users will appreciate...
- case 7:
- if (record->event.pressed) {
- SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT));
- }
- break;
- }
+ [1] = LAYOUT( \
+ LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \
+ 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, \
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \
+ KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \
+ _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ /* Mouse layer.
+ *
+ * ___________________________________________________________________________________
+ * | | | | | | | |
+ * | | | | | | | |
+ * |___________|___________|___________|___________|___________|___________|___________|
+ * | | | | MS | | | | | | | | |
+ * | | | | UP | | | | | | | | |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | MS | MS | MS | | | | | | | |
+ * | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | | | | | | | | | | | | |
+ * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
+ * | | | | | | | | | | | | |
+ * | |RESET| | | | | | | | | | |
+ * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
+ * | | | | | | | | | | |
+ * | | | | | | | | | | F(2)|
+ * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
+ *
+ */
- return MACRO_NONE;
-
-}
+ [2] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(2) \
+ )
+};
void matrix_init_user(void) {
}
@@ -194,44 +155,79 @@ void matrix_init_user(void) {
void matrix_scan_user(void) {
}
+// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of
+// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way,
+// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for
+// LaTeX editing.
+//
+// Customize to your heart's content!
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
+
+ switch (keycode) {
+
+ case PAIR_PR:
+ if (record->event.pressed) {
+ SEND_STRING("()"SS_TAP(X_LEFT));
+ }
+ return false;
+
+ case PAIR_BR:
+ if (record->event.pressed) {
+ SEND_STRING("[]"SS_TAP(X_LEFT));
+ }
+ return false;
+
+ case PAIR_CB:
+ if (record->event.pressed) {
+ SEND_STRING("{}"SS_TAP(X_LEFT));
+ }
+ return false;
+
+ // Probably something only Lisp users will appreciate...
+ case LAMBDA:
+ if (record->event.pressed) {
+ SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT));
+ }
+ return false;
+ }
+
return true;
}
void led_set_user(uint8_t usb_led) {
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
}
diff --git a/keyboards/handwired/space_oddity/readme.md b/keyboards/handwired/space_oddity/readme.md
index 07ec957faf..2997833f09 100644
--- a/keyboards/handwired/space_oddity/readme.md
+++ b/keyboards/handwired/space_oddity/readme.md
@@ -1,5 +1,6 @@
-Space Oddity Keyboard
-=====================
+# Space Oddity Keyboard
+
+![Space Oddity](https://i.imgur.com/dE9Y4XK.jpg)
This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro.
@@ -7,7 +8,10 @@ As originally designed, the top row consists of 2u keys which are used for user-
Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section.
-A picture of the finished product can be found here: https://imgur.com/dE9Y4XK
+This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome!
+
+Keyboard Maintainer: [James Taylor](https://github.com/broken-username)
+Hardware Supported: Arduino Pro Micro
## Pinout
@@ -15,11 +19,16 @@ The following pins are used:
- Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3
- Rows 1-6: F4, F5, F6, F7, B1, B3
-## Compiling and loading the firmware
+## Flashing
+
+Make example for this keyboard (after setting up your build environment):
-To build the firmware, run `make handwired/space_oddity` from the toplevel directory.
+ make handwired/space_oddity:default
-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.
+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.
-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
+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 4dc93fad9e..b597ef2b09 100644
--- a/keyboards/handwired/space_oddity/rules.mk
+++ b/keyboards/handwired/space_oddity/rules.mk
@@ -35,7 +35,7 @@ F_USB = $(F_CPU)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
+# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = caterina
@@ -45,14 +45,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= no # Commands for debug and configuration
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
-NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= no
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
TAP_DANCE_ENABLE = yes
diff --git a/keyboards/handwired/space_oddity/space_oddity.h b/keyboards/handwired/space_oddity/space_oddity.h
index e9270d044e..d35bfea587 100644
--- a/keyboards/handwired/space_oddity/space_oddity.h
+++ b/keyboards/handwired/space_oddity/space_oddity.h
@@ -1,9 +1,8 @@
-#ifndef KB_H
-#define KB_H
+#pragma once
#include "quantum.h"
-#define KEYMAP( \
+#define LAYOUT( \
K000, K002, K004, K006, K008, K010, K011, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
@@ -18,5 +17,3 @@
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \
{ K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \
}
-
-#endif \ No newline at end of file