diff options
Diffstat (limited to 'keyboards/40percentclub/half_n_half')
8 files changed, 286 insertions, 13 deletions
diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index 9aa8e810dd..c74fcacbb9 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -46,12 +46,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define UNUSED_PINS /* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL +#define DIODE_DIRECTION COL2ROW /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define USE_SERIAL // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h index 6cec599290..bc330c9cb7 100644 --- a/keyboards/40percentclub/half_n_half/half_n_half.h +++ b/keyboards/40percentclub/half_n_half/half_n_half.h @@ -16,6 +16,7 @@ #pragma once #include "quantum.h" +#define ___ KC_NO /* This a shortcut to help you visually see your layout. * @@ -26,18 +27,22 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, \ - K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, \ - K20, K21, K22, K23, K24, K25, K26, K70, K71, K72, K73, K74, K75, K76, \ - K34, K82 \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L34, R32 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06 }, \ - { K10, K11, K12, K13, K14, K15, K16 }, \ - { K20, K21, K22, K23, K24, K25, K26 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, KC_NO, KC_NO }, \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { ___, ___, ___, ___, L34, ___, ___ }, \ \ - { K56, K55, K54, K53, K52, K51, K50 }, \ - { K66, K65, K64, K63, K62, K61, K60 }, \ - { K76, K75, K74, K73, K72, K71, K70 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K82, KC_NO, KC_NO } \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { ___, ___, ___, ___, R32, ___, ___ } \ } + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/40percentclub/half_n_half/info.json b/keyboards/40percentclub/half_n_half/info.json index e69de29bb2..e791e36c68 100644 --- a/keyboards/40percentclub/half_n_half/info.json +++ b/keyboards/40percentclub/half_n_half/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "half_n_half", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 44, + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":7, "y":0}, + {"label":"R01", "x":8, "y":0}, + {"label":"R02", "x":9, "y":0}, + {"label":"R03", "x":10, "y":0}, + {"label":"R04", "x":11, "y":0}, + {"label":"R05", "x":12, "y":0}, + {"label":"R06", "x":13, "y":0}, + + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":7, "y":1}, + {"label":"R11", "x":8, "y":1}, + {"label":"R12", "x":9, "y":1}, + {"label":"R13", "x":10, "y":1}, + {"label":"R14", "x":11, "y":1}, + {"label":"R15", "x":12, "y":1}, + {"label":"R16", "x":13, "y":1}, + + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":7, "y":2}, + {"label":"R21", "x":8, "y":2}, + {"label":"R22", "x":9, "y":2}, + {"label":"R23", "x":10, "y":2}, + {"label":"R24", "x":11, "y":2}, + {"label":"R25", "x":12, "y":2}, + {"label":"R26", "x":13, "y":2}, + + {"label":"L34", "x":4, "y":3, "w":2}, + {"label":"R32", "x":8, "y":3, "w":2} + ] + } + } +} +
\ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h new file mode 100644 index 0000000000..f73fd055cc --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Boy_314 + * + * 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 + +// place overrides here +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c new file mode 100644 index 0000000000..2eef3dc48b --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2019 Boy_314 + * + * 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 + +// Tap Dance Declarations +enum { + TD_SWAP_LAYERS = 0 +}; + +enum layers { + _DVORAK, + _QWERTY, + _LOWER, + _RAISE, +}; + +enum halfnhalf_keycodes { + NEWTAB = SAFE_RANGE, + ALTF4, + CLSTAB, + PRVWIN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* DVORAK + * ,-------------------------------------------------------------------------------------------------. + * |Tab |' |, |. |P |Y |Brght+|= |F |G |C |R |L |Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |CtlCps|A |O |E |U |I |Brght-|Ctrl+F|D |H |T |N |S |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LShift|; |Q |J |K |X |LAlt |- |B |M |W |V |Z |RShift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |TD Swap Layer| |Space | + * `-------------' `-------------' + */ + [_DVORAK] = LAYOUT(/* Base Dvorak */ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC + ), + + /* QWERTY + * ,-------------------------------------------------------------------------------------------------. + * |Tab |Q |W |E |R |T |Brght+|' |Y |U |I |O |P |Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |CtlCps|A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LShift|Z |X |C |V |B |LAlt |- |N |M |, |. |/ |RShift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |TD Swap Layer| |Space | + * `-------------' `-------------' + */ + [_QWERTY] = LAYOUT(/* Base Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC + ), + + /* LOWER + * ,-------------------------------------------------------------------------------------------------. + * |Esc |1 |2 |3 |4 |5 | | |6 |7 |8 |9 |0 |/ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Caps |F1 |F2 |F3 |F4 |F5 |F6 |Vol Up|Play |_ |+ |{ |} || | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |F7 |F8 |F9 |F10 |F11 |F12 |Vol Dn|Next |Home |PgDn |PgUp |End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + * `-------------' `-------------' + */ + [_LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MNXT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS + ), + + /* RAISE + * ,-------------------------------------------------------------------------------------------------. + * |Reset | | |Up | | | |PRVWIN|CLSTAB| | | | |Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |` | |Left |Down |Right | | |NEWTAB|ALTF4 |- |= |[ |] |\ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |! |@ |# |$ |% | | |^ |& |* |( |) | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + * `-------------' `-------------' + */ + [_RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Macros */ + RESET, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, PRVWIN, CLSTAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, NEWTAB, ALTF4, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_TRNS + ) +}; + +void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + layer_on(_LOWER); + break; + case 2: + layer_on(_RAISE); + break; + } +} + +void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + layer_off(_LOWER); + break; + case 2: + layer_off(_RAISE); + break; + case 3: + if (biton32(default_layer_state) == _DVORAK) { + set_single_persistent_default_layer(_QWERTY); + } + else if (biton32(default_layer_state) == _QWERTY) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Control + T + case NEWTAB: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("t")); + } + break; + // Alt + F4 + case ALTF4: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_F4)SS_UP(X_LALT)); + } + break; + // Control + W + case CLSTAB: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("w")); + } + break; + // Control + Shift + N + case PRVWIN: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_LSFT("n"))); + } + break; + } + return true; +} diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md new file mode 100644 index 0000000000..9eff08b5ea --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md @@ -0,0 +1,2 @@ +# Boy_314's keymap for half_n_half +# Currently only supports DVORAK. QWERTY Support is on the TODO list.
\ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk new file mode 100644 index 0000000000..59c7ccf827 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk @@ -0,0 +1,5 @@ +TAP_DANCE_ENABLE = yes # Enable Tap Dance +NKRO_ENABLE = yes # USB Nkey Rollover + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes
\ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index bd0d8f808c..cc5fccee98 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -79,3 +79,6 @@ 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 (+400) + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes |