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.

89 lines
2.1 KiB

  1. #pragma once
  2. #include "quantum.h"
  3. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  4. enum userspace_custom_layers {
  5. DV = 0,
  6. QW,
  7. GAM1,
  8. RSE,
  9. LWR,
  10. LFT,
  11. MOUSE,
  12. TT1,
  13. TT2,
  14. TT3,
  15. T23X
  16. };
  17. #define BASE DV
  18. enum userspace_custom_keycodes {
  19. PAWFIVE = SAFE_RANGE,
  20. MOUKEY,
  21. MS_BTN1,
  22. MS_BTN2,
  23. MS_BTN3
  24. };
  25. // Transparent macro to indicate that this spot is already being pressed
  26. // to activate this layer
  27. #define _LAYER_ KC_TRNS
  28. // == Dual-action keys on most of the modifiers
  29. #define CTL_ESC CTL_T(KC_ESC)
  30. #define CTL_GRV CTL_T(KC_GRV)
  31. #define ALT_TAB ALT_T(KC_TAB)
  32. #define SFT_SPC SFT_T(KC_SPC)
  33. // == Macro keys for commonly used apps
  34. // -- Slack
  35. // Move one conversation up/down
  36. #define SLACKTB LGUI(LSFT(KC_T))
  37. #define SLACKUP LALT(LSFT(KC_UP))
  38. #define SLACKDN LALT(LSFT(KC_DOWN))
  39. // -- 1password
  40. #define PSWD LCTL(KC_BSLS)
  41. #define PSWD_ALT LCTL(LALT(KC_BSLS))
  42. // -- Browser and OS X
  43. // Activate one tab left/right
  44. #define TAB_LFT LGUI(LSFT(KC_LBRC))
  45. #define TAB_RGT LGUI(LSFT(KC_RBRC))
  46. // Go back/forward in history
  47. #define BWSR_BK LGUI(KC_LBRC)
  48. #define BWSR_FW LGUI(KC_RBRC)
  49. // -- Screen management
  50. // Make window fill the left/right side
  51. #define SCR_LFT HYPR(KC_LEFT)
  52. #define SCR_RGT HYPR(KC_RGHT)
  53. // Make window fill the whole monitor
  54. #define SCR_FUL HYPR(KC_F)
  55. // -- Windows variants of browser commanads
  56. // Activate one tab left/right
  57. #define WTABLFT LCTL(LSFT(KC_TAB))
  58. #define WTABRGT LCTL(KC_TAB)
  59. // Go back/forward in history
  60. #define WBWSRBK LALT(KC_LEFT)
  61. #define WBWSRFW LALT(KC_RGHT)
  62. // == Extended alpha layer toggles
  63. // -- Dvorak
  64. // Pressing U opens up the LWR layer (numpad)
  65. #define LWR_U LT(LWR, KC_U)
  66. // Pressing H opens up the RSE layer (brackets/parens)
  67. #define RSE_H LT(RSE, KC_H)
  68. // -- Qwerty
  69. // Pressing F opens up the LWR layer (numpad)
  70. #define LWR_F LT(LWR, KC_F)
  71. // Pressing J opens up the RSE layer (brackets/parens)
  72. #define RSE_J LT(RSE, KC_J)
  73. // -- LFT layer (Works on both Qwerty and Dvorak)
  74. // Pressing Back space or Enter opens up the LFT layer (media/navigation)
  75. #define LFT_BK LT(LFT, KC_BSPC)
  76. #define LFT_ENT LT(LFT, KC_ENT)