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

[Bug] Massdrop Alt Default keymap Caps Lock LED flickers #10813

Closed
3 tasks
cmerrill opened this issue Oct 31, 2020 · 0 comments · Fixed by #10818
Closed
3 tasks

[Bug] Massdrop Alt Default keymap Caps Lock LED flickers #10813

cmerrill opened this issue Oct 31, 2020 · 0 comments · Fixed by #10818

Comments

@cmerrill
Copy link
Contributor

Describe the Bug

When using the Massdrop Alt keyboard with the default keymap, the FN+z key combination is setup to toggle between All/Key-Only/Underglow-only/None lighting modes.

In the Key-only and Underglow-only modes the Caps Lock key LED flickers if Caps-Lock is enabled.

System Information

  • Keyboard: Massdrop Alt High Profile
  • Operating system: Windows 10
  • ARM GCC version: 8.4.0
  • QMK Firmware version: 0.10.46
  • Any keyboard related software installed?
    • AutoHotKey
    • Karabiner
    • Other:

Additional Context

In the massdrop/alt/keymaps/default/keymap.c file, the "Fn+z" keycode is defined to change between the following LED modes:

  • All lights
  • Key backlighting only
  • Underglow only
  • No lights

In the massdrop/alt/config_led.h file, the following lines are used to define special processing for the Caps Lock Key:

#define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality
#ifdef USB_LED_INDICATOR_ENABLE //Scan codes refer to actual key matrix codes, not KC_* (255 to disable)
#define USB_LED_NUM_LOCK_SCANCODE 255
#define USB_LED_CAPS_LOCK_SCANCODE 30
#define USB_LED_SCROLL_LOCK_SCANCODE 255
#define USB_LED_COMPOSE_SCANCODE 255
#define USB_LED_KANA_SCANCODE 255
#endif //USB_LED_INDICATOR_ENABLE

These parameters are used in the tmk_core/arm_atsam/led_matrix.c file to "invert" the color of the key LED every frame. Unfortunately, if the key is drawn as "BLACK" or off, this code will cause the LED to flicker between black and white repeatedly.

led_buffer[i].r = 255 - led_buffer[i].r;
led_buffer[i].g = 255 - led_buffer[i].g;
led_buffer[i].b = 255 - led_buffer[i].b;

I have a working fix for this, but am not sure what the best way to do this is given that the LED code is not using the same abstractions as the standard QMK RGB matrix code.

noroadsleft pushed a commit that referenced this issue Nov 9, 2020
* Update massdrop/alt keyboard to fix Caps Lock LED flickering.

* Fix Caps-lock LED during underglow-only for massdrop/ctrl

* Update keyboards/massdrop/ctrl/keymaps/default/keymap.c
ChrissiQ pushed a commit to ChrissiQ/qmk_firmware that referenced this issue Nov 10, 2020
)

* Update massdrop/alt keyboard to fix Caps Lock LED flickering.

* Fix Caps-lock LED during underglow-only for massdrop/ctrl

* Update keyboards/massdrop/ctrl/keymaps/default/keymap.c
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this issue May 23, 2024
)

* Update massdrop/alt keyboard to fix Caps Lock LED flickering.

* Fix Caps-lock LED during underglow-only for massdrop/ctrl

* Update keyboards/massdrop/ctrl/keymaps/default/keymap.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant