From 7446c6ea7d49b9967b6f308e47a351f8c1398ab5 Mon Sep 17 00:00:00 2001
From: ak66666 <32971450+ak66666@users.noreply.github.com>
Date: Sun, 6 Oct 2024 05:08:18 -0400
Subject: [PATCH] Added a new keyboard ThumbsUp! v9 with a default keymap
(#23800)
* Added a cleaned-up set of files for ThumbsUp! v9.
* Renamed the keymap for v9 as default
* Update keyboards/thumbsup/keymaps/default/keymap.c
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/keymaps/default/keymap.c
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/keymaps/default/keymap.c
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/keymaps/default/keymap.c
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/keymaps/default/keymap.c
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/rev9_promicro_4x12/info.json
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/rev9_promicro_4x12/readme.md
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/rev9_promicro_4x12/readme.md
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/rev9_promicro_4x12/rules.mk
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Update keyboards/thumbsup/rev9_promicro_4x12/info.json
As per PR review suggestions.
Co-authored-by: jack <0x6a73@protonmail.com>
* Apply suggestions from code review
Co-authored-by: jack <0x6a73@protonmail.com>
* Delete keyboards/thumbsup/keymaps/default/readme.md as per review recommendation.
* v9: Fixed the layout name in keymap.c file.
* v9: PR recommendatios applied - rules.mk file removed, info.json renamed to keyboard.json.
* v9: PR recommendatios applied - rules.mk file removed, info.json renamed to keyboard.json.
* v9: Fixed the copyright header modified by mistake.
* v9: Fixed the tri-layer switch as per the review recommendation.
* v9: Fixed the copyright header modified by mistake.
---------
Co-authored-by: jack <0x6a73@protonmail.com>
---
keyboards/thumbsup/keymaps/default/keymap.c | 175 ++++++++++++++++++
keyboards/thumbsup/keymaps/default/rules.mk | 1 +
.../thumbsup/rev9_promicro_4x12/config.h | 28 +++
.../thumbsup/rev9_promicro_4x12/keyboard.json | 77 ++++++++
.../thumbsup/rev9_promicro_4x12/readme.md | 27 +++
.../thumbsup/rev9_promicro_4x12/rules.mk | 1 +
6 files changed, 309 insertions(+)
create mode 100644 keyboards/thumbsup/keymaps/default/keymap.c
create mode 100644 keyboards/thumbsup/keymaps/default/rules.mk
create mode 100644 keyboards/thumbsup/rev9_promicro_4x12/config.h
create mode 100644 keyboards/thumbsup/rev9_promicro_4x12/keyboard.json
create mode 100644 keyboards/thumbsup/rev9_promicro_4x12/readme.md
create mode 100644 keyboards/thumbsup/rev9_promicro_4x12/rules.mk
diff --git a/keyboards/thumbsup/keymaps/default/keymap.c b/keyboards/thumbsup/keymaps/default/keymap.c
new file mode 100644
index 0000000000..a7bc427180
--- /dev/null
+++ b/keyboards/thumbsup/keymaps/default/keymap.c
@@ -0,0 +1,175 @@
+/* Copyright 2022 Alexander (Sasha) Karmanov
+ *
+ * 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
+
+
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _QWERTY,
+ _CURSORLEFT,
+ _CURSORRGHT,
+ _NUMBERS,
+ _EXTRARIGHT
+};
+
+// Aliases for this command to make the thumb keys work as LOWER/RAISE on hold and as space on hit.
+//#define CURSORRGHT LT(_CURSORRGHT,KC_SPC)
+//#define CURSORLEFT LT(_CURSORLEFT,KC_SPC)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* Qwerty
+ * ,-----------------------------------------+ +-----------------------------------------.
+ * | Esc | Q | W | E | R | T | | Y | U | I | O | P |BSpc |
+ * |------+------+------+------+------+------+ +------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G | | H | J | K | L | ; |Enter |
+Hold:
+ Extra-Rt
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Ctrl | Z | X | C | V | B | | N | M | , | . | / |RCtrl |
+ * +------+------+------+------+------+------+ +------+------+------+------+------+------+
+ . | GUI | Alt | | | | | | RAlt | Menu | .
+ | +------+------+ | | | | +------+------+ |
+Hold: | | LSft |CursLt| |CursRt| RSft | |
+Single hit: | | |Space | |Space | | |
+ | +------+------| |------+------+ |
+ +------------------------------> SPACE SPACE <-----------------------------+
+
+ */
+[_QWERTY] = LAYOUT(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LT(_EXTRARIGHT,KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_PENT,
+ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTL,
+ KC_SPC, KC_LGUI, KC_LALT, KC_LSFT, LT(TL_LOWR,KC_SPC), LT(TL_UPPR ,KC_SPC), KC_RSFT, KC_RALT, KC_APP, KC_SPC
+),
+
+
+/*
+
+Layers below are used on top of QWERTY layer defined above.
+(Except the PLOVER/STENO layers.)
+ +-------+
+The keys which are shown empty, like this: | |, represent a transparent key,
+ +-------+
+meaning the key from the underlaying layer (i.e. QWERTY) will be used.
+In the keymaps those keys are defined as "_______".
+
+ +-------+ +-------+
+The keys which are shown solid, like this: | XXXXX | or this | ... |, represent an opaque/blocking key?
+ +-------+ +-------+
+Such key is not doing anything in that layer nor allowing the key from the underlaying layer
+to be invoked.
+In the keymaps those keys are defined as "XXXXXXX".
+
+Most of the modifiers are the same in all layers.
+So in most layers they are defined as transparent keys,
+letting the keys from QWERTY layer to do the work.
+
+With that idea all the layers below leave the unmodified keys as transparent keys.
+In the same time - the layers block the keys that have no sense to be used
+in that given layer. For instance in the cursor control layers
+some of the keys are not used in the layer, but they are blocked to avoid
+alpha-keys from QWERTY layer to appear.
+
+For the same reason the keymaps below are shown simplified,
+without separate thumbcluster.
+
+*/
+
+
+
+/* Cursor Control on the right (Right Space)
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc |Break |WheelD|MousUp|WheelU| Del | Ins | Home | Up | End | ` | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |SelAll|MousLt|MousDn|MousRt| ... | PgUp | Left | Down |Right | ... | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | Undo | Cut | Copy | Paste| ... | PgDn |MsBtLe|MsBtMi|MsBtRt| ... | |
+ * `------+------+------+------+------+------+------+------+------+------+------+------.
+ * | | | | | X | | | |
+ * `-------------------------------------------------------'
+ */
+[_CURSORRGHT] = LAYOUT(
+ _______, KC_BRK, KC_WH_D, KC_MS_U, KC_WH_U, KC_DEL, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_GRV, KC_DEL,
+ KC_ENT, LCTL(KC_A), KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______,
+ _______, LCTL(KC_Z), LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), XXXXXXX, KC_INS, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+
+
+ /* Cursor Control on the left (Left Space)
+ * ,-----------------------------------------------------------------------------------.
+ * | |Break | Home | Up | End | Ins | Del |WheelU|MousUp|WheelD| ` | Del |
+ * |------+------+------+------+------+------+-------------+------+------+------+------|
+ * | Enter|SelAll|Right | Down | Left | PgUp | xxx |MousLt|MousDn|MousRt| xxx |Enter |
+ * |------+------+------+------+------+------+------|------+------+------+------+------|
+ * | | xxx |MsBtRt|MsBtMi|MsBtLe| PgDn | xxx | Cut | Copy | Paste| xxx | |
+ * `------+------+------+------+------+------+------+------+------+------+------+------.
+ * | | | | X | | | | |
+ * `-------------------------------------------------------'
+ */
+[_CURSORLEFT] = LAYOUT(
+ _______, KC_BRK, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_DEL, KC_WH_U, KC_MS_U, KC_WH_D, KC_GRV, KC_DEL,
+ KC_ENT, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, _______,
+ _______, XXXXXXX, KC_BTN2, KC_BTN3, KC_BTN1, KC_INS, XXXXXXX, LCTL(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+
+ /* Numbers on the home row, FNs on the top row, symbols in the second row
+ * (Lower or Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |BackSp|
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| Enter|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | F11 | F12 | LAlt |LShift| LAlt | RAlt |RShift| , | . | / | |
+ * `------+------+------+------+------+------+------+------+------+------+------+------.
+ * | | | | | | | | |
+ * `-------------------------------------------------------'
+ */
+[_NUMBERS] = LAYOUT(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ LT(_EXTRARIGHT,KC_TAB), 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_LALT, KC_LSFT, KC_LALT, KC_RALT, KC_RSFT, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+/* ExtraRightSide (the keys from the right side which did not fit into the matrix)
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc |BREAK |PLOVR2|PLOVER|TxBOLT|TxBlt2| ` | = | ( | ) | - | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |******| | | | | |PrtScr| | | | ' | |
+ This is the
+ key turning
+ this layer on
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | |NumPad|Qwerty| | | | [ | ] | \ | |
+ * `------+------+------+------+------+------+------+------+------+------+------+------.
+ * | | | | | | | | |
+ * `-------------------------------------------------------'
+ */
+[_EXTRARIGHT] = LAYOUT(
+ _______, KC_BRK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, KC_EQL, KC_LPRN, KC_RPRN, KC_MINS, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, KC_QUOT, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+};
+
diff --git a/keyboards/thumbsup/keymaps/default/rules.mk b/keyboards/thumbsup/keymaps/default/rules.mk
new file mode 100644
index 0000000000..2c72d2ddb6
--- /dev/null
+++ b/keyboards/thumbsup/keymaps/default/rules.mk
@@ -0,0 +1 @@
+TRI_LAYER_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/thumbsup/rev9_promicro_4x12/config.h b/keyboards/thumbsup/rev9_promicro_4x12/config.h
new file mode 100644
index 0000000000..71300e008d
--- /dev/null
+++ b/keyboards/thumbsup/rev9_promicro_4x12/config.h
@@ -0,0 +1,28 @@
+/*
+Copyright 2024 Alexander (Sasha) Karmanov (ak66666)
+
+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
+
+
+//Cirque ProGlide Touchpad configuration
+#define POINTING_DEVICE_ROTATION_90
+#define CIRQUE_PINNACLE_TAP_ENABLE
+#define CIRQUE_PINNACLE_SECONDARY_TAP_ENABLE
+#define POINTING_DEVICE_GESTURES_SCROLL_ENABLE
+
+#define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_ABSOLUTE_MODE
diff --git a/keyboards/thumbsup/rev9_promicro_4x12/keyboard.json b/keyboards/thumbsup/rev9_promicro_4x12/keyboard.json
new file mode 100644
index 0000000000..95fa6664b2
--- /dev/null
+++ b/keyboards/thumbsup/rev9_promicro_4x12/keyboard.json
@@ -0,0 +1,77 @@
+{
+ "manufacturer": "Alexander (Sasha) Karmanov",
+ "keyboard_name": "ThumbsUp! v9",
+ "maintainer": "u/ak66666",
+ "development_board": "promicro",
+ "diode_direction": "COL2ROW",
+ "features": {
+ "bootmagic": true,
+ "extrakey": true,
+ "mousekey": true,
+ "pointing_device": true
+ },
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "matrix_pins": {
+ "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "B3", "F4", "F5", "F6", "F7", "B1"],
+ "rows": ["D3", "D2", "D4", "C6"]
+ },
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x0090",
+ "vid": "0x5361"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label": "ESC", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "Q", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "W", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "E", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "R", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "T", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "Y", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "U", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "I", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "O", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "P", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "BKSPC", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "TAB", "matrix": [1, 0], "x": 0, "y": 1},
+ {"label": "A", "matrix": [1, 1], "x": 1, "y": 1},
+ {"label": "S", "matrix": [1, 2], "x": 2, "y": 1},
+ {"label": "D", "matrix": [1, 3], "x": 3, "y": 1},
+ {"label": "F", "matrix": [1, 4], "x": 4, "y": 1},
+ {"label": "G", "matrix": [1, 5], "x": 5, "y": 1},
+ {"label": "H", "matrix": [1, 6], "x": 6, "y": 1},
+ {"label": "J", "matrix": [1, 7], "x": 7, "y": 1},
+ {"label": "K", "matrix": [1, 8], "x": 8, "y": 1},
+ {"label": "L", "matrix": [1, 9], "x": 9, "y": 1},
+ {"label": ";", "matrix": [1, 10], "x": 10, "y": 1},
+ {"label": "ENTER", "matrix": [1, 11], "x": 11, "y": 1},
+ {"label": "LCTRL", "matrix": [2, 0], "x": 0, "y": 2},
+ {"label": "Z", "matrix": [2, 1], "x": 1, "y": 2},
+ {"label": "X", "matrix": [2, 2], "x": 2, "y": 2},
+ {"label": "C", "matrix": [2, 3], "x": 3, "y": 2},
+ {"label": "V", "matrix": [2, 4], "x": 4, "y": 2},
+ {"label": "B", "matrix": [2, 5], "x": 5, "y": 2},
+ {"label": "N", "matrix": [2, 6], "x": 6, "y": 2},
+ {"label": "M", "matrix": [2, 7], "x": 7, "y": 2},
+ {"label": ",", "matrix": [2, 8], "x": 8, "y": 2},
+ {"label": ".", "matrix": [2, 9], "x": 9, "y": 2},
+ {"label": "/", "matrix": [2, 10], "x": 10, "y": 2},
+ {"label": "RCTRL", "matrix": [2, 11], "x": 11, "y": 2},
+ {"label": "SPACE", "matrix": [3, 1], "x": 1, "y": 3},
+ {"label": "WIN", "matrix": [3, 2], "x": 2, "y": 3},
+ {"label": "LALT", "matrix": [3, 3], "x": 3, "y": 3},
+ {"label": "LSHIFT", "matrix": [3, 5], "x": 4, "y": 3},
+ {"label": "RAISE", "matrix": [3, 4], "x": 5, "y": 3},
+ {"label": "LOWER", "matrix": [3, 7], "x": 6, "y": 3},
+ {"label": "RSHIFT", "matrix": [3, 6], "x": 7, "y": 3},
+ {"label": "RALT", "matrix": [3, 8], "x": 8, "y": 3},
+ {"label": "MENU", "matrix": [3, 9], "x": 9, "y": 3},
+ {"label": "SPACE", "matrix": [3, 10], "x": 10, "y": 3}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/thumbsup/rev9_promicro_4x12/readme.md b/keyboards/thumbsup/rev9_promicro_4x12/readme.md
new file mode 100644
index 0000000000..e74da5cec8
--- /dev/null
+++ b/keyboards/thumbsup/rev9_promicro_4x12/readme.md
@@ -0,0 +1,27 @@
+# ThumbsUp! v9
+
+![ThumbsUp! v9](https://i.imgur.com/Zqc6dpQ.jpeg)
+
+A yet another version of the ThumbsUp! keyboard, a three-level PCB-based keyboard supporting Kailh Choc (1350) switches.
+This v9 version got 4x12 key layout with 2- or 3-key thumbcluster and an optional touchpad.
+
+
+* Keyboard Maintainer: [Alexander (Sasha) Karmanov](https://github.com/ak66666)
+* Hardware Supported: AtMega32u4 ProMicro-compatibles
+* Hardware Availability: https://www.etsy.com/ca/listing/1641077896/thumbsup-v9-ergonomic-mechanical
+
+Make example for this keyboard (after setting up your build environment):
+
+ make thumbsup/rev9_promicro_4x12:default
+
+Flashing example for this keyboard:
+
+ make thumbsup/rev9_promicro_4x12:default:flash
+
+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).
+
+## Bootloader
+
+Enter the bootloader:
+
+* **Physical reset button**: Press twice the button on the bottom side of the middle PCB.
diff --git a/keyboards/thumbsup/rev9_promicro_4x12/rules.mk b/keyboards/thumbsup/rev9_promicro_4x12/rules.mk
new file mode 100644
index 0000000000..9bfd1498a3
--- /dev/null
+++ b/keyboards/thumbsup/rev9_promicro_4x12/rules.mk
@@ -0,0 +1 @@
+POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c
\ No newline at end of file