@ -0,0 +1,29 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#pragma once | |||||
#define EE_HANDS | |||||
#undef RGBLED_NUM | |||||
#define RGBLIGHT_ANIMATIONS | |||||
#define RGBLED_NUM 12 | |||||
#define RGBLIGHT_HUE_STEP 8 | |||||
#define RGBLIGHT_SAT_STEP 8 | |||||
#define RGBLIGHT_VAL_STEP 8 | |||||
#define RGBLIGHT_SPLIT \ | |||||
{ 6, 6 } | |||||
#define RGBLIGHT_SLEEP |
@ -0,0 +1,94 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#include "mnil.h" | |||||
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {5, 5, 5, 5}; | |||||
#define HSV_DEFAULT 32, 255, 255 | |||||
layer_state_t layer_state_set_user(layer_state_t state) { | |||||
state = update_tri_layer_state(state, _SYMBOLS, _NAVIGATION, _NUMPAD); | |||||
switch (get_highest_layer(state)) { | |||||
case _NUMPAD: | |||||
rgblight_sethsv_noeeprom(HSV_GREEN); | |||||
break; | |||||
case _NAVIGATION: | |||||
rgblight_sethsv_noeeprom(HSV_MAGENTA); | |||||
break; | |||||
case _SYMBOLS: | |||||
rgblight_sethsv_noeeprom(HSV_AZURE); | |||||
break; | |||||
default: // for any other layers, or the default layer | |||||
rgblight_sethsv_noeeprom(HSV_DEFAULT); | |||||
break; | |||||
} | |||||
return state; | |||||
} | |||||
// clang-format off | |||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||
[_COLEMAK] = LAYOUT( | |||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ | |||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, TD(OAA), KC_NO, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_LSFT, TD(AAE), KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_NO, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_LCTL, KC_Z, KC_X, KC_C, KC_D, KC_V, _NAV_SPC, _SYM_ENT,KC_K, KC_H, KC_COMM, KC_DOT, SE_MINS, KC_LGUI, | |||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ | |||||
KC_LGUI, SFT_TAB, _NAV_SPC, _SYM_ENT,CTL_BSPC,ALT_DEL), | |||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘ | |||||
[_SYMBOLS] = LAYOUT( | |||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ | |||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, KC_NO, SE_PIPE, SE_LBRC, SE_RBRC, KC_NO, S(KC_5), SE_QUES, SE_AT, SE_EQL, SE_DLR, KC_TRNS, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, SE_LCBR, SE_RCBR, SE_LPRN, SE_RPRN, KC_NO, SE_PLUS, S(KC_1), S(KC_2), S(KC_3), SE_AMPR, KC_TRNS, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, M_TILD, M_CIRC, SE_LESS, SE_GRTR, KC_NO, KC_TRNS, KC_TRNS, SE_APOS, SE_SLSH, SE_BSLS, SE_ASTR, M_BTCK, KC_TRNS, | |||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), | |||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘ | |||||
[_NAVIGATION] = LAYOUT( | |||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, KC_NO, CUT, COPY, PASTE, AUTOFILL, KC_NO, KC_HOME, KC_WH_D, KC_WH_U, KC_END, KC_NO, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, KC_ACL0, KC_ACL1, KC_BTN2, KC_BTN1, KC_LCTL, KC_WH_L, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_WH_R, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, KC_ACL2, KC_BTN4, KC_BTN3, KC_BTN5, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LCTL, | |||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), | |||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘ | |||||
[_NUMPAD] = LAYOUT( | |||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ | |||||
RGB_TOG, RGB_M_P, RGB_M_B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, QUIT, WIN, MVWSL , MVWSR, CRYWS, TERM, KC_7, KC_8, KC_9, KC_COMM, KC_NO, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, CS_TAB, C_TAB, PRVWS, NXTWS, I3MOD, OPEN, KC_4, KC_5, KC_6, KC_0, KC_NO, | |||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ | |||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, MOVWS, KC_TRNS, KC_TRNS, BROWSER, KC_1, KC_2, KC_3, KC_DOT, KC_NO, | |||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), | |||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘ | |||||
}; | |||||
// clang-format on |
@ -0,0 +1,2 @@ | |||||
# mnil's iris keymap | |||||
Read my user settings [here](../../../../../users/mnil/readme.md) for more details. |
@ -0,0 +1 @@ | |||||
RGBLIGHT_ENABLE = yes |
@ -0,0 +1,23 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#pragma once | |||||
#ifdef AUDIO_ENABLE | |||||
# define STARTUP_SONG SONG(NO_SOUND) | |||||
#endif | |||||
#define MIDI_BASIC |
@ -0,0 +1,60 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#include "mnil.h" | |||||
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _SYMBOLS, _NAVIGATION, _NUMPAD); } | |||||
// clang-format off | |||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||||
[_COLEMAK] = LAYOUT_planck_2x2u( | |||||
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, TD(OAA), KC_BSPC, | |||||
KC_TAB, TD(AAE), KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_NO, | |||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SE_MINS, KC_NO , | |||||
KC_LCTL, KC_NO, KC_LGUI, SFT_TAB, _NAV_SPC, _SYM_ENT, CTL_BSPC,ALT_DEL, KC_NO, KC_LGUI | |||||
), | |||||
[_QWERTY] = LAYOUT_planck_2x2u( | |||||
KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, | |||||
KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE, | |||||
KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||||
), | |||||
[_SYMBOLS] = LAYOUT_planck_2x2u( | |||||
KC_TRNS, KC_NO, SE_PIPE, SE_LBRC, SE_RBRC, KC_NO, S(KC_5), SE_QUES, SE_AT, SE_EQL, SE_DLR, KC_BSPC, | |||||
KC_TRNS, SE_LCBR, SE_RCBR, SE_LPRN, SE_RPRN, KC_NO, SE_PLUS, S(KC_1), S(KC_2), S(KC_3), SE_AMPR, KC_QUOT, | |||||
KC_TRNS, M_TILD, M_CIRC, SE_LESS, SE_GRTR, KC_NO, SE_APOS, SE_SLSH, SE_BSLS, SE_ASTR, M_BTCK, KC_ENT, | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||||
), | |||||
[_NAVIGATION] = LAYOUT_planck_2x2u( | |||||
KC_TRNS, KC_NO, CUT, COPY, PASTE, AUTOFILL,KC_NO, KC_HOME, KC_WH_D, KC_WH_U, KC_END, KC_NO, | |||||
KC_TRNS, KC_ACL0, KC_ACL1, KC_BTN2, KC_BTN1, KC_LCTL, KC_WH_L, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_WH_R, | |||||
KC_TRNS, KC_ACL2, KC_BTN4, KC_BTN3, KC_BTN5, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LCTL, | |||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||||
), | |||||
[_NUMPAD] = LAYOUT_planck_2x2u( | |||||
KC_TRNS, QUIT, WIN, MVWSL, MVWSR, CRYWS, TERM, KC_7, KC_8, KC_9, KC_COMM, RESET, | |||||
KC_TRNS, CS_TAB, C_TAB, PRVWS, NXTWS, I3MOD, OPEN, KC_4, KC_5, KC_6, KC_0, KC_NO, | |||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, MOVWS, BROWSER, KC_1, KC_2, KC_3, KC_DOT, KC_NO, | |||||
QWE_COL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||||
), | |||||
}; | |||||
// clang-format on |
@ -0,0 +1,2 @@ | |||||
# mnil's planck keymap | |||||
Read my user settings [here](../../../../users/mnil/readme.md) for more details. |
@ -0,0 +1,21 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#pragma once | |||||
#define MK_3_SPEED | |||||
#define MK_MOMENTARY_ACCEL | |||||
#define PERMISSIVE_HOLD |
@ -0,0 +1,146 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#include "mnil.h" | |||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||||
switch (keycode) { | |||||
case M_TILD: // ~ | |||||
if (record->event.pressed) { | |||||
tap_code16(RALT(KC_RBRC)); | |||||
tap_code(KC_SPC); | |||||
} else { | |||||
} | |||||
break; | |||||
case M_CIRC: // ^ | |||||
if (record->event.pressed) { | |||||
tap_code16(S(KC_RBRC)); | |||||
tap_code(KC_SPC); | |||||
} else { | |||||
} | |||||
break; | |||||
case M_BTCK: // ` | |||||
if (record->event.pressed) { | |||||
tap_code16(S(KC_EQL)); | |||||
tap_code(KC_SPC); | |||||
} else { | |||||
} | |||||
break; | |||||
case QWE_COL: // Swap default keymap layer | |||||
if (record->event.pressed) { | |||||
if (get_highest_layer(default_layer_state) == _COLEMAK) { | |||||
default_layer_set(1UL << _QWERTY); | |||||
} else { | |||||
default_layer_set(1UL << _COLEMAK); | |||||
} | |||||
} | |||||
break; | |||||
} | |||||
return true; | |||||
}; | |||||
// Tap Dance | |||||
// Determine the current tap dance state | |||||
int cur_dance(qk_tap_dance_state_t *state) { | |||||
if (state->count == 1) { | |||||
if (state->interrupted || !state->pressed) | |||||
return SINGLE_TAP; | |||||
else | |||||
return SINGLE_HOLD; | |||||
} else if (state->count == 2) { | |||||
if (state->interrupted) | |||||
return DOUBLE_SINGLE_TAP; | |||||
else if (state->pressed) | |||||
return DOUBLE_HOLD; | |||||
else | |||||
return DOUBLE_SINGLE_TAP; | |||||
} | |||||
if (state->count == 3) { | |||||
if (state->interrupted || !state->pressed) | |||||
return TRIPLE_TAP; | |||||
else | |||||
return TRIPLE_HOLD; | |||||
} else | |||||
return 8; | |||||
} | |||||
static tap ae_tap_state = {.is_press_action = true, .state = 0}; | |||||
void ae_finished(qk_tap_dance_state_t *state, void *user_data) { | |||||
ae_tap_state.state = cur_dance(state); | |||||
switch (ae_tap_state.state) { | |||||
case SINGLE_TAP: | |||||
register_code(KC_A); | |||||
break; | |||||
case SINGLE_HOLD: | |||||
tap_code(SE_AE); | |||||
break; | |||||
case DOUBLE_SINGLE_TAP: | |||||
tap_code(KC_A); | |||||
register_code(KC_A); | |||||
break; | |||||
} | |||||
} | |||||
void ae_reset(qk_tap_dance_state_t *state, void *user_data) { | |||||
switch (ae_tap_state.state) { | |||||
case SINGLE_TAP: | |||||
unregister_code(KC_A); | |||||
break; | |||||
case DOUBLE_SINGLE_TAP: | |||||
unregister_code(KC_A); | |||||
break; | |||||
} | |||||
ae_tap_state.state = 0; | |||||
} | |||||
static tap aa_tap_state = {.is_press_action = true, .state = 0}; | |||||
void aa_finished(qk_tap_dance_state_t *state, void *user_data) { | |||||
aa_tap_state.state = cur_dance(state); | |||||
switch (aa_tap_state.state) { | |||||
case SINGLE_TAP: | |||||
register_code(SE_OSLH); | |||||
break; | |||||
case SINGLE_HOLD: | |||||
register_code(SE_AA); | |||||
unregister_code(SE_AA); | |||||
break; | |||||
case DOUBLE_SINGLE_TAP: | |||||
tap_code(SE_OSLH); | |||||
register_code(SE_OSLH); | |||||
break; | |||||
} | |||||
} | |||||
void aa_reset(qk_tap_dance_state_t *state, void *user_data) { | |||||
switch (aa_tap_state.state) { | |||||
case SINGLE_TAP: | |||||
unregister_code(SE_OSLH); | |||||
break; | |||||
case DOUBLE_SINGLE_TAP: | |||||
unregister_code(SE_OSLH); | |||||
break; | |||||
} | |||||
aa_tap_state.state = 0; | |||||
} | |||||
// clang-format off | |||||
qk_tap_dance_action_t tap_dance_actions[] = { | |||||
[AAE] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ae_finished, ae_reset, 250), | |||||
[OAA] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, aa_finished, aa_reset, 250) | |||||
}; | |||||
// clang-format on |
@ -0,0 +1,85 @@ | |||||
/* Copyright 2021 Mats Nilsson | |||||
* | |||||
* This program is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU General Public License as published by | |||||
* the Free Software Foundation, either version 2 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU General Public License | |||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
*/ | |||||
#pragma once | |||||
#include QMK_KEYBOARD_H | |||||
#include "keymap_swedish.h" | |||||
// Layers | |||||
enum layers { | |||||
_COLEMAK, | |||||
_QWERTY, | |||||
_SYMBOLS, | |||||
_NAVIGATION, | |||||
_NUMPAD, | |||||
}; | |||||
// Custom Keycodes | |||||
#define _NAV_SPC LT(_NAVIGATION, KC_SPC) // _NAVIGATION when held, SPACE when tapped | |||||
#define _SYM_ENT LT(_SYMBOLS, KC_ENT) // _SYMBOLS when held, ENTER when tapped | |||||
#define CTL_BSPC MT(MOD_LCTL, KC_BSPC) // CTRL when held, BACKSPACE when tapped | |||||
#define ALT_DEL MT(MOD_LALT, KC_DEL) // ALT when held, DELETE when tapped | |||||
#define SFT_TAB MT(MOD_LSFT, KC_TAB) // SHIFT when held, TAB when tapped | |||||
#define C_TAB C(KC_TAB) // CTRL+TAB | |||||
#define CS_TAB C(S(KC_TAB)) // SHIFT+CTRL+TAB | |||||
#define CUT C(KC_X) // CTRL+X | |||||
#define COPY C(KC_INS) // CTRL+INSERT | |||||
#define PASTE S(KC_INS) // SHIFT+INSERT | |||||
#define AUTOFILL C(S(KC_L)) // Bitwarden Autofill, CTRL+SHIFT+L | |||||
// i3 config | |||||
#define I3MOD KC_LGUI // $mod | |||||
#define OPEN G(KC_SPC) // $mod+SPACE | |||||
#define QUIT G(S(KC_Q)) // $mod+SHIFT+Q | |||||
#define WIN G(C(KC_SPC)) // $mod+CTRL+SPACE | |||||
#define BROWSER G(KC_ENTER) // $mod+ENTER | |||||
#define TERM G(S(KC_ENTER)) // $mod+CTRL+ENTER | |||||
#define NXTWS G(KC_TAB) // $mod+TAB | |||||
#define PRVWS G(S(KC_TAB)) // $mod+SHIFT+TAB | |||||
#define MOVWS G(KC_LSFT) // $mod+SHIFT+$X | |||||
#define CRYWS G(KC_LALT) // $mod+ALT+$X | |||||
#define MVWSL G(C(S(KC_LEFT))) // $mod+CTRL+SHIFT+LEFT | |||||
#define MVWSR G(C(S(KC_RGHT))) // $mod+CTRL+SHIFT+RIGHT | |||||
enum custom_keycodes { | |||||
M_TILD = SAFE_RANGE, // ~ | |||||
M_CIRC, // ^ | |||||
M_BTCK, // ` | |||||
QWE_COL, // Swaps default layer | |||||
}; | |||||
// Tap Dance | |||||
typedef struct { | |||||
bool is_press_action; | |||||
int state; | |||||
} tap; | |||||
// Define a type for as many tap dance states as you need | |||||
enum { | |||||
SINGLE_TAP = 1, | |||||
SINGLE_HOLD = 2, | |||||
DOUBLE_TAP = 3, | |||||
DOUBLE_HOLD = 4, | |||||
DOUBLE_SINGLE_TAP = 5, // send two single taps | |||||
TRIPLE_TAP = 6, | |||||
TRIPLE_HOLD = 7 | |||||
}; | |||||
enum { | |||||
AAE = 0, // a and ae | |||||
OAA, // o and aa | |||||
}; |
@ -0,0 +1,23 @@ | |||||
# mnil's user settings | |||||
This keymap consist of four primary layers, `_COLEMAK`, `_SYMBOL`, `_NAVIGATION` and `_NUMPAD`. | |||||
Colemak layout for less finger travel distance and to reduce RSI. | |||||
The `_SYMBOL` layer is optimized for programming, specifically in `C++`. | |||||
Space and Enter do double duties as layer toggle on hold where the `_NUMPAD` is entered when both are held down. | |||||
`ALT+TAB` and `SHIFT+ALT+TAB` keys is implemented to register `ALT` and then `TAB` on each subsequent key press one leaves the `_NUMPAD`-layer. | |||||
The Swedish characters `åäöÅÄÖ` are added as a tap dances on top of the Colemak layer since they are rarely needed. | |||||
# License | |||||
Copyright 2021 Mats Nilsson matni403@gmail.com @mnil | |||||
This program is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU General Public License as published by | |||||
the Free Software Foundation, either version 2 of the License, or | |||||
(at your option) any later version. | |||||
This program is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU General Public License for more details. | |||||
You should have received a copy of the GNU General Public License | |||||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
@ -0,0 +1,7 @@ | |||||
SRC += mnil.c | |||||
MOUSEKEY_ENABLE = yes # Enable mouse keys | |||||
LTO_ENABLE = yes # Enable link time optimization | |||||
BACKLIGHT_ENABLE = no | |||||
CONSOLE_ENABLE = no | |||||
AUTO_SHIFT_ENABLE = no | |||||
TAP_DANCE_ENABLE = yes |