Reverting back to tap holds

- per documentation I felt the gains were not worth having to press
shift to get those alt keycodes.
- on symbol layer split side, there were alot of same finger bigrams
This commit is contained in:
Victor 2024-05-07 23:51:38 -05:00
parent aace26eec5
commit aaa2269240
Failed to generate hash of commit
5 changed files with 62 additions and 63 deletions

View file

@ -1,25 +1,24 @@
#include "keyoverride.h"
//https://docs.qmk.fm/#/feature_key_overrides?id=simple-example
/*
Key Override
Here we will override some shifted versions of keys
https://docs.qmk.fm/#/feature_key_overrides?id=simple-example
Intentionally did not convert all the override/autoshit tap holds to this format
- Here I could type faster and be able to hold to repeat the keycodes however
- I had tons of same finger bigrams doing trying to get ~ and :
- I didn't feel the need to be able to repeat those symbols
*/
const key_override_t delete_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL);
const key_override_t media_next_override = ko_make_basic(MOD_MASK_SHIFT, KC_MNXT, KC_MPRV);
const key_override_t at_sym_override = ko_make_basic(MOD_MASK_SHIFT, KC_AT, KC_AMPR);
const key_override_t exlm_sym_override = ko_make_basic(MOD_MASK_SHIFT, KC_EXLM, KC_DLR);
const key_override_t perc_sym_override = ko_make_basic(MOD_MASK_SHIFT, KC_PERC, KC_CIRC);
const key_override_t comm_sym_override = ko_make_basic(MOD_MASK_SHIFT, KC_COMM, KC_LPRN);
const key_override_t dot_sym_override = ko_make_basic(MOD_MASK_SHIFT, KC_DOT, KC_RPRN);
const key_override_t **key_overrides = (const key_override_t *[]){
&delete_override,
&media_next_override,
&at_sym_override,
&exlm_sym_override,
&perc_sym_override,
&comm_sym_override,
&dot_sym_override,
NULL // Null terminate the array of overrides!
};

View file

@ -22,15 +22,15 @@ void insert_brackets(uint16_t left, uint16_t right, uint32_t ms) {
tap_code16(KC_LEFT);
}
//here we can have the holds be more complex, like sending "" when you hold "
// here we can have the holds be more complex, like sending "" when you hold "
bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
//tap is record->tap.count && record->event.pressed
//hold is record->event.pressed
// tap is record->tap.count && record->event.pressed
// hold is record->event.pressed
//just saving this to handle mods
//bool isShift = ( (get_mods() & MOD_BIT(KC_LSFT)) || (get_oneshot_mods() & MOD_BIT(KC_LSFT)) );
//isShift ? insert_brackets(LSFT(key), LSFT(altkey)) : insert_brackets(key, altkey);
// just saving this to handle mods
// bool isShift = ( (get_mods() & MOD_BIT(KC_LSFT)) || (get_oneshot_mods() & MOD_BIT(KC_LSFT)) );
// isShift ? insert_brackets(LSFT(key), LSFT(altkey)) : insert_brackets(key, altkey);
bool isHold = false;
@ -62,7 +62,7 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
case TR_SLSH:
single_tap(TAPHOLD_SLSH, isHold);
break;
/* case TR_COMM:
case TR_COMM:
single_tap(TAPHOLD_COMM, isHold);
break;
case TR_DOT:
@ -88,7 +88,7 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
break;
case TR_QUOT:
single_tap(TAPHOLD_QUOT, isHold);
break;*/
break;
}
@ -100,7 +100,7 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
switch(keycode) {
//Brackets
// Brackets
case TR_LCBR:
insert_brackets(TAPHOLD_LCBR, WAIT_DELAY);
break;
@ -118,7 +118,7 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
break;
//double tap
// double tap
case TR_EQL:
double_tap(TAPHOLD_EQL, WAIT_DELAY);
break;
@ -129,8 +129,8 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
double_tap(TAPHOLD_SLSH, WAIT_DELAY);
break;
//custom action
/* case TR_COMM:
// custom override without holding shift
case TR_COMM:
single_tap(TAPHOLD_COMM, isHold);
break;
case TR_DOT:
@ -146,7 +146,7 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
single_tap(TAPHOLD_AT, isHold);
break;
//simulates auto-shift
// simulates auto-shift
case TR_MINS:
single_tap(TAPHOLD_MINS, isHold);
break;
@ -159,7 +159,7 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode) {
case TR_QUOT:
single_tap(TAPHOLD_QUOT, isHold);
break;
*/
}
return false;

View file

@ -13,29 +13,29 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t keycode);
* and easier to maintain
*/
//Brackets: open and close brackets and put the cursor inside
// Brackets: open and close brackets and put the cursor inside
#define TAPHOLD_LCBR KC_LCBR, KC_RCBR
#define TAPHOLD_LABK KC_LABK, KC_RABK
#define TAPHOLD_LBRC KC_LBRC, KC_RBRC
#define TAPHOLD_LPRN KC_LPRN, KC_RPRN
#define TAPHOLD_SQUO KC_QUOT, KC_QUOT
//double tap
// double tap
#define TAPHOLD_EQL KC_EQL, KC_EQL
#define TAPHOLD_BSLS KC_BSLS, KC_BSLS
#define TAPHOLD_SLSH KC_SLSH, KC_SLSH
//Custom: things like overriding default shifted key
//#define TAPHOLD_COMM KC_COMM, KC_LPRN
//#define TAPHOLD_DOT KC_DOT, KC_RPRN
//#define TAPHOLD_PERC KC_PERC, KC_CIRC
//#define TAPHOLD_EXLM KC_EXLM, KC_DLR
//#define TAPHOLD_AT KC_AT, KC_AMPR
// Custom override without holding shift
#define TAPHOLD_COMM KC_COMM, KC_LPRN
#define TAPHOLD_DOT KC_DOT, KC_RPRN
#define TAPHOLD_PERC KC_PERC, KC_CIRC
#define TAPHOLD_EXLM KC_EXLM, KC_DLR
#define TAPHOLD_AT KC_AT, KC_AMPR
//auto shift
//#define TAPHOLD_MINS KC_MINS, KC_UNDS
//#define TAPHOLD_GRV KC_GRV, KC_TILD
//#define TAPHOLD_SCLN KC_SCLN, KC_COLN
//#define TAPHOLD_QUOT KC_QUOT, KC_DQUO
// auto shift
#define TAPHOLD_MINS KC_MINS, KC_UNDS
#define TAPHOLD_GRV KC_GRV, KC_TILD
#define TAPHOLD_SCLN KC_SCLN, KC_COLN
#define TAPHOLD_QUOT KC_QUOT, KC_DQUO