dvorak_42_key.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. // Copyright 2022 LucW (@luc-languagetools)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "quantum.h"
  5. // LAYERS
  6. // ======
  7. enum layer_names {
  8. BASE, // base dvorak layer
  9. KEYNAV, // arrow navigation (right hand)
  10. KEYSEL, // arrow navigation + shift (allow text selection)
  11. SHELL_NAV, // bash shortcuts
  12. SHELL_SCREEN, // linux screen shortcuts
  13. BROWSER_CONTROL, // control browser and mouse
  14. COMBINED, // combined numbers and symbols layer
  15. ANDROID_STUDIO, // android studio specific layer
  16. VSCODE, // visual studio code specific layer
  17. SHORTCUTS, // shortcuts to be intercepted by autohotkey
  18. };
  19. enum custom_keycodes {
  20. PLACEHOLDER = SAFE_RANGE, // can always be here
  21. // shell nav macros
  22. SHELL_LS,
  23. SHELL_LSLTR,
  24. SHELL_LSLA,
  25. SHELL_CDPRE,
  26. SHELL_LESS,
  27. SHELL_PLESS,
  28. SHELL_PGREP,
  29. SHELL_TAILF,
  30. SHELL_SCREENRD,
  31. SHELL_SCREEN_NEW,
  32. SHELL_SCREEN_LIST,
  33. SHELL_GIT_DIFF,
  34. SHELL_GIT_STATUS,
  35. // linux screen macros
  36. SCREEN_TAB_LEFT,
  37. SCREEN_TAB_RIGHT,
  38. SCREEN_NEW_TAB,
  39. SCREEN_DETACH,
  40. SCREEN_RENAME,
  41. SCREEN_NUMBER,
  42. SCREEN_KILL,
  43. SCREEN_0,
  44. SCREEN_1,
  45. SCREEN_2,
  46. SCREEN_3,
  47. SCREEN_4,
  48. SCREEN_5,
  49. SCREEN_6,
  50. SCREEN_7,
  51. SCREEN_8,
  52. SCREEN_9,
  53. SCREEN_COPY_MODE,
  54. SCREEN_PASTE,
  55. SCREEN_READREG_1,
  56. SCREEN_READREG_2,
  57. SCREEN_READREG_3,
  58. SCREEN_PASTEREG_1,
  59. SCREEN_PASTEREG_2,
  60. SCREEN_PASTEREG_3,
  61. // Windows 10 macros
  62. WINDOWS10_WORKSPACE_LEFT,
  63. WINDOWS10_WORKSPACE_RIGHT,
  64. WINDOWS10_TASK_VIEW,
  65. };
  66. // Notepad++ shortcuts
  67. // ===================
  68. #define NP_DUPE_LINE LCTL(KC_D)
  69. // ChromeOS shortcuts
  70. // ==================
  71. #define CO_WS_LEFT RGUI(KC_LBRC)
  72. #define CO_WS_RIGHT RGUI(KC_RBRC)
  73. // Android Studio shortcuts
  74. #define AS_TABLEFT LALT(KC_LEFT)
  75. #define AS_TABRIGHT LALT(KC_RIGHT)
  76. #define AS_SYMBOL LCTL(LALT(KC_N))
  77. #define AS_CLASS LCTL(KC_N)
  78. #define AS_FINDUSAGE LALT(KC_F7)
  79. #define AS_BACK LCTL(LALT(KC_LEFT))
  80. #define AS_BRACKET LCTL(LSFT(KC_M))
  81. #define AS_GO_DECLARATION LCTL(KC_B)
  82. #define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B))
  83. #define AS_CLOSETAB LCTL(KC_F4)
  84. #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4))
  85. #define AS_COPYLINEDOWN LCTL(KC_D)
  86. #define AS_DEL_LINE LCTL(KC_Y)
  87. #define AS_LINE LCTL(KC_G)
  88. #define AS_CMT_BLOCK LCTL(LSFT(KC_SLSH))
  89. #define AS_CMT_LINE LCTL(KC_SLSH)
  90. #define AS_BM_PREV LALT(KC_P)
  91. #define AS_BM_NEXT LALT(KC_N)
  92. #define AS_BM_TOGGLE KC_F11
  93. #define AS_BM_LIST LSFT(KC_F11)
  94. // visual studio code shortcuts
  95. // ============================
  96. #include "vscode_macros.h"
  97. // unused vscode shortcuts
  98. // #define VS_BM_LIST LCTL(LALT(KC_L))
  99. // #define VS_BM_LISTALL LCTL(LALT(KC_A))
  100. // #define VS_BM_CLEARALL LCTL(LALT(KC_C))
  101. // #define VS_TERMINAL_PREV MEH(KC_F12)
  102. // #define VS_TERMINAL_NEXT MEH(KC_F13)
  103. // #define VS_TERMINAL_NEW MEH(KC_F14)
  104. // #define VS_TERMINAL_DETACH MEH(KC_F15)
  105. // #define VS_TERMINAL_RENAME MEH(KC_F16)
  106. // #define VS_JUMPY MEH(KC_F17)
  107. // #define VS_FIND MEH(KC_F19)
  108. // #define VS_CLOSEPANEL LCTL(LSFT(KC_W))
  109. // #define VS_BUILD LCTL(LSFT(KC_B))
  110. // #define VS_OPEN_FILE MEH(KC_F2)
  111. // #define VS_TERMINAL MEH(KC_F15)
  112. // tap-dance configuration
  113. // =======================
  114. enum {
  115. // TD_BSPC_CTL_BSPC,
  116. // TD_BSPC_CTL_BSPC_IOS,
  117. TD_DEL_WORD_DEL,
  118. TD_DEL_WORD_DEL_IOS
  119. };
  120. typedef struct {
  121. uint16_t tap;
  122. uint16_t hold;
  123. uint16_t held;
  124. } tap_dance_tap_hold_t;
  125. #define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \
  126. { .fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, .user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), }