diff options
| author | Zac Moulton <moulton.zac@gmail.com> | 2021-09-10 18:56:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-10 18:56:50 -0700 |
| commit | d7747a2d700eec08679011d79dc6192fe43ca402 (patch) | |
| tree | bb714979ee6522af754c6deba60cd174fec0fdaf /users | |
| parent | 759d1927f099ba319ad09c69a2cc71026d775713 (diff) | |
| download | qmk_firmware-d7747a2d700eec08679011d79dc6192fe43ca402.tar.gz qmk_firmware-d7747a2d700eec08679011d79dc6192fe43ca402.zip | |
[Keymap] moults31 userspace and keymaps (#12025)
Diffstat (limited to 'users')
| -rw-r--r-- | users/moults31/gdb.c | 59 | ||||
| -rw-r--r-- | users/moults31/gdb.h | 21 | ||||
| -rw-r--r-- | users/moults31/moults31.c | 114 | ||||
| -rw-r--r-- | users/moults31/moults31.h | 61 | ||||
| -rw-r--r-- | users/moults31/obs.c | 80 | ||||
| -rw-r--r-- | users/moults31/obs.h | 21 | ||||
| -rw-r--r-- | users/moults31/readme.md | 5 | ||||
| -rw-r--r-- | users/moults31/rules.mk | 10 | ||||
| -rw-r--r-- | users/moults31/vscode.c | 90 | ||||
| -rw-r--r-- | users/moults31/vscode.h | 21 |
10 files changed, 482 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 | } | ||
diff --git a/users/moults31/gdb.h b/users/moults31/gdb.h new file mode 100644 index 000000000..385825692 --- /dev/null +++ b/users/moults31/gdb.h | |||
| @@ -0,0 +1,21 @@ | |||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | #include "moults31.h" | ||
| 20 | |||
| 21 | bool process_record_gdb(uint16_t keycode, keyrecord_t *record); | ||
diff --git a/users/moults31/moults31.c b/users/moults31/moults31.c new file mode 100644 index 000000000..0dbaed0bb --- /dev/null +++ b/users/moults31/moults31.c | |||
| @@ -0,0 +1,114 @@ | |||
| 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 "moults31.h" | ||
| 17 | |||
| 18 | bool moults31_tap_custom_code(uint16_t keycode) { | ||
| 19 | keyrecord_t record = { | ||
| 20 | .event = { | ||
| 21 | .pressed = 1, | ||
| 22 | }, | ||
| 23 | }; | ||
| 24 | return process_record_user(keycode, &record); | ||
| 25 | } | ||
| 26 | |||
| 27 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 28 | bool rv = true; | ||
| 29 | switch (keycode) { | ||
| 30 | case M_MST_CODEBLOCK: | ||
| 31 | if (record->event.pressed) { | ||
| 32 | SEND_STRING("```"); | ||
| 33 | } | ||
| 34 | break; | ||
| 35 | |||
| 36 | case M_VSC_TERMFOCUS: | ||
| 37 | case M_VSC_SIDEBARFOCUS: | ||
| 38 | case M_VSC_SIDEBARCLOSE: | ||
| 39 | case M_VSC_FILECLOSE: | ||
| 40 | case M_VSC_FILENXT: | ||
| 41 | case M_VSC_FILEPRV: | ||
| 42 | case M_VSC_DBGCNSLFOCUS: | ||
| 43 | case M_VSC_MVEDTRNXTGRP: | ||
| 44 | case M_VSC_MVEDTRPRVGRP: | ||
| 45 | case M_VSC_EDGRPNXT: | ||
| 46 | case M_VSC_EDGRPPRV: | ||
| 47 | case M_VSC_VIEWSIZEINC: | ||
| 48 | case M_VSC_VIEWSIZEDEC: | ||
| 49 | rv = process_record_vsc(keycode, record); | ||
| 50 | break; | ||
| 51 | |||
| 52 | case M_GDB_PLAY: | ||
| 53 | case M_GDB_PAUSE: | ||
| 54 | case M_GDB_STEPOVER: | ||
| 55 | case M_GDB_STEPIN: | ||
| 56 | case M_GDB_STEPOUT: | ||
| 57 | case M_GDB_RESTART: | ||
| 58 | case M_GDB_STOP: | ||
| 59 | rv = process_record_gdb(keycode, record); | ||
| 60 | break; | ||
| 61 | |||
| 62 | case M_OBS_BRB: | ||
| 63 | case M_OBS_GAME: | ||
| 64 | case M_OBS_JSTCHT: | ||
| 65 | case M_OBS_DSKT_MUTE: | ||
| 66 | case M_OBS_DSKT_UNMUTE: | ||
| 67 | case M_OBS_VOICE_MUTE: | ||
| 68 | case M_OBS_VOICE_UNMUTE: | ||
| 69 | case M_OBS_MOOSIC_MUTE: | ||
| 70 | case M_OBS_MOOSIC_UNMUTE: | ||
| 71 | rv = process_record_obs(keycode, record); | ||
| 72 | break; | ||
| 73 | } | ||
| 74 | return rv; | ||
| 75 | }; | ||
| 76 | |||
| 77 | #ifdef ENCODER_ENABLE | ||
| 78 | __attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 79 | const layer_state_t curr_layer = get_highest_layer(layer_state); | ||
| 80 | if (index == 1) { /* Bottom encoder */ | ||
| 81 | if(curr_layer == 2 || curr_layer == 3) { | ||
| 82 | if (clockwise) { | ||
| 83 | moults31_tap_custom_code(M_VSC_FILENXT); | ||
| 84 | } else { | ||
| 85 | moults31_tap_custom_code(M_VSC_FILEPRV); | ||
| 86 | } | ||
| 87 | } | ||
| 88 | else { | ||
| 89 | if (clockwise) { | ||
| 90 | tap_code(KC_VOLU); | ||
| 91 | } else { | ||
| 92 | tap_code(KC_VOLD); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } | ||
| 96 | if (index == 0) { /* Top encoder */ | ||
| 97 | if(curr_layer == 2 || curr_layer == 3) { | ||
| 98 | if (clockwise) { | ||
| 99 | moults31_tap_custom_code(M_VSC_VIEWSIZEINC); | ||
| 100 | } else { | ||
| 101 | moults31_tap_custom_code(M_VSC_VIEWSIZEDEC); | ||
| 102 | } | ||
| 103 | } | ||
| 104 | else { | ||
| 105 | if (clockwise) { | ||
| 106 | tap_code(KC_MNXT); | ||
| 107 | } else { | ||
| 108 | tap_code(KC_MPRV); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | } | ||
| 112 | return false; | ||
| 113 | } | ||
| 114 | #endif | ||
diff --git a/users/moults31/moults31.h b/users/moults31/moults31.h new file mode 100644 index 000000000..60e317b78 --- /dev/null +++ b/users/moults31/moults31.h | |||
| @@ -0,0 +1,61 @@ | |||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | #include "vscode.h" | ||
| 21 | #include "obs.h" | ||
| 22 | #include "gdb.h" | ||
| 23 | |||
| 24 | bool moults31_tap_custom_code(uint16_t keycode); | ||
| 25 | |||
| 26 | enum custom_keycodes { | ||
| 27 | // VSCode keycodes | ||
| 28 | M_VSC_TERMFOCUS = SAFE_RANGE, | ||
| 29 | M_VSC_SIDEBARFOCUS, | ||
| 30 | M_VSC_SIDEBARCLOSE, | ||
| 31 | M_VSC_DBGCNSLFOCUS, | ||
| 32 | M_VSC_EDGRPNXT, | ||
| 33 | M_VSC_EDGRPPRV, | ||
| 34 | M_VSC_MVEDTRNXTGRP, | ||
| 35 | M_VSC_MVEDTRPRVGRP, | ||
| 36 | M_VSC_VIEWSIZEINC, | ||
| 37 | M_VSC_VIEWSIZEDEC, | ||
| 38 | M_VSC_FILECLOSE, | ||
| 39 | M_VSC_FILENXT, | ||
| 40 | M_VSC_FILEPRV, | ||
| 41 | // GDB keycodes (for vscode debugger) | ||
| 42 | M_GDB_PLAY, | ||
| 43 | M_GDB_PAUSE, | ||
| 44 | M_GDB_STEPOVER, | ||
| 45 | M_GDB_STEPIN, | ||
| 46 | M_GDB_STEPOUT, | ||
| 47 | M_GDB_RESTART, | ||
| 48 | M_GDB_STOP, | ||
| 49 | // MS Teams keycodes | ||
| 50 | M_MST_CODEBLOCK, | ||
| 51 | // OBS keycodes | ||
| 52 | M_OBS_BRB, | ||
| 53 | M_OBS_GAME, | ||
| 54 | M_OBS_JSTCHT, | ||
| 55 | M_OBS_DSKT_MUTE, | ||
| 56 | M_OBS_DSKT_UNMUTE, | ||
| 57 | M_OBS_VOICE_MUTE, | ||
| 58 | M_OBS_VOICE_UNMUTE, | ||
| 59 | M_OBS_MOOSIC_MUTE, | ||
| 60 | M_OBS_MOOSIC_UNMUTE, | ||
| 61 | }; | ||
diff --git a/users/moults31/obs.c b/users/moults31/obs.c new file mode 100644 index 000000000..0ae5f3deb --- /dev/null +++ b/users/moults31/obs.c | |||
| @@ -0,0 +1,80 @@ | |||
| 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 "obs.h" | ||
| 17 | |||
| 18 | bool process_record_obs(uint16_t keycode, keyrecord_t *record) { | ||
| 19 | // Apply all 4 mods for custom OBS macros | ||
| 20 | register_code(KC_LSHIFT); | ||
| 21 | register_code(KC_LCTL); | ||
| 22 | register_code(KC_LALT); | ||
| 23 | register_code(KC_LGUI); | ||
| 24 | |||
| 25 | switch (keycode) { | ||
| 26 | case M_OBS_BRB: | ||
| 27 | if (record->event.pressed) { | ||
| 28 | SEND_STRING("1"); | ||
| 29 | } | ||
| 30 | break; | ||
| 31 | case M_OBS_GAME: | ||
| 32 | if (record->event.pressed) { | ||
| 33 | SEND_STRING("2"); | ||
| 34 | } | ||
| 35 | break; | ||
| 36 | case M_OBS_JSTCHT: | ||
| 37 | if (record->event.pressed) { | ||
| 38 | SEND_STRING("3"); | ||
| 39 | } | ||
| 40 | break; | ||
| 41 | case M_OBS_DSKT_MUTE: | ||
| 42 | if (record->event.pressed) { | ||
| 43 | SEND_STRING("4"); | ||
| 44 | } | ||
| 45 | break; | ||
| 46 | case M_OBS_DSKT_UNMUTE: | ||
| 47 | if (record->event.pressed) { | ||
| 48 | SEND_STRING("5"); | ||
| 49 | } | ||
| 50 | break; | ||
| 51 | case M_OBS_VOICE_MUTE: | ||
| 52 | if (record->event.pressed) { | ||
| 53 | SEND_STRING("6"); | ||
| 54 | } | ||
| 55 | break; | ||
| 56 | case M_OBS_VOICE_UNMUTE: | ||
| 57 | if (record->event.pressed) { | ||
| 58 | SEND_STRING("7"); | ||
| 59 | } | ||
| 60 | break; | ||
| 61 | case M_OBS_MOOSIC_MUTE: | ||
| 62 | if (record->event.pressed) { | ||
| 63 | SEND_STRING("8"); | ||
| 64 | } | ||
| 65 | break; | ||
| 66 | case M_OBS_MOOSIC_UNMUTE: | ||
| 67 | if (record->event.pressed) { | ||
| 68 | SEND_STRING("9"); | ||
| 69 | } | ||
| 70 | break; | ||
| 71 | } | ||
| 72 | |||
| 73 | // Unpress all 4 mods for custom OBS macros | ||
| 74 | unregister_code(KC_LSHIFT); | ||
| 75 | unregister_code(KC_LCTL); | ||
| 76 | unregister_code(KC_LALT); | ||
| 77 | unregister_code(KC_LGUI); | ||
| 78 | |||
| 79 | return true; | ||
| 80 | } | ||
diff --git a/users/moults31/obs.h b/users/moults31/obs.h new file mode 100644 index 000000000..2a2973f80 --- /dev/null +++ b/users/moults31/obs.h | |||
| @@ -0,0 +1,21 @@ | |||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | #include "moults31.h" | ||
| 20 | |||
| 21 | bool process_record_obs(uint16_t keycode, keyrecord_t *record); | ||
diff --git a/users/moults31/readme.md b/users/moults31/readme.md new file mode 100644 index 000000000..3a5badbe5 --- /dev/null +++ b/users/moults31/readme.md | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # moults31 Userspace | ||
| 2 | |||
| 3 | ## Features | ||
| 4 | |||
| 5 | - Custom macros for VScode, OBS, GDB (Visual) | ||
diff --git a/users/moults31/rules.mk b/users/moults31/rules.mk new file mode 100644 index 000000000..af7c11d9f --- /dev/null +++ b/users/moults31/rules.mk | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | SRC += moults31.c | ||
| 2 | |||
| 3 | # Custom macro sources | ||
| 4 | SRC += vscode.c | ||
| 5 | SRC += obs.c | ||
| 6 | SRC += gdb.c | ||
| 7 | |||
| 8 | ifneq ($(PLATFORM),CHIBIOS) | ||
| 9 | LTO_ENABLE = yes # Enable link time optimization | ||
| 10 | endif | ||
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 | |||
| 18 | bool 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 | } | ||
diff --git a/users/moults31/vscode.h b/users/moults31/vscode.h new file mode 100644 index 000000000..7e88b6591 --- /dev/null +++ b/users/moults31/vscode.h | |||
| @@ -0,0 +1,21 @@ | |||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | #include "moults31.h" | ||
| 20 | |||
| 21 | bool process_record_vsc(uint16_t keycode, keyrecord_t *record); | ||
