diff options
author | itsnoteasy <pyrosoma1@yahoo.ie> | 2020-06-05 07:55:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 23:55:39 -0700 |
commit | a68b0ed9a25dcbfd616faabab10a123c3c0710fd (patch) | |
tree | 11b3f0ef4def38a83b1d430a96fb2f1d50e6cc98 | |
parent | a2dee4494d27a0a7d6075317a1b41e0ff4db194f (diff) | |
download | qmk_firmware-a68b0ed9a25dcbfd616faabab10a123c3c0710fd.tar.gz qmk_firmware-a68b0ed9a25dcbfd616faabab10a123c3c0710fd.zip |
[Keyboard] Add ortho5by12 keyboard (#9141)
* Add files via upload
* Update keyboards/ortho5by12/rules.mk
* Add files via upload
* Add files via upload
* Update keyboards/ortho5by12/ortho5by12.h
* Update keyboards/ortho5by12/ortho5by12.h
* Add files via upload
* Add files via upload
* Update keyboards/ortho5by12/readme.md
* Update keyboards/ortho5by12/readme.md
* Update keyboards/ortho5by12/readme.md
* Update keyboards/ortho5by12/readme.md
* Update keyboards/ortho5by12/readme.md
* Update keyboards/ortho5by12/readme.md
* Update keyboards/ortho5by12/info.json
* Update keyboards/ortho5by12/ortho5by12.h
* Apply suggestions from code review
* Update rules.mk
* Update config.h
* Update config.h
* Update config.h
* Delete rules.mk
* Delete config.h
* Delete info.json
* Delete ortho5by12.c
* Delete ortho5by12.h
* Delete readme.md
* Delete keymap.c
-rw-r--r-- | keyboards/ortho5by12/config.h | 59 | ||||
-rw-r--r-- | keyboards/ortho5by12/info.json | 137 | ||||
-rw-r--r-- | keyboards/ortho5by12/keymaps/default/keymap.c | 215 | ||||
-rw-r--r-- | keyboards/ortho5by12/ortho5by12.c | 30 | ||||
-rw-r--r-- | keyboards/ortho5by12/ortho5by12.h | 57 | ||||
-rw-r--r-- | keyboards/ortho5by12/readme.md | 55 | ||||
-rw-r--r-- | keyboards/ortho5by12/rules.mk | 34 |
7 files changed, 587 insertions, 0 deletions
diff --git a/keyboards/ortho5by12/config.h b/keyboards/ortho5by12/config.h new file mode 100644 index 0000000000..629059ef05 --- /dev/null +++ b/keyboards/ortho5by12/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2019 Takuya Urakawa (dm9records.com) +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +// These VID/PID is not verified. Use at your own risk. +#define VENDOR_ID 0x16C0 +#define PRODUCT_ID 0x27DB +#define DEVICE_VER 0x0002 +#define MANUFACTURER /u/squeezeonein +#define PRODUCT ortho5by12 +#define DESCRIPTION 12x5 ortholinear keyboard with through hole components + +/* key matrix size, duplex 10x6 */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + 0 1 2 3 4 5 6 7 8 9 */ +#define MATRIX_ROW_PINS { B5, B1, B2, B3, B4, C0, D5, D6, D7, B0 } +#define MATRIX_COL_PINS { C2, D0, D1, D4, C3, C1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define BOOTMAGIC_LITE_ROW 7 +#define BOOTMAGIC_LITE_COLUMN 2 diff --git a/keyboards/ortho5by12/info.json b/keyboards/ortho5by12/info.json new file mode 100644 index 0000000000..934e499a3f --- /dev/null +++ b/keyboards/ortho5by12/info.json @@ -0,0 +1,137 @@ +{ + "keyboard_name": "ortho5by12", + "keyboard_folder": "ortho5by12", + "url": "https://github.com/itsnoteasy/misc/blob/master/ortho5by12.zip", + "maintainer": "itsnoteasy", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12_1x2uC": { + "key_count": 59, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 }, + { "w": 1, "x": 0, "y": 4 }, + { "w": 1, "x": 1, "y": 4 }, + { "w": 1, "x": 2, "y": 4 }, + { "w": 1, "x": 3, "y": 4 }, + { "w": 1, "x": 4, "y": 4 }, + { "w": 2, "x": 5, "y": 4 }, + { "w": 1, "x": 7, "y": 4 }, + { "w": 1, "x": 8, "y": 4 }, + { "w": 1, "x": 9, "y": 4 }, + { "w": 1, "x": 10, "y": 4 }, + { "w": 1, "x": 11, "y": 4 } ] + }, + "LAYOUT_ortho_5x12": { + "key_count": 60, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 }, + { "w": 1, "x": 0, "y": 4 }, + { "w": 1, "x": 1, "y": 4 }, + { "w": 1, "x": 2, "y": 4 }, + { "w": 1, "x": 3, "y": 4 }, + { "w": 1, "x": 4, "y": 4 }, + { "w": 1, "x": 5, "y": 4 }, + { "w": 1, "x": 6, "y": 4 }, + { "w": 1, "x": 7, "y": 4 }, + { "w": 1, "x": 8, "y": 4 }, + { "w": 1, "x": 9, "y": 4 }, + { "w": 1, "x": 10, "y": 4 }, + { "w": 1, "x": 11, "y": 4 } ] + } + } +} diff --git a/keyboards/ortho5by12/keymaps/default/keymap.c b/keyboards/ortho5by12/keymaps/default/keymap.c new file mode 100644 index 0000000000..67fb80a32f --- /dev/null +++ b/keyboards/ortho5by12/keymaps/default/keymap.c @@ -0,0 +1,215 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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_DEL, + 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, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_5x12( + 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_5x12( + 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + } + return true; +}; diff --git a/keyboards/ortho5by12/ortho5by12.c b/keyboards/ortho5by12/ortho5by12.c new file mode 100644 index 0000000000..615ab9d04e --- /dev/null +++ b/keyboards/ortho5by12/ortho5by12.c @@ -0,0 +1,30 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "ortho5by12.h" + +void matrix_init_kb(void) { + setPinOutput(C4); + setPinOutput(C5); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(C4, led_state.num_lock); + writePin(C5, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/ortho5by12/ortho5by12.h b/keyboards/ortho5by12/ortho5by12.h new file mode 100644 index 0000000000..84f59859d8 --- /dev/null +++ b/keyboards/ortho5by12/ortho5by12.h @@ -0,0 +1,57 @@ +/* Copyright 2019 Yiancar + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once +#define XXX KC_NO +#include "quantum.h" + +#define LAYOUT_ortho_5x12( \ + K00, K01, K02, K03, K04, K05, K10, K11, K12, K13, K14, K15, \ + K20, K21, K22, K23, K24, K25, K30, K31, K32, K33, K34, K35, \ + K40, K41, K42, K43, K44, K45, K50, K51, K52, K53, K54, K55, \ + K60, K61, K62, K63, K64, K65, K70, K71, K72, K73, K74, K75, \ + K80, K81, K82, K83, K84, K85, K90, K91, K92, K93, K94, K95 \ +) { \ + { K01, K03, K05, K11, K13, K15 }, \ + { K00, K02, K04, K10, K12, K14 }, \ + { K20, K22, K24, K30, K32, K34 }, \ + { K21, K23, K25, K31, K33, K35 }, \ + { K41, K43, K45, K51, K53, K55 }, \ + { K40, K42, K44, K50, K52, K54 }, \ + { K60, K62, K64, K70, K72, K74 }, \ + { K61, K63, K65, K71, K73, K75 }, \ + { K81, K83, K85, K91, K93, K95 }, \ + { K80, K82, K84, K90, K92, K94 } \ +} + +#define LAYOUT_ortho_5x12_1x2uC( \ + K00, K01, K02, K03, K04, K05, K10, K11, K12, K13, K14, K15, \ + K20, K21, K22, K23, K24, K25, K30, K31, K32, K33, K34, K35, \ + K40, K41, K42, K43, K44, K45, K50, K51, K52, K53, K54, K55, \ + K60, K61, K62, K63, K64, K65, K70, K71, K72, K73, K74, K75, \ + K80, K81, K82, K83, K84, K85, K91, K92, K93, K94, K95 \ +) { \ + { K01, K03, K05, K11, K13, K15 }, \ + { K00, K02, K04, K10, K12, K14 }, \ + { K20, K22, K24, K30, K32, K34 }, \ + { K21, K23, K25, K31, K33, K35 }, \ + { K41, K43, K45, K51, K53, K55 }, \ + { K40, K42, K44, K50, K52, K54 }, \ + { K60, K62, K64, K70, K72, K74 }, \ + { K61, K63, K65, K71, K73, K75 }, \ + { K81, K83, K85, K91, K93, K95 }, \ + { K80, K82, K84, XXX, K92, K94 } \ +} diff --git a/keyboards/ortho5by12/readme.md b/keyboards/ortho5by12/readme.md new file mode 100644 index 0000000000..8d059bdf47 --- /dev/null +++ b/keyboards/ortho5by12/readme.md @@ -0,0 +1,55 @@ +# ortho5by12 // Through Hole + +A Plaid-style 5x12 design with two indicator LEDs. + +Uses a Schottky 1N4729A/3.6V diode. This is left out of the Plaid BOM which is identical, except for number of 1N4148 diodes (60+attrition). I recommend using 10k resistors for the LEDs instead of the Plaid's 1.5k to make them less glaring. I reckon hsgw was just trying to shave down the parts cost by re-using the 1.5kohm. + +I use a spare PCB as the backplate since it has the same dimensions. + +This was developed on Linux Mint so you'll have to adapt the commands yourself if you run anything else. + +pic here: https://www.reddit.com/r/MechanicalKeyboards/comments/g0ukw4/ortho5by12_through_hole/ + +* Keyboard Maintainer: [gipetto](https://github.com/itsnoteasy) +* Hardware Supported: ATmega328P with V-USB +* Hardware Availability: [PCB](https://github.com/itsnoteasy/misc/blob/master/ortho5by12.zip) + +Make example for this keyboard (after setting up your build environment): + + make ortho5by12:default + +Flash firmware: + + make ortho5by12:default:flash + +Bootloader doesn't seem to work for the time being. I deleted the last line in ortho5by12.hex and copied the USBasp bootloader onto the end in a text editor, then flashed over AVRISP using a Teensy 2.0 (following the [QMK ISP Flashing Guide](https://docs.qmk.fm/#/isp_flashing_guide)). I used a cut up MCU socket soldered to stripboard to make an ISP programming socket. Remember to make fuse in the USBasp directory on a new MCU. + +## ISP pinout: + + R4 + + Reset SCK MISO + + GND MOSI VCC + + C5 + +## A few build notes: + +I haven't found it easy to get into bootloader mode every time. sometimes there's no alternative but +to use the ISP header, or pull the IC. + +Put the switch diodes in with the banded end down towards the switches. This gives the fastest scan rate. If you don't and go by the silkscreen then you can swap COL2ROW/ROW2COL from whatever it currently is. The speed penalty is negligible anyway. The silkscreen is probably wrong, so do the component placement from KiCad nightly; it caught me out. +If you attempt to map the duplex matrix you will hate me so don't bother. I should have used one LED pin as an extra matrix pin, but in my naivete I thought it was used for a bootloader function. The duplexing is compensated for in a header file so you can use a standard Preonic keymap with any extra unavailable pins commented out. On the upside there's some funky twin LED code out there for Plaids which should be compatible. + +Boot and Reset switches have swapped position to my other PCB to ease routing - Boot is on the right. + +## Bootloader + +Use USBaspLoader from hsgw's repository. + +https://github.com/hsgw/USBaspLoader/tree/plaid + +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/ortho5by12/rules.mk b/keyboards/ortho5by12/rules.mk new file mode 100644 index 0000000000..465c5184f6 --- /dev/null +++ b/keyboards/ortho5by12/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LAYOUTS_HAS_RGB = no |