From ca39fa8222ed339f09b2713bd538880fd4f2ff0e Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 12 Dec 2018 16:46:13 -0800 Subject: Keyboard: handwired/kbod Refactor, Configurator support and readme update (#4623) * handwired/kbod: refactor - layout macro KEYMAP renamed to LAYOUT * handwired/kbod: update config.h files to #pragma once * handwired/kbod: Configurator support * handwired/kbod: readme update - updated reademe to current template - added image --- keyboards/handwired/kbod/config.h | 5 +- keyboards/handwired/kbod/info.json | 74 +++++++++++++++++++++++ keyboards/handwired/kbod/kbod.h | 2 +- keyboards/handwired/kbod/keymaps/default/config.h | 7 +-- keyboards/handwired/kbod/keymaps/default/keymap.c | 54 ++++++++--------- keyboards/handwired/kbod/readme.md | 23 +++---- 6 files changed, 113 insertions(+), 52 deletions(-) create mode 100644 keyboards/handwired/kbod/info.json (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index a3f3e3908a..d3869f99ef 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -161,5 +160,3 @@ along with this program. If not, see . #undef TAPPING_TOGGLE #define TAPPING_TOGGLE 2 - -#endif diff --git a/keyboards/handwired/kbod/info.json b/keyboards/handwired/kbod/info.json new file mode 100644 index 0000000000..02586164b2 --- /dev/null +++ b/keyboards/handwired/kbod/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "kbod", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h index 3560636242..5d9dbd05b3 100644 --- a/keyboards/handwired/kbod/kbod.h +++ b/keyboards/handwired/kbod/kbod.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ diff --git a/keyboards/handwired/kbod/keymaps/default/config.h b/keyboards/handwired/kbod/keymaps/default/config.h index df06a26206..271f48d001 100644 --- a/keyboards/handwired/kbod/keymaps/default/config.h +++ b/keyboards/handwired/kbod/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 1386b742f5..063a94b4d2 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "kbod.h" - -#define _____ KC_TRNS +#include QMK_KEYBOARD_H #define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn))) @@ -25,33 +23,33 @@ if (record->event.pressed) { \ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( /* Base */ - F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, 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_LBRC, KC_RBRC, KC_BSLASH, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, - TT(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + LAYOUT( /* Base */ + F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, 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_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + TT(1), KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL \ ), - KEYMAP( /* Cursor layer */ - KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - TT(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, - TT(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____, - _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP, - _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT + LAYOUT( /* Cursor layer */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + TT(3), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + TT(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_END, KC_UP, \ + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT \ ), - KEYMAP( /* Keypad layer */ - TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, - _____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, KC_P0, KC_PDOT, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, - _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 + LAYOUT( /* Keypad layer */ + TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_BTN1, KC_MS_U, KC_BTN2, \ + _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN3 \ ), - KEYMAP( /* Multimedia layer */ - TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____, - _____, _____, KC_WAKE, _____, _____, _____, _____, _____, _____, _____, KC_MSTP, KC_MPRV, KC_MNXT, _____, - _____, _____, KC_SLEP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, KC_PWR, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2, - _____, _____, _____, KC_MPLY, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 + LAYOUT( /* Multimedia layer */ + TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ + _______, _______, KC_WAKE, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_MNXT, _______, \ + _______, _______, KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PWR, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_WH_U, KC_BTN2, \ + _______, _______, _______, KC_MPLY, KC_WH_L, KC_WH_D, KC_WH_R, KC_BTN3 \ ), }; @@ -101,4 +99,4 @@ void matrix_scan_user(void) { } else { PORTC &= ~_BV(PC7); } -} \ No newline at end of file +} diff --git a/keyboards/handwired/kbod/readme.md b/keyboards/handwired/kbod/readme.md index d2f2c01ae8..470ccce0e3 100644 --- a/keyboards/handwired/kbod/readme.md +++ b/keyboards/handwired/kbod/readme.md @@ -1,21 +1,18 @@ -KBOD keyboard firmware -====================== +# KBOD -KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It's utilize 8x8 matrix and has layout similar to GH-60 +![KBOD](https://f4.fudanchii.net/shx/2017/02/IMG_20170212_224547.jpg) -## Quantum MK Firmware +KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It utilizes an 8x8 matrix and has layout similar to GH60. [More info](https://github.com/fudanchii/keyboard_of_disapproval) -For the full Quantum feature list, see [the parent readme](/). +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: Arduino Micro -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and use ```make handwired/kbod:default``` to generate the .hex file. You may flash it with avrdude + make handwired/kbod:default -## Flashing -Something along this line: +Flashing your firmware may be done with avrdude. The command should be something along this line: -``` -avrdude -p m32u4 -c avr109 -P -C -e -u flash:w:handwired_kbod_default.hex -``` + avrdude -p m32u4 -c avr109 -P -C -e -u flash:w:handwired_kbod_default.hex -[More info](https://github.com/fudanchii/keyboard_of_disapproval) \ 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). -- cgit v1.2.3