diff --git a/keyboards/handwired/planck/keymaps/default/config.h b/keyboards/handwired/planck/keymaps/default/config.h deleted file mode 100644 index 18f28dfa64c..00000000000 --- a/keyboards/handwired/planck/keymaps/default/config.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* Copyright 2021 Wholteza - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once -/* Place overrides here */ - -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { E6, B3, D1, D0 } -#define MATRIX_COL_PINS \ - { C7, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/planck/keymaps/default/keymap.c b/keyboards/handwired/planck/keymaps/default/keymap.c index 6408447bda3..d1bb2eefd77 100644 --- a/keyboards/handwired/planck/keymaps/default/keymap.c +++ b/keyboards/handwired/planck/keymaps/default/keymap.c @@ -1,94 +1,35 @@ -/* Copyright 2021 Wholteza - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "planck.h" +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _NUM, + _SYM, + _EXTRAS +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // QWERTY - KEYMAP( + [_BASE] = LAYOUT( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), - - // LOWER - KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - - // RAISE - KEYMAP( + [_NUM] = LAYOUT( 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), - // EXTRAS - KEYMAP( + [_SYM] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_EXTRAS] = LAYOUT( 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, + QK_BOOT, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; - - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - 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 { - - } - -} diff --git a/keyboards/handwired/planck/keymaps/default/readme.md b/keyboards/handwired/planck/keymaps/default/readme.md index d005d512a0e..fdfa831d420 100644 --- a/keyboards/handwired/planck/keymaps/default/readme.md +++ b/keyboards/handwired/planck/keymaps/default/readme.md @@ -1,28 +1,3 @@ # The Default Planck Layout Maintained by [Wholteza](https://github.com/wholteza). - -## Teensy pinout - -Can be changed in the `config.h` - -Where `C0` and `R0` is **top left** when looking at the wiring of your keyboard (upside down). - -| **COL/ROW** | **PIN** | -| ----------- | ------- | -| **C0** | F0 | -| **C1** | F1 | -| **C2** | F4 | -| **C3** | F5 | -| **C4** | F6 | -| **C5** | F7 | -| **C6** | B6 | -| **C7** | B5 | -| **C8** | B4 | -| **C9** | D7 | -| **C10** | D6 | -| **C11** | C7 | -| **R0** | E6 | -| **R1** | B3 | -| **R2** | D1 | -| **R3** | D0 | diff --git a/keyboards/handwired/planck/readme.md b/keyboards/handwired/planck/readme.md index cb9d1abdef9..86b1902f5d8 100644 --- a/keyboards/handwired/planck/readme.md +++ b/keyboards/handwired/planck/readme.md @@ -5,23 +5,17 @@ A compact 40% (12x4) ortholinear keyboard kit sold by OLKB before they developed the rev1 PCB. Keyboard Maintainer: [Wholteza](https://github.com/wholteza) -Hardware Supported: [Teensy 2.0](https://www.pjrc.com/store/teensy.html), [Planck lo-pro switch plate and bottom case](https://olkb.com/collections/planck) -Hardware Availability: [PJRC](https://www.pjrc.com/store/teensy.html), [OLKB](https://olkb.com/collections/planck) +Hardware Supported: [Teensy 2.0](https://www.pjrc.com/store/teensy.html) + +## Compile and Flash Make example for this keyboard (after setting up your build environment): - make handwired/planck:default + qmk compile --keyboard handwired/planck --keymap default -Flashing example for this keyboard: +To flash the keyaboard, use the Teensy Loader application provided by [PJRC](https://www.pjrc.com/teensy/loader.html). - make handwired/planck:default:flash +## Pinout -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). +The pinout can be found in the `keyboard.json` and looking at your keyboards wiring (flipped with the keycaps facing down) column and row 0 is **top left**. -## Bootloader - -Enter the bootloader in 3 ways: - -- **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -- **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead -- **Keycode in layout**: Press the key mapped to `RESET` if it is available