Reshuffle Number Layer and Cleanup

- remove mods on number layer
- function keys on top, numbers now on middle
- added media keys to number layer
- updated documentation
This commit is contained in:
Victor 2024-05-06 22:30:28 -05:00
parent 2d3c6f2f4e
commit 20cdbdd1a5
Failed to generate hash of commit
4 changed files with 36 additions and 19 deletions

View file

@ -43,33 +43,51 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_BSPC: {
//https://docs.qmk.fm/#/feature_advanced_keycodes?id=shift-backspace-for-delete
// Initialize a boolean variable that keeps track
// of the delete key status: registered or not?
static bool delkey_registered = false;
if (record->event.pressed) {
// Detect the activation of either shift keys
uint8_t current_mod = get_mods();
uint8_t current_osm = get_oneshot_mods();
// Detect the activation of either shift keys
if ((current_mod | current_osm) & MOD_MASK_SHIFT) {
// First temporarily canceling both shifts so that
// shift isn't applied to the KC_DEL keycode
del_mods(MOD_MASK_SHIFT);
del_oneshot_mods(MOD_MASK_SHIFT);
// Press delete and keep track that key press
register_code(KC_DEL);
delkey_registered = true;
// Reapplying modifier state so that the held shift key(s)
// still work even after having tapped the Backspace/Delete key
set_mods(current_mod);
set_oneshot_mods(current_osm);
return false;
}
} else {
} else { // on release of KC_BSPC
if(delkey_registered) {
unregister_code(KC_DEL);
delkey_registered = false;
return false;
}
}
// QMK will process Backspace instead
// if the shift modifier is not detected
return true;
}

View file

@ -184,9 +184,9 @@ enum keycodes {
#define LAYER_NAVIGATION \
___x___, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_CAPS, KC_TAB, ___x___, KC_PSCR, CONFIG, \
___x___, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_BSPC, _SCAG_MODS________________________, \
_UCCPR_L___________________________________, KC_DEL, KC_APP, TR_SNIP, TR_SDPI, TR_PDPI, \
___x___, KC_HOME, KC_UP, KC_END, KC_PGUP, ___x___, ___x___, KC_CAPS, KC_PSCR, CONFIG, \
___x___, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ___x___, _SCAG_MODS________________________, \
_UCCPR_L___________________________________, ___x___, KC_APP, TR_SNIP, TR_SDPI, TR_PDPI, \
ZOOMRST, SYM, KC_ENT, _LAYER_TRANS_____________
@ -198,16 +198,16 @@ enum keycodes {
#define LAYER_NUMBER \
KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F8, KC_F10, KC_F2, KC_F4, KC_F6, \
KC_7, KC_5, KC_3, KC_1, KC_9, KC_8, KC_0, KC_2, KC_4, KC_6, \
_GACS_MODS________________________, KC_F11, KC_F12, ___x___, KC_F2, KC_F4, KC_F6, \
KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F8, KC_F10, TR_COMM, TR_DOT, TR_MINS, \
KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_F11, KC_F12, TR_COMM, TR_DOT, TR_MINS, \
_LAYER_TRANS_____________, _LAYER_TRANS_____________
#define LAYER_CONFIG \
___x___, ___x___, ___x___, ___x___, KC_MUTE, ___x___, ___x___, EE_CLR, QK_BOOT, _______, \
___x___, ___x___, ___x___, ___x___, KC_VOLU, ___x___, TR_LSFT, ___x___, ___x___, TR_RMOD, \
___x___, ___x___, ___x___, ___x___, KC_VOLD, TR_RTOG, TR_RHUI, TR_RSAI, TR_RVAI, TR_RSPI, \
_NONE_5____________________________________, ___x___, ___x___, EE_CLR, QK_BOOT, _______, \
_NONE_5____________________________________, ___x___, TR_LSFT, ___x___, ___x___, TR_RMOD, \
_NONE_5____________________________________, TR_RTOG, TR_RHUI, TR_RSAI, TR_RVAI, TR_RSPI, \
BASELYR, ___x___, ___x___, TR_DMP1, TR_DMR1, TR_RTOG
/*