Run IWYU & format code for MouseKeys

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
master^2^2
Michael Richters 3 years ago
parent c84aa58470
commit 51125f215b
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -29,7 +29,7 @@
#include "kaleidoscope/key_defs.h" // for Key, SYNTHETIC
#include "kaleidoscope/keyswitch_state.h" // for keyToggledOn
#include "kaleidoscope/plugin/mousekeys/MouseKeyDefs.h" // for KEY_MOUSE_BUTTON, KEY_MOUS...
#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" // for MouseWrapper, wrapper, WAR...
#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h" // for MouseWrapper, WARP_DOWN
namespace kaleidoscope {
namespace plugin {
@ -226,6 +226,7 @@ void MouseKeys::sendMouseWarpReport(const KeyEvent &event) const {
void MouseKeys::sendMouseMoveReport() const {
int8_t dx = 0;
int8_t dy = 0;
uint8_t direction = directions_ & cursor_mask_;
if (direction != 0) {
@ -271,6 +272,7 @@ uint8_t accelFactor(uint8_t accel_step) {
return 1 + (y >> 7);
} else {
uint16_t remaining_steps = 256 - accel_step;
uint16_t y = remaining_steps * remaining_steps;
return 255 - (y >> 7);
}
@ -346,6 +348,7 @@ uint8_t MouseKeys::cursorDelta() const {
void MouseKeys::sendMouseWheelReport() const {
int8_t dh = 0;
int8_t dv = 0;
uint8_t direction = directions_ >> wheel_offset_;
if (direction != 0) {

@ -22,7 +22,6 @@
#include "kaleidoscope/event_handler_result.h" // for EventHandlerResult
#include "kaleidoscope/key_defs.h" // for Key
#include "kaleidoscope/plugin.h" // for Plugin
// =============================================================================
// Deprecated MousKeys code
#include "kaleidoscope_internal/deprecations.h" // for DEPRECATED
@ -66,7 +65,6 @@ namespace kaleidoscope {
namespace plugin {
class MouseKeys : public kaleidoscope::Plugin {
public:
#ifndef NDEPRECATED
DEPRECATED(MOUSEKEYS_SPEED)
static uint8_t speed;

@ -16,7 +16,7 @@
#include "kaleidoscope/plugin/mousekeys/MouseWrapper.h"
#include <stdint.h> // for uint16_t, uint8_t, int8_t
#include <stdint.h> // for uint16_t, uint8_t
#include "kaleidoscope/Runtime.h" // for Runtime, Runtime_
#include "kaleidoscope/device/device.h" // for Base<>::HID, VirtualProps:...

@ -16,9 +16,9 @@
#pragma once
#include <stdint.h> // for uint8_t, uint16_t
#include <stdint.h> // for uint16_t, uint8_t
#include "kaleidoscope/plugin/mousekeys/MouseWarpModes.h"
#include "kaleidoscope/plugin/mousekeys/MouseWarpModes.h" // for MOUSE_WARP_GRID_2X2
// Mouse acceleration

Loading…
Cancel
Save