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.

90 lines
2.9 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 "vscode.h"
  17. bool process_record_vsc(uint16_t keycode, keyrecord_t *record) {
  18. bool rv = true;
  19. switch (keycode) {
  20. case M_VSC_TERMFOCUS:
  21. if (record->event.pressed) {
  22. SEND_STRING(SS_LCTRL("`"));
  23. }
  24. break;
  25. case M_VSC_SIDEBARFOCUS:
  26. if (record->event.pressed) {
  27. SEND_STRING(SS_LCTRL("0"));
  28. }
  29. break;
  30. case M_VSC_SIDEBARCLOSE:
  31. if (record->event.pressed) {
  32. SEND_STRING(SS_LCTRL("b"));
  33. }
  34. break;
  35. case M_VSC_FILECLOSE:
  36. if (record->event.pressed) {
  37. SEND_STRING(SS_LCTRL("w"));
  38. }
  39. break;
  40. case M_VSC_FILENXT:
  41. if (record->event.pressed) {
  42. SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_K) SS_TAP(X_PGDOWN) SS_UP(X_LCTRL));
  43. }
  44. break;
  45. case M_VSC_FILEPRV:
  46. if (record->event.pressed) {
  47. SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_K) SS_TAP(X_PGUP) SS_UP(X_LCTRL));
  48. }
  49. break;
  50. case M_VSC_DBGCNSLFOCUS:
  51. if (record->event.pressed) {
  52. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_D))));
  53. }
  54. break;
  55. case M_VSC_MVEDTRNXTGRP:
  56. if (record->event.pressed) {
  57. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_RIGHT))));
  58. }
  59. break;
  60. case M_VSC_MVEDTRPRVGRP:
  61. if (record->event.pressed) {
  62. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_LEFT))));
  63. }
  64. break;
  65. case M_VSC_EDGRPNXT:
  66. if (record->event.pressed) {
  67. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_L))));
  68. }
  69. break;
  70. case M_VSC_EDGRPPRV:
  71. if (record->event.pressed) {
  72. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_K))));
  73. }
  74. break;
  75. case M_VSC_VIEWSIZEINC:
  76. if (record->event.pressed) {
  77. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_P))));
  78. }
  79. break;
  80. case M_VSC_VIEWSIZEDEC:
  81. if (record->event.pressed) {
  82. SEND_STRING(SS_LCTRL(SS_LALT(SS_TAP(X_O))));
  83. }
  84. break;
  85. }
  86. return rv;
  87. }