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.

102 lines
4.8 KiB

  1. /* Copyright 2021 gipsy-king
  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 QMK_KEYBOARD_H
  17. // Raise layer or enter on tap
  18. #define RAISE LT(1, KC_ENT)
  19. // Xmonad layer with LGUI always on
  20. #define MOD4 LM(2, MOD_LGUI)
  21. // Oneshot
  22. #define ONESHOT OSL(3)
  23. // Mic-mute-tap or Fn layer (F20 is mic-mute on thinkpads)
  24. #define FNLAY LT(3, KC_F20)
  25. enum custom_keycodes {
  26. EMAIL = SAFE_RANGE,
  27. EMAIL_W,
  28. };
  29. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  30. /* Qwerty
  31. * .-----------------------------------------------------------------------------------.
  32. * | Tab | Q | W | E | R | T | Y | U | I | O | P |Backsp|
  33. * |------+------+------+------+------+------|------+------+------+------+------+------|
  34. * | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
  35. * |------+------+------+------+------+------|------+------+------+------+------+------|
  36. * | - | Z | X | C | V | B | N | M | , | . | / | = |
  37. * |------+------+------+------+------+------+------+------+------+------+------+------|
  38. * | LCTR | LGUI | LALT | MOD4 | ^( | Space|Ent/Ra| ^) | RALT | MUTE | RGUI | RCTR |
  39. * '-----------------------------------------------------------------------------------'
  40. */
  41. [0] = LAYOUT(
  42. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
  43. KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,
  44. KC_MINS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_EQL,
  45. KC_LCTL,KC_LALT,KC_LGUI,MOD4, KC_LSPO,KC_SPC, RAISE, KC_RSPC,KC_RALT,KC_RGUI,FNLAY, KC_RCTL
  46. ),
  47. /* Raise
  48. * .-----------------------------------------------------------------------------------.
  49. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
  50. * |------+------+------+------+------+------|------+------+------+------+------+------|
  51. * | ~ | { | PgUp | PgDn | End | Home | <- | \/ | /\ | -> | } | | |
  52. * |------+------+------+------+------+------|------+------+------+------+------+------|
  53. * | [ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ] |
  54. * |------+------+------+------+------+------+------+------+------+------+------+------|
  55. * | | | | | | | | | | | | |
  56. * '-----------------------------------------------------------------------------------'
  57. */
  58. [1] = LAYOUT(
  59. KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
  60. KC_TILD,KC_LCBR,KC_PGUP,KC_PGDN,KC_END, KC_HOME,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_RCBR,KC_PIPE,
  61. KC_LBRC,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_RBRC,
  62. _______,_______,_______,_______,_______,_______,_______,_______,_______,ONESHOT,_______,_______
  63. ),
  64. /* XMONAD
  65. * Top row: Quit, Workspace shortcuts, Run
  66. * Middle row: Float, HJKL
  67. * Bottom row: Shift, Close, Border, Keyboard reset
  68. * Thumbs: Estra shifts, Space, Enter, Shifts
  69. */
  70. [2] = LAYOUT(
  71. KC_Q, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_P, KC_MUTE,
  72. KC_LSFT,_______,_______,_______,_______,KC_T, KC_H, KC_J, KC_K, KC_L, _______,_______,
  73. KC_LSFT,_______,_______,KC_C, _______,KC_B, _______,_______,_______,_______,_______,_______,
  74. _______,_______,_______,KC_LSFT,KC_LSFT,KC_SPC, KC_ENT, KC_LSFT,_______,_______,KC_VOLD,KC_VOLU
  75. ),
  76. /* Fn
  77. * Some macros, Keyboard-reset, mouse and audio.
  78. */
  79. [3] = LAYOUT(
  80. _______,_______,EMAIL_W,EMAIL, _______,_______,_______,_______,_______,_______,_______,RESET,
  81. _______,_______,_______,_______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______,
  82. _______,_______,_______,_______,_______,_______,KC_BTN1,KC_MUTE,KC_VOLD,KC_VOLU,KC_BRID,KC_BRIU,
  83. _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
  84. )
  85. };
  86. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  87. if (record->event.pressed) {
  88. switch (keycode) {
  89. case EMAIL:
  90. SEND_STRING("ste3ls@gmail.com");
  91. break;
  92. case EMAIL_W:
  93. SEND_STRING("benjamin@midokura.com");
  94. break;
  95. }
  96. }
  97. return true;
  98. };