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.

85 lines
2.8 KiB

  1. /* Copyright 2021 Mats Nilsson
  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. #include QMK_KEYBOARD_H
  18. #include "keymap_swedish.h"
  19. // Layers
  20. enum layers {
  21. _COLEMAK,
  22. _QWERTY,
  23. _SYMBOLS,
  24. _NAVIGATION,
  25. _NUMPAD,
  26. };
  27. // Custom Keycodes
  28. #define _NAV_SPC LT(_NAVIGATION, KC_SPC) // _NAVIGATION when held, SPACE when tapped
  29. #define _SYM_ENT LT(_SYMBOLS, KC_ENT) // _SYMBOLS when held, ENTER when tapped
  30. #define CTL_BSPC MT(MOD_LCTL, KC_BSPC) // CTRL when held, BACKSPACE when tapped
  31. #define ALT_DEL MT(MOD_LALT, KC_DEL) // ALT when held, DELETE when tapped
  32. #define SFT_TAB MT(MOD_LSFT, KC_TAB) // SHIFT when held, TAB when tapped
  33. #define C_TAB C(KC_TAB) // CTRL+TAB
  34. #define CS_TAB C(S(KC_TAB)) // SHIFT+CTRL+TAB
  35. #define CUT C(KC_X) // CTRL+X
  36. #define COPY C(KC_INS) // CTRL+INSERT
  37. #define PASTE S(KC_INS) // SHIFT+INSERT
  38. #define AUTOFILL C(S(KC_L)) // Bitwarden Autofill, CTRL+SHIFT+L
  39. // i3 config
  40. #define I3MOD KC_LGUI // $mod
  41. #define OPEN G(KC_SPC) // $mod+SPACE
  42. #define QUIT G(S(KC_Q)) // $mod+SHIFT+Q
  43. #define WIN G(C(KC_SPC)) // $mod+CTRL+SPACE
  44. #define BROWSER G(KC_ENTER) // $mod+ENTER
  45. #define TERM G(S(KC_ENTER)) // $mod+CTRL+ENTER
  46. #define NXTWS G(KC_TAB) // $mod+TAB
  47. #define PRVWS G(S(KC_TAB)) // $mod+SHIFT+TAB
  48. #define MOVWS G(KC_LSFT) // $mod+SHIFT+$X
  49. #define CRYWS G(KC_LALT) // $mod+ALT+$X
  50. #define MVWSL G(C(S(KC_LEFT))) // $mod+CTRL+SHIFT+LEFT
  51. #define MVWSR G(C(S(KC_RGHT))) // $mod+CTRL+SHIFT+RIGHT
  52. enum custom_keycodes {
  53. M_TILD = SAFE_RANGE, // ~
  54. M_CIRC, // ^
  55. M_BTCK, // `
  56. QWE_COL, // Swaps default layer
  57. };
  58. // Tap Dance
  59. typedef struct {
  60. bool is_press_action;
  61. int state;
  62. } tap;
  63. // Define a type for as many tap dance states as you need
  64. enum {
  65. SINGLE_TAP = 1,
  66. SINGLE_HOLD = 2,
  67. DOUBLE_TAP = 3,
  68. DOUBLE_HOLD = 4,
  69. DOUBLE_SINGLE_TAP = 5, // send two single taps
  70. TRIPLE_TAP = 6,
  71. TRIPLE_HOLD = 7
  72. };
  73. enum {
  74. AAE = 0, // a and ae
  75. OAA, // o and aa
  76. };