qmk/qmk_firmware

[Bug] Auto Shift custom filter hjkl can not work

Open

#21,982 opened on Sep 12, 2023

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (Avg merge 20d 9h) (27 merged PRs in 30d)

Description

Describe the Bug

The Auto Shift feature is incredibly useful. However, it conflicts with long-pressing hjkl in Vim. I've tried modifying keymap.c, but it didn't work.

bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
    switch (keycode) {
        case KC_H:
        case KC_J:
        case KC_K:
        case KC_L:
            return false; // disable Auto-Shift
        default:
            return true; // others Auto-Shift
    }
}

rules.mk

VIA_ENABLE          = yes
VIAL_ENABLE         = yes
LTO_ENABLE          = yes

RGBLIGHT_ENABLE     = yes
RGB_MATRIX_ENABLE   = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
MOUSEKEY_ENABLE     = no
OLED_ENABLE         = no
OLED_DRIVER         = SSD1306
EXTRAKEY_ENABLE     = yes
COMBO_ENABLE        = no

QMK_SETTINGS        = yes

AUTO_SHIFT_ENABLE = yes

Contributor guide