Browse Source

fixed one shot layer accessed via tap dance key and then rolling press of another tap dance key bug. also fixed del and bspc handling in capsword.

pull/17056/head
K 2 years ago
parent
commit
0ccfb8fad0
17 changed files with 855 additions and 28 deletions
  1. +0
    -1
      keyboards/kinesis/kint36/keymaps/kevkevco/config.h
  2. +9
    -6
      keyboards/kinesis/kint36/keymaps/kevkevco/features/caps_word.c
  3. +2
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/kevkevco.gitignore
  4. +36
    -14
      keyboards/kinesis/kint36/keymaps/kevkevco/keymap.c
  5. BIN
      keyboards/kinesis/kint36/keymaps/kevkevco/private/Keymaps Printout.pages
  6. +8
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/QMK Configuration Notes.webloc
  7. +0
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/applefnpatch/applefn.patch
  8. +0
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/applefnpatch/applefn_readme.md
  9. +505
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/archive.txt
  10. +80
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/cs50readme.md
  11. +76
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/swaphandsdrafts.txt
  12. +15
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/private/swaphandsfinal.txt
  13. +34
    -1
      keyboards/kinesis/kint36/keymaps/kevkevco/process_records.c
  14. +2
    -1
      keyboards/kinesis/kint36/keymaps/kevkevco/process_records.h
  15. +25
    -3
      keyboards/kinesis/kint36/keymaps/kevkevco/readme.md
  16. +59
    -2
      keyboards/kinesis/kint36/keymaps/kevkevco/tap_dances.c
  17. +4
    -0
      keyboards/kinesis/kint36/keymaps/kevkevco/tap_dances.h

+ 0
- 1
keyboards/kinesis/kint36/keymaps/kevkevco/config.h View File

@ -17,7 +17,6 @@
#define MK_KINETIC_SPEED // Mouse key cursor motion customization
// Redefine Product and Vendor IDs for Apple Fn Key patch to work
// Anything from this list should work: https://usb-ids.gowdy.us/read/UD/05ac
#undef VENDOR_ID
#define VENDOR_ID 0x05AC
#undef PRODUCT_ID


+ 9
- 6
keyboards/kinesis/kint36/keymaps/kevkevco/features/caps_word.c View File

@ -50,7 +50,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
}
if (!(mods & ~MOD_MASK_SHIFT)) {
uprintf("\nkeycode is %x", keycode);
dprintf("\nkeycode is %x", keycode);
// Custom section to tweak Caps Word behavior on select keys
switch (keycode) {
@ -65,7 +65,10 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
return true;
case GUI_T(KC_BSPC):
clear_mods();
dprintf("get mods is %x", get_mods());
tap_code(KC_LNUM); // Dummy keypress to get rid of lingering shift modifier
process_caps_word(KC_BSPC, record);
dprintf("after sending kc_bspc caps word . get mods is %x", get_mods());
return true;
case TD(LPINKY):
clear_mods();
@ -73,7 +76,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
return true;
case RGUI_T(KC_SPC):
clear_mods();
SEND_STRING(SS_DELAY(300));
// SEND_STRING(SS_DELAY(300));
if (IS_LAYER_ON(_SYMBOLS)) {
process_caps_word(KC_UNDS, record);
return true;
@ -91,14 +94,14 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: // Added by kevkevco to ignore tap dance keys
case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:
print("\nignore section?");
dprint("\nignore section?");
return true;
#ifndef NO_ACTION_TAPPING
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
print("\nmodtap section?");
dprint("\nmodtap section?");
if (record->tap.count == 0) {
print("\ncancelling modtap section?");
dprint("\ncancelling modtap section?");
// Deactivate if a mod becomes active through holding a mod-tap key.
caps_word_set(false);
return true;
@ -108,7 +111,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
# ifndef NO_ACTION_LAYER
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
print("\nlayer tap section?");
dprint("\nlayer tap section?");
# endif // NO_ACTION_LAYER
if (record->tap.count == 0) {


+ 2
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/kevkevco.gitignore View File

@ -0,0 +1,2 @@
# Files to not include in git
/private

+ 36
- 14
keyboards/kinesis/kint36/keymaps/kevkevco/keymap.c View File

@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY/Default Layer
,--------------------------------------------------------------. ,--------------------------------------------------------------.
|ESC^ST|SWAPHD| F2 |QWERTY|NUMSFT|FUNCTN|KEYPAD| NAV | VIM | | CLEAR|MACROP|MACROR|MACROS| Mute | VolDn| VolUp|Keypad|PROGRM|
|ESC^ST|SWAPHD|DEBUG |QWERTY|NUMSFT|FUNCTN|LKEYPD| NAV | VIM | | CLEAR|MACROP|MACROR|MACROS| Mute | VolDn| VolUp|RKEYPD|PROGRM|
`--------------------------------------------------------------' `--------------------------------------------------------------'
,------------------------------------------------------. ,------------------------------------------------------.
| ESC|`\~ | 1^! | 2^@ | 3^# | 4^$ | 5^% | | 6^^ | 7^& | 8^* | 9^( | 0^) | NAV |
@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------|
| :LSHFT | Z~ | X~ | C~ | V~ | B~ | | N~ | M | ,|< | .|> | SLSH* | :RSHFT |
`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------'
| LKEYPD | Fn | Left | Rght | | Down | Up | ???? | ???? |
| LKEYPD | Fn | Left | Rght | | Down | Up | ???? | Leader |
`-----------------------------------' `-----------------------------------'
,-----------------. ,-----------------.
|SELWORD |Ent/COG*| | . /??? | , /NAV |
@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
3: Toggle LKEYPAD
3h: End Running Program (CTL+C)
[RPINKY] 1: '
1h: One shot SYMBOLS layer
1h: One shot SYMBOLS layer, which also functions as active while holding
2: Toggle NUMSHIFT layer
2h: Caps Word
3: ______
@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------|
| |PastePal| Safari | Drive | Finder | Gmail | |Spotlght|MssnCtrl|Desktop |LaunchPd| | |
|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------|
| | Zoom | |Calendar| VSCode |Bitwardn| | Notion |Messages| | | | |
| | Zoom |QMKTlbox|Calendar| VSCode |Bitwardn| | Notion |Messages| | | | |
`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------'
| | | | | | | | | |
`-----------------------------------' `-----------------------------------'
@ -130,17 +130,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
`--------------------------' `--------------------------'
Notes:
* PastePal shortcut is configured in its own application
* Desktop, Quick Note, Launchpad (also in Karabiner), Mission Control shortcut is confifured in MacOS system preferences
* Desktop, Quick Note shortcuts are confifured in MacOS system preferences
*/
[_QWERTY] = LAYOUT_pretty(
ESC_STS, SH_TT, KC_LEAD, QWERTY, NUMSHFT, FUNCTN, L_KEYPD, NAV, VIM, CLEAR, DM_PLY1, DM_REC1, DM_RSTP, KC_MUTE, KC_VOLD, KC_VOLU, R_KEYPD, QMK,
ESC_STS, SH_TT, DB_TOGG, QWERTY, NUMSHFT, FUNCTN, L_KEYPD, NAV, VIM, CLEAR, DM_PLY1, DM_REC1, DM_RSTP, KC_MUTE, KC_VOLD, KC_VOLU, R_KEYPD, QMK,
T_GVES, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TG(_NAV),
MEH_TAB, Q_HOLD, W_HOLD, KC_E, R_HOLD, T_HOLD, Y_HOLD, KC_U, T_ISPT, KC_O, KC_P, BSP_HYP,
T_LPNKY, A_CTL, S_OPT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_OPT, T_COLON, T_RPNKY,
OS_LSFT, Z_HOLD, X_HOLD, C_HOLD, V_HOLD, B_HOLD, N_HOLD, KC_M, T_CMAG, T_PDAG, T_SLSH, OS_RSFT,
L_KEYPD, KC_APFN, KC_LEFT, KC_RIGHT, KC_DOWN, KC_UP, _______, _______,
L_KEYPD, KC_APFN, KC_LEFT, KC_RIGHT, KC_DOWN, KC_UP, _______, KC_LEAD,
SELWORD, ENT_CAG, KC_DOT, COM_NAV,
T_SPOT, T_WIND,
BSP_GUI, DEL_SFT, APP_NAV, OS_MEH, T_ENTR, SPC_GUI
@ -287,7 +287,7 @@ Navigation Layer
,--------+--------+--------| |--------+--------+--------.
| Mouse | Mouse | | | | Mouse | Mouse |
| Button | Button |--------| |--------| Button | Button |
| 1 | 2 | QWERTY | | QWERTY | 2 | 1 |
| 1 | 2 | | | | 2 | 1 |
`--------------------------' `--------------------------'
Note:
* QWERTY deactivates the layer and returns to the main layout
@ -302,7 +302,7 @@ Navigation Layer
KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
_______, _______, _______, _______,
_______, _______,
KC_BTN1, KC_BTN2, QWERTY, QWERTY, KC_BTN2, KC_BTN1
KC_BTN1, KC_BTN2, _______, _______, KC_BTN2, KC_BTN1
),
/* Keypad Layer
@ -553,7 +553,7 @@ void led_wave(bool state) {
// Callback functions that get called every time the layer changes
layer_state_t layer_state_set_user(layer_state_t state) {
if (!isRecording) { // Let Macro LED settings override standard ones
dprintf("\ncallback func symbols layer is %x", IS_LAYER_ON(_SYMBOLS));
// When _SYMBOLS Layer is activated, LED wave is activated
if (IS_LAYER_ON_STATE(state, _SYMBOLS)) {
led_wave(true);
@ -599,11 +599,22 @@ void matrix_scan_user(void) {
}
}
if (oneshot_symbols_timer_state) {
if (timer_elapsed(oneshot_symbols_timer) > 500) {
dprintf("\n passed 500 threshold timer and oneshot_symbols_timer is -%x", oneshot_symbols_timer);
oneshot_symbols_timer_state = false;
dprintf("\n turned false oneshot_symbols_layer_state is %x", oneshot_symbols_timer_state);
}
}
// CMD_TAB Timer Timed Out
if (is_cmd_tab_active) {
if (timer_elapsed(cmd_tab_timer) > 800) {
unregister_code(KC_LGUI);
is_cmd_tab_active = false;
dprint("turning nav off");
layer_off(_NAV);
}
}
@ -718,7 +729,7 @@ bool caps_word_press_user(uint16_t keycode) {
// Keycodes that continue Caps Word, with shift applied.
case KC_A ... KC_Z:
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key.
print("\nkeycodes that continue CW WITH shifting");
dprint("\nkeycodes that continue CW WITH shifting");
return true;
// Keycodes that continue Caps Word, without shifting.
@ -727,17 +738,28 @@ bool caps_word_press_user(uint16_t keycode) {
case KC_1 ... KC_0:
case KC_BSPC:
case KC_MINS:
print("\nkeycodes that continue CW without shifting");
case KC_DEL:
dprint("\nkeycodes that continue CW without shifting");
return true;
case KC_UNDS:
print("\nunds");
dprint("\nunds");
return true;
// case ESC_STS:
// case KC_ESC:
default:
print("\nkeycodes that end CW");
dprint("\nkeycodes that end CW");
return false; // Deactivate Caps Word.
}
}
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
// debug_enable=true;
// debug_matrix=true;
debug_enable=false;
debug_matrix=false;
//debug_keyboard=true;
//debug_mouse=true;
}

BIN
keyboards/kinesis/kint36/keymaps/kevkevco/private/Keymaps Printout.pages View File


+ 8
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/private/QMK Configuration Notes.webloc View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://docs.google.com/document/d/19xYxJ5cNEKwVJEt1SFG3B6Vxt-h8dGFaduCqtf5QG9Q/edit</string>
</dict>
</plist>

keyboards/kinesis/kint36/keymaps/kevkevco/applefnpatch/applefn.patch → keyboards/kinesis/kint36/keymaps/kevkevco/private/applefnpatch/applefn.patch View File


keyboards/kinesis/kint36/keymaps/kevkevco/applefnpatch/applefn_readme.md → keyboards/kinesis/kint36/keymaps/kevkevco/private/applefnpatch/applefn_readme.md View File


+ 505
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/private/archive.txt View File

@ -0,0 +1,505 @@
// Inactive Aliases
// #define NUMPAD TG(_NUMPAD)
// #define ADJUST MO(_ADJUST2)
// #define SPCFN LT(_FUNCTION, KC_SPC)
// #define BSPCFN LT(_FUNCTION2, KC_BSPC)
// #define ENTNS LT(_NUMBERS, KC_ENT)
// #define DELNS LT(_NUMBERS2, KC_DEL)
// #define CTLESC CTL_T(KC_ESC)
// #define ALTAPP ALT_T(KC_APP)
// #define CTL_A LCTL(KC_A)
// #define CTL_C LCTL(KC_C)
// #define CTL_V LCTL(KC_V)
// #define CTL_X LCTL(KC_X)
// #define CTL_Z LCTL(KC_Z)
// #define CTL_Y LCTL(KC_Y)
// #define CA_TAB LCA(KC_TAB)
// #define HYPER ALL_T(KC_NO)
// #define TD_ADJ TD(ADJ)
// #define TD_LBCB TD(LBCB)
// #define TD_RBCB TD(RBCB)
// #define TD_EQPL TD(EQPL)
// #define TD_PLEQ TD(PLEQ)
// #define TD_MNUN TD(MNUN)
// #define TD_SLAS TD(SLAS)
// #define TD_GVTL TD(GVTL)
// #define TD_PPEQ TD(PPEQ)
// #define TD_PMUN TD(PMUN)
// #define TD_PSPA TD(PSPA)
// #define NKROTG MAGIC_TOGGLE_NKRO
# Swap Hands
// Swapping Hands Matrix starting on line numbers that end in 0 for quick counting
/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */
#define LAYOUT_pretty( \
kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \
k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \
k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \
k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \
k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \
k14, k24, k34, k54, k64, k84, k94, kA4, \
k56, k55, k96, k85, \
k35, k86, \
k36, k46, k25, k66, k75, k65 \
) { \
{ k00, k01, k02, k03, ___, ___, ___ }, \
{ k10, k11, k12, k13, k14, ___, ___ }, \
{ k20, k21, k22, k23, k24, k25, ___ }, \
{ k30, k31, k32, k33, k34, k35, k36 }, \
{ k40, k41, k42, k43, ___, ___, k46 }, \
{ k50, k51, k52, k53, k54, k55, k56 }, \
{ k60, k61, k62, k63, k64, k65, k66 }, \
{ k70, k71, k72, k73, ___, k75, ___ }, \
{ k80, k81, k82, k83, k84, k85, k86 }, \
{ k90, k91, k92, k93, k94, ___, k96 }, \
{ kA0, kA1, kA2, kA3, kA4, ___, ___ }, \
{ kB0, kB1, kB2, kB3, ___, ___, ___ }, \
{ kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \
{ kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \
{ kE0, kE1, kE2, kE3, kE4, kE5, ___ } \
}
[_QWERTY] = LAYOUT_pretty(
ESC_STS, SH_TT, KC_LEAD, TO(_QWERTY), TG(_NUMSHIFT),TG(_FUNCTION),TG(_KEYPAD),TG(_NAV), TG(_VIM), CLEAR, DM_PLY1, DM_REC1, DM_RSTP,KC_MUTE,KC_VOLD,KC_VOLU,TG(_KEYPAD), QMK,
TD(GVES), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TG(_NAV),
MEH_T(KC_TAB), LT(0,KC_Q), LT(0,KC_W), KC_E, KC_R, LT(0,KC_T), KC_Y, KC_U, TD(ISPT),KC_O, KC_P, HYPR_T(KC_BSPC),
TD(LPINKY),LCTL_T(KC_A),LOPT_T(KC_S),LGUI_T(KC_D),LSFT_T(KC_F),KC_G, KC_H,RSFT_T(KC_J),RGUI_T(KC_K),ROPT_T(KC_L),TD(COLON),TD(RPINKY),
OSM(MOD_LSFT),LT(0,KC_Z),LT(0,KC_X),LT(0,KC_C),LT(0,KC_V),KC_B, KC_N, KC_M, TD(CMAG),TD(PDAG),TD(SLSH), OSM(MOD_RSFT),
TG(_LKEYPAD),KC_APFN, KC_LEFT, KC_RIGHT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
SELWORD, LCAG_T(KC_ENT), _______, LT(_NAV, S(KC_COMM)),
TD(SPOT), TD(WIND),
LGUI_T(KC_BSPC), SFT_T(KC_DEL), APP_NAV, OSM(MOD_MEH), TD(ENTR), RGUI_T(KC_SPC)
tuesdayjohn favorite
https://github.com/qmk/qmk_firmware/tree/master/users/ericgebhart very detailed and involved...contains caps_word code
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
[TD_TAB_BKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LSFT(KC_TAB)),
[TD_RIGHT_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_RIGHT, KC_TAB),
[TD_LEFT_BACKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, LSFT(KC_TAB)),
[TD_UP_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_HOME),
[TD_DOWN_END] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_END)
[TD_HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END),
// Caps Word, activated by pressing both shift keys at the same time.
//
// This library implements "Caps Word", which is like conventional Caps Lock,
// but automatically disables itself at the end of the word. This is useful for
// typing all-caps identifiers like `MOD_MASK_ALT`.
//
// Caps Word is activated by pressing the left and right shift keys at the same
// time. This way you don't need a dedicated key for using Caps Word. I've
// tested that this works as expected with one-shot mods and Space Cadet Shift.
// If your shift keys are mod-taps, activate Caps Word by holding both shift
// mod-tap keys until the tapping term, release them, then begin typing.
//
// For full documentation, see
// https://getreuer.info/posts/keyboards/caps-word
# Cap Words https://github.com/qmk/qmk_firmware/blob/c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf/users/drashna/keyrecords/capwords.md
This is taken from [Pascal Getreuer's implemenation](https://getreuer.info/posts/keyboards/caps-word/index.html), with a number of modifications.
To enable Caps Word, add `CAPS_WORD_ENABLE = yes` to your `rules.mk`.
/* _SYMB2ol level, more ergodox like
*
* ,-------------------------------------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------|
* | | | * | # | | | | | | | | | |
* |--------+------+------+------+------+------| +------+------+------+------+------+--------|
* | | / | < | > | | | | | | + | * | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | { | } | | | | | | = | - | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | = | ( | ) | | | | | | | | | | |
* `--------+------+------+------+------+------- `------+------+------+------+------+--------'
* | | |GUI/L |L1/RT | | L1/UP|GUI/DN| { | } |
* `---------------------------' `---------------------------'
* ,-------------. ,-------------.
* | CTRL | | | ALT | GUI |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | BkSp | Del |------| |------|Mouse1|Mouse2|
* | | |Reset | | |LClick|Rclick|
* `--------------------' `--------------------'
*/
[_SYMB2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_ASTR, KC_HASH, _______, _______,
_______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______,
_______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______,
_______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______,
_______, _______, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT),
_______, _______,
_______,
_______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2,
_______, _______, _______, KC_ASTR, _______, _______,
_______, _______, KC_PLUS, KC_MINS, _______, _______,
_______, _______, KC_EQL, KC_PIPE, _______, _______,
_______, _______, _______, _______, _______, _______,
LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), _______, _______,
_______, _______,
_______,
_______, _______, _______
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | K/ | K* | K- | = |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | ( | ) | | | | | | | K7 | K8 | K9 | K+ | # |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | { | } | ` |------| |------| | K4 | K5 | K6 | K+ | ' |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | | K1 | K2 | K3 | K= | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | K0 | K0 | K. | K= | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | L2 | | L2 | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// PROGRAMMING
[PROG] = LAYOUT_ergodox(
// left hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
TO(NAVI),
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_EQUAL,
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NUHS,
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_QUOT,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS,
KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_TRNS,
KC_TRNS, KC_TRNS,
TO(NAVI),
KC_TRNS, KC_TRNS, KC_TRNS
),
/*
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{11, 0}, {11, 1}, {11, 2}, {11, 3}, ___, ___, ___ }, \
{{10, 0}, {10, 1}, {10, 2}, {10, 3}, {10, 4}, ___, ___ }, \
{{9, 0}, {9, 1}, {9, 2}, {9, 3}, {9, 4}, {6, 6}, ___ }, \
{{8, 0}, {8, 1}, {8, 2}, {8, 3}, {8, 4}, {8, 6}, {6, 5} }, \
{{7, 0}, {7, 1}, {7, 2}, {7, 3}, ___, ___, {7, 5} }, \
{{6, 0}, {6, 1}, {6, 2}, {6, 3}, {5, 4}, {9, 6}, {8, 5} }, \
{{5, 0}, {5, 1}, {5, 2}, {5, 3}, {5, 4}, {3, 6}, {2, 5} }, \
{{4, 0}, {4, 1}, {4, 2}, {4, 3}, ___, {4, 6}, ___ }, \
{{3, 0}, {3, 1}, {3, 2}, {3, 3}, {3, 4}, {5, 6}, {3, 5} }, \
{{2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, ___, {5, 5} }, \
{{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, ___, ___ }, \
{{0, 0}, {0, 1}, {0, 2}, {0, 3}, ___, ___, ___ }, \
{{12, 0}, {12, 1}, {12, 2}, {12, 3}, {12, 4}, {12, 5}, ___ }, \
{{13, 0}, {13, 1}, {13, 2}, {13, 3}, {13, 4}, {13, 5}, ___ }, \
{{14, 0}, {14, 1}, {14, 2}, {14, 3}, {14, 4}, {14, 5}, ___ } \
};
*/
// Default mapping of keys
/*
{ \
{ {0,0}, {0,1}, {0,2}, {0,3}, }, \
{ {1,0}, {1,1}, {1,2}, {1,3}, {1,4}, }, \
{ {2,0}, {2,1}, {2,2}, {2,3}, {2,4}, {2,5}, }, \
{ {3,0}, {3,1}, {3,2}, {3,3}, {3,4}, {3,5}, {3,6} }, \
{ {4,0}, {4,1}, {4,2}, {4,3}, {4,6} }, \
{ {5,0}, {5,1}, {5,2}, {5,3}, {5,4}, {5,5}, {5,6} }, \
{ {6,0}, {6,1}, {6,2}, {6,3}, {6,4}, {6,5}, {6,6} }, \
{ {7,0}, {7,1}, {7,2}, {7,3}, {7,5}, }, \
{ {8,0}, {8,1}, {8,2}, {8,3}, {8,4}, {8,5}, {8,6} }, \
{ {9,0}, {9,1}, {9,2}, {9,3}, {9,4}, {9,6} }, \
{ {10,0}, {10,1}, {10,2}, {10,3}, {10,4}, }, \
{ {11,0}, {11,1}, {11,2}, {11,3}, }, \
{ {12,0}, {12,1}, {12,2}, {12,3}, {12,4}, {12,5}, }, \
{ {13,0}, {13,1}, {13,2}, {13,3}, {13,4}, {13,5}, }, \
{ {14,0}, {14,1}, {14,2}, {14,3}, {14,4}, {14,5}, } \
};
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] =
{
{{11, 0}, {11, 1}, {11, 2}, {11, 3}}, \
{{10, 0}, {10, 1}, {10, 2}, {10, 3}, {10, 4}}, \
{{9, 0}, {9, 1}, {9, 2}, {9, 3}, {9, 4}, {6, 6}}, \
{{8, 0}, {8, 1}, {8, 2}, {8, 3}, {8, 4}, {8, 6}, {6, 5}}, \
{{7, 0}, {7, 1}, {7, 2}, {7, 3}, {7, 5}}, \
{{6, 0}, {6, 1}, {6, 2}, {6, 3}, {5, 4}, {9, 6}, {8, 5}}, \
{{5, 0}, {5, 1}, {5, 2}, {5, 3}, {5, 4}, {3, 6}, {2, 5}}, \
{{4, 0}, {4, 1}, {4, 2}, {4, 3}, {4, 6}}, \
{{3, 0}, {3, 1}, {3, 2}, {3, 3}, {3, 4}, {5, 6}, {3, 5}}, \
{{2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {5, 5}}, \
{{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}}, \
{{0, 0}, {0, 1}, {0, 2}, {0, 3}}, \
{{12, 0}, {12, 1}, {12, 2}, {12, 3}, {12, 4}, {12, 5}}, \
{{13, 0}, {13, 1}, {13, 2}, {13, 3}, {13, 4}, {13, 5}}, \
{{14, 0}, {14, 1}, {14, 2}, {14, 3}, {14, 4}, {14, 5}} \
{ {0,0}, {1,0}, {2,0}, {3,0}, }, \(
{ {0,1}, {1,1}, {2,1}, {3,1}, {4,1}, }, \
{ {0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, }, \
{ {0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3} }, \
{ {0,4}, {1,4}, {2,4}, {3,4}, {6,4} }, \
{ {0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5} }, \
{ {0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}, {6,6} }, \
{ {0,7}, {1,7}, {2,7}, {3,7}, {5,7}, }, \
{ {0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}, {6,8} }, \
{ {0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {6,9} }, \
{ {0,10}, {1,10}, {2,10}, {3,10}, {4,10}, }, \
{ {0,11}, {1,11}, {2,11}, {3,11}, }, \
{ {0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}, }, \
{ {0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}, }, \
{ {0,14}, {1,14}, {2,14}, {3,14}, {4,14}, {5,14}, } \)
};
*/
/*
{
{{((11)), 0}, {(11), 1}, {(11), 2}, {(11), 3}}, \
{{(10), 0}, {(10), 1}, {(10), 2}, {(10), 3}, {(10), 4}}, \
{{9, 0}, {9, 1}, {9, 2}, {9, 3}, {9, 4}, {6, 6}}, \
{{8, 0}, {8, 1}, {8, 2}, {8, 3}, {8, 4}, {8, 6}, {6, 5}}, \
{{7, 0}, {7, 1}, {7, 2}, {7, 3}, {7, 5}}, \
{{6, 0}, {6, 1}, {6, 2}, {6, 3}, {5, 4}, {9, 6}, {8, 5}}, \
{{5, 0}, {5, 1}, {5, 2}, {5, 3}, {5, 4}, {3, 6}, {2, 5}}, \
{{4, 0}, {4, 1}, {4, 2}, {4, 3}, {4, 6}}, \
{{3, 0}, {3, 1}, {3, 2}, {3, 3}, {3, 4}, {5, 6}, {3, 5}}, \
{{2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {5, 5}}, \
{{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}}, \
{{0, 0}, {0, 1}, {0, 2}, {0, 3}}, \
{{(12), 0}, {(12), 1}, {(12), 2}, {(12), 3}, {(12), 4}, {(12), 5}}, \
{{(13), 0}, {(13), 1}, {(13), 2}, {(13), 3}, {(13), 4}, {(13), 5}}, \
{{(14), 0}, {(14), 1}, {(14), 2}, {(14), 3}, {(14), 4}, {(14), 5}} \
};
*/
/* Old version didn't feel as ergonomic for braces
,--------------------------------------------------------------. ,--------------------------------------------------------------.
| | | | | | | | | | | | | | | | | | | |
`--------------------------------------------------------------' `--------------------------------------------------------------'
,------------------------------------------------------. ,------------------------------------------------------.
| | | | | | | | | | | | | |
|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------|
| | | | { | } | | | | | | | | |
|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------|
| | | | ( | ) | | | | : | ; | # | | |
|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------|
| | | | [ | ] | | | | | | | | \ | |
`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------'
| | | | | | | | | |
`-----------------------------------' `-----------------------------------'
,-----------------. ,-----------------.
| + | | | | ` |
,--------+--------+--------| |--------+--------+--------.
| | | * | | | | |
| - | = |--------| |--------| " | _ |
| | | / | | | | |
`--------------------------' `--------------------------'
[_SYMBOLS] = LAYOUT_pretty(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, KC_COLN, KC_SCLN, KC_HASH, _______, _______,
_______, _______, _______, KC_LBRC, KC_RBRC, KC_PIPE, _______, _______, _______, _______, KC_BSLS, _______,
_______, _______, _______, _______, _______, _______, _______, _______,
KC_PLUS, _______, _______, KC_GRV,
KC_ASTR, _______,
KC_MINS, KC_EQL, KC_SLSH, _______, KC_DQUO, KC_UNDS
),
*/
// Space Tap Dance
// Create an instance of 'td_tap_t' for the 'space' tap dance.
// static td_tap_t space_td_state = {
// .is_press_action = true,
// .state = TD_NONE
// };
// void space_td_finished (qk_tap_dance_state_t *state, void *user_data) {
// // qk_tap_dance_full_t *keycodes = (qk_tap_dance_full_t *)user_data;
// space_td_state.state = cur_dance(state);
// switch (space_td_state.state) {
// case SINGLE_TAP: tap_code(KC_SPC); break; // Space
// case SINGLE_HOLD:
// dprintf("adding gui mods key down");
// add_mods(MOD_MASK_GUI);
// break; // Hold for Gui
// // case DOUBLE_TAP: register_code16(G(KC_GRV)); break; // Switch between open spaces of the same application
// case DOUBLE_HOLD: add_mods(MOD_BIT(KC_RSFT)); break; //
// // case TRIPLE_TAP: add_oneshot_mods(MOD_MASK_SA); layer_on(_NAV); set_oneshot_layer(_NAV, ONESHOT_START); break; //
// // case TRIPLE_HOLD: register_code16(G(KC_H)); break; //
// default: break;
// }
// }
// void space_td_reset (qk_tap_dance_state_t *state, void *user_data) {
// // qk_tap_dance_full_t *keycodes = (qk_tap_dance_full_t *)user_data;
// switch (space_td_state.state) {
// // case SINGLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); break;
// case SINGLE_HOLD: dprintf("deleting mods key up"); del_mods(MOD_MASK_GUI); break;
// // case DOUBLE_TAP: unregister_code16(G(KC_GRV)); break;
// case DOUBLE_HOLD: del_mods(MOD_BIT(KC_RSFT)); break;
// // case TRIPLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); break;
// // case TRIPLE_HOLD: unregister_code16(G(KC_H)); break;
// default: break;
// }
// space_td_state.state = 0;
// }
// [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap
// [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap
// [PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Equal sign on a single-tap, plus sign on a double-tap
// [UNMN] = ACTION_TAP_DANCE_DOUBLE(KC_UNDS, KC_MINS), // Underscore sign on a single-tap, minus on a double-tap
// [SMCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLN), // Semicolon on a single-tap, colon on a double-tap
// [APQU] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQUO), // Single quote on a single-tap, double quote on a double-tap
// [SLQU] = ACTION_TAP_DANCE_FN(triple_tap_dance_slash), // Slash on a single-tap, two slashes on a double-tap, question mark on a triple tap
// [NVUD] = FULL_TAP_DANCE(KC_UNDS, 3, 3, KC_CAPS, 4, C(KC_C)),
// case TG(_FUNCTION):
// if (record->event.pressed) {
// if (flash_array[3][1] == 1) {
// led_flash(3, false);
// } else {
// led_flash(3, true);
// }
// }
// return true;
// case CAPWORD: // Caps Word
// if (record->event.pressed) {
// caps_word_set(true);
// break;
// }
// case RGUI_T(KC_SPC):
// if (record->tap.count == 2) {
// if (record->event.pressed) {
// add_mods(MOD_BIT(KC_RSFT));
// return false;
// }
// else {
// del_mods(KC_RSFT);
// return false;
// }
// }
// return true;
[SPACE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, space_td_finished, space_td_reset),
// Structure to define input into full tap dance
typedef struct {
uint16_t kc1;
uint16_t kc2;
uint16_t kc3;
uint16_t kc4;
uint16_t kc5;
uint16_t kc6;
} qk_tap_dance_full_t;
/*
Functions associated with specific advanced tap dances
void full_td_finished(qk_tap_dance_state_t *state, void *user_data);
void full_td_reset(qk_tap_dance_state_t *state, void *user_data);
#define FULL_TAP_DANCE(kc1, kc2, kc3, kc4, kc5, kc6) \
{ .fn = {NULL, full_td_finished, full_td_reset}, .user_data = (void *)&((qk_tap_dance_full_t){kc1, kc2, kc3, kc4, kc5, kc6}), }
*/
// void window_td_finished(qk_tap_dance_state_t *state, void *user_data);
// void window_td_reset(qk_tap_dance_state_t *state, void *user_data);
// void lpinky_td_finished(qk_tap_dance_state_t *state, void *user_data);
// void lpinky_td_reset(qk_tap_dance_state_t *state, void *user_data);
// void rpinky_td_finished(qk_tap_dance_state_t *state, void *user_data);
// void rpinky_td_reset(qk_tap_dance_state_t *state, void *user_data);
// void slsh_td_finished(qk_tap_dance_state_t *state, void *user_data);
// void slsh_td_reset(qk_tap_dance_state_t *state, void *user_data);
// Input Variables Tap Dance
// Create an instance of 'td_tap_t' for the 'full' tap dance.
// [NVUD] = FULL_TAP_DANCE(KC_UNDS, 3, 3, KC_CAPS, 4, C(KC_C)),
// static td_tap_t full_td_state = {
// .is_press_action = true,
// .state = TD_NONE
// };
// void full_td_finished (qk_tap_dance_state_t *state, void *user_data) {
// qk_tap_dance_full_t *keycodes = (qk_tap_dance_full_t *)user_data;
// full_td_state.state = hold_cur_dance(state);
// switch (full_td_state.state) {
// case SINGLE_TAP: register_code16(keycodes->kc1); break;
// case SINGLE_HOLD: layer_on(keycodes->kc2); break;
// case DOUBLE_TAP: layer_invert(keycodes->kc3); break;
// case DOUBLE_HOLD: register_code16(keycodes->kc4); break;
// case TRIPLE_TAP: layer_invert(keycodes->kc5); break;
// case TRIPLE_HOLD: register_code16(keycodes->kc6); break;
// default: break;
// }
// }
// void full_td_reset (qk_tap_dance_state_t *state, void *user_data) {
// qk_tap_dance_full_t *keycodes = (qk_tap_dance_full_t *)user_data;
// switch (full_td_state.state) {
// case SINGLE_TAP: unregister_code16(keycodes->kc1); break;
// case SINGLE_HOLD: layer_off(keycodes->kc2); break;
// // case DOUBLE_TAP: unregister_code16(keycodes->kc3); break;
// case DOUBLE_HOLD: unregister_code16(keycodes->kc4); break;
// // case TRIPLE_TAP: unregister_code16(keycodes->kc5); break;
// case TRIPLE_HOLD: unregister_code16(keycodes->kc6); break;
// default: break;
// }
// full_td_state.state = 0;
// }

+ 80
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/private/cs50readme.md View File

@ -0,0 +1,80 @@
# kevkevco's Kinesis Advantage2 QMK Configuration
## Video Demo: https://youtu.be/s9EsregvOKw
Tested with a Kinesis Advantage2, kinT (stapelberg) keyboard controller built
with a Teensy 3.6 microcontroller and a USA system layout.
# Approach
This keymap is created to address my tendonitis/tennis elbow symptoms as well as enhance the ease and convenience of coding and generally using my MacBook. As such, I want to provide a bit of the setup that I've created for myself beyond my QMK keymap that has helped. Feel free to reach out to me for more details.
# My Setup
## Keyboard:
- Working with upgradekeyboards.com, they changed the switches in my board to Kailh box white switches for ease of use and clear clicky feedback.
- They also installed a new KinT PCB with a Teensy 3.6 controller
- They also added about a pound of weight to the board to make it stay put on the desk, feel more substantial and stable, and perhaps improve the acoustics.
## Keycaps
I shuffled several of the keycaps around to my ergonomic preferences. I used a blank keycap set purchased from Kinesis in order to have the extra keycaps necessary for this.
## Furniture:
- Standing desk by Uplift (as recommended by Wirecutter)
- Keyboard tray by Humanscale
- Humanscale Leap v2 Chair
## Technology:
- Kensington Slimblade
- Kensington Expert
- Evoluent Right Handed V4MDLW wireless large vertical mouse
- Evoluent Left Handed wired vertical mouse
- Monitors that can adjust to the right positioning
- Logitech G915TKL Wireless Clicky Keyboard for variation
## BT500
Sometimes it is more convenient for me to use my keyboard wirelessly, for example in my lap. For that purpose I used industrial strength velcro to temporarily attach a slim portable battery ~10,000mAh to the back of the keyboard. Mostly for aesthetics I had the native USB cord replaced with a shorter cord (that avoids having extra slack) that plugs into the BT500 which then plugs into the portable battery. There is a few inches of give and take in the cord to slide through the hole in the back of the board that was plugged using a rubber piece that upgradekeyboards.com found.
Note: The Apple Fn key doesn't seem to work using BT500 Bluetooth adapter.
## Other Ergonomic Considerations
- Hand exercises/strengthening seem positive
- Elbow compression sleeve seems to help
# Software
## Steermouse
[Great MacOS software to customize the use of most mouses](http://plentycom.jp/en/steermouse/). You can import and export default profiles. I use this to swap the trackballs I use between my left and right hand but reflect the button assignments
## Karabiner
- I use this to launch applications using my keyboard
- [I've provided my complex modification file as a template](karabiner_example.json)
## Teensy Loader
[This application](https://www.pjrc.com/teensy/loader.html) is what I use to flash my keyboard.
# Features
## Apple Fn Patch
KC_APFN is created through the following Apple Fn patch: https://gist.github.com/fauxpark/010dcf5d6377c3a71ac98ce37414c6c4
Please see the link and comment thread for installation instrucitons.
## Home Row Mods
Are inspired by [this article.](https://precondition.github.io/home-row-mods)
## SELECT WORD
Enable Select Word Macro from https://getreuer.info/posts/keyboards/select-word/index.html
## CAPSWORD and NUMWORD
**credit:** [replicaJunction](https://github.com/qmk/qmk_firmware/tree/906108fb486797ab2f3eb7c3a6f70e099c1199e6/users/replicaJunction#capsword-and-numword and Drashna
The concept here is simple: more often than you'd think, you need to type a single word in ALL CAPS. An easy example for me, as a programmer, is a constant value; in most programming languages, constants are typed in all caps by convention.
You typically have a few choices, but each one comes with a drawback. Here are the options I'm aware of:
* Use proper typing technique and alternate which hand holds Shift for each keypress
* This can often end up requiring you to switch / re-press Shift again and again, making this a tedious process
* Hold a single Shift key down
* This can lead to uncomfortable finger gymnastics
* Hit the Caps Lock key, then hit it again when you're done
* Requires you to remember to hit it again, meaning a higher cognitive load
* In some layouts for smaller keyboards, Caps Lock is not easily accessible (sometimes not mapped at all)
The solution to this problem is CAPSWORD. When enabled, it activates Caps Lock and begins running an additional callback on each keypress. If the keypress is an alphanumeric key or one of a specific few symbols (such as the underscore), nothing happens. Otherwise, before processing the keypress, Caps Lock is disabled again.
NUMWORD is a similar concept, but has a slightly more elaborate implementation. There's a bit of extra logic in the NUMWORD code that allows the keycode to act as a tap/hold key as well. Tapping enables NUMWORD while number keys are in use, while holding the key enables a number layer for the duration of the key hold and disables it again afterwards.
**Note:** The implementation of NUMWORD requires that the keyboard's layer definitions be accessible in a header file.
# Misc. Configuration Notes
## Repeating Hold Function
In order to get fast repeating hold function, as if holding down a key on a normal keyboard, on space, enter, delete, forward delete in default layout. Tap and release within tapping term and then immediately trigger same key with a hold right after. This works because I have opted not to use: https://docs.qmk.fm/#/tap_hold?id=tapping-force-hold
## Custom MacOS App Shortcuts
https://support.apple.com/guide/mac-help/create-keyboard-shortcuts-for-apps-mchlp2271/mac
I created two specifically for QMK: Program and Reboot in the Teensy program for quick flashing.

+ 76
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/private/swaphandsdrafts.txt View File

@ -0,0 +1,76 @@
{ \
{ {0,0}, {0,1}, {0,2}, {0,3}, }, \
{ {1,0}, {1,1}, {1,2}, {1,3}, {1,4}, }, \
{ {2,0}, {2,1}, {2,2}, {2,3}, {2,4}, {2,5}, }, \
{ {3,0}, {3,1}, {3,2}, {3,3}, {3,4}, {3,5}, {3,6} }, \
{ {4,0}, {4,1}, {4,2}, {4,3}, {4,6} }, \
{ {5,0}, {5,1}, {5,2}, {5,3}, {5,4}, {5,5}, {5,6} }, \
{ {6,0}, {6,1}, {6,2}, {6,3}, {6,4}, {6,5}, {6,6} }, \
{ {7,0}, {7,1}, {7,2}, {7,3}, {7,5}, }, \
{ {8,0}, {8,1}, {8,2}, {8,3}, {8,4}, {8,5}, {8,6} }, \
{ {9,0}, {9,1}, {9,2}, {9,3}, {9,4}, {9,6} }, \
{ {A,0}, {A,1}, {A,2}, {A,3}, {A,4}, }, \
{ {B,0}, {B,1}, {B,2}, {B,3}, }, \
{ {C,0}, {C,1}, {C,2}, {C,3}, {C,4}, {C,5}, }, \
{ {D,0}, {D,1}, {D,2}, {D,3}, {D,4}, {D,5}, }, \
{ {E,0}, {E,1}, {E,2}, {E,3}, {E,4}, {E,5}, } \
}
{ \
{ {0,0}, {0,1}, {0,2}, {0,3}, }, \
{ {1,0}, {1,1}, {1,2}, {1,3}, {1,4}, }, \
{ {2,0}, {2,1}, {2,2}, {2,3}, {2,4}, {2,5}, }, \
{ {3,0}, {3,1}, {3,2}, {3,3}, {3,4}, {3,5}, {3,6} }, \
{ {4,0}, {4,1}, {4,2}, {4,3}, {4,6} }, \
{ {5,0}, {5,1}, {5,2}, {5,3}, {5,4}, {5,5}, {5,6} }, \
{ {6,0}, {6,1}, {6,2}, {6,3}, {6,4}, {6,5}, {6,6} }, \
{ {7,0}, {7,1}, {7,2}, {7,3}, {7,5}, }, \
{ {8,0}, {8,1}, {8,2}, {8,3}, {8,4}, {8,5}, {8,6} }, \
{ {9,0}, {9,1}, {9,2}, {9,3}, {9,4}, {9,6} }, \
{ {10,0}, {10,1}, {10,2}, {10,3}, {10,4}, }, \
{ {11,0}, {11,1}, {11,2}, {11,3}, }, \
{ {12,0}, {12,1}, {12,2}, {12,3}, {12,4}, {12,5}, }, \
{ {13,0}, {13,1}, {13,2}, {13,3}, {13,4}, {13,5}, }, \
{ {14,0}, {14,1}, {14,2}, {14,3}, {14,4}, {14,5}, } \
}
{ \
{ {0,0}, {0,1}, {0,2}, {0,3}, }, \
{ {1,0}, {1,1}, {1,2}, {1,3}, {1,4}, }, \
{ {2,0}, {2,1}, {2,2}, {2,3}, {2,4}, {2,5}, }, \
{ {3,0}, {3,1}, {3,2}, {3,3}, {3,4}, {3,5}, {3,6} }, \
{ {4,0}, {4,1}, {4,2}, {4,3}, {4,6} }, \
{ {5,0}, {5,1}, {5,2}, {5,3}, {5,4}, {5,5}, {5,6} }, \
{ {6,0}, {6,1}, {6,2}, {6,3}, {6,4}, {6,5}, {6,6} }, \
{ {7,0}, {7,1}, {7,2}, {7,3}, {7,5}, }, \
{ {8,0}, {8,1}, {8,2}, {8,3}, {8,4}, {8,5}, {8,6} }, \
{ {9,0}, {9,1}, {9,2}, {9,3}, {9,4}, {9,6} }, \
{ {10,0}, {10,1}, {10,2}, {10,3}, {10,4}, }, \
{ {11,0}, {11,1}, {11,2}, {11,3}, }, \
{ {12,0}, {12,1}, {12,2}, {12,3}, {12,4}, {12,5}, }, \
{ {13,0}, {13,1}, {13,2}, {13,3}, {13,4}, {13,5}, }, \
{ {14,0}, {14,1}, {14,2}, {14,3}, {14,4}, {14,5}, } \
}
{ \
{ {0,0}, {1,0}, {2,0}, {3,0}, }, \
{ {0,1}, {1,1}, {2,1}, {3,1}, {4,1}, }, \
{ {0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, }, \
{ {0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3} }, \
{ {0,4}, {1,4}, {2,4}, {3,4}, {6,4} }, \
{ {0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5} }, \
{ {0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}, {6,6} }, \
{ {0,7}, {1,7}, {2,7}, {3,7}, {5,7}, }, \
{ {0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}, {6,8} }, \
{ {0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {6,9} }, \
{ {0,10}, {1,10}, {2,10}, {3,10}, {4,10}, }, \
{ {0,11}, {1,11}, {2,11}, {3,11}, }, \
{ {0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}, }, \
{ {0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}, }, \
{ {0,14}, {1,14}, {2,14}, {3,14}, {4,14}, {5,14}, } \
}

+ 15
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/private/swaphandsfinal.txt View File

@ -0,0 +1,15 @@
{{0, 11}, {1, 11}, {2, 11}, {3, 11}}, \
{{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}}, \
{{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {6, 6}}, \
{{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {6, 8}, {5, 6}}, \
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {5, 7}}, \
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 5}, {6, 9}, {5, 8}}, \
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {6, 3}, {5, 2}}, \
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {6, 4}}, \
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {6, 5}, {5, 3}}, \
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 5}}, \
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, \
{{0, 0}, {1, 0}, {2, 0}, {3, 0}}, \
{{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}, {5, 12}}, \
{{0, 13}, {1, 13}, {2, 13}, {3, 13}, {4, 13}, {5, 13}}, \
{{0, 14}, {1, 14}, {2, 14}, {3, 14}, {4, 14}, {5, 14}} \

+ 34
- 1
keyboards/kinesis/kint36/keymaps/kevkevco/process_records.c View File

@ -172,23 +172,56 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Let QMK process the KC_BSPC keycode as usual outside of shift
return true;
// For Application Switcher moving left and down
// case D_GUI:
// if (is_cmd_tab_active) {
// if (record->event.pressed) { // Holding key down will not function as home row mod
// tap_code(KC_DOWN);
// cmd_tab_timer = timer_read();
// return false;
// }
// } else {
// return true;
// }
// case S_OPT:
// if (is_cmd_tab_active) {
// if (record->event.pressed) { // Holding key down will not function as home row mod
// tap_code(KC_LEFT);
// cmd_tab_timer = timer_read();
// return false;
// }
// } else {
// return true;
// }
case KC_UP:
case KC_LEFT:
case KC_DOWN:
case KC_RIGHT:
if (is_cmd_tab_active) {
cmd_tab_timer = timer_read();
}
return true;
case APP_NAV:
// Super cmdTAB modified for MacOS to CMD_TAB
// This macro will register KC_LGUI and tap KC_TAB, then wait for 1000ms.
// If the key is tapped again, it will send another KC_TAB and restart timer.
// If there is no tap within 800ms, KC_LGUI will be unregistered, thus allowing you to cycle through windows.
// Press shift key with APP_NAV key to send Shift+Cmd+Tab which iterates through the application switcher window backwards.
dprintf("\n app nav pressed and tap count is %x", record->tap.count);
if (record->event.pressed) {
if (!is_cmd_tab_active) {
is_cmd_tab_active = true;
register_code(KC_LGUI);
dprintf("turning nav on");
layer_on(_NAV);
}
cmd_tab_timer = timer_read();
// if (!record->tap.count) { tap_code16(S(KC_TAB)); } // Hold key for moving left within application switcher
register_code(KC_TAB);
} else {
unregister_code(KC_TAB);
}
return true;
return false;
case KPSWAP:
if (record->event.pressed) {


+ 2
- 1
keyboards/kinesis/kint36/keymaps/kevkevco/process_records.h View File

@ -23,6 +23,7 @@ uint8_t mod_state;
bool is_cmd_tab_active;
uint16_t cmd_tab_timer;
// Aliases for longer keycodes
// clang-format off
@ -84,7 +85,7 @@ uint16_t cmd_tab_timer;
#define KP6_OPT ROPT_T(KC_6)
#define PLS_CTL RCTL_T(KC_PPLS)
// Misc.
// Misc.f
#define OS_LSFT OSM(MOD_LSFT)
#define OS_RSFT OSM(MOD_RSFT)
#define OS_MEH OSM(MOD_MEH)


+ 25
- 3
keyboards/kinesis/kint36/keymaps/kevkevco/readme.md View File

@ -42,10 +42,32 @@ I use [this wonderful app](https://rectangleapp.com/pro) to manage my windows. I
## Teensy Loader
[This application](https://www.pjrc.com/teensy/loader.html) is what I use to flash my keyboard.
# Features
## Apple Fn Patch
KC_APFN is created through the following Apple Fn patch: https://gist.github.com/fauxpark/010dcf5d6377c3a71ac98ce37414c6c4
## Apple Fn Key
### Please note: keycode KC_APFN is included in keymap but requires separate implementation.
Included in this keymap is keycode `KC_APFN`, which emulates the native Apple Fn key. It is created using this [Apple Fn patch.](https://gist.github.com/fauxpark/010dcf5d6377c3a71ac98ce37414c6c4) If you do not want to use this keycode, simply remove `KC_APFN` from the "keymap.c" file and remove `APPLE_FN_ENABLE = yes` from the "rules.mk" file.
Please see the link and comment thread for installation instrucitons.
**Please see the link and comment thread for more detailed instructions than the following summary:**
This patch adds support for the Apple Fn key, which unlike most keyboards with Fn keys, is actually sent over the wire. It works by repurposing the reserved byte in the keyboard report to represent [the `KeyboardFn` usage of the `AppleVendor Top Case` usage page](https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-1035.70.7/IOHIDFamily/AppleHIDUsageTables.h.auto.html). When the Fn key is pressed, the value of this byte becomes `1`.
To apply this patch, download the below file, `cd` to your `qmk_firmware` repository in your preferred terminal, and run `git apply /path/to/applefn.patch`. Then, add the `KC_APPLE_FN` (or `KC_APFN` for short) keycode to your keymap.
There are a couple of caveats to this implementation that are important to be aware of. Firstly, it is not compatible with NKRO, as QMK's NKRO report format has no reserved byte - it is part of the 6KRO report for compatibility with the HID [boot protocol](https://deskthority.net/wiki/USB#Keyboard_Boot_Protocol). Thus you must set `NKRO_ENABLE = no` in your keymap's `rules.mk`.
You will also need to redefine the USB Vendor and Product IDs in your keymap's `config.h` to that of a genuine Apple keyboard* in order for macOS to recognise the Fn key:
```c
#undef VENDOR_ID
#define VENDOR_ID 0x05AC
#undef PRODUCT_ID
#define PRODUCT_ID <pid>
```
Any IDs from this list should work: https://usb-ids.gowdy.us/read/UD/05ac
This is the primary reason this patch has not been integrated into upstream QMK - Apple would probably not be too happy about others using their vendor ID, and a feature that relies on the VID/PID pair being set to a specific value is not particularly ideal anyway.
See https://github.com/qmk/qmk_firmware/issues/2179 for a little more info and discussion.
<sup>\* It appears that the functionality of certain F keys can differ depending on the PID, likely because they have evolved over time on real Apple keyboards.</sup>
## Home Row Mods
Are inspired by [this article.](https://precondition.github.io/home-row-mods)


+ 59
- 2
keyboards/kinesis/kint36/keymaps/kevkevco/tap_dances.c View File

@ -2,14 +2,33 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "tap_dances.h"
#include "print.h" // For debugging purposes
bool oneshot_symbols_timer_state = false;
uint16_t oneshot_symbols_timer = 0;
// Tap Dance processing function option #1
// This tap dance favors keys that are used frequently in typing like 'f'
td_state_t cur_dance(qk_tap_dance_state_t *state) {
dprint("\n---nohold_cur");
dprintf("\nkeycode is %x", state->keycode);
dprintf("\ninterrupted bool is %x", state->interrupted);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
dprintf("\ninterrupting_keycode is %x", state
->interrupting_keycode);
dprintf("\nsymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
if (state->count == 1) {
if (state->interrupted || !state->pressed) return SINGLE_TAP;
// Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
else
dprintf("\n right before sending single_hold...ssymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
dprintf("\n right before sending single_hold...oneshot_symbols_layer_state is %x", oneshot_symbols_timer_state);
if(oneshot_symbols_timer_state){
dprintf("\n right before sending single_hold...oneshot_symbols_layer_state is %x", oneshot_symbols_timer_state);
return UNKNOWN;
}
return SINGLE_HOLD;
} else if (state->count == 2) {
// DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
@ -37,6 +56,15 @@ td_state_t cur_dance(qk_tap_dance_state_t *state) {
// Tap Dance processing function option #2
// This works well if you want this key to work as a "fast modifier". It favors being held over being tapped.
int hold_cur_dance(qk_tap_dance_state_t *state) {
dprint("\n----hold_cur");
dprintf("\nkeycode is %x", state->keycode);
dprintf("\ncount is %x", state->count);
dprintf("\npressed is %x", state->pressed);
dprintf("\ninterrupted bool is %x", state->interrupted);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
dprintf("\nsymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
if (state->count == 1) {
if (state->interrupted) {
if (!state->pressed)
@ -47,6 +75,7 @@ int hold_cur_dance(qk_tap_dance_state_t *state) {
if (!state->pressed)
return SINGLE_TAP;
else
dprintf("\n right before sending single_hold...ssymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
return SINGLE_HOLD;
}
}
@ -99,13 +128,27 @@ void triple_tap_dance_esc(qk_tap_dance_state_t *state, void *user_data) {
static td_tap_t entr_td_state = {.is_press_action = true, .state = TD_NONE};
void entr_td_finished(qk_tap_dance_state_t *state, void *user_data) {
// qk_tap_dance_full_t *keycodes = (qk_tap_dance_full_t *)user_data;
entr_td_state.state = hold_cur_dance(state);
dprint("\nfinished enter function");
dprintf("\nkeycode is %x", state->keycode);
dprintf("\ncount is %x", state->count);
dprintf("\npressed is %x", state->pressed);
dprintf("\nsymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
dprintf("\n oneshot_symbols_layer_state is %x", oneshot_symbols_timer_state);
if (oneshot_symbols_timer_state) {
dprint("\ncould also truncate here?");
return;
}
dprintf("\ninterrupted bool is %x", state->interrupted);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
entr_td_state.state = cur_dance(state);
switch (entr_td_state.state) {
case SINGLE_TAP:
dprint("go for single tap enter enterkey");
tap_code(KC_ENT);
break;
case SINGLE_HOLD:
dprint("go for single hold enterkey");
layer_on(_RKEYPAD);
break;
case DOUBLE_TAP:
@ -122,6 +165,13 @@ void entr_td_finished(qk_tap_dance_state_t *state, void *user_data) {
}
void entr_td_reset(qk_tap_dance_state_t *state, void *user_data) {
dprint("\reset enter function");
dprintf("\nkeycode is %x", state->keycode);
dprintf("\ncount is %x", state->count);
dprintf("\npressed is %x", state->pressed);
dprintf("\ninterrupted bool is %x", state->interrupted);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
dprintf("\ninterrupting_keycode is %x", state->interrupting_keycode);
switch (entr_td_state.state) {
// case SINGLE_TAP: break;
case SINGLE_HOLD:
@ -276,10 +326,15 @@ static td_tap_t lpinky_td_state = {.is_press_action = true, .state = TD_NONE};
void lpinky_td_finished(qk_tap_dance_state_t *state, void *user_data) {
lpinky_td_state.state = cur_dance(state);
dprintf("\nsymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
switch (lpinky_td_state.state) {
case SINGLE_TAP:
dprint("go for single tap lpinky");
layer_on(_SYMBOLS);
set_oneshot_layer(_SYMBOLS, ONESHOT_START);
dprintf("\nsymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
oneshot_symbols_timer_state = true;
oneshot_symbols_timer = timer_read();
break;
case SINGLE_HOLD:
layer_on(_NAV);
@ -306,6 +361,8 @@ void lpinky_td_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (lpinky_td_state.state) {
case SINGLE_TAP:
clear_oneshot_layer_state(ONESHOT_PRESSED);
dprint("go for reset single tap tap lpinky");
dprintf("\nsymbols layer is %x", IS_LAYER_ON(_SYMBOLS));
break;
case SINGLE_HOLD:
layer_off(_NAV);


+ 4
- 0
keyboards/kinesis/kint36/keymaps/kevkevco/tap_dances.h View File

@ -49,3 +49,7 @@ typedef struct {
bool is_press_action;
td_state_t state;
} td_tap_t;
// Band-aid fix for oneshot timing issues
bool oneshot_symbols_timer_state;
uint16_t oneshot_symbols_timer;

Loading…
Cancel
Save