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

Oops, all rotary encoders - new keyboard + demonstrated encoder method #23700

Closed
wants to merge 4 commits into from
Closed
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
Debug cleanup
  • Loading branch information
jvbroek committed May 11, 2024
commit da8a3b1d2faa9ebde8e4a87c0e49114392be8a8a
7 changes: 0 additions & 7 deletions keyboards/oare/keymaps/default/keycode_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@

#include "keycode_lookup.h"
#include "keymap_introspection.h"
#include "print.h"

// Now we implement a custom "semi-transparent" keycode using KC_ENC:
// We fall through to layer 0 to get the actual keycode, then modify it according to what's in key_offsets
uint16_t keycode_at_keymap_location(uint8_t layer_num, uint8_t row, uint8_t column) {
uint16_t code = keycode_at_keymap_location_raw(layer_num, row, column);
if (code > 3) {
uprintf("got code %d for row %d col %d\n", code, row, column);
}
if (code == KC_ENC) {
// don't return this, we need to fall through but then modify
// Could make it more generic to fall to the next active layer instead of straight to 0, but I don't care that much.
Expand All @@ -26,8 +22,5 @@ uint16_t keycode_at_keymap_location(uint8_t layer_num, uint8_t row, uint8_t colu
}
}
}
if (code > 3) {
uprintf("returning code %d for row %d col %d\n", code, row, column);
}
return code;
}
Loading