diff options
| -rw-r--r-- | docs/Modding-your-keyboard.md | 25 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/handwired_binaryplease/Makefile | 74 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/handwired_binaryplease/config.h | 39 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/handwired_binaryplease/keymap.c | 317 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/handwired_binaryplease/readme.md | 2 |
5 files changed, 449 insertions, 8 deletions
diff --git a/docs/Modding-your-keyboard.md b/docs/Modding-your-keyboard.md index 5d4b5d40f..2429570f5 100644 --- a/docs/Modding-your-keyboard.md +++ b/docs/Modding-your-keyboard.md | |||
| @@ -48,16 +48,25 @@ This is inside one of the macros. So when that macro executes, your keyboard pla | |||
| 48 | 48 | ||
| 49 | "Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes. | 49 | "Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes. |
| 50 | 50 | ||
| 51 | ## Music mode | ||
| 51 | 52 | ||
| 52 | ## Recording And Playing back Music | 53 | The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. |
| 53 | * ```Music On``` - Turn music mode on. The default mapping is ```Lower+Upper+C``` | ||
| 54 | * ```LCTL``` - start a recording | ||
| 55 | * play some tones | ||
| 56 | * ```LALT``` - stop recording, stop playing | ||
| 57 | * ```LGUI``` - play recording | ||
| 58 | * ```LALT``` - stop playing | ||
| 59 | * ```Music Off``` - Turn music mode off. The default mapping is ```Lower+Upper+V``` | ||
| 60 | 54 | ||
| 55 | Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. | ||
| 56 | |||
| 57 | Keycodes available: | ||
| 58 | |||
| 59 | * `MU_ON` - Turn music mode on | ||
| 60 | * `MU_OFF` - Turn music mode off | ||
| 61 | * `MU_TOG` - Toggle music mode | ||
| 62 | |||
| 63 | In music mode, the following keycodes work differently, and don't pass through: | ||
| 64 | |||
| 65 | * `LCTL` - start a recording | ||
| 66 | * `LALT` - stop recording/stop playing | ||
| 67 | * `LGUI` - play recording | ||
| 68 | * `KC_UP` - speed-up playback | ||
| 69 | * `KC_DOWN` - slow-down playback | ||
| 61 | 70 | ||
| 62 | ## MIDI functionalty | 71 | ## MIDI functionalty |
| 63 | 72 | ||
diff --git a/keyboards/planck/keymaps/handwired_binaryplease/Makefile b/keyboards/planck/keymaps/handwired_binaryplease/Makefile new file mode 100644 index 000000000..538b1c26c --- /dev/null +++ b/keyboards/planck/keymaps/handwired_binaryplease/Makefile | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | ifndef QUANTUM_DIR | ||
| 2 | include ../../../../Makefile | ||
| 3 | endif | ||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | # MCU name | ||
| 8 | #MCU = at90usb1287 | ||
| 9 | MCU = atmega32u4 | ||
| 10 | |||
| 11 | # Processor frequency. | ||
| 12 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 13 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 14 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 15 | # automatically to create a 32-bit value in your source code. | ||
| 16 | # | ||
| 17 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 18 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 19 | # does not *change* the processor frequency - it should merely be updated to | ||
| 20 | # reflect the processor speed set externally so that the code can use accurate | ||
| 21 | # software delays. | ||
| 22 | F_CPU = 16000000 | ||
| 23 | |||
| 24 | # | ||
| 25 | # LUFA specific | ||
| 26 | # | ||
| 27 | # Target architecture (see library "Board Types" documentation). | ||
| 28 | ARCH = AVR8 | ||
| 29 | |||
| 30 | # Input clock frequency. | ||
| 31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 37 | # source code. | ||
| 38 | # | ||
| 39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 41 | F_USB = $(F_CPU) | ||
| 42 | |||
| 43 | # Interrupt driven control endpoint task(+60) | ||
| 44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 45 | |||
| 46 | |||
| 47 | # Boot Section Size in *bytes* | ||
| 48 | # Teensy halfKay 512 | ||
| 49 | # Teensy++ halfKay 1024 | ||
| 50 | # Atmel DFU loader 4096 | ||
| 51 | # LUFA bootloader 4096 | ||
| 52 | # USBaspLoader 2048 | ||
| 53 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 54 | |||
| 55 | # Build Options | ||
| 56 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 57 | # the appropriate keymap folder that will get included automatically | ||
| 58 | # | ||
| 59 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 60 | MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) | ||
| 61 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 62 | CONSOLE_ENABLE ?= no # Console for debug(+400) | ||
| 63 | COMMAND_ENABLE ?= no # Commands for debug and configuration | ||
| 64 | NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 65 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality | ||
| 66 | MIDI_ENABLE ?= yes # MIDI controls | ||
| 67 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
| 68 | UNICODE_ENABLE ?= no # Unicode | ||
| 69 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 70 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. | ||
| 71 | API_SYSEX_ENABLE = no | ||
| 72 | |||
| 73 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 74 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboards/planck/keymaps/handwired_binaryplease/config.h b/keyboards/planck/keymaps/handwired_binaryplease/config.h new file mode 100644 index 000000000..5a90634bf --- /dev/null +++ b/keyboards/planck/keymaps/handwired_binaryplease/config.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | /* USB Device descriptor parameter */ | ||
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | #undef VENDOR_ID | ||
| 11 | #undef PRODUCT_ID | ||
| 12 | #undef MANUFACTURER | ||
| 13 | #undef PRODUCT | ||
| 14 | #undef DESCRIPTION | ||
| 15 | #undef MATRIX_ROW_PINS | ||
| 16 | #undef MATRIX_COL_PINS | ||
| 17 | #undef UNUSED_PINS | ||
| 18 | #undef BACKLIGHT_PIN | ||
| 19 | #undef BACKLIGHT_LEVELS | ||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x6060 | ||
| 25 | #define MANUFACTURER binaryplease | ||
| 26 | #define PRODUCT Teensy_Planck | ||
| 27 | #define DESCRIPTION A compact ortholinear keyboard using a teensy 2.0 | ||
| 28 | |||
| 29 | #define MATRIX_ROW_PINS { D3, D2, D1, D0 } | ||
| 30 | #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4 } | ||
| 31 | #define UNUSED_PINS | ||
| 32 | |||
| 33 | #define BACKLIGHT_PIN B7 | ||
| 34 | |||
| 35 | /* number of backlight levels */ | ||
| 36 | #define BACKLIGHT_LEVELS 0 | ||
| 37 | |||
| 38 | |||
| 39 | #endif | ||
diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c new file mode 100644 index 000000000..25a422dbb --- /dev/null +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c | |||
| @@ -0,0 +1,317 @@ | |||
| 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | ||
| 2 | // this is the style you want to emulate. | ||
| 3 | |||
| 4 | #include "planck.h" | ||
| 5 | #include "action_layer.h" | ||
| 6 | #ifdef AUDIO_ENABLE | ||
| 7 | #include "audio.h" | ||
| 8 | #endif | ||
| 9 | #include "eeconfig.h" | ||
| 10 | |||
| 11 | extern keymap_config_t keymap_config; | ||
| 12 | |||
| 13 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 14 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 15 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 16 | // entirely and just use numbers. | ||
| 17 | |||
| 18 | enum planck_layers { | ||
| 19 | _QWERTY, | ||
| 20 | _COLEMAK, | ||
| 21 | /*_DVORAK,*/ | ||
| 22 | _LOWER, | ||
| 23 | _RAISE, | ||
| 24 | /*_PLOVER,*/ | ||
| 25 | _ADJUST | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum planck_keycodes { | ||
| 29 | QWERTY = SAFE_RANGE, | ||
| 30 | COLEMAK, | ||
| 31 | /*DVORAK,*/ | ||
| 32 | /*PLOVER,*/ | ||
| 33 | LOWER, | ||
| 34 | RAISE, | ||
| 35 | BACKLIT | ||
| 36 | /*EXT_PLV*/ | ||
| 37 | }; | ||
| 38 | |||
| 39 | // Fillers to make layering more clear | ||
| 40 | #define _______ KC_TRNS | ||
| 41 | #define XXXXXXX KC_NO | ||
| 42 | |||
| 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 44 | |||
| 45 | /* Qwerty | ||
| 46 | * ,-----------------------------------------------------------------------------------. | ||
| 47 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 48 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 49 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | | ||
| 50 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 51 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
| 52 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 53 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 54 | * `-----------------------------------------------------------------------------------' | ||
| 55 | */ | ||
| 56 | [_QWERTY] = { | ||
| 57 | {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | ||
| 58 | {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | ||
| 59 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, | ||
| 60 | {KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | ||
| 61 | }, | ||
| 62 | |||
| 63 | /* Colemak | ||
| 64 | * ,-----------------------------------------------------------------------------------. | ||
| 65 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
| 66 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 67 | * | Esc | A | R | S | T | D | H | N | E | I | O | " | | ||
| 68 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 69 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | ||
| 70 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 71 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 72 | * `-----------------------------------------------------------------------------------' | ||
| 73 | */ | ||
| 74 | [_COLEMAK] = { | ||
| 75 | {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, | ||
| 76 | {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, | ||
| 77 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, | ||
| 78 | {KC_LCTL, KC_LGUI, XXXXXXX, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | ||
| 79 | }, | ||
| 80 | |||
| 81 | /* Dvorak | ||
| 82 | * ,-----------------------------------------------------------------------------------. | ||
| 83 | * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | | ||
| 84 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 85 | * | Esc | A | O | E | U | I | D | H | T | N | S | / | | ||
| 86 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 87 | * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | | ||
| 88 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 89 | * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 90 | * `-----------------------------------------------------------------------------------' | ||
| 91 | */ | ||
| 92 | /*[_DVORAK] = {*/ | ||
| 93 | /*{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},*/ | ||
| 94 | /*{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},*/ | ||
| 95 | /*{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },*/ | ||
| 96 | /*{KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}*/ | ||
| 97 | /*},*/ | ||
| 98 | |||
| 99 | /* Lower | ||
| 100 | * ,-----------------------------------------------------------------------------------. | ||
| 101 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
| 102 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 103 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 104 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 105 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | | ||
| 106 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 107 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 108 | * `-----------------------------------------------------------------------------------' | ||
| 109 | */ | ||
| 110 | [_LOWER] = { | ||
| 111 | {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, | ||
| 112 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, | ||
| 113 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, | ||
| 114 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | ||
| 115 | }, | ||
| 116 | |||
| 117 | /* Raise | ||
| 118 | * ,-----------------------------------------------------------------------------------. | ||
| 119 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 120 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 121 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 122 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 123 | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | | ||
| 124 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 125 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 126 | * `-----------------------------------------------------------------------------------' | ||
| 127 | */ | ||
| 128 | [_RAISE] = { | ||
| 129 | {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, | ||
| 130 | {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, | ||
| 131 | {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, | ||
| 132 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | ||
| 133 | }, | ||
| 134 | |||
| 135 | /* Plover layer (http://opensteno.org) | ||
| 136 | * ,-----------------------------------------------------------------------------------. | ||
| 137 | * | # | # | # | # | # | # | # | # | # | # | # | # | | ||
| 138 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 139 | * | | S | T | P | H | * | * | F | P | L | T | D | | ||
| 140 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 141 | * | | S | K | W | R | * | * | R | B | G | S | Z | | ||
| 142 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 143 | * | Exit | | | A | O | | E | U | | | | | ||
| 144 | * `-----------------------------------------------------------------------------------' | ||
| 145 | */ | ||
| 146 | |||
| 147 | /*[_PLOVER] = {*/ | ||
| 148 | /*{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },*/ | ||
| 149 | /*{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},*/ | ||
| 150 | /*{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},*/ | ||
| 151 | /*{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}*/ | ||
| 152 | /*},*/ | ||
| 153 | |||
| 154 | /* Adjust (Lower + Raise) | ||
| 155 | * ,-----------------------------------------------------------------------------------. | ||
| 156 | * | | Reset| | | | | | | | | | Del | | ||
| 157 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 158 | * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | | ||
| 159 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 160 | * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | | ||
| 161 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 162 | * | | | | | | | | | | | | | ||
| 163 | * `-----------------------------------------------------------------------------------' | ||
| 164 | */ | ||
| 165 | [_ADJUST] = { | ||
| 166 | {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, | ||
| 167 | {_______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, QWERTY, COLEMAK}, | ||
| 168 | {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, | ||
| 169 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | ||
| 170 | } | ||
| 171 | |||
| 172 | |||
| 173 | }; | ||
| 174 | |||
| 175 | #ifdef AUDIO_ENABLE | ||
| 176 | |||
| 177 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
| 178 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 179 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 180 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 181 | float tone_plover[][2] = SONG(PLOVER_SOUND); | ||
| 182 | float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); | ||
| 183 | float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); | ||
| 184 | |||
| 185 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 186 | #endif | ||
| 187 | |||
| 188 | |||
| 189 | void persistant_default_layer_set(uint16_t default_layer) { | ||
| 190 | eeconfig_update_default_layer(default_layer); | ||
| 191 | default_layer_set(default_layer); | ||
| 192 | } | ||
| 193 | |||
| 194 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 195 | switch (keycode) { | ||
| 196 | case QWERTY: | ||
| 197 | if (record->event.pressed) { | ||
| 198 | #ifdef AUDIO_ENABLE | ||
| 199 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | ||
| 200 | #endif | ||
| 201 | persistant_default_layer_set(1UL<<_QWERTY); | ||
| 202 | } | ||
| 203 | return false; | ||
| 204 | break; | ||
| 205 | case COLEMAK: | ||
| 206 | if (record->event.pressed) { | ||
| 207 | #ifdef AUDIO_ENABLE | ||
| 208 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | ||
| 209 | #endif | ||
| 210 | persistant_default_layer_set(1UL<<_COLEMAK); | ||
| 211 | } | ||
| 212 | return false; | ||
| 213 | break; | ||
| 214 | /*case DVORAK:*/ | ||
| 215 | /*if (record->event.pressed) {*/ | ||
| 216 | /*#ifdef AUDIO_ENABLE*/ | ||
| 217 | /*PLAY_NOTE_ARRAY(tone_dvorak, false, 0);*/ | ||
| 218 | /*#endif*/ | ||
| 219 | /*persistant_default_layer_set(1UL<<_DVORAK);*/ | ||
| 220 | /*}*/ | ||
| 221 | /*return false;*/ | ||
| 222 | /*break;*/ | ||
| 223 | case LOWER: | ||
| 224 | if (record->event.pressed) { | ||
| 225 | layer_on(_LOWER); | ||
| 226 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 227 | } else { | ||
| 228 | layer_off(_LOWER); | ||
| 229 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 230 | } | ||
| 231 | return false; | ||
| 232 | break; | ||
| 233 | case RAISE: | ||
| 234 | if (record->event.pressed) { | ||
| 235 | layer_on(_RAISE); | ||
| 236 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 237 | } else { | ||
| 238 | layer_off(_RAISE); | ||
| 239 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 240 | } | ||
| 241 | return false; | ||
| 242 | break; | ||
| 243 | case BACKLIT: | ||
| 244 | if (record->event.pressed) { | ||
| 245 | register_code(KC_RSFT); | ||
| 246 | #ifdef BACKLIGHT_ENABLE | ||
| 247 | backlight_step(); | ||
| 248 | #endif | ||
| 249 | } else { | ||
| 250 | unregister_code(KC_RSFT); | ||
| 251 | } | ||
| 252 | return false; | ||
| 253 | break; | ||
| 254 | /*case PLOVER:*/ | ||
| 255 | /*if (record->event.pressed) {*/ | ||
| 256 | /*#ifdef AUDIO_ENABLE*/ | ||
| 257 | /*stop_all_notes();*/ | ||
| 258 | /*PLAY_NOTE_ARRAY(tone_plover, false, 0);*/ | ||
| 259 | /*#endif*/ | ||
| 260 | /*layer_off(_RAISE);*/ | ||
| 261 | /*layer_off(_LOWER);*/ | ||
| 262 | /*layer_off(_ADJUST);*/ | ||
| 263 | /*layer_on(_PLOVER);*/ | ||
| 264 | /*if (!eeconfig_is_enabled()) {*/ | ||
| 265 | /*eeconfig_init();*/ | ||
| 266 | /*}*/ | ||
| 267 | /*keymap_config.raw = eeconfig_read_keymap();*/ | ||
| 268 | /*keymap_config.nkro = 1;*/ | ||
| 269 | /*eeconfig_update_keymap(keymap_config.raw);*/ | ||
| 270 | /*}*/ | ||
| 271 | /*return false;*/ | ||
| 272 | /*break;*/ | ||
| 273 | /*case EXT_PLV:*/ | ||
| 274 | /*if (record->event.pressed) {*/ | ||
| 275 | /*#ifdef AUDIO_ENABLE*/ | ||
| 276 | /*PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);*/ | ||
| 277 | /*#endif*/ | ||
| 278 | /*layer_off(_PLOVER);*/ | ||
| 279 | /*}*/ | ||
| 280 | /*return false;*/ | ||
| 281 | /*break;*/ | ||
| 282 | } | ||
| 283 | return true; | ||
| 284 | } | ||
| 285 | |||
| 286 | void matrix_init_user(void) { | ||
| 287 | #ifdef AUDIO_ENABLE | ||
| 288 | startup_user(); | ||
| 289 | #endif | ||
| 290 | } | ||
| 291 | |||
| 292 | #ifdef AUDIO_ENABLE | ||
| 293 | |||
| 294 | void startup_user() | ||
| 295 | { | ||
| 296 | _delay_ms(20); // gets rid of tick | ||
| 297 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | ||
| 298 | } | ||
| 299 | |||
| 300 | void shutdown_user() | ||
| 301 | { | ||
| 302 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | ||
| 303 | _delay_ms(150); | ||
| 304 | stop_all_notes(); | ||
| 305 | } | ||
| 306 | |||
| 307 | void music_on_user(void) | ||
| 308 | { | ||
| 309 | music_scale_user(); | ||
| 310 | } | ||
| 311 | |||
| 312 | void music_scale_user(void) | ||
| 313 | { | ||
| 314 | PLAY_NOTE_ARRAY(music_scale, false, 0); | ||
| 315 | } | ||
| 316 | |||
| 317 | #endif | ||
diff --git a/keyboards/planck/keymaps/handwired_binaryplease/readme.md b/keyboards/planck/keymaps/handwired_binaryplease/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/handwired_binaryplease/readme.md | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # The Default Planck Layout | ||
| 2 | |||
