Add movement hook to ps2_mouse (#8805)
Process mouse movement in the keymap before it is sent to the host. Example uses include filtering noise, adding acceleration, and automatically activating a layer. To use, define the following function in your keymap: void ps2_mouse_moved_user(report_mouse_t *mouse_report);
This commit is contained in:
parent
00fc35539d
commit
b7dc2eb9ab
3 changed files with 18 additions and 0 deletions
|
@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <stdbool.h>
|
||||
#include "debug.h"
|
||||
#include "report.h"
|
||||
|
||||
#define PS2_MOUSE_SEND(command, message) \
|
||||
do { \
|
||||
|
@ -174,4 +175,6 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
|
|||
|
||||
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
|
||||
|
||||
void ps2_mouse_moved_user(report_mouse_t *mouse_report);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue