Merge pull request #26 from ilmagico/master

Add setSpeedLimit API
pull/365/head
Jesse Vincent 6 years ago committed by GitHub
commit 47499e5b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -242,6 +242,12 @@ properties available:
> wheel shall scroll, and defaults to 1. The second, `.wheelDelay`, controls the
> delay between two scroll events, and defaults to 50 milliseconds.
### `.setSpeedLimit`
> This method sets the maximum speed after which acceleration stops.
> The default is 127, and the minimum value is 16 (things will not work
> properly below 16).
### `.setWarpGridSize`
> This method changes the size of the grid used for [warping](#warping). The

@ -23,6 +23,10 @@ void MouseKeys_::setWarpGridSize(uint8_t grid_size) {
MouseWrapper.warp_grid_size = grid_size;
}
void MouseKeys_::setSpeedLimit(uint8_t speed_limit) {
MouseWrapper.speedLimit = speed_limit;
}
void MouseKeys_::scrollWheel(uint8_t keyCode) {
if (millis() < wheelEndTime)
return;

@ -16,6 +16,7 @@ class MouseKeys_ : public kaleidoscope::Plugin {
static uint16_t wheelDelay;
static void setWarpGridSize(uint8_t grid_size);
static void setSpeedLimit(uint8_t speed_limit);
kaleidoscope::EventHandlerResult onSetup();
kaleidoscope::EventHandlerResult beforeReportingState();

Loading…
Cancel
Save