Skip to content

Replace QMK logo with large layer digit on OLED; add per-layer RGB matrix lighting#8

Merged
timfee merged 17 commits intomainfrom
copilot/remove-qmk-logo-add-layer-number
Apr 14, 2026
Merged

Replace QMK logo with large layer digit on OLED; add per-layer RGB matrix lighting#8
timfee merged 17 commits intomainfrom
copilot/remove-qmk-logo-add-layer-number

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 13, 2026

  • Diagnose Cmd+Shift+V regression: 'L'/'R' thumbs cause same-hand shortcuts to resolve as tap
  • Fix get_chordal_hold to use timing for same-hand mod-tap keys (<150ms = tap, ≥150ms = hold)
  • Validate changes (CodeQL clean, code review clean for changed code)

Copilot AI and others added 2 commits April 13, 2026 00:11
…layer RGB matrix lighting

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/cc846d9d-7039-4650-9167-e05fa242c89f

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
…e hold-on-other-key-press

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/2a2d454b-14c3-485c-9968-a5297bba60e4

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
@timfee timfee marked this pull request as ready for review April 14, 2026 00:24
Copilot AI review requested due to automatic review settings April 14, 2026 00:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the timfee userspace keymap to improve visual feedback (OLED + RGB matrix) and to make require-prior-idle (RPI) timing work correctly across split halves.

Changes:

  • Replace the OLED QMK logo with a centered 32×32 bitmap showing the current layer number.
  • Switch RPI timing to use split-synchronized activity (via SPLIT_ACTIVITY_ENABLE + last_input_activity_elapsed()), and retune/expand RPI thresholds to additional mod-tap keys.
  • Add per-layer RGB matrix indicator coloring and enable RGB matrix in the userspace rules.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
users/timfee/timfee.h Updates key aliases and RPI threshold definitions.
users/timfee/timfee.c Implements large layer digit OLED rendering, switches RPI timing source, and adds per-layer RGB matrix coloring.
users/timfee/rules.mk Enables RGB matrix for this userspace.
users/timfee/config.h Enables split activity sync and removes retro-tapping defines.
users/timfee/bitmaps.h Adds 32×32 digit bitmap assets and lookup table for OLED rendering.
keyboards/keebart/corne_choc_pro/keymaps/timfee/keymap.c Updates base layer to use KC_Z / KC_SLSH directly (removing the prior layer-tap aliases).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread users/timfee/timfee.c
Comment on lines +474 to +489
static inline bool led_in_set(uint8_t led, const uint8_t *set, uint8_t count) {
for (uint8_t j = 0; j < count; j++) {
if (set[j] == led) return true;
}
return false;
}

bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t layer = get_highest_layer(layer_state);

for (uint8_t i = led_min; i < led_max; i++) {
switch (layer) {
case 1:
if (led_in_set(i, L1_SYMBOL_LEDS, sizeof(L1_SYMBOL_LEDS))) {
rgb_matrix_set_color(i, 0, 255, 0); // bright green (symbols)
} else if (led_in_set(i, L1_NUMBER_LEDS, sizeof(L1_NUMBER_LEDS))) {
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

led_in_set takes count as a uint8_t, but the call sites pass sizeof(...) (a size_t). It works with the current uint8_t[] sets, but it’s an implicit narrowing conversion and easy to get wrong if the element type ever changes. Consider taking count as size_t and passing an element count (sizeof(arr) / sizeof(arr[0]) or an ARRAY_SIZE macro) rather than raw sizeof(arr).

Copilot uses AI. Check for mistakes.
last_input_activity_elapsed() includes the mod-tap key's OWN matrix
event. Since process_record_user fires ~tapping_term ms after the
physical press (after action_tapping resolves tap/hold), the elapsed
time is always ≈ tapping_term < RPI thresholds, so holds never work.

Revert to manual last_key_time updated at the END of process_record_user.
Remove SPLIT_ACTIVITY_ENABLE (not needed — master processes all keys
from both halves).

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/14d8fea9-7e5d-40c4-9b47-abab68e5d4e2

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
@timfee
Copy link
Copy Markdown
Owner

timfee commented Apr 14, 2026

but reverting is UNACCEPTABLE. now i have the problem where when I hit backspace (even once the backspace key is fully released) and press another key < 100ms or so, it fires the hold function of backspace (CMD) plus thaat key!!! STOP GOING IN CIRCLES

…press measurement

Both previous approaches measured inter-key timing in process_record_user,
which fires at tap/hold RESOLUTION time (not physical press time):
- last_input_activity_elapsed(): always ≈ tapping_term → holds never worked
- manual last_key_time: stale on return-false paths → CMD+key leak

pre_process_record_user fires at the physical keypress moment, BEFORE the
tapping state machine buffers the key. Flag the key position there, then
check the flag in process_record_user at resolution time to force-tap.

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/40e6f36c-6ca7-4425-830c-0dac14106e87

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
…ernal dependency on Keebart

- Add Keebart/vial-qmk-corne-choc-pro (vial branch) as git submodule at qmk_firmware/
- Remove qmk_repo/qmk_ref from CI workflow (reusable workflow auto-detects submodule)
- Rewrite README with self-contained setup, upstream pull, and cherry-pick instructions

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/1be9b3e0-bc94-471c-b013-1192141c550a

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
- Define CHORDAL_HOLD in config.h (replaces PERMISSIVE_HOLD_PER_KEY)
- Add chordal_hold_layout[8][7] with L/R/*/0 hand assignments
- Remove all require-prior-idle (RPI) state and logic
- Remove get_permissive_hold callback
- Remove RPI threshold defines from timfee.h
- Chordal hold handles the opposite-hands rule at the firmware level:
  same-hand chord = tap, opposite-hand chord = hold

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/f112c532-9be7-4612-8000-d680cd50c50c

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
…ap override

- Remove qmk_firmware submodule, restore CI to build against external Keebart repo
- Fix chordal_hold_layout: thumbs marked 'L'/'R' (not '*') so same-hand
  fast typing resolves as tap, cross-hand resolves as hold
- Add get_chordal_hold() override: layer-taps always hold (for same-hand
  layer access), mod-taps use default cross-hand logic
- Simplify README back to standard userspace overlay

Agent-Logs-Url: https://github.com/timfee/qmk_userspace/sessions/2bf6f380-de28-4523-a92b-40d4f1aa2c25

Co-authored-by: timfee <3246342+timfee@users.noreply.github.com>
@timfee timfee merged commit d05c01c into main Apr 14, 2026
2 of 3 checks passed
Copilot stopped work on behalf of timfee due to an error April 14, 2026 20:38
@timfee timfee deleted the copilot/remove-qmk-logo-add-layer-number branch April 20, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants