Skip to content

Commit

Permalink
Scrollwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
dmi3 committed Apr 13, 2023
1 parent 6d965d4 commit bbd5c35
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
11 changes: 10 additions & 1 deletion keyboards/handwired/onekey/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,14 @@
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ortho_1x1(KC_A)
LAYOUT_ortho_1x1(KC_BTN3)
};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_WH_D);
} else {
tap_code(KC_WH_U);
}
return true;
}
4 changes: 4 additions & 0 deletions keyboards/handwired/onekey/rp2040/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A

#define ADC_PIN GP26

#define ENCODERS_PAD_A { GP7 }
#define ENCODERS_PAD_B { GP8 }
#define ENCODER_RESOLUTION 3
2 changes: 2 additions & 0 deletions keyboards/handwired/onekey/rp2040/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENCODER_ENABLE = yes
MOUSEKEY_ENABLE = yes

0 comments on commit bbd5c35

Please sign in to comment.