keychron_common.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Copyright 2022 @ Keychron (https://www.keychron.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 <stdint.h>
  18. #include <stdbool.h>
  19. #include "action.h"
  20. #include "quantum_keycodes.h"
  21. enum custom_keycodes {
  22. KC_LOPTN = QK_KB_2, // TECH DEBT: Starts at QK_KB_2 to maintain ordering with VIA definitions. See #19884. Revert to QK_KB_0 when VIA catches up with QMK.
  23. KC_ROPTN,
  24. KC_LCMMD,
  25. KC_RCMMD,
  26. KC_SIRI,
  27. KC_TASK_VIEW,
  28. KC_FILE_EXPLORER,
  29. KC_SCREEN_SHOT,
  30. KC_CORTANA
  31. };
  32. #define KC_TASK KC_TASK_VIEW
  33. #define KC_FLXP KC_FILE_EXPLORER
  34. #define KC_SNAP KC_SCREEN_SHOT
  35. #define KC_CRTA KC_CORTANA
  36. typedef struct PACKED {
  37. uint8_t len;
  38. uint8_t keycode[3];
  39. } key_combination_t;
  40. void housekeeping_task_keychron(void);
  41. bool process_record_keychron(uint16_t keycode, keyrecord_t *record);