Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crkbd/jussaw #17

Merged
merged 25 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
105f1fa
Add mod tap keys
jussaw Aug 25, 2023
e567d8e
Cleanup
jussaw Aug 25, 2023
ad1504c
Update comments
jussaw Aug 25, 2023
c6da19c
Update code delay
jussaw Aug 25, 2023
4da825b
Merge branch 'qmk:master' into crkbd/jussaw
jussaw Sep 18, 2023
03c8869
Merge branch 'qmk:master' into crkbd/mod-tap
jussaw Sep 18, 2023
f54dede
Merge branch 'qmk:master' into jussaw/crkbd/mod-tap
jussaw Sep 18, 2023
77dc9b8
Cleanup comments
jussaw Sep 18, 2023
192f46f
Cleanup and ModTap updates
jussaw Sep 18, 2023
7052b22
Update mod tap options
jussaw Sep 18, 2023
10edeb8
Merge remote-tracking branch 'origin/jussaw/crkbd/mod-tap' into crkbd…
jussaw Sep 18, 2023
82980df
Remove colemak and put mod keys on upper layer
jussaw Sep 18, 2023
7711aa8
Add modifier keys to lower and upper layer
jussaw Sep 19, 2023
8adbc7e
Rename mod tap keys
jussaw Sep 19, 2023
5fe71a4
Add hyper key to all layers
jussaw Sep 20, 2023
226dc6d
Reformat layout
jussaw Sep 21, 2023
8a8f72e
Merge branch 'qmk:master' into crkbd/jussaw
jussaw Nov 3, 2023
12dae20
Merge branch 'qmk:master' into crkbd/mod-tap
jussaw Nov 3, 2023
6026d19
Merge branch 'qmk:master' into crkbd/mod-tap
jussaw Nov 20, 2023
1862cc0
Merge branch 'qmk:master' into crkbd/mod-tap
jussaw Aug 5, 2024
6b7efe4
Add Simultaneous Opposing Cardinal Directions functionality on game l…
jussaw Aug 5, 2024
c892aa8
Merge branch 'crkbd/mod-tap' of https://github.com/jussaw/qmk_firmwar…
jussaw Aug 5, 2024
77d5bfe
Merge branch 'qmk:master' into crkbd/jussaw
jussaw Oct 5, 2024
eb7ad92
Merge branch 'crkbd/mod-tap' into crkbd/jussaw
jussaw Oct 5, 2024
f5cec91
Merge branch 'master' into crkbd/jussaw
jussaw Oct 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions keyboards/crkbd/keymaps/jussaw/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#pragma once

//#define USE_MATRIX_I2C

/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS

// Mouse key speed and acceleration.
/* Mod Tap */
#define TAP_CODE_DELAY 50
#define TAPPING_TERM 200
#define QUICK_TAP_TERM 0
#define PERMISSIVE_HOLD_PER_KEY
#define TAPPING_FORCE_HOLD

/* Mouse key speed and acceleration. */
#undef MOUSEKEY_DELAY
#define MOUSEKEY_DELAY 0
#undef MOUSEKEY_INTERVAL
Expand All @@ -35,4 +44,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 6
#undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 64
#define MOUSEKEY_TIME_TO_MAX 64
169 changes: 105 additions & 64 deletions keyboards/crkbd/keymaps/jussaw/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

enum layers {
_QWERTY,
_COLEMAKDH,
_LOWER,
_UPPER,
_ADJUST,
Expand All @@ -33,128 +32,170 @@ enum custom_keycodes {
LOWER,
UPPER,
ADJUST,
DF_QWRT,
DF_CMDH,
TG_GAME,
GAME,
};

/* Layer Keys */
#define LOWER MO(_LOWER)
#define UPPER MO(_UPPER)
#define ADJUST MO(_ADJUST)
#define DF_QWRT DF(_QWERTY)
#define DF_CMDH DF(_COLEMAKDH)
#define TG_GAME TG(_GAME)

/* Mod Tap Keys for Qwerty Layer */
#define A_LGUI LGUI_T(KC_A)
#define S_LALT LALT_T(KC_S)
#define D_LCTL LCTL_T(KC_D)
#define F_LSFT LSFT_T(KC_F)
#define J_RSFT RSFT_T(KC_J)
#define K_RCTL RCTL_T(KC_K)
#define L_RALT RALT_T(KC_L)
#define SC_RGUI RGUI_T(KC_SCLN)

/* Mod Tap Keys for Lower Layer */
#define MIN_RSFT RSFT_T(KC_MINS)
#define EQL_RCTL RCTL_T(KC_EQL)
#define LBC_RALT RALT_T(KC_LBRC)
#define RBC_RGUI RGUI_T(KC_RBRC)

/* Mod Tap Keys for Upper Layer */
#define F1_LGUI LGUI_T(KC_F1)
#define F2_LALT LALT_T(KC_F2)
#define F3_LCTL LCTL_T(KC_F3)
#define F4_LSFT LSFT_T(KC_F4)


static bool a_pressed = false;
static bool d_pressed = false;

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (layer_state_is(_GAME)) {
switch (keycode) {
case KC_A:
if (record->event.pressed) {
if (d_pressed) {
unregister_code(KC_D);
}
register_code(KC_A);
a_pressed = true;
} else {
unregister_code(KC_A);
a_pressed = false;
if (d_pressed) {
register_code(KC_D);
}
}
return false; // Skip default handling for this key

case KC_D:
if (record->event.pressed) {
if (a_pressed) {
unregister_code(KC_A);
}
register_code(KC_D);
d_pressed = true;
} else {
unregister_code(KC_D);
d_pressed = false;
if (a_pressed) {
register_code(KC_A);
}
}
return false; // Skip default handling for this key
}
}
return true; // Process all other keycodes normally
}

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Qwerty
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Esc | A | S | D | F | G | | H | J | K | L | ; | "" |
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Alt | Z | X | C | V | B | | N | M | , | . | / | Enter |
* | Esc | A,LGUI | S,LALT | D,LCTL | F,LSFT | G | | H | J,RSFT | K,RCTL | L,RALT | ;,RGUI | "" |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Ctrl | Lower | Space | | Shift | Upper | GUI |
* | CAPS | Z | X | C | V | B | | N | M | , | . | / | Enter |
* `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------'
* | Hyper | Lower | Space | | Bksp | Upper | |
* `--------------------------' `--------------------------'
*/
[_QWERTY] = LAYOUT_split_3x6_3(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, LOWER, KC_SPC, KC_RSFT, UPPER, KC_RGUI
),

/* Colemak Mod-DH
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Tab | Q | W | F | P | B | | J | L | U | Y | ; | Bksp |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Esc | A | R | S | T | G | | M | N | E | I | O | "" |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Alt | Z | X | C | D | V | | K | H | , | . | / | Enter |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Ctrl | Lower | Space | | Shift | Upper | GUI |
* `--------------------------' `--------------------------'
*/
[_COLEMAKDH] = LAYOUT_split_3x6_3(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LALT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, LOWER, KC_SPC, KC_RSFT, UPPER, KC_RGUI
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_ESC, A_LGUI, S_LALT, D_LCTL, F_LSFT, KC_G, KC_H, J_RSFT, K_RCTL, L_RALT, SC_RGUI, KC_QUOT,
KC_CAPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_HYPR, LOWER, KC_SPC, KC_BSPC, UPPER, XXXXXXX
),

/* Lower
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Esc | | | | | | | ` | - | = | [ | ] | \ |
* | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Alt | | | | | | | ~ | _ | + | { | } | | |
* | Esc | GUI | Alt | Ctrl | Shift | | | ` | -,RSFT | =,RCTL | [,RALT | ],RGUI | \ |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Ctrl | Trans | Alt | | Shift | Adjust | GUI |
* | | | | | | | | ~ | _ | + | { | } | | |
* `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------'
* | Hyper | Trans | Space | | Bksp | Adjust | |
* `--------------------------' `--------------------------'
*/
[_LOWER] = LAYOUT_split_3x6_3(
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
KC_LCTL, KC_TRNS, KC_LALT, KC_RSFT, ADJUST, KC_RGUI
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_ESC, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_GRV,MIN_RSFT,EQL_RCTL,LBC_RALT,RBC_RGUI, KC_BSLS,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
KC_HYPR, KC_TRNS, KC_SPC, KC_BSPC, ADJUST, XXXXXXX
),


/* Upper
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Tab | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
* | Tab | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | F11 | F1 | F2 | F3 | F4 | F5 | | Ins | Left | Down | Up | Right | Del |
* | F11 |F1,LGUI |F2,LALT |F3,LCTL |F4,LSFT | F5 | | Ins | Left | Down | Up | Right | \ |
* +--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | F12 | F6 | F7 | F8 | F9 | F10 | |PrntScrn| Home |Pg Down | Pg Up | End | Enter |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | Ctrl | Adjust | Alt | | Shift | Trans | GUI |
* `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------'
* | Hyper | Adjust | Space | | Bksp | Trans | |
* `--------------------------' `--------------------------'
*/
[_UPPER] = LAYOUT_split_3x6_3(
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_INS, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_DEL,
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_F11, F1_LGUI, F2_LALT, F3_LCTL, F4_LSFT, KC_F5, KC_INS, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_BSLS,
KC_F12, KC_F5, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_ENT,
KC_LCTL, ADJUST, KC_LALT, KC_RSFT, KC_TRNS, KC_RGUI
KC_HYPR, ADJUST, KC_SPC, KC_BSPC, KC_TRNS, XXXXXXX
),


/* Adjust
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | RESET | | | | |TG(GAME)| | Play | Prev | Next | | | |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* |DF(QWRT)| | | Mouse2 | Mouse1 | | | Vol+ |Ms Left |Ms Down | Ms Up |Ms Right| |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* |DF(CMDH)| | | Mouse4 | Mouse5 | | | Vol- | MsWl L | MsWl D | MsWl U | MsWl R | |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | | Trans | | | | Trans | |
* | | | | Mouse4 | Mouse5 | | | Vol- | MsWl L | MsWl D | MsWl U | MsWl R | |
* `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------'
* | Hyper | Lower | | | | Upper | |
* `--------------------------' `--------------------------'
*/
[_ADJUST] = LAYOUT_split_3x6_3(
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_GAME, KC_MPLY, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX,
DF_QWRT, XXXXXXX, XXXXXXX, KC_BTN2, KC_BTN1, XXXXXXX, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
DF_CMDH, XXXXXXX, XXXXXXX, KC_BTN4, KC_BTN5, XXXXXXX, KC_VOLD, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX,
XXXXXXX, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_GAME, KC_MPLY, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX,
DF_QWRT, XXXXXXX, XXXXXXX, KC_BTN2, KC_BTN1, XXXXXXX, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN4, KC_BTN5, XXXXXXX, KC_VOLD, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX,
KC_HYPR, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX
),


/* Game
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | T | Tab | Q | W | E | R | | Y | U | I | O | P | Bksp |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | G | Shift | A | S | D | F | | H | J | K | L | ; | "" |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* | B | Ctrl | Z | X | C | V | | N | M | , | . | / | Enter |
* |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
* `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------'
* | Esc | Alt | Space | | | |TG(GAME)|
* `--------------------------' `--------------------------'
*/
[_GAME] = LAYOUT_split_3x6_3(
KC_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_G, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_B, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_ESC, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, TG_GAME
KC_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_G, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_B, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_ESC, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, TG_GAME
),
};
};
2 changes: 1 addition & 1 deletion keyboards/crkbd/keymaps/jussaw/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OLED_DRIVER_ENABLE = no
RGBLIGHT_ENABLE = no
RGB_MATRIX_ENABLE = no
BOOTLOADER = atmel-dfu
BOOTLOADER = atmel-dfu
2 changes: 1 addition & 1 deletion keyboards/planck/keymaps/jussaw/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
#undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 6
#undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 64
#define MOUSEKEY_TIME_TO_MAX 64
2 changes: 1 addition & 1 deletion keyboards/planck/keymaps/jussaw/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,4 @@ bool music_mask_user(uint16_t keycode) {
default:
return true;
}
}
}