From 5655d6e5f5d2e35d896dc08e8a040b72a1e868ce Mon Sep 17 00:00:00 2001 From: Viktor Eikman Date: Sat, 20 Feb 2021 20:32:04 +0100 Subject: [Keyboard] Concertina (#11922) * [Keyboard] Concertina * Added a novel handwired keyboard. * Concertina lint * Perfunctory changes to pass CI. * Concertina line width * Changes from code review: GPL headers, modernization, full-width representation of matrix to match info.json. --- keyboards/handwired/concertina/64key/64key.c | 17 ++++ keyboards/handwired/concertina/64key/64key.h | 56 +++++++++++++ keyboards/handwired/concertina/64key/config.h | 34 ++++++++ .../concertina/64key/keymaps/default/config.h | 23 ++++++ .../concertina/64key/keymaps/default/keymap.c | 93 ++++++++++++++++++++++ keyboards/handwired/concertina/64key/readme.md | 15 ++++ 6 files changed, 238 insertions(+) create mode 100644 keyboards/handwired/concertina/64key/64key.c create mode 100644 keyboards/handwired/concertina/64key/64key.h create mode 100644 keyboards/handwired/concertina/64key/config.h create mode 100644 keyboards/handwired/concertina/64key/keymaps/default/config.h create mode 100644 keyboards/handwired/concertina/64key/keymaps/default/keymap.c create mode 100644 keyboards/handwired/concertina/64key/readme.md (limited to 'keyboards/handwired/concertina/64key') diff --git a/keyboards/handwired/concertina/64key/64key.c b/keyboards/handwired/concertina/64key/64key.c new file mode 100644 index 0000000000..31211b0a9a --- /dev/null +++ b/keyboards/handwired/concertina/64key/64key.c @@ -0,0 +1,17 @@ +/* Copyright 2020-2021 Viktor Eikman + * + * 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 "64key.h" diff --git a/keyboards/handwired/concertina/64key/64key.h b/keyboards/handwired/concertina/64key/64key.h new file mode 100644 index 0000000000..a9e557fc78 --- /dev/null +++ b/keyboards/handwired/concertina/64key/64key.h @@ -0,0 +1,56 @@ +/* Copyright 2020-2021 Viktor Eikman + * + * 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 + +#include "quantum.h" + +/* + * The matrix is constructed for ease of soldering and for density. + * The nomenclature is _. + * + * L: Left hand. + * R: Right hand. + * T: Thumb cluster. + * M: Main cluster. + * + * Numbers increase going to the right and away from the user on the + * right-hand side of the keyboard, looking directly at each of the two + * key clusters (main and thumb), one by one. + * This coordinate system is mirrored for the left-hand side. + */ + +#define LAYOUT_64key( \ + LT_32, LT_22, LT_12, RT_12, RT_22, RT_32, \ + LT_31, LT_21, LT_11, LT_01, RT_01, RT_11, RT_21, RT_31, \ + LT_20, LT_10, LT_00, RT_00, RT_10, RT_20, \ + \ + LM_34, LM_24, LM_14, LM_04, RM_04, RM_14, RM_24, RM_34, \ + LM_53, LM_43, LM_33, LM_23, LM_13, LM_03, RM_03, RM_13, RM_23, RM_33, RM_43, RM_53, \ + LM_52, LM_42, LM_32, LM_22, LM_12, LM_02, RM_02, RM_12, RM_22, RM_32, RM_42, RM_52, \ + LM_51, LM_41, LM_31, LM_21, LM_11, RM_11, RM_21, RM_31, RM_41, RM_51, \ + LM_20, RM_20 \ + ) \ + { \ + { LT_00, LT_10, LT_20, LT_31, LM_20, LM_31, LM_41, LM_51 }, \ + { LT_01, LT_11, LT_21, LM_11, LM_21, LM_32, LM_42, LM_52 }, \ + { LT_12, LT_22, LT_32, LM_12, LM_22, LM_33, LM_43, LM_53 }, \ + { LM_02, LM_03, LM_04, LM_13, LM_23, LM_14, LM_24, LM_34 }, \ + { RT_00, RT_10, RT_20, RT_31, RM_20, RM_31, RM_41, RM_51 }, \ + { RT_01, RT_11, RT_21, RM_11, RM_21, RM_32, RM_42, RM_52 }, \ + { RT_12, RT_22, RT_32, RM_12, RM_22, RM_33, RM_43, RM_53 }, \ + { RM_02, RM_03, RM_04, RM_13, RM_23, RM_14, RM_24, RM_34 }, \ + } diff --git a/keyboards/handwired/concertina/64key/config.h b/keyboards/handwired/concertina/64key/config.h new file mode 100644 index 0000000000..1b09c403f6 --- /dev/null +++ b/keyboards/handwired/concertina/64key/config.h @@ -0,0 +1,34 @@ +/* Copyright 2020-2021 Viktor Eikman + * + * 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 + +#include "config_common.h" + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS { D3, D2 } + +/* LEDs are not used in the standard 64key configuration. */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 0 + +#define DIODE_DIRECTION COL2ROW + +#define PERMISSIVE_HOLD diff --git a/keyboards/handwired/concertina/64key/keymaps/default/config.h b/keyboards/handwired/concertina/64key/keymaps/default/config.h new file mode 100644 index 0000000000..4af423c3a7 --- /dev/null +++ b/keyboards/handwired/concertina/64key/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020-2021 Viktor Eikman + * + * 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 + +/* Custom space-cadet modifier and tap combinations: Brackets on Ctrl and braces on Alt. */ +#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_LBRACKET +#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_RBRACKET +#define LAPO_KEYS KC_LALT, KC_LSFT, KC_LBRACKET +#define RAPC_KEYS KC_RALT, KC_RSFT, KC_RBRACKET diff --git a/keyboards/handwired/concertina/64key/keymaps/default/keymap.c b/keyboards/handwired/concertina/64key/keymaps/default/keymap.c new file mode 100644 index 0000000000..e8425824fb --- /dev/null +++ b/keyboards/handwired/concertina/64key/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020-2021 Viktor Eikman + * + * 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 QMK_KEYBOARD_H +#include +#include + +enum layer_names { + _QWERTY, // OS-side Colemak. Default. + _COLEMAK, // Keyboard-side Colemak. Portability, emergency. + _GAMING, // Navigation clusters (only) change hands. + _NUMERIC // Numbers, function keys, special characters, mouse. +}; + +enum taps { + PNX, // Play/pause; next track. +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [PNX] = ACTION_TAP_DANCE_DOUBLE(KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK), +}; + +// Shorthand: +#define LAYER_N MO(_NUMERIC) +#define LAYER_C TG(_COLEMAK) +#define LAYER_G TG(_GAMING) +#define PASTE LSFT(KC_INS) // Terminal-compatible paste. +#define SLQ RALT(KC_9) // Single left-side quotation mark (in Colemak). +#define SRQ RALT(KC_0) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_64key( + KC_LSPO, KC_MINS, KC_EQL, KC_VOLD, KC_VOLU, KC_RSPC, + KC_LCPO, KC_LGUI, KC_HAEN, KC_ENT, KC_MUTE, TD(PNX), LAYER_N, KC_RCPC, + KC_LAPO, KC_SPC, SLQ, SRQ, KC_ESC, KC_RAPC, + + CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, + KC_TAB, CM_Q, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_SCLN, KC_BSLS, + KC_BSPC, CM_A, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, CM_O, KC_QUOT, + KC_DEL, CM_Z, KC_HOME, KC_PGUP, KC_END, KC_LEFT, KC_UP, KC_RGHT, KC_SLSH, KC_GRV, + KC_PGDN, KC_DOWN +), + +[_COLEMAK] = LAYOUT_64key( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + + KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, + _______, KC_Q, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_SCLN, _______, + _______, KC_A, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, KC_O, _______, + _______, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______ +), + +[_GAMING] = LAYOUT_64key( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LEFT, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, KC_END, _______, _______, + KC_DOWN, KC_PGDN +), + +[_NUMERIC] = LAYOUT_64key( + _______, _______, _______, KC_ACL1, KC_ACL2, _______, + _______, _______, LAYER_C, _______, KC_ACL0, _______, _______, _______, + _______, _______, _______, KC_SLEP, _______, _______, + + KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, + KC_F12, KC_F1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_F10, KC_F11, + _______, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_APP, KC_0, PASTE, + KC_INS, KC_EXLM, KC_BTN1, KC_BTN3, KC_BTN2, KC_MS_L, KC_MS_U, KC_MS_R, KC_PSCR, RESET, + LAYER_G, KC_MS_D +) +}; diff --git a/keyboards/handwired/concertina/64key/readme.md b/keyboards/handwired/concertina/64key/readme.md new file mode 100644 index 0000000000..78d384f68d --- /dev/null +++ b/keyboards/handwired/concertina/64key/readme.md @@ -0,0 +1,15 @@ +The `64key` layout +================== + +This folder represents the keyboard configuration identified as +`concertina_64key` in the DMOTE application’s list of GNU make targets, as of +version 0.7.0 of that application. The QMK code is fully compatible back to +version 0.6.0, which introduced the Concertina. + +The default keymap for this layout has a QWERTY base layer but is intended for +running Colemak on the OS side. It has a separate key layer that forces Colemak +from the QMK side in case the keyboard has to be used with a computer that does +not run Colemak. + +A full set of printable caps to match the keymap is available in the +`dmote-keycap` application, [here](https://github.com/veikman/dmote-keycap). -- cgit v1.2.3