logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

tractyl_manuform.h (3539B)


  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  2. *
  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. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include "quantum.h"
  18. enum charybdis_keycodes {
  19. POINTER_DEFAULT_DPI_FORWARD = QK_KB_0,
  20. POINTER_DEFAULT_DPI_REVERSE,
  21. POINTER_SNIPING_DPI_FORWARD,
  22. POINTER_SNIPING_DPI_REVERSE,
  23. SNIPING_MODE,
  24. SNIPING_MODE_TOGGLE,
  25. DRAGSCROLL_MODE,
  26. DRAGSCROLL_MODE_TOGGLE,
  27. };
  28. #define DPI_MOD POINTER_DEFAULT_DPI_FORWARD
  29. #define DPI_RMOD POINTER_DEFAULT_DPI_REVERSE
  30. #define S_D_MOD POINTER_SNIPING_DPI_FORWARD
  31. #define S_D_RMOD POINTER_SNIPING_DPI_REVERSE
  32. #define SNIPING SNIPING_MODE
  33. #define SNP_TOG SNIPING_MODE_TOGGLE
  34. #define DRGSCRL DRAGSCROLL_MODE
  35. #define DRG_TOG DRAGSCROLL_MODE_TOGGLE
  36. #ifdef POINTING_DEVICE_ENABLE
  37. /** \brief Return the current DPI value for the pointer's default mode. */
  38. uint16_t charybdis_get_pointer_default_dpi(void);
  39. /**
  40. * \brief Update the pointer's default DPI to the next or previous step.
  41. *
  42. * Increases the DPI value if `forward` is `true`, decreases it otherwise.
  43. * The increment/decrement steps are equal to CHARYBDIS_DEFAULT_DPI_CONFIG_STEP.
  44. *
  45. * The new value is persisted in EEPROM.
  46. */
  47. void charybdis_cycle_pointer_default_dpi(bool forward);
  48. /**
  49. * \brief Same as `charybdis_cycle_pointer_default_dpi`, but do not write to
  50. * EEPROM.
  51. *
  52. * This means that reseting the board will revert the value to the last
  53. * persisted one.
  54. */
  55. void charybdis_cycle_pointer_default_dpi_noeeprom(bool forward);
  56. /** \brief Return the current DPI value for the pointer's sniper-mode. */
  57. uint16_t charybdis_get_pointer_sniping_dpi(void);
  58. /**
  59. * \brief Update the pointer's sniper-mode DPI to the next or previous step.
  60. *
  61. * Increases the DPI value if `forward` is `true`, decreases it otherwise.
  62. * The increment/decrement steps are equal to CHARYBDIS_SNIPING_DPI_CONFIG_STEP.
  63. *
  64. * The new value is persisted in EEPROM.
  65. */
  66. void charybdis_cycle_pointer_sniping_dpi(bool forward);
  67. /**
  68. * \brief Same as `charybdis_cycle_pointer_sniping_dpi`, but do not write to
  69. * EEPROM.
  70. *
  71. * This means that reseting the board will revert the value to the last
  72. * persisted one.
  73. */
  74. void charybdis_cycle_pointer_sniping_dpi_noeeprom(bool forward);
  75. /** \brief Whether sniper-mode is enabled. */
  76. bool charybdis_get_pointer_sniping_enabled(void);
  77. /**
  78. * \brief Enable/disable sniper mode.
  79. *
  80. * When sniper mode is enabled the dpi is reduced to slow down the pointer for
  81. * more accurate movements.
  82. */
  83. void charybdis_set_pointer_sniping_enabled(bool enable);
  84. /** \brief Whether drag-scroll is enabled. */
  85. bool charybdis_get_pointer_dragscroll_enabled(void);
  86. /**
  87. * \brief Enable/disable drag-scroll mode.
  88. *
  89. * When drag-scroll mode is enabled, horizontal and vertical pointer movements
  90. * are translated into horizontal and vertical scroll movements.
  91. */
  92. void charybdis_set_pointer_dragscroll_enabled(bool enable);
  93. #endif // POINTING_DEVICE_ENABLE