-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Bocaj Ergodox Updates #3364
Bocaj Ergodox Updates #3364
Changes from 11 commits
59c6870
eeba0ce
b17fa50
0a945eb
9b7e1e9
3aaab4e
6211b78
638c005
850f7c6
603f9e2
10dd01f
e106f84
b46a20e
b94845e
cbc7673
59a18c6
cb723cc
9414e91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
Copyright 2018 Jacob Jerrell <jacob.jerrell@gmail.com> | ||
|
||
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 "quantum.h" | ||
#include "sendstring_workman.h" | ||
|
||
// Layers | ||
#define _HWRKMN 0 | ||
#define _SWRKMN 1 | ||
#define _NUMPAD 2 | ||
#define _MOUSE 3 | ||
#define _TOOLS 4 | ||
#define _DIABLOII 5 | ||
#define _DIABLOIII 6 | ||
|
||
enum custom_keycodes { | ||
KC_EPRM = SAFE_RANGE, | ||
KC_SWRK, | ||
KC_HWRK, | ||
KC_VRSN, | ||
JJ_COPY, | ||
JJ_PASTE, | ||
JJ_ARRW, | ||
MC_LOCK, | ||
}; | ||
|
||
// Space Cadet Hyper/Meh and [/] | ||
#define HYP_LBK ALL_T(KC_LBRACKET) | ||
#define MEH_RBK MEH_T(KC_RBRACKET) | ||
|
||
#define XXXXXXX KC_NO | ||
|
||
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) | ||
|
||
/* Pretty Layout | ||
.---------------------------------------------. .---------------------------------------------. | ||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | ! 8 | 9 | 10 | 11 | 12 | 13 | 14 | | ||
!-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! | ||
| 15 | 16 | 17 | 18 | 19 | 20 | 21 | ! 22 | 23 | 24 | 25 | 26 | 27 | 28 | | ||
!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! | ||
| 29 | 30 | 31 | 32 | 33 | 34 |-------! !-------! 35 | 36 | 37 | 38 | 39 | 40 | | ||
!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! | ||
| 41 | 42 | 43 | 44 | 45 | 46 | 47 | ! 48 | 49 | 50 | 51 | 52 | 53 | 54 | | ||
'-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' | ||
| 55 | 56 | 57 | 58 | 59 | .---------------. .---------------. ! 60 | 61 | 62 | 63 | 64 | | ||
'------------------------------' | 65 | 66 | ! 67 | 68 | '------------------------------' | ||
.-------+-------+-------! !-------+-------+-------. | ||
! ! | 69 | ! 70 | ! ! | ||
! ! !-------! !-------! ! ! | ||
| 71 | 72 | 73 | ! 74 | 75 | 76 | | ||
'-----------------------' '-----------------------' | ||
*/ | ||
|
||
#define _____________________ERGODOX_TOP_LEFT__________________ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, JJ_ARRW | ||
#define _____________________ERGODOX_TOP_RIGHT_________________ KC_MINUS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL | ||
#define _____________________ERGODOX_BOTTOM_LEFT_______________ TG(_MOUSE), TG(_NUMPAD), SH_MON, KC_UP, KC_LEFT | ||
#define _____________________ERGODOX_BOTTOM_RIGHT______________ KC_RIGHT, KC_DOWN, TO(_DIABLOII), TO(_DIABLOIII), TT(_TOOLS) | ||
|
||
// LEFT | RIGHT | ||
#define _____________ERGODOX_THUMBS____________ KC_APP,KC_HOME, KC_PGUP,KC_ESC, \ | ||
KC_END, KC_PGDOWN, \ | ||
KC_SPACE,KC_BSPACE,JJ_COPY, JJ_PASTE,KC_TAB,KC_ENTER | ||
|
||
// Software Driven Workman (basically HW QWERTY but I'm a purist) | ||
#define ______________SWORKMAN_L1______________ WK_Q, WK_D, WK_R, WK_W, WK_B | ||
#define ______________SWORKMAN_L2______________ WK_A, SFT_T(WK_S), GUI_T(WK_H), ALT_T(WK_T), WK_G | ||
#define ______________SWORKMAN_L3______________ CTL_T(WK_Z), WK_X, WK_M, WK_C, WK_V | ||
|
||
#define ______________SWORKMAN_R1______________ WK_J, WK_F, WK_U, WK_P, WK_SCLN | ||
#define ______________SWORKMAN_R2______________ WK_Y, ALT_T(WK_N), GUI_T(WK_E), SFT_T(WK_O), WK_I | ||
#define ______________SWORKMAN_R3______________ WK_K, WK_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH) | ||
|
||
// Hardware Driven Workman | ||
#define ______________HWORKMAN_L1______________ KC_Q, KC_D, KC_R, KC_W, KC_B | ||
#define ______________HWORKMAN_L2______________ KC_A, SFT_T(KC_S), GUI_T(KC_H), ALT_T(KC_T), KC_G | ||
#define ______________HWORKMAN_L3______________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V | ||
|
||
#define ______________HWORKMAN_R1______________ KC_J, KC_F, KC_U, KC_P, KC_SCLN | ||
#define ______________HWORKMAN_R2______________ KC_Y, ALT_T(KC_N), GUI_T(KC_E), SFT_T(KC_O), KC_I | ||
#define ______________HWORKMAN_R3______________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef USERSPACE_CONFIG_H | ||
#define USERSPACE_CONFIG_H | ||
|
||
#ifndef QMK_KEYS_PER_SCAN | ||
#define QMK_KEYS_PER_SCAN 4 | ||
#endif // QMK KEYS PER SCAN | ||
|
||
// this makes it possible to do rolling combos (zx) with keys that | ||
// convert to other keys on hold (z becomes ctrl when you hold it, | ||
// and when this option isn't enabled, z rapidly followed by x | ||
// actually sends Ctrl-x. That's bad.) | ||
#define IGNORE_MOD_TAP_INTERRUPT | ||
#undef PERMISSIVE_HOLD | ||
#undef PREVENT_STUCK_MODIFIERS | ||
|
||
// Disable action_get_macro and fn_actions, since we don't use these | ||
// and it saves on space in the firmware. | ||
#define NO_ACTION_MACRO | ||
#define NO_ACTION_FUNCTION | ||
|
||
#endif // !USERSPACE_CONFIG_H |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
/* | ||
Copyright 2018 Jacob Jerrell <jacob.jerrell@gmail.com> | ||
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 QMK_KEYBOARD_H | ||
#include "bocaj.h" | ||
#include "version.h" | ||
#include "action_layer.h" | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[_HWRKMN] = LAYOUT_ergodox_pretty_wrapper( | ||
_____________________ERGODOX_TOP_LEFT__________________, _____________________ERGODOX_TOP_RIGHT_________________, | ||
KC_DEL,______________HWORKMAN_L1______________,KC_LPRN, KC_RPRN,______________HWORKMAN_R1______________,KC_BSLS, | ||
TT(_NUMPAD),______________HWORKMAN_L2______________, ______________HWORKMAN_R2______________,LT(_TOOLS, KC_QUOTE), | ||
KC_LSFT,______________HWORKMAN_L3______________,HYP_LBK, MEH_RBK,______________HWORKMAN_R3______________,KC_RSFT, | ||
_____________________ERGODOX_BOTTOM_LEFT_______________, _____________________ERGODOX_BOTTOM_RIGHT______________, | ||
_____________ERGODOX_THUMBS____________ | ||
), | ||
[_SWRKMN] = LAYOUT_ergodox_pretty_wrapper( | ||
_____________________ERGODOX_TOP_LEFT__________________, _____________________ERGODOX_TOP_RIGHT_________________, | ||
KC_DEL,______________SWORKMAN_L1______________,KC_LPRN, KC_RPRN,______________SWORKMAN_R1______________,KC_BSLS, | ||
TT(_NUMPAD),______________SWORKMAN_L2______________, ______________SWORKMAN_R2______________,LT(_TOOLS, KC_QUOTE), | ||
KC_LSFT,______________SWORKMAN_L3______________,HYP_LBK, MEH_RBK,______________SWORKMAN_R3______________,KC_RSFT, | ||
_____________________ERGODOX_BOTTOM_LEFT_______________, _____________________ERGODOX_BOTTOM_RIGHT______________, | ||
_____________ERGODOX_THUMBS____________ | ||
), | ||
[_NUMPAD] = LAYOUT_ergodox_pretty_wrapper( | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,_______, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_PSLS,XXXXXXX, | ||
XXXXXXX,XXXXXXX,XXXXXXX, KC_UP ,XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,KC_KP_7,KC_KP_8,KC_KP_9,KC_PAST,XXXXXXX, | ||
_______,XXXXXXX,SFT_T(KC_LEFT),GUI_T(KC_DOWN),ALT_T(KC_RGHT), XXXXXXX, XXXXXXX,KC_KP_4,KC_KP_5,KC_KP_6,KC_PPLS,XXXXXXX, | ||
KC_LSFT,KC_LCTL,XXXXXXX,XXXXXXX,JJ_COPY,JJ_PASTE,XXXXXXX, XXXXXXX,XXXXXXX,KC_KP_1,KC_KP_2,KC_KP_3,KC_PMNS,XXXXXXX, | ||
XXXXXXX,_______,XXXXXXX,KC_LALT,KC_LGUI, KC_KP_0,KC_PDOT,KC_COMM,KC_PEQL,XXXXXXX, | ||
_____________ERGODOX_THUMBS____________ | ||
), | ||
[_MOUSE] = LAYOUT_ergodox_pretty_wrapper( | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,_______, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R, XXXXXXX, XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,JJ_COPY,JJ_PASTE,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_D,XXXXXXX,XXXXXXX,XXXXXXX, | ||
_______,XXXXXXX,XXXXXXX,XXXXXXX,KC_BTN1, KC_BTN2,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
_____________ERGODOX_THUMBS____________ | ||
), | ||
[_TOOLS] = LAYOUT_ergodox_pretty_wrapper( | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_EPRM, KC_EPRM,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX,KC__MUTE,KC__VOLDOWN,KC__VOLUP,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,MC_LOCK, | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,KC_HWRK,KC_SWRK,_______, | ||
_____________ERGODOX_THUMBS____________ | ||
), | ||
[_DIABLOII] = LAYOUT_ergodox_pretty_wrapper( | ||
KC_R , KC_1 , KC_2 , KC_3 , KC_4 ,KC_GRV ,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
KC_TAB , KC_F5 , KC_F6 , KC_F7 , KC_F8 ,KC_HOME,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
KC_W , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_Q , XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
KC_LSFT,ALT_T(KC_C),KC_I,KC_T ,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
KC_ESC ,XXXXXXX, KC_M ,XXXXXXX,KC_SPACE, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX, | ||
XXXXXXX, XXXXXXX, | ||
KC_MS_L,KC_MS_R,TO(_HWRKMN), XXXXXXX,XXXXXXX,XXXXXXX | ||
), | ||
[_DIABLOIII] = LAYOUT_ergodox_pretty_wrapper( | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
KC_TAB , KC_J , KC_L , KC_Q ,XXXXXXX, KC_I ,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX, KC_1 , KC_2 , KC_3 , KC_4 , KC_S , XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
KC_LSFT, KC_Z , KC_G , KC_O , KC_Y , KC_F ,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, | ||
XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX, | ||
XXXXXXX, XXXXXXX, | ||
KC_MS_L,KC_MS_R,TO(_HWRKMN), XXXXXXX,XXXXXXX,XXXXXXX | ||
) | ||
}; | ||
|
||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should already be defined. It is fine to be redefined, but ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JacobJerrell was this needed here? |
||
/* Left hand, matrix positions */ | ||
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, | ||
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, | ||
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, | ||
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, | ||
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, | ||
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, | ||
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, | ||
/* Right hand, matrix positions */ | ||
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, | ||
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, | ||
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, | ||
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, | ||
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, | ||
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, | ||
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, | ||
}; | ||
|
||
void matrix_init_keymap(void) { // Runs boot tasks for keyboard | ||
}; | ||
|
||
// Defines actions for my custom keycodes | ||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
switch (keycode) { | ||
// KC_COPY and KC_PASTE have problems with different hardware/software mappings | ||
// e.g. If the mappings conflict, KC_COPY will send Cmd+M which minimizes the | ||
// window and is very annoying. JJ_COPY and JJ_PASTE fix this by sending the | ||
// raw character rather than the KC_* code | ||
case JJ_COPY: | ||
if (!record->event.pressed) { | ||
SEND_STRING(SS_LGUI("c")); | ||
} | ||
return false; | ||
break; | ||
case JJ_PASTE: | ||
if (!record->event.pressed) { | ||
SEND_STRING(SS_LGUI("v")); | ||
} | ||
return false; | ||
break; | ||
case JJ_ARRW: | ||
if (!record->event.pressed) { | ||
SEND_STRING(" -> "); | ||
} | ||
return false; | ||
break; | ||
case KC_SWRK: | ||
if (!record->event.pressed) { | ||
set_single_persistent_default_layer(_SWRKMN); | ||
layer_move(_SWRKMN); | ||
ergodox_blink_all_leds(); | ||
ergodox_blink_all_leds(); | ||
} | ||
return false; | ||
break; | ||
case KC_HWRK: | ||
if (!record->event.pressed) { | ||
set_single_persistent_default_layer(_HWRKMN); | ||
layer_move(_HWRKMN); | ||
ergodox_blink_all_leds(); | ||
ergodox_blink_all_leds(); | ||
} | ||
return false; | ||
break; | ||
case KC_EPRM: | ||
if (!record->event.pressed) { | ||
ergodox_blink_all_leds(); | ||
eeconfig_init(); | ||
} | ||
return false; | ||
break; | ||
case KC_VRSN: | ||
if (!record->event.pressed) { | ||
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); | ||
} | ||
return false; | ||
break; | ||
case MC_LOCK: | ||
if (!record->event.pressed) { | ||
layer_move(_HWRKMN); | ||
SEND_STRING(SS_LCTRL(SS_LGUI("q"))); | ||
} | ||
return false; | ||
break; | ||
} | ||
return true; | ||
} | ||
|
||
void matrix_scan_user(void) { | ||
uint8_t layer = biton32(layer_state); | ||
ergodox_board_led_off(); | ||
ergodox_right_led_1_off(); | ||
ergodox_right_led_2_off(); | ||
ergodox_right_led_3_off(); | ||
switch (layer) { | ||
case _NUMPAD: | ||
ergodox_right_led_3_on(); | ||
ergodox_right_led_3_set(10); | ||
break; | ||
case _MOUSE: | ||
ergodox_right_led_2_on(); | ||
ergodox_right_led_2_set(10); | ||
break; | ||
case _TOOLS: | ||
ergodox_right_led_2_on(); | ||
ergodox_right_led_2_set(10); | ||
ergodox_right_led_3_on(); | ||
ergodox_right_led_3_set(10); | ||
case _DIABLOII: | ||
ergodox_right_led_1_on(); | ||
ergodox_right_led_1_set(10); | ||
default: | ||
// none | ||
break; | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AUTO_SHIFT_ENABLE = no | ||
COMMAND_ENABLE = no | ||
SWAP_HANDS_ENABLE = yes | ||
TAP_DANCE_ENABLE = no | ||
EXTRAKEY_ENABLE = no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in
.git/info/exclude
, not here, as this file is global, and.git/info/exclude
is local only.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed secrets.h - Macros have all been removed. I missed this line during the cleanup. Thank you!