aboutsummaryrefslogtreecommitdiff
path: root/users/moults31/vscode.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/moults31/vscode.c')
-rw-r--r--users/moults31/vscode.c90
1 files changed, 90 insertions, 0 deletions
diff --git a/users/moults31/vscode.c b/users/moults31/vscode.c
new file mode 100644
index 000000000..a2fcf062d
--- /dev/null
+++ b/users/moults31/vscode.c
@@ -0,0 +1,90 @@
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 "vscode.h"
17
18bool process_record_vsc(uint16_t keycode, keyrecord_t *record) {
19 bool rv = true;
20
21 switch (keycode) {
22 case M_VSC_TERMFOCUS:
23 if (record->event.pressed) {
24 SEND_STRING(SS_LCTRL("`"));
25 }
26 break;
27 case M_VSC_SIDEBARFOCUS:
28 if (record->event.pressed) {
29 SEND_STRING(SS_LCTRL("0"));
30 }
31 break;
32 case M_VSC_SIDEBARCLOSE:
33 if (record->event.pressed) {
34 SEND_STRING(SS_LCTRL("b"));
35 }
36 break;
37 case M_VSC_FILECLOSE:
38 if (record->event.pressed) {
39 SEND_STRING(SS_LCTRL("w"));
40 }
41 break;
42 case M_VSC_FILENXT:
43 if (record->event.pressed) {
44 SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_K) SS_TAP(X_PGDOWN) SS_UP(X_LCTRL));
45 }
46 break;
47 case M_VSC_FILEPRV:
48 if (record->event.pressed) {
49 SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_K) SS_TAP(X_PGUP) SS_UP(X_LCTRL));
50 }
51 break;
52 case M_VSC_DBGCNSLFOCUS:
53 if (record->event.pressed) {
54 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_D))));
55 }
56 break;
57 case M_VSC_MVEDTRNXTGRP:
58 if (record->event.pressed) {
59 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_RIGHT))));
60 }
61 break;
62 case M_VSC_MVEDTRPRVGRP:
63 if (record->event.pressed) {
64 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_LEFT))));
65 }
66 break;
67 case M_VSC_EDGRPNXT:
68 if (record->event.pressed) {
69 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_L))));
70 }
71 break;
72 case M_VSC_EDGRPPRV:
73 if (record->event.pressed) {
74 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_K))));
75 }
76 break;
77 case M_VSC_VIEWSIZEINC:
78 if (record->event.pressed) {
79 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_P))));
80 }
81 break;
82 case M_VSC_VIEWSIZEDEC:
83 if (record->event.pressed) {
84 SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_O))));
85 }
86 break;
87 }
88
89 return rv;
90}