add initial totem stuff

This commit is contained in:
Christoph Cullmann 2023-04-13 12:04:24 +02:00
parent 38d7e59103
commit f6735a8d58
No known key found for this signature in database
14 changed files with 1038 additions and 0 deletions

60
totem/config.h Normal file
View file

@ -0,0 +1,60 @@
/*
Copyright 2022 GEIST <@geigeigeist>
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 */
/*#define VENDOR_ID 0x3A3C
#define PRODUCT_ID 0x0002
#define DEVICE_VER 0x0001
#define MANUFACTURER GEIST
#define PRODUCT TOTEM
*/
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 8
#define MATRIX_COLS 5
// wiring of each half
#define MATRIX_ROW_PINS { GP26, GP27, GP28, GP29 }
#define MATRIX_COL_PINS { GP6, GP7, GP3, GP4, GP2 }
#define DIODE_DIRECTION COL2ROW
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#define DEBOUNCE 5
/* Serial settings */
#define USE_SERIAL
/* serial.c configuration for split keyboard */
#define SOFT_SERIAL_PIN GP0
//#define SPLIT_LAYER_STATE_ENABLE
//#define SPLIT_USB_DETECT
#define SERIAL_USE_MULTI_TRANSACTION
/* communication between sides */
#define SERIAL_PIO_USE_PIO1
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U

7
totem/halconf.h Normal file
View file

@ -0,0 +1,7 @@
#pragma once
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE
#include_next <halconf.h>

54
totem/info.json Normal file
View file

@ -0,0 +1,54 @@
{
"keyboard_name": "TOTEM",
"url": "https://github.com/GEIGEIGEIST/TOTEM",
"manufacturer": "GEIST",
"usb": {
"vid": "0x3A3C",
"pid": "0x0002",
"device_version": "0.3.0"
},
"layouts": {
"LAYOUT_totem": {
"layout": [
{"x": 0.776, "y": 1.519, "w": 1.059, "r": -10},
{"x": 1.964, "y": 0.605, "w": 1.059, "r": -4},
{"x": 3.175, "y": 0, "w": 1.059},
{"x": 4.234, "y": 0.496, "w": 1.059},
{"x": 5.292, "y": 0.656, "w": 1.059},
{"x": 8.682, "y": 0.656, "w": 1.059},
{"x": 9.741, "y": 0.496, "w": 1.059},
{"x": 10.8, "y": 0, "w": 1.059},
{"x": 12.007, "y": 0.606, "w": 1.059, "r": 4},
{"x": 13.199, "y": 1.52, "w": 1.059, "r": 10},
{"x": 0.95, "y": 2.504, "w": 1.059, "r": -10},
{"x": 2.033, "y": 1.602, "w": 1.059, "r": -4},
{"x": 3.175, "y": 1, "w": 1.059},
{"x": 4.234, "y": 1.496, "w": 1.059},
{"x": 5.292, "y": 1.656, "w": 1.059},
{"x": 8.682, "y": 1.661, "w": 1.059},
{"x": 9.741, "y": 1.496, "w": 1.059},
{"x": 10.8, "y": 1, "w": 1.059},
{"x": 11.937, "y": 1.603, "w": 1.059, "r": 4},
{"x": 13.026, "y": 2.505, "w": 1.059, "r": 10},
{"x": 0, "y": 3.231, "w": 1.059, "r": -10},
{"x": 1.124, "y": 3.489, "w": 1.059, "r": -10},
{"x": 2.103, "y": 2.6, "w": 1.059, "r": -4},
{"x": 3.175, "y": 2, "w": 1.059},
{"x": 4.234, "y": 2.496, "w": 1.059},
{"x": 5.292, "y": 2.656, "w": 1.059},
{"x": 8.682, "y": 2.661, "w": 1.059},
{"x": 9.741, "y": 2.496, "w": 1.059},
{"x": 10.8, "y": 2, "w": 1.059},
{"x": 11.868, "y": 2.601, "w": 1.059, "r": 4},
{"x": 12.852, "y": 3.49, "w": 1.059, "r": 10},
{"x": 13.973, "y": 3.231, "w": 1.059, "r": 10},
{"x": 3.938, "y": 3.714, "w": 1.059},
{"x": 5.11, "y": 3.878, "w": 1.059, "r": 15},
{"x": 6.195, "y": 4.329, "w": 1.059, "r": 30},
{"x": 7.781, "y": 4.329, "w": 1.059, "r": -30},
{"x": 8.866, "y": 3.878, "w": 1.059, "r": -15},
{"x": 10.037, "y": 3.714, "w": 1.059}
]
}
}
}

