Keyboard firmwares for Atmel AVR and Cortex-M
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

mousekey.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. Copyright 2011 Jun Wako <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef MOUSEKEY_H
  15. #define MOUSEKEY_H
  16. #include <stdbool.h>
  17. #include "host.h"
  18. /* max value on report descriptor */
  19. #define MOUSEKEY_MOVE_MAX 127
  20. #define MOUSEKEY_WHEEL_MAX 127
  21. #ifndef MOUSEKEY_MOVE_DELTA
  22. #define MOUSEKEY_MOVE_DELTA 5
  23. #endif
  24. #ifndef MOUSEKEY_WHEEL_DELTA
  25. #define MOUSEKEY_WHEEL_DELTA 1
  26. #endif
  27. #ifndef MOUSEKEY_DELAY
  28. #define MOUSEKEY_DELAY 300
  29. #endif
  30. #ifndef MOUSEKEY_INTERVAL
  31. #define MOUSEKEY_INTERVAL 50
  32. #endif
  33. #ifndef MOUSEKEY_MAX_SPEED
  34. #define MOUSEKEY_MAX_SPEED 10
  35. #endif
  36. #ifndef MOUSEKEY_TIME_TO_MAX
  37. #define MOUSEKEY_TIME_TO_MAX 20
  38. #endif
  39. #ifndef MOUSEKEY_WHEEL_MAX_SPEED
  40. #define MOUSEKEY_WHEEL_MAX_SPEED 8
  41. #endif
  42. #ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
  43. #define MOUSEKEY_WHEEL_TIME_TO_MAX 40
  44. #endif
  45. uint8_t mk_delay;
  46. uint8_t mk_interval;
  47. uint8_t mk_max_speed;
  48. uint8_t mk_time_to_max;
  49. uint8_t mk_wheel_max_speed;
  50. uint8_t mk_wheel_time_to_max;
  51. void mousekey_task(void);
  52. void mousekey_on(uint8_t code);
  53. void mousekey_off(uint8_t code);
  54. void mousekey_clear(void);
  55. void mousekey_send(void);
  56. #endif