You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

  1. /* Copyright 2021 moults31
  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. #include "gdb.h"
  17. bool process_record_gdb(uint16_t keycode, keyrecord_t *record) {
  18. bool rv = true;
  19. switch (keycode) {
  20. case M_GDB_PLAY:
  21. if (record->event.pressed) {
  22. SEND_STRING(SS_TAP(X_F5));
  23. }
  24. break;
  25. case M_GDB_PAUSE:
  26. if (record->event.pressed) {
  27. SEND_STRING(SS_TAP(X_F6));
  28. }
  29. break;
  30. case M_GDB_STEPOVER:
  31. if (record->event.pressed) {
  32. SEND_STRING(SS_TAP(X_F10));
  33. }
  34. break;
  35. case M_GDB_STEPIN:
  36. if (record->event.pressed) {
  37. SEND_STRING(SS_TAP(X_F11));
  38. }
  39. break;
  40. case M_GDB_STEPOUT:
  41. if (record->event.pressed) {
  42. SEND_STRING(SS_LSFT(SS_TAP(X_F11)));
  43. }
  44. break;
  45. case M_GDB_RESTART:
  46. if (record->event.pressed) {
  47. SEND_STRING(SS_LCTRL(SS_LSFT(SS_TAP(X_F5))));
  48. }
  49. break;
  50. case M_GDB_STOP:
  51. if (record->event.pressed) {
  52. SEND_STRING(SS_LSFT(SS_TAP(X_F5)));
  53. }
  54. break;
  55. }
  56. return rv;
  57. }