diff options
| author | Mats Nilsson <matni403@gmail.com> | 2021-06-19 02:55:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-18 17:55:56 -0700 |
| commit | 8de028f1889da418de52bdc1da138687c4944378 (patch) | |
| tree | e99c298cf3a55bc4ef6a6f9f942cc832b996ee26 /users/mnil/mnil.h | |
| parent | 8694e2d3f074ffbdc9f3fc1c0a5fe3c6b4163f5d (diff) | |
| download | qmk_firmware-8de028f1889da418de52bdc1da138687c4944378.tar.gz qmk_firmware-8de028f1889da418de52bdc1da138687c4944378.zip | |
[Keymap] Add my keymaps for the Keebio Iris and Planck (#13005)
Diffstat (limited to 'users/mnil/mnil.h')
| -rw-r--r-- | users/mnil/mnil.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/users/mnil/mnil.h b/users/mnil/mnil.h new file mode 100644 index 000000000..357acfe3c --- /dev/null +++ b/users/mnil/mnil.h | |||
| @@ -0,0 +1,85 @@ | |||
| 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 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "keymap_swedish.h" | ||
| 21 | |||
| 22 | // Layers | ||
| 23 | enum layers { | ||
| 24 | _COLEMAK, | ||
| 25 | _QWERTY, | ||
| 26 | _SYMBOLS, | ||
| 27 | _NAVIGATION, | ||
| 28 | _NUMPAD, | ||
| 29 | }; | ||
| 30 | |||
| 31 | // Custom Keycodes | ||
| 32 | #define _NAV_SPC LT(_NAVIGATION, KC_SPC) // _NAVIGATION when held, SPACE when tapped | ||
| 33 | #define _SYM_ENT LT(_SYMBOLS, KC_ENT) // _SYMBOLS when held, ENTER when tapped | ||
| 34 | #define CTL_BSPC MT(MOD_LCTL, KC_BSPC) // CTRL when held, BACKSPACE when tapped | ||
| 35 | #define ALT_DEL MT(MOD_LALT, KC_DEL) // ALT when held, DELETE when tapped | ||
| 36 | #define SFT_TAB MT(MOD_LSFT, KC_TAB) // SHIFT when held, TAB when tapped | ||
| 37 | #define C_TAB C(KC_TAB) // CTRL+TAB | ||
| 38 | #define CS_TAB C(S(KC_TAB)) // SHIFT+CTRL+TAB | ||
| 39 | #define CUT C(KC_X) // CTRL+X | ||
| 40 | #define COPY C(KC_INS) // CTRL+INSERT | ||
| 41 | #define PASTE S(KC_INS) // SHIFT+INSERT | ||
| 42 | #define AUTOFILL C(S(KC_L)) // Bitwarden Autofill, CTRL+SHIFT+L | ||
| 43 | |||
| 44 | // i3 config | ||
| 45 | #define I3MOD KC_LGUI // $mod | ||
| 46 | #define OPEN G(KC_SPC) // $mod+SPACE | ||
| 47 | #define QUIT G(S(KC_Q)) // $mod+SHIFT+Q | ||
| 48 | #define WIN G(C(KC_SPC)) // $mod+CTRL+SPACE | ||
| 49 | #define BROWSER G(KC_ENTER) // $mod+ENTER | ||
| 50 | #define TERM G(S(KC_ENTER)) // $mod+CTRL+ENTER | ||
| 51 | #define NXTWS G(KC_TAB) // $mod+TAB | ||
| 52 | #define PRVWS G(S(KC_TAB)) // $mod+SHIFT+TAB | ||
| 53 | #define MOVWS G(KC_LSFT) // $mod+SHIFT+$X | ||
| 54 | #define CRYWS G(KC_LALT) // $mod+ALT+$X | ||
| 55 | #define MVWSL G(C(S(KC_LEFT))) // $mod+CTRL+SHIFT+LEFT | ||
| 56 | #define MVWSR G(C(S(KC_RGHT))) // $mod+CTRL+SHIFT+RIGHT | ||
| 57 | |||
| 58 | enum custom_keycodes { | ||
| 59 | M_TILD = SAFE_RANGE, // ~ | ||
| 60 | M_CIRC, // ^ | ||
| 61 | M_BTCK, // ` | ||
| 62 | QWE_COL, // Swaps default layer | ||
| 63 | }; | ||
| 64 | |||
| 65 | // Tap Dance | ||
| 66 | typedef struct { | ||
| 67 | bool is_press_action; | ||
| 68 | int state; | ||
| 69 | } tap; | ||
| 70 | |||
| 71 | // Define a type for as many tap dance states as you need | ||
| 72 | enum { | ||
| 73 | SINGLE_TAP = 1, | ||
| 74 | SINGLE_HOLD = 2, | ||
| 75 | DOUBLE_TAP = 3, | ||
| 76 | DOUBLE_HOLD = 4, | ||
| 77 | DOUBLE_SINGLE_TAP = 5, // send two single taps | ||
| 78 | TRIPLE_TAP = 6, | ||
| 79 | TRIPLE_HOLD = 7 | ||
| 80 | }; | ||
| 81 | |||
| 82 | enum { | ||
| 83 | AAE = 0, // a and ae | ||
| 84 | OAA, // o and aa | ||
| 85 | }; | ||
