diff options
author | QMK Bot <hello@qmk.fm> | 2023-02-28 19:15:33 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2023-02-28 19:15:33 +0000 |
commit | 184c1e5187ddacccae4bcea428603923e1cbe385 (patch) | |
tree | 88a92e041bc7b29e61ea07127747a9257e9edf52 /keyboards/ploopyco | |
parent | 7a8265247b75bf389c791738a30a01fe3dba2263 (diff) | |
parent | 0596720f7fb6b877cd8c55b03dc014e189648f35 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/ploopyco')
-rw-r--r-- | keyboards/ploopyco/mouse/keymaps/drashna/keymap.c | 9 | ||||
-rw-r--r-- | keyboards/ploopyco/trackball/readme.md | 15 |
2 files changed, 15 insertions, 9 deletions
diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c index cf0b57d433..a249ebdfd9 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c +++ b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c @@ -17,6 +17,8 @@ */ #include QMK_KEYBOARD_H +// safe range starts at `USER_SAFE_RANGE` instead. + // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -26,6 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) }, + [1] = { ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) }, +}; +#endif + #ifdef RGBLIGHT_ENABLE void eeconkfig_init_user(void) { rgblight_enable(); diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index 1648bd20f9..5c76f10187 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -29,20 +29,17 @@ The PCB should indicate which revision this is. While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse sensor. -The default behavior for this is: ```c -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { - mouse_report->h = h; - mouse_report->v = v; -} - -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report){ + // executed each time the sensor is updated + // mouse_report.<attribute> - can be used to access indivdual mouse attributes + return mouse_report; } ``` +More information on `report_mouse_t` may be found [here](https://docs.qmk.fm/#/feature_pointing_device?id=manipulating-mouse-reports). + This should allow you to more heavily customize the behavior. Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. |