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

[keymap] Update gourdo1 keymap for Q2 changes #17398

Merged
merged 21 commits into from
Jul 2, 2022
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Expansion of symbols that don't interrupt Caps Word
  • Loading branch information
gourdo1 committed Jun 22, 2022
commit d03953b755acdba2a89450fed35cfefc25bebb8c
29 changes: 29 additions & 0 deletions users/gourdo1/gourdo1.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,35 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t * record) {
}
}

// Define custom Caps Word continuity characters
bool caps_word_press_user(uint16_t keycode) {
switch (keycode) {
// Keycodes that continue Caps Word, with shift applied.
case KC_A ... KC_Z:
case KC_TILD:
case KC_UNDS:
case KC_DQT:
case KC_COLN:
case KC_RSFT:
case KC_LSFTCAPSWIN:
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
return true;

// Keycodes that continue Caps Word, without shifting.
case KC_1 ... KC_0:
case KC_GRV:
case KC_MINS:
case KC_QUOT:
case KC_SCLN:
case KC_BSPC:
case KC_DEL:
return true;

default:
return false; // Deactivate Caps Word.
}
}

// Turn on/off NUM LOCK if current state is different
void activate_numlock(bool turn_on) {
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) {
Expand Down