forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[User] changes to nstickney's keymaps (qmk#11456)
0) Built a Bastyl, gave away the ErgoDoxEZ 1) UNICODEMAP 2) Iris left is now Elite-C 3) New QMK flashing instructions
- Loading branch information
Showing
7 changed files
with
364 additions
and
189 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* Copyright 2021 @nstickney | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
// Changes from Bastyl defaults | ||
#ifdef MASTER_RIGHT | ||
# undef MASTER_RIGHT | ||
#endif | ||
|
||
// Turn off RGB lights when computer is sleeping | ||
#define RGBLIGHT_SLEEP | ||
|
||
// https://beta.docs.qmk.fm/developing-qmk/qmk-reference/config_options#features-that-can-be-disabled | ||
#define NO_ACTION_ONESHOT | ||
#define NO_ACTION_MACRO | ||
#define NO_ACTION_FUNCTION | ||
|
||
// Turn off all possible RGB animations | ||
#ifdef RGB_ANIMATIONS | ||
# undef RGB_ANIMATIONS | ||
#endif | ||
#ifdef RGB_EFFECT_ALTERNATING | ||
# undef RGB_EFFECT_ALTERNATING | ||
#endif | ||
#ifdef RGB_EFFECT_BREATHING | ||
# undef RGB_EFFECT_BREATHING | ||
#endif | ||
#ifdef RGB_EFFECT_CHRISTMAS | ||
# undef RGB_EFFECT_CHRISTMAS | ||
#endif | ||
#ifdef RGB_EFFECT_KNIGHT | ||
# undef RGB_EFFECT_KNIGHT | ||
#endif | ||
#ifdef RGB_EFFECT_RAINBOW_MOOD | ||
# undef RGB_EFFECT_RAINBOW_MOOD | ||
#endif | ||
#ifdef RGB_EFFECT_RAINBOW_SWIRL | ||
# undef RGB_EFFECT_RAINBOW_SWIRL | ||
#endif | ||
#ifdef RGB_EFFECT_RGB_TEST | ||
# undef RGB_EFFECT_RGB_TEST | ||
#endif | ||
#ifdef RGB_EFFECT_SNAKE | ||
# undef RGB_EFFECT_SNAKE | ||
#endif | ||
#ifdef RGB_EFFECT_STATIC_GRADIENT | ||
# undef RGB_EFFECT_STATIC_GRADIENT | ||
#endif | ||
#ifdef RGB_EFFECT_TWINKLE | ||
# undef RGB_EFFECT_TWINKLE | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,96 @@ | ||
/* Copyright 2021 @nstickney | ||
* | ||
* 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 "nstickney.h" | ||
|
||
// Tap Dancing | ||
void dance_layer (qk_tap_dance_state_t *state, void *user_data) { | ||
switch (state -> count) { | ||
case 1: tap_code(KC_APP); break; | ||
case 2: layer_invert(NUMP); break; | ||
case 3: layer_invert(SYMB); break; | ||
case 4: layer_invert(SYSH); break; | ||
default: break; | ||
} | ||
void dance_layer(qk_tap_dance_state_t *state, void *user_data) { | ||
switch (state->count) { | ||
case 1: | ||
tap_code(KC_APP); | ||
break; | ||
case 2: | ||
layer_invert(NUMP); | ||
break; | ||
case 3: | ||
layer_invert(SYMB); | ||
break; | ||
default: | ||
break; | ||
} | ||
}; | ||
|
||
void dance_lock_finished (qk_tap_dance_state_t *state, void *user_data) { | ||
switch (state->count) { | ||
case 1: register_code(KC_LGUI); break; | ||
case 2: register_code(KC_NLCK); break; | ||
case 3: register_code(KC_CAPS); break; | ||
case 4: register_code(KC_SLCK); break; | ||
default: break; | ||
} | ||
void dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
switch (state->count) { | ||
case 1: | ||
register_code(KC_LGUI); | ||
break; | ||
case 2: | ||
register_code(KC_NLCK); | ||
break; | ||
case 3: | ||
register_code(KC_CAPS); | ||
break; | ||
case 4: | ||
register_code(KC_SLCK); | ||
break; | ||
default: | ||
break; | ||
} | ||
}; | ||
|
||
void dance_lock_reset (qk_tap_dance_state_t *state, void *user_data) { | ||
switch (state->count) { | ||
case 1: unregister_code(KC_LGUI); break; | ||
case 2: unregister_code(KC_NLCK); break; | ||
case 3: register_code(KC_CAPS); break; | ||
case 4: register_code(KC_SLCK); break; | ||
default: break; | ||
} | ||
void dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
switch (state->count) { | ||
case 1: | ||
unregister_code(KC_LGUI); | ||
break; | ||
case 2: | ||
register_code(KC_NLCK); | ||
break; | ||
case 3: | ||
register_code(KC_CAPS); | ||
break; | ||
case 4: | ||
register_code(KC_SLCK); | ||
break; | ||
default: | ||
break; | ||
} | ||
}; | ||
|
||
qk_tap_dance_action_t tap_dance_actions[] = { | ||
[LOCKS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lock_finished, dance_lock_reset), | ||
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) | ||
}; | ||
|
||
void eeconfig_init_user (void) { | ||
set_unicode_input_mode(UC_LNX); // Linux | ||
//set_unicode_input_mode(UC_OSX); // Mac OSX | ||
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) | ||
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) | ||
}; | ||
// RGB underglow per-layer hue values | ||
const uint16_t LAYER_HUE[] = {6, 197, 133, 69}; | ||
|
||
// Initialize RGB underglow (colorful) | ||
void keyboard_post_init_user(void) { | ||
rgblight_enable_noeeprom(); | ||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
for (uint16_t i = 0; i < 256; ++i) { | ||
rgblight_sethsv_noeeprom((i + LAYER_HUE[BASE]) % 256, 255, 136); | ||
wait_ms(8); | ||
} | ||
}; | ||
|
||
// Turn on RGB underglow according to active layer | ||
layer_state_t layer_state_set_user(layer_state_t state) { | ||
uint8_t user_val = rgblight_get_val(); | ||
rgblight_sethsv_noeeprom(LAYER_HUE[get_highest_layer(state)], 255, user_val); | ||
return state; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
/* Copyright 2021 @nstickney | ||
* | ||
* 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 USE_SERIAL | ||
#define MASTER_LEFT | ||
|
||
#undef UNICODE_SELECTED_MODES | ||
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC | ||
|
||
// Layers | ||
#define BASE 0 // Base layer | ||
#define SYMB 1 // Symbols | ||
#define SYSH 2 // Symbols, shifted | ||
#define NUMP 3 // Numpad | ||
#define FCTN 4 // Function | ||
#include QMK_KEYBOARD_H | ||
|
||
// Make keymaps more clear | ||
// Specialty keycodes | ||
#define CC_ESC LCTL_T(KC_ESC) | ||
#define CC_QUOT RCTL_T(KC_QUOT) | ||
#define AC_SLSH LALT_T(KC_SLSH) | ||
#define AC_EQL RALT_T(KC_EQL) | ||
#define FC_BSLS LT(FCTN, KC_BSLS) | ||
#define FC_MINS LT(FCTN, KC_MINS) | ||
|
||
enum tap_dances {LOCKS = 0, LAYERS = 1}; | ||
// Layers | ||
enum { | ||
BASE, // Base layer | ||
SYMB, // Symbols | ||
NUMP, // Numpad | ||
FCTN // Function | ||
}; | ||
|
||
// Tap dance | ||
enum { | ||
LOCKS, // Activate NUM/CAPS/SCROLL lock | ||
LAYERS // Activate NUMP and SYMB layers | ||
}; |
Oops, something went wrong.