diff options
Diffstat (limited to 'users/moults31/gdb.c')
-rw-r--r-- | users/moults31/gdb.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/users/moults31/gdb.c b/users/moults31/gdb.c new file mode 100644 index 000000000..42f5513ec --- /dev/null +++ b/users/moults31/gdb.c | |||
@@ -0,0 +1,59 @@ | |||
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 | |||
18 | bool process_record_gdb(uint16_t keycode, keyrecord_t *record) { | ||
19 | bool rv = true; | ||
20 | switch (keycode) { | ||
21 | case M_GDB_PLAY: | ||
22 | if (record->event.pressed) { | ||
23 | SEND_STRING(SS_TAP(X_F5)); | ||
24 | } | ||
25 | break; | ||
26 | case M_GDB_PAUSE: | ||
27 | if (record->event.pressed) { | ||
28 | SEND_STRING(SS_TAP(X_F6)); | ||
29 | } | ||
30 | break; | ||
31 | case M_GDB_STEPOVER: | ||
32 | if (record->event.pressed) { | ||
33 | SEND_STRING(SS_TAP(X_F10)); | ||
34 | } | ||
35 | break; | ||
36 | case M_GDB_STEPIN: | ||
37 | if (record->event.pressed) { | ||
38 | SEND_STRING(SS_TAP(X_F11)); | ||
39 | } | ||
40 | break; | ||
41 | case M_GDB_STEPOUT: | ||
42 | if (record->event.pressed) { | ||
43 | SEND_STRING(SS_LSFT(SS_TAP(X_F11))); | ||
44 | } | ||
45 | break; | ||
46 | case M_GDB_RESTART: | ||
47 | if (record->event.pressed) { | ||
48 | SEND_STRING(SS_LCTRL(SS_LSFT(SS_TAP(X_F5)))); | ||
49 | } | ||
50 | break; | ||
51 | case M_GDB_STOP: | ||
52 | if (record->event.pressed) { | ||
53 | SEND_STRING(SS_LSFT(SS_TAP(X_F5))); | ||
54 | } | ||
55 | break; | ||
56 | } | ||
57 | |||
58 | return rv; | ||
59 | } | ||