View file

@ -0,0 +1,29 @@
#pragma once
/* The way how "handedness" is decided (which half is which),
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
for more options.
*/
#define MASTER_LEFT
// #define MASTER_RIGHT
//#define TAPPING_TERM 170
#define TAPPING_TERM 170
// Prevent normal rollover on alphas from accidentally triggering mods.
#define IGNORE_MOD_TAP_INTERRUPT
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
#define TAPPING_FORCE_HOLD
// Auto Shift
#define NO_AUTO_SHIFT_ALPHA
#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
#define AUTO_SHIFT_NO_SETUP
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
#define NO_ACTION_ONESHOT

View file

@ -0,0 +1,330 @@
/*
D E F A U L T
*/
#include QMK_KEYBOARD_H
#include <stdio.h>
#include "totem.h"
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ D E F I N I T I O N S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e l a y e r s │
// └─────────────────────────────────────────────────┘
enum totem_layers {
_QWERTY,
_COLEMAK,
_LOWER,
_RAISE,
_ADJUST,
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e k e y c o d e s │
// └─────────────────────────────────────────────────┘
enum custom_keycodes {
COLEMAK = SAFE_RANGE,
QWERTY,
LOWER,
RAISE,
ADJUST,
OS_SWAP,
MAKE_H,
SNAP
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e m a c r o n a m e s │
// └─────────────────────────────────────────────────┘
// LEFT HAND HOME ROW MODS QWERTY ├──────────────────┐
#define GUI_A MT(MOD_LGUI, KC_A)
#define ALT_S MT(MOD_LALT, KC_S)
#define CTL_D MT(MOD_LCTL, KC_D)
#define SHT_F MT(MOD_LSFT, KC_F)
// RIGHT HAND HOME ROW MODS QWERTY ├─────────────────┐
#define SHT_J MT(MOD_RSFT, KC_J)
#define CTL_K MT(MOD_LCTL, KC_K)
#define ALT_L MT(MOD_LALT, KC_L)
#define GUI_S MT(MOD_LGUI, KC_SCLN)
// LEFT HAND HOME ROW MODS COLEMAK ├─────────────────┐
#define GUI_A MT(MOD_LGUI, KC_A)
#define ALT_R MT(MOD_LALT, KC_R)
#define CTL_S MT(MOD_LCTL, KC_S)
#define SHT_T MT(MOD_LSFT, KC_T)
// RIGHT HAND HOME ROW MODS COLEMAK ├────────────────┐
#define SHT_N MT(MOD_RSFT, KC_N)
#define CTL_E MT(MOD_LCTL, KC_E)
#define ALT_I MT(MOD_LALT, KC_I)
#define GUI_O MT(MOD_LGUI, KC_O)
#define LOWER LT(_LOWER, KC_TAB)
#define RAISE LT(_RAISE, KC_ESC)
#define ADJUST MO(_ADJUST)
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ K E Y M A P S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
q w e r t y
Q W E R T Y U I O P
A S D F G H J K L ;
Q Z X C V B N M , . / P
CTRL LOWER SPACE ENTER RAISE BSPC
*/
[_QWERTY] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
GUI_A, ALT_S, CTL_D, SHT_F, KC_G, KC_H, SHT_J, CTL_K, ALT_L, GUI_S,
KC_Q, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_P,
KC_DEL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
),
/*
c o l e m a k
Q W F P G J L U Y ;
A R S T D H N E I O
Q Z X C V B K M , . / ;
DEL LOWER SPACE ENTER RAISE BSPC
*/
[_COLEMAK] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O,
KC_Q, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SCLN,
KC_DEL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
),
/*
l o w e r
CAPSLCK NUMLCK = { } 7 8 9 +
HOME [ ] 4 5 6 -
SCRNSHT END PG SAVE PG ( ) 1 2 3 *
ADJUST 0
*/
[_LOWER] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_CAPS, KC_NUM, KC_UP, KC_EQL, KC_LCBR, KC_RCBR, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_QUOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_MINS,
SNAP, KC_END, KC_PGUP, C(KC_S), KC_PGDN, KC_LPRN, KC_RPRN, KC_P1, KC_P2, KC_P3, KC_PAST, _______,
_______, _______, _______, _______, ADJUST, KC_P0
),
/*
r a i s e
! @ # $ % ^ & Ü ° /
Ä è SZ é ¥ £ Ö
` ~ CUE DM REC1 DM STOP DM PLY1
GIPHY ADJUST
*/
[_RAISE] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, RALT(KC_U),RALT(KC_3),KC_BSLS,
RALT(KC_A),RALT(KC_F),RALT(KC_S),RALT(KC_G),XXXXXXX, XXXXXXX,LSFT(RALT(KC_4)),RALT(KC_5), RALT(KC_4), RALT(KC_O),
XXXXXXX, LSFT(KC_GRV),KC_TILD, RALT(KC_C),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_REC1, DM_RSTP, DM_PLY1,
_______, ADJUST, _______, _______, _______, _______
),
/*
a d j u s t
RESET F7 F8 F9 F12
DEBUG QWERTY F4 F5 F6 F11
MAKE OS SWAP COLEMAK F1 F2 F3 F10 F13
*/
[_ADJUST] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12,
DB_TOGG, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11,
MAKE_H, OS_SWAP, COLEMAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F10, KC_F13,
_______, _______, _______, _______, _______, _______
)
/*
t e m p l a t e
[_TEMPLATE] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
),
*/
};
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ M A C R O S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case OS_SWAP:
if (record->event.pressed) {
if (!keymap_config.swap_lctl_lgui) {
keymap_config.swap_lctl_lgui = true; // ─── MAC
}
else {
keymap_config.swap_lctl_lgui = false; // ─── WIN
}
eeconfig_update_keymap(keymap_config.raw);
clear_keyboard(); // ──── clear to prevent stuck keys
return false;
}
// ┌─────────────────────────────────────────────────┐
// │ l a y e r │
// └─────────────────────────────────────────────────┘
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
// ┌─────────────────────────────────────────────────┐
// │ q m k │
// └─────────────────────────────────────────────────┘
case MAKE_H:
if (record->event.pressed) {
SEND_STRING ("qmk compile -kb totem -km default");
tap_code(KC_ENTER);
}
break;
// ┌─────────────────────────────────────────────────┐
// │ p r o d u c t i v i t y │
// └─────────────────────────────────────────────────┘
case SNAP:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
SEND_STRING(SS_LSFT(SS_LCMD(SS_LCTL("4")))); //MAC
} else {
SEND_STRING(SS_LSFT(SS_LWIN("S"))); //WIN
}
}
break;
}
return true;
}
/*
*/

View file

@ -0,0 +1 @@
DYNAMIC_MACRO_ENABLE = yes

View file

@ -0,0 +1,32 @@
#pragma once
/* The way how "handedness" is decided (which half is which),
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
for more options.
*/
#define MASTER_LEFT
// #define MASTER_RIGHT
//#define TAPPING_TERM 170
#define TAPPING_TERM 170
// Prevent normal rollover on alphas from accidentally triggering mods.
#define IGNORE_MOD_TAP_INTERRUPT
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
#define TAPPING_FORCE_HOLD
// Auto Shift
#define NO_AUTO_SHIFT_ALPHA
#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
#define AUTO_SHIFT_NO_SETUP
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
#define NO_ACTION_ONESHOT
//#define NO_ACTION_TAPPING
//#define NO_MUSIC_MODE
#define COMBO_COUNT 1

View file

@ -0,0 +1,352 @@
/*
*/
#include QMK_KEYBOARD_H
#include <stdio.h>
#include "totem.h"
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ D E F I N I T I O N S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e l a y e r s │
// └─────────────────────────────────────────────────┘
enum totem_layers {
_COLEMAK,
_QWERTY,
_LOWER,
_RAISE,
_ADJUST,
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e k e y c o d e s │
// └─────────────────────────────────────────────────┘
enum custom_keycodes {
COLEMAK = SAFE_RANGE,
QWERTY,
LOWER,
RAISE,
ADJUST,
OS_SWAP,
WMAIL,
GIPHY,
MAKE_H,
SNAP
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e m a c r o n a m e s │
// └─────────────────────────────────────────────────┘
// LEFT HAND HOME ROW MODS ├───────────────────────────────────┐
#define GUI_A MT(MOD_LGUI, KC_A)
#define ALT_R MT(MOD_LALT, KC_R)
#define CTL_S MT(MOD_LCTL, KC_S)
#define SHT_T MT(MOD_LSFT, KC_T)
// RIGHT HAND HOME ROW MODS ├───────────────────────────────────┐
#define SHT_N MT(MOD_RSFT, KC_N)
#define CTL_E MT(MOD_LCTL, KC_E)
#define ALT_I MT(MOD_LALT, KC_I)
#define GUI_O MT(MOD_LGUI, KC_O)
#define LOWER LT(_LOWER, KC_TAB)
#define RAISE LT(_RAISE, KC_ESC)
#define ADJUST MO(_ADJUST)
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e c o m b o s │
// └─────────────────────────────────────────────────┘
const uint16_t PROGMEM esc_combo[] = {KC_TAB, KC_Q, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
COMBO(esc_combo, KC_ESC)
};
// ┌─────────────────────────────────────────────────┐
// │ d e f i n e k e y o v e r r i d e s │
// └─────────────────────────────────────────────────┘
const key_override_t sve_key_override = ko_make_basic(MOD_MASK_GUI, KC_S, C(KC_S));
// This globally defines all key overrides to be used ├───────────┐
const key_override_t **key_overrides = (const key_override_t *[]){
&sve_key_override,
NULL // Null terminate the array of overrides!
};
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ K E Y M A P S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
c o l e m a k
Q W F P G J L U Y ;
A R S T D H N E I O
Q Z X C V B K M , . / \
DEL LOWER SPACE ENTER RAISE BSPC
*/
[_COLEMAK] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O,
KC_Q, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
KC_DEL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
),
/*
q w e r t y
Q W E R T Y U I O P
A S D F G H J K L ;
SHIFT Z X C V B N M , . / \
CTRL LOWER SPACE ENTER RAISE BSPC
*/
[_QWERTY] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
),
/*
l o w e r
CAPSLCK NUMLCK = { } 7 8 9 +
HOME [ ] 4 5 6 -
SCRNSHT END PG SAVE PG ( ) 1 2 3 *
ADJUST 0
*/
[_LOWER] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_CAPS, KC_NUM, KC_UP, KC_EQL, KC_LCBR, KC_RCBR, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_QUOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_MINS,
SNAP, KC_END, KC_PGUP, C(KC_S), KC_PGDN, KC_LPRN, KC_RPRN, KC_P1, KC_P2, KC_P3, KC_PAST, _______,
_______, _______, _______, _______, ADJUST, KC_P0
),
/*
r a i s e
! @ # $ % ^ & Ü ° /
Ä è SZ é ¥ £ Ö
WEB ` ~ CUE DM REC1 DM STOP DM PLY1
GIPHY ADJUST
*/
[_RAISE] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, RALT(KC_U),RALT(KC_3),KC_BSLS,
RALT(KC_A),RALT(KC_F),RALT(KC_S),RALT(KC_G),XXXXXXX, XXXXXXX,LSFT(RALT(KC_4)),RALT(KC_5), RALT(KC_4), RALT(KC_O),
WMAIL, LSFT(KC_GRV),KC_TILD, RALT(KC_C),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DM_REC1, DM_RSTP, DM_PLY1,
GIPHY, ADJUST, _______, _______, _______, _______
),
/*
a d j u s t
RESET F7 F8 F9 F12
DEBUG QWERTY F4 F5 F6 F11
MAKE OS SWAP COLEMAK F1 F2 F3 F10 F13
*/
[_ADJUST] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12,
DB_TOGG, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11,
MAKE_H, OS_SWAP, COLEMAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F10, KC_F13,
_______, _______, _______, _______, _______, _______
)
/*
t e m p l a t e
[_TEMPLATE] = LAYOUT(
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
),
*/
};
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// │ M A C R O S │
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case OS_SWAP:
if (record->event.pressed) {
if (!keymap_config.swap_lctl_lgui) {
keymap_config.swap_lctl_lgui = true; // ─── MAC
}
else {
keymap_config.swap_lctl_lgui = false; // ─── WIN
}
eeconfig_update_keymap(keymap_config.raw);
clear_keyboard(); // ──── clear to prevent stuck keys
return false;
}
// ┌─────────────────────────────────────────────────┐
// │ l a y e r │
// └─────────────────────────────────────────────────┘
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
// ┌─────────────────────────────────────────────────┐
// │ q m k │
// └─────────────────────────────────────────────────┘
case MAKE_H:
if (record->event.pressed) {
SEND_STRING ("qmk compile -kb totem -km geist");
tap_code(KC_ENTER);
}
break;
// ┌─────────────────────────────────────────────────┐
// │ p r o d u c t i v i t y │
// └─────────────────────────────────────────────────┘
case WMAIL:
if (record->event.pressed) {
SEND_STRING ("igit.igit@web.de");
}
break;
case GMAIL:
if (record->event.pressed) {
SEND_STRING ("igit@gmx.de");
}
break;
case GIPHY:
if (record->event.pressed) {
SEND_STRING ("@gif ");
}
break;
case SNAP:
if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) {
SEND_STRING(SS_LSFT(SS_LCMD(SS_LCTL("4")))); //MAC
} else {
SEND_STRING(SS_LSFT(SS_LWIN("S"))); //WIN
}
}
break;
}
return true;
}
/*
*/

View file

@ -0,0 +1,3 @@
DYNAMIC_MACRO_ENABLE = yes
COMBO_ENABLE = yes
KEY_OVERRIDE_ENABLE = yes

9
totem/mcuconf.h Normal file
View file

@ -0,0 +1,9 @@
#pragma once
#include_next <mcuconf.h>
#undef RP_PWM_USE_PWM4
#define RP_PWM_USE_PWM4 TRUE
#undef RP_PWM_USE_TIM1
#define RP_PWM_USE_TIM1 TRUE

18
totem/readme.md Normal file
View file

@ -0,0 +1,18 @@
```
▀▀▀▀▀ ▀▀▀▀▀ ▀▀█▀▀
▄▀▀▀▄ ▄ ▄▀▀▀▄ ▄ ▄▀▀▀▄ █ ▄▀▀▀▄
█ █ █ █ █ █ █ █ █ █ █
▀▀▀ █ ▀▀▀ █ ▀▀▀ ▀ ▀▀▀
█ ▄▄▄█▄▄▄ █ █
▀ █ █ █ █▄█
▀▀▀▀▀ █ █ █ ▀
▀ ▀ ▀
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
```
# TOTEM split keyboard
TOTEM is 34 keys column-staggered split keyboard made by @geigeigeist. It uses the Seeed XIAO RP2040.
You can use this command to compile the firmware
`qmk compile -kb totem -km default`

31
totem/rules.mk Normal file
View file

@ -0,0 +1,31 @@
# MCU name
MCU = RP2040
# Bootloader selection
BOOTLOADER = rp2040
# Ignore some warnings during the build, likely to be fixed before RP2040 PR is merged
ALLOW_WARNINGS = yes
# LTO must be disabled for RP2040 builds
LTO_ENABLE = no
SPLIT_KEYBOARD = yes
SWAP_HANDS_ENABLE = yes
# PIO serial/WS2812 drivers must be used on RP2040
SERIAL_DRIVER = vendor
WS2812_DRIVER = vendor
#SPACE SAVING
EXTRAKEY_ENABLE = no
AUDIO_ENABLE = no
MUSIC_ENABLE = no
LTO_ENABLE = no
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
MOUSEKEY_ENABLE = no
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
MAGIC_ENABLE = no

56
totem/totem.c Normal file
View file

@ -0,0 +1,56 @@
/* Copyright 2022
* GEIST @geigeigeist
*
* 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 "totem.h"
#ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak))
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] =
// The LAYOUT macro could work for this, but it was harder to figure out the
// identity using it.
// This is the identity layout.
/*
{ \
{ {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0} }, \
{ {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1} }, \
{ {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2} }, \
{ {0, 3}, {2, 3}, {3, 3}, {4, 3} }, \
\
{ {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4} }, \
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5} }, \
{ {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6} }, \
{ {0, 7}, {1, 7}, {2, 7}, {4, 7}, \
};
*/
// This is the mirror, q <-> p, w <-> o, etc...
{ \
{ {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4} }, \
{ {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5} }, \
{ {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6} }, \
{ {4, 7}, {2, 7}, {1, 7}, {0, 7} }, \
\
{ {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0} }, \
{ {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1} }, \
{ {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2} }, \
{ {4, 3}, {3, 3}, {2, 3}, {0, 3} }, \
};
#endif //SWAP_HANDS_ENABLE

56
totem/totem.h Normal file
View file

@ -0,0 +1,56 @@
/* Copyright 2022
* GEIST @geigeigeist
*
* 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 "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
// readability
#define ___ KC_NO
// |SW01|SW02|SW03|SW04|SW05| |SW05|SW04|SW03|SW02|SW01|
// |SW06|SW07|SW08|SW09|SW10| |SW10|SW09|SW08|SW07|SW06|
// |SW16|SW11|SW12|SW13|SW14|SW15| |SW15|SW14|SW13|SW12|SW11|SW16|
// |SW17|SW18|SW19| |SW19|SW18|SW17|
#define LAYOUT_totem( \
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
L30, L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, R34,\
L32, L33, L34, R30, R31, R32 \
) \
{ \
{ L00, L01, L02, L03, L04 }, \
{ L10, L11, L12, L13, L14 }, \
{ L20, L21, L22, L23, L24 }, \
{ L30, ___, L32, L33, L34 }, \
{ R04, R03, R02, R01, R00 }, \
{ R14, R13, R12, R11, R10 }, \
{ R24, R23, R22, R21, R20 }, \
{ R34, ___, R32, R31, R30 }, \
}
#define LAYOUT LAYOUT_totem