Skip to content

Commit

Permalink
Stuff (getreuer#5)
Browse files Browse the repository at this point in the history
* This seems to be ok.

* add the planck.

* prepare for something else.
  • Loading branch information
fride authored Jun 19, 2023
1 parent 0894197 commit 02cf314
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 59 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN mkdir -p /qmk_firmware/keyboards/redox/keymaps/fride

COPY ./qmk-config-totem/totem/ /qmk_firmware/keyboards/totem/
COPY ./src/keymaps/totem/ /qmk_firmware/keyboards/totem/keymaps/fride/
COPY ./src/keymaps/planck/ /qmk_firmware/keyboards/planck/keymaps/fride/
COPY ./src/keymaps/redox/ /qmk_firmware/keyboards/redox/keymaps/fride/
COPY ./src/keymaps/ferris/ /qmk_firmware/keyboards/ferris/keymaps/fride/
COPY ./src/users/fride/ /qmk_firmware/users/fride/
Expand Down
2 changes: 2 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ build: clean
DOCKER_BUILDKIT=1 docker buildx build -o type=local,dest=result .
redox:
DOCKER_BUILDKIT=1 docker buildx build --build-arg="KEYBOARD=redox" -o type=local,dest=result .
planck:
DOCKER_BUILDKIT=1 docker buildx build --build-arg="KEYBOARD=planck/rev6" -o type=local,dest=result .
fetch_totem_src:
git submodule add -f [email protected]:GEIGEIGEIST/qmk-config-totem.git
git submodule sync
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# totem-qmk
Keymap for the wired Totem
# QMK Keymap

My keymap is based mainly on the [magic sturdy](https://github.com/Ikcelaks/keyboard_layouts/blob/main/magic_sturdy/magic_sturdy.md) layout.




## Inspiration
- https://github.com/pixelbreaker/qmk_userspace

# Old Combos:
- https://github.com/Ikcelaks/keyboard_layouts/blob/main/magic_sturdy/magic_sturdy.md
- https://github.com/Bertie2011/thrown-exception-keyboard/blob/main/docs/keymap.md
- https://github.com/getreuer/qmk-keymap
- https://www.jonashietala.se/blog/2022/08/28/the_t-342_keyboard_layout/
- https://github.com/possumvibes/keyboard-layout
![Alt text](aptmak.png)

# Scratchpad!

```
COMB( CMB_EQL, KC_EQL, MAGIC, KC_O)
Expand Down
Binary file added aptmak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/keymaps/planck/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#define IGNORE_MOD_TAP_INTERRUPT // Lets you roll mod-tap keys
#define TAPPING_FORCE_HOLD // Allows mod use immediately after tap use
#define TAPPING_FORCE_HOLD_PER_KEY // BUT NOT EVERYWHERE.
#define TAPPING_TERM 200 // Base tapping term
#define TAPPING_TERM_PER_KEY // Adjust tapping term for finger strength

#define PLANCK(k) CONV_PLANCK(k)

#define CONV_PLANCK( \
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \
k34, k35, k36, k37 \
) \
{ \
{ KC_ESC, k01, k02, k03, k04, k05 }, \
{ KC_TAB, k11, k12, k13, k14, k15 }, \
{ OS_LSFT, k21, k22, k23, k24, k25 }, \
{ KC_LCTL, KC_LALT, KC_LGUI, KC_LALT, KC_RCTL, k36 }, \
{ k06, k07, k08, k09, k0a, KC_BSPC }, \
{ k16, k17, k18, k19, k1a, KC_ENTER }, \
{ k26, k27, k28, k29, k2a, OSL(NUM) }, \
{ k37, OSL(NUM), KC_RGUI, OSL(NUM), k34, k35 } \
}
10 changes: 10 additions & 0 deletions src/keymaps/planck/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include QMK_KEYBOARD_H
#include "layout.h"
#include "g/keymap_combo.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[ALPHA] = PLANCK(_BASE),
[NAV] = PLANCK(_NAV),
[NUM] = PLANCK(_NUM),
[SYM] = PLANCK(_SYM1)
};
2 changes: 1 addition & 1 deletion src/keymaps/totem/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{ L00, L01, L02, L03, L04 }, \
{ L10, L11, L12, L13, L14 }, \
{ L20, L21, L22, L23, L24 }, \
{ KC_NO, KC_NO, OSL(SYM), L33, L34 }, \
{ KC_NO, KC_NO, OSL(NUM), L33, L34 }, \
{ R04, R03, R02, R01, R00 }, \
{ R14, R13, R12, R11, R10 }, \
{ R24, R23, R22, R21, R20 }, \
Expand Down
108 changes: 65 additions & 43 deletions src/users/fride/combos.def
Original file line number Diff line number Diff line change
@@ -1,29 +1,51 @@
// Layout key reference
// KC_V, KC_M, KC_L, KC_C, KC_P, KC_B MAGIC, KC_U, KC_O, KC_QUOT
// HM_S, HM_T, HM_R, HM_D, KC_Y, KC_F HM_N, HM_E, HM_A, HM_I
// KC_X, KC_K, KC_J, KC_G, KC_W, KC_Z KC_H, KC_COMM, KC_DOT, KC_UNDS
// NAV_SPC, ____, ___, REPEAT

// Horizontal Combos
COMB( combo_canel, CANCEL, KC_S, KC_I)
COMB( CMB_BOOT, QK_BOOT, KC_V, KC_QUOT)
COMB( COMBO_Q, KC_Q, KC_V, KC_M)
COMB( combo_enter, KC_ENTER, HM_N, HM_E, HM_A)
COMB( COMBO_ESC, ESC_SYM, HM_R, HM_D)
COMB( combo_tab, KC_TAB, HM_T, HM_R, HM_D)
COMB( COMBO_COLON, CLN_NUM, HM_N, HM_E)
COMB( COMBO_SCOLON, KC_SCLN, HM_N, KC_COMM)
// KC_V, KC_M, KC_L, KC_C, KC_P, KC_B MAGIC, KC_U, KC_O, KC_QUOT
// HM_S, HM_T, HM_R, HM_D, KC_Y, KC_F HM_N, HM_E, HM_A, HM_I
// KC_X, KC_K, KC_J, KC_G, KC_W, KC_Z KC_H, KC_COMM, KC_DOT, KC_UNDS
// NAV_SPC, OS_MEH, REPEAT, OS_LSFT

COMB( combo_canel, CANCEL, HM_S, HM_I)
COMB( cCMB_CANCEL2, CANCEL, NAV_SPC, OS_LSFT)

COMB( CMB_BOOT, QK_BOOT, KC_V, KC_QUOT)
COMB( COMBO_Q, KC_Q, KC_V, KC_M)
COMB( combo_enter, KC_ENTER, HM_N, HM_E, HM_A)
COMB( COMBO_ESC, ESC_SYM, HM_R, HM_D)
COMB( combo_tab, KC_TAB, HM_T, HM_R, HM_D)
COMB( COMBO_COLON, CLN_NUM, HM_N, HM_E)
COMB( COMBO_SCOLON, KC_SCLN, HM_N, KC_COMM)

COMB( COMBO_LT, KC_LT, KC_M, KC_L)
COMB( COMBO_GT, KC_GT, KC_L, KC_C)

COMB( COMBO_LBRC, KC_LBRC, MAGIC, KC_U)
COMB( COMBO_RBRC, KC_RBRC, KC_U, KC_O)
COMB( COMBO_SLSH, KC_SLSH, KC_COMM, KC_DOT)
COMB( COMBO_MINS, KC_MINS, MAGIC, KC_O)
COMB( COMBO_EQL, KC_EQL, MAGIC, KC_O, KC_U)

// diagonal
COMB( COMBO_LPAREN, KC_LPRN, HM_T, HM_D)
COMB( COMBO_RPAREN, KC_RPRN, HM_N, HM_A)

// thumb combos
COMB (CMB_NUMWORD, NUMWORD, NAV_SPC, OS_LSFT)
COMB (CMB_NUMWORD2, NUMWORD, HM_E, HM_A)
COMB (CMB_NUMWORD3, NUMWORD, HM_T, HM_R)


// arraows
SUBS (COMB_FAT_ARROW_R, "=>", MAGIC, HM_N )
SUBS (COMB_ARROW_R, "->", KC_U, HM_E )
SUBS (COMB_PIPE_R, "|>", KC_O, HM_A )

SUBS (COMB_FAT_ARROW_L, "<=", KC_C, HM_D )
SUBS (COMB_ARROW_L, "<-", KC_L, HM_R )
SUBS (COMB_PIPE_L, "<|", KC_M, HM_T )
SUBS (COMB_GT_OR_EQL, ">=", KC_G, HM_D )



// One shot numbers
COMB( COMBO_0, KC_0, OS_LSFT, HM_N)
COMB( COMBO_2, KC_2, OS_LSFT, HM_E)
Expand All @@ -38,35 +60,35 @@ COMB( COMBO_7, KC_7, OS_LSFT, HM_S)
COMB( COMBO_9, KC_9, OS_LSFT, KC_G)
// one shot symbols on thumbs

COMB( COMB_TILD, KC_TILD, OS_LSFT,KC_V)
COMB( COMB_PLUS, KC_PLUS, OS_LSFT,KC_M)
COMB( COMB_ASTR, KC_ASTR, OS_LSFT,KC_L)
COMB( COMB_EXLM, KC_EXLM, OS_LSFT,KC_C)

COMB( COMB_HASH, KC_HASH, NAV_SPC,MAGIC)
COMB( COMB_AT, KC_AT, NAV_SPC,KC_U)
COMB( COMB_CIRC, KC_CIRC, NAV_SPC,KC_O)

COMB( COMB_PIPE, KC_PIPE, OS_LSFT,HM_S)
COMB( COMB_LCBR, KC_LCBR, OS_LSFT,HM_T)
COMB( COMB_RCBR, KC_RCBR, OS_LSFT,HM_R)
COMB( COMB_MINS, KC_MINS, OS_LSFT,HM_D)
COMB( COMB_BSLS, KC_BSLS, OS_LSFT,KC_Y)

COMB( COMB_GRV, KC_GRV, NAV_SPC,KC_F)
COMB( COMB_QUES, KC_QUES, NAV_SPC,HM_N)
COMB( COMB_LBRC, KC_LBRC, NAV_SPC,HM_E)
COMB( COMB_RBRC, KC_RBRC, NAV_SPC,HM_A)

COMB( COMB_LT, KC_LT, OS_LSFT,KC_K)
COMB( COMB_GT, KC_GT, OS_LSFT,KC_J)
COMB( COMB_PERC, KC_PERC, OS_LSFT,KC_G)
COMB( COMB_NO, KC_NO, OS_LSFT,KC_W)

COMB( COMB_SLSH, KC_SLSH, NAV_SPC,KC_Z)
COMB( COMB_AMPR, KC_AMPR, NAV_SPC,KC_H)
COMB( COMB_LPRN, KC_LPRN, NAV_SPC,KC_COMM)
COMB( COMB_RPRN, KC_RPRN, NAV_SPC,KC_DOT)
// COMB( COMB_TILD, KC_TILD, OS_LSFT,KC_V)
// COMB( COMB_PLUS, KC_PLUS, OS_LSFT,KC_M)
// COMB( COMB_ASTR, KC_ASTR, OS_LSFT,KC_L)
// COMB( COMB_EXLM, KC_EXLM, OS_LSFT,KC_C)

// COMB( COMB_HASH, KC_HASH, NAV_SPC,MAGIC)
// COMB( COMB_AT, KC_AT, NAV_SPC,KC_U)
// COMB( COMB_CIRC, KC_CIRC, NAV_SPC,KC_O)

// COMB( COMB_PIPE, KC_PIPE, OS_LSFT,HM_S)
// COMB( COMB_LCBR, KC_LCBR, OS_LSFT,HM_T)
// COMB( COMB_RCBR, KC_RCBR, OS_LSFT,HM_R)
// COMB( COMB_MINS, KC_MINS, OS_LSFT,HM_D)
// COMB( COMB_BSLS, KC_BSLS, OS_LSFT,KC_Y)

// COMB( COMB_GRV, KC_GRV, NAV_SPC,KC_F)
// COMB( COMB_QUES, KC_QUES, NAV_SPC,HM_N)
// COMB( COMB_LBRC, KC_LBRC, NAV_SPC,HM_E)
// COMB( COMB_RBRC, KC_RBRC, NAV_SPC,HM_A)

// COMB( COMB_LT, KC_LT, OS_LSFT,KC_K)
// COMB( COMB_GT, KC_GT, OS_LSFT,KC_J)
// COMB( COMB_PERC, KC_PERC, OS_LSFT,KC_G)
// COMB( COMB_NO, KC_NO, OS_LSFT,KC_W)

// COMB( COMB_SLSH, KC_SLSH, NAV_SPC,KC_Z)
// COMB( COMB_AMPR, KC_AMPR, NAV_SPC,KC_H)
// COMB( COMB_LPRN, KC_LPRN, NAV_SPC,KC_COMM)
// COMB( COMB_RPRN, KC_RPRN, NAV_SPC,KC_DOT)



Expand Down
8 changes: 7 additions & 1 deletion src/users/fride/features/layermodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ void process_num_word(uint16_t keycode, const keyrecord_t *record) {
switch (keycode) {
// Don't disable for those keycodes
case KC_1 ... KC_0:
case KC_PERC:
case FIVE:
case THREE:
case ONE:
case ZERO:
case TWO:
case FOUR:
case KC_PERC:
case KC_COMM:
case KC_DOT: // still a . stops!?
case KC_SLSH:
Expand Down
28 changes: 23 additions & 5 deletions src/users/fride/fride.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include "features/achordion.h"
#include "layout.h"


#define IS_SHIFTED(mods) (mods | get_weak_mods() | get_oneshot_mods() & MOD_MASK_SHIFT);

const custom_shift_key_t custom_shift_keys[] = {
{KC_DOT, KC_EXLM},
{KC_COMM, KC_QUES},
Expand Down Expand Up @@ -310,6 +313,9 @@ bool tap_hold(uint16_t keycode) {
case KC_LBRC:
case KC_LCBR:
case KC_LEFT:
case KC_EXLM:
case KC_DQUO:
case KC_LT:
case KC_UP:
case KC_DOWN:
case KC_RIGHT:
Expand All @@ -320,7 +326,7 @@ bool tap_hold(uint16_t keycode) {
}

void tap_hold_send_tap(uint16_t keycode) {
switch (keycode) {
switch (keycode) {
case CPYPASTE:
tap_code16(G(KC_C));
break;
Expand All @@ -330,6 +336,12 @@ void tap_hold_send_tap(uint16_t keycode) {
}
void tap_hold_send_hold(uint16_t keycode) {
switch (keycode) {
case KC_QUOT:
SEND_STRING("''" SS_TAP(X_LEFT));
break;
case KC_DQUO:
SEND_STRING("\"\"" SS_TAP(X_LEFT));
break;
case CPYPASTE:
tap_code16(G(KC_V));
break;
Expand All @@ -349,15 +361,21 @@ void tap_hold_send_hold(uint16_t keycode) {
tap_code16(KC_SLSH);
break;
case KC_LPRN:
tap_code16(KC_RPRN);
SEND_STRING("()" SS_TAP(X_LEFT));
break;
case KC_LBRC:
tap_code16(KC_RBRC);
case KC_LT:
SEND_STRING("<>" SS_TAP(X_LEFT));
break;
case KC_LBRC:
SEND_STRING("[]" SS_TAP(X_LEFT));
break;
case KC_LCBR:
tap_code16(KC_RCBR);
SEND_STRING("{}" SS_TAP(X_LEFT));
break;
case KC_EQL:
send_string(" == ");
break;
case KC_EXLM:
send_string(" != ");
break;
}
Expand Down
18 changes: 13 additions & 5 deletions src/users/fride/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ enum custom_keycodes {
// #define HRML(k1, k2, k3, k4) LT(SYM,k1), LCTL_T(k2), LALT_T(k3), LGUI_T(k4)
// #define HRMR(k1, k2, k3, k4) RGUI_T(k1), RALT_T(k2), LCTL_T(k3), LT(SYM, k4)


#define FIVE LCTL_T(KC_5)
#define THREE LALT_T(KC_3)
#define ONE LGUI_T(KC_1)
#define ZERO RGUI_T(KC_0)
#define TWO RALT_T(KC_2)
#define FOUR RCTL_T(KC_4)

#define _______ KC_NO
#define ___________________________________________ _______, _______, _______, _______, _______

Expand All @@ -135,7 +143,7 @@ enum custom_keycodes {
KC_V, KC_M, KC_L, KC_C, KC_P, KC_B, MAGIC, KC_U, KC_O, KC_QUOT, \
HM_S, HM_T, HM_R, HM_D, KC_Y, KC_F, HM_N, HM_E, HM_A, HM_I, \
KC_X, KC_K, KC_J, KC_G, KC_W, KC_Z, KC_H, KC_COMM, KC_DOT, KC_UNDS, \
NAV_SPC, OSL(SYM), NUMWORD, OS_LSFT
NAV_SPC, OS_MEH, REPEAT, OS_LSFT

// clang-format off
#define _NAV \
Expand All @@ -146,10 +154,10 @@ enum custom_keycodes {

// clang-format off
#define _NUM \
KC_7, KC_5, KC_3, KC_1, KC_9, KC_8, KC_0, KC_2, KC_4, KC_6, \
KC_NO, KC_LT, KC_GT, KC_NO, KC_PIPE, KC_BSLS, KC_LCBR, KC_LPRN,KC_RPRN, KC_RCBR, \
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_PAST,KC_EQL, KC_PLUS, \
NAV_SPC, OS_MEH, REPEAT, OS_LSFT
KC_EXLM, KC_AT, _______, _______, _______, _______, KC_HASH,KC_AMPR, _______, _______, \
KC_7, FIVE, THREE, ONE, KC_PLUS, KC_PAST, ZERO, TWO, FOUR, KC_6, \
_______, _______, KC_HASH, KC_9, KC_PERC, KC_CIRC, KC_8, KC_COMM, KC_DOT, KC_UNDS, \
NAV_SPC, OS_MEH, REPEAT, OS_LSFT


// clang-format off
Expand Down

0 comments on commit 02cf314

Please sign in to comment.