Skip to content

Commit bbd5c35

Browse files
committed
Scrollwheel
1 parent 6d965d4 commit bbd5c35

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

keyboards/handwired/onekey/keymaps/default/keymap.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@
33
#include QMK_KEYBOARD_H
44

55
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6-
LAYOUT_ortho_1x1(KC_A)
6+
LAYOUT_ortho_1x1(KC_BTN3)
77
};
8+
9+
bool encoder_update_user(uint8_t index, bool clockwise) {
10+
if (clockwise) {
11+
tap_code(KC_WH_D);
12+
} else {
13+
tap_code(KC_WH_U);
14+
}
15+
return true;
16+
}

keyboards/handwired/onekey/rp2040/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@
2121
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A
2222

2323
#define ADC_PIN GP26
24+
25+
#define ENCODERS_PAD_A { GP7 }
26+
#define ENCODERS_PAD_B { GP8 }
27+
#define ENCODER_RESOLUTION 3
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ENCODER_ENABLE = yes
2+
MOUSEKEY_ENABLE = yes

0 commit comments

Comments
 (0)