aboutsummaryrefslogtreecommitdiff
path: root/users/nstickney
diff options
context:
space:
mode:
Diffstat (limited to 'users/nstickney')
-rw-r--r--users/nstickney/config.h63
-rw-r--r--users/nstickney/nstickney.c112
-rw-r--r--users/nstickney/nstickney.h46
-rw-r--r--users/nstickney/readme.md49
-rw-r--r--users/nstickney/rules.mk35
-rw-r--r--users/nstickney/unicodemap.h106
6 files changed, 364 insertions, 47 deletions
diff --git a/users/nstickney/config.h b/users/nstickney/config.h
new file mode 100644
index 000000000..b853038c2
--- /dev/null
+++ b/users/nstickney/config.h
@@ -0,0 +1,63 @@
1/* Copyright 2021 @nstickney
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// Changes from Bastyl defaults
18#ifdef MASTER_RIGHT
19# undef MASTER_RIGHT
20#endif
21
22// Turn off RGB lights when computer is sleeping
23#define RGBLIGHT_SLEEP
24
25// https://beta.docs.qmk.fm/developing-qmk/qmk-reference/config_options#features-that-can-be-disabled
26#define NO_ACTION_ONESHOT
27#define NO_ACTION_MACRO
28#define NO_ACTION_FUNCTION
29
30// Turn off all possible RGB animations
31#ifdef RGB_ANIMATIONS
32# undef RGB_ANIMATIONS
33#endif
34#ifdef RGB_EFFECT_ALTERNATING
35# undef RGB_EFFECT_ALTERNATING
36#endif
37#ifdef RGB_EFFECT_BREATHING
38# undef RGB_EFFECT_BREATHING
39#endif
40#ifdef RGB_EFFECT_CHRISTMAS
41# undef RGB_EFFECT_CHRISTMAS
42#endif
43#ifdef RGB_EFFECT_KNIGHT
44# undef RGB_EFFECT_KNIGHT
45#endif
46#ifdef RGB_EFFECT_RAINBOW_MOOD
47# undef RGB_EFFECT_RAINBOW_MOOD
48#endif
49#ifdef RGB_EFFECT_RAINBOW_SWIRL
50# undef RGB_EFFECT_RAINBOW_SWIRL
51#endif
52#ifdef RGB_EFFECT_RGB_TEST
53# undef RGB_EFFECT_RGB_TEST
54#endif
55#ifdef RGB_EFFECT_SNAKE
56# undef RGB_EFFECT_SNAKE
57#endif
58#ifdef RGB_EFFECT_STATIC_GRADIENT
59# undef RGB_EFFECT_STATIC_GRADIENT
60#endif
61#ifdef RGB_EFFECT_TWINKLE
62# undef RGB_EFFECT_TWINKLE
63#endif
diff --git a/users/nstickney/nstickney.c b/users/nstickney/nstickney.c
index 3e18e5c83..8222e7289 100644
--- a/users/nstickney/nstickney.c
+++ b/users/nstickney/nstickney.c
@@ -1,34 +1,73 @@
1/* Copyright 2021 @nstickney
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 */
1#include "nstickney.h" 16#include "nstickney.h"
2 17
3// Tap Dancing 18// Tap Dancing
4void dance_layer (qk_tap_dance_state_t *state, void *user_data) { 19void dance_layer(qk_tap_dance_state_t *state, void *user_data) {
5 switch (state -> count) { 20 switch (state->count) {
6 case 1: tap_code(KC_APP); break; 21 case 1:
7 case 2: layer_invert(NUMP); break; 22 tap_code(KC_APP);
8 case 3: layer_invert(SYMB); break; 23 break;
9 case 4: layer_invert(SYSH); break; 24 case 2:
10 default: break; 25 layer_invert(NUMP);
11 } 26 break;
27 case 3:
28 layer_invert(SYMB);
29 break;
30 default:
31 break;
32 }
12}; 33};
13 34
14void dance_lock_finished (qk_tap_dance_state_t *state, void *user_data) { 35void dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) {
15 switch (state->count) { 36 switch (state->count) {
16 case 1: register_code(KC_LGUI); break; 37 case 1:
17 case 2: register_code(KC_NLCK); break; 38 register_code(KC_LGUI);
18 case 3: register_code(KC_CAPS); break; 39 break;
19 case 4: register_code(KC_SLCK); break; 40 case 2:
20 default: break; 41 register_code(KC_NLCK);
21 } 42 break;
43 case 3:
44 register_code(KC_CAPS);
45 break;
46 case 4:
47 register_code(KC_SLCK);
48 break;
49 default:
50 break;
51 }
22}; 52};
23 53
24void dance_lock_reset (qk_tap_dance_state_t *state, void *user_data) { 54void dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) {
25 switch (state->count) { 55 switch (state->count) {
26 case 1: unregister_code(KC_LGUI); break; 56 case 1:
27 case 2: unregister_code(KC_NLCK); break; 57 unregister_code(KC_LGUI);
28 case 3: register_code(KC_CAPS); break; 58 break;
29 case 4: register_code(KC_SLCK); break; 59 case 2:
30 default: break; 60 register_code(KC_NLCK);
31 } 61 break;
62 case 3:
63 register_code(KC_CAPS);
64 break;
65 case 4:
66 register_code(KC_SLCK);
67 break;
68 default:
69 break;
70 }
32}; 71};
33 72
34qk_tap_dance_action_t tap_dance_actions[] = { 73qk_tap_dance_action_t tap_dance_actions[] = {
@@ -36,9 +75,22 @@ qk_tap_dance_action_t tap_dance_actions[] = {
36 [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) 75 [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
37}; 76};
38 77
39void eeconfig_init_user (void) { 78// RGB underglow per-layer hue values
40 set_unicode_input_mode(UC_LNX); // Linux 79const uint16_t LAYER_HUE[] = {6, 197, 133, 69};
41 //set_unicode_input_mode(UC_OSX); // Mac OSX 80
42 //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) 81// Initialize RGB underglow (colorful)
43 //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) 82void keyboard_post_init_user(void) {
44}; \ No newline at end of file 83 rgblight_enable_noeeprom();
84 rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
85 for (uint16_t i = 0; i < 256; ++i) {
86 rgblight_sethsv_noeeprom((i + LAYER_HUE[BASE]) % 256, 255, 136);
87 wait_ms(8);
88 }
89};
90
91// Turn on RGB underglow according to active layer
92layer_state_t layer_state_set_user(layer_state_t state) {
93 uint8_t user_val = rgblight_get_val();
94 rgblight_sethsv_noeeprom(LAYER_HUE[get_highest_layer(state)], 255, user_val);
95 return state;
96};
diff --git a/users/nstickney/nstickney.h b/users/nstickney/nstickney.h
index d3f5a7c6f..2b596b25e 100644
--- a/users/nstickney/nstickney.h
+++ b/users/nstickney/nstickney.h
@@ -1,20 +1,22 @@
1#include QMK_KEYBOARD_H 1/* Copyright 2021 @nstickney
2 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 */
3#pragma once 16#pragma once
4#define USE_SERIAL 17#include QMK_KEYBOARD_H
5#define MASTER_LEFT
6
7#undef UNICODE_SELECTED_MODES
8#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC
9
10// Layers
11#define BASE 0 // Base layer
12#define SYMB 1 // Symbols
13#define SYSH 2 // Symbols, shifted
14#define NUMP 3 // Numpad
15#define FCTN 4 // Function
16 18
17// Make keymaps more clear 19// Specialty keycodes
18#define CC_ESC LCTL_T(KC_ESC) 20#define CC_ESC LCTL_T(KC_ESC)
19#define CC_QUOT RCTL_T(KC_QUOT) 21#define CC_QUOT RCTL_T(KC_QUOT)
20#define AC_SLSH LALT_T(KC_SLSH) 22#define AC_SLSH LALT_T(KC_SLSH)
@@ -22,4 +24,16 @@
22#define FC_BSLS LT(FCTN, KC_BSLS) 24#define FC_BSLS LT(FCTN, KC_BSLS)
23#define FC_MINS LT(FCTN, KC_MINS) 25#define FC_MINS LT(FCTN, KC_MINS)
24 26
25enum tap_dances {LOCKS = 0, LAYERS = 1}; \ No newline at end of file 27// Layers
28enum {
29 BASE, // Base layer
30 SYMB, // Symbols
31 NUMP, // Numpad
32 FCTN // Function
33};
34
35// Tap dance
36enum {
37 LOCKS, // Activate NUM/CAPS/SCROLL lock
38 LAYERS // Activate NUMP and SYMB layers
39};
diff --git a/users/nstickney/readme.md b/users/nstickney/readme.md
new file mode 100644
index 000000000..b62264d68
--- /dev/null
+++ b/users/nstickney/readme.md
@@ -0,0 +1,49 @@
1# nstickney's Ortholinear Layout
2
3 > Familiar layout for users who regularly switch between Bastyl/Iris and standard QWERTY.
4
5## Install
6
7For instructions on building and installing this keymap, see the [docs](https://docs.qmk.fm/#/getting_started_make_guide).
8Below is the command for me; it may be different for you.
9Note that my Iris keyboard has an Elite-C on the left half and a ProMicro on the right half.
10
11- Bastyl: `make hidtech/bastyl:nstickney:dfu`
12- Iris
13 - Elite-C: `make keebio/iris/rev2:nstickney:dfu`
14 - ProMicro: `make keebio/iris/rev2:nstickney:avrdude`
15
16## Usage
17
180. QWERTY `BASE` layer.
19 * `/`, `\`, `[SPACE]`, `[ENTER]`, `-`, and `=` on the thumb clusters.
20 * `[` and `]` added on Bastyl.
21 * `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`.
22 * `'` can also be held for `CTRL`.
23 * [Space-Cadet Shift](https://beta.docs.qmk.fm/using-qmk/advanced-keycodes/feature_space_cadet) is enabled, so the `SHIFT` keys send `(` and `)` when tapped.
24 * Hold down `/` or `=` for `ALT`.
25 * Hold down `\` or `-` to access the functions layer.
26 * Farthest thumb keys are `GUI` (left) and `MENU` (right).
27 * Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively.
28 * Tapping `MENU` 2 or 3 times will toggle the `NUMP` and `SYMB` layers, respectively.
290. Unicode-input symbols on `SYMB` layer. Based (loosely) on US-International layout.
300. `NUMP` layer has number pads on each hand. Number pad `7`-`8`-`9` align with QWERTY `7`-`8`-`9` on right hand.
310. Function, arrow, media, and miscellaneous keys on `FCTN` layer.
32 * `F1` through `F10` on `1`-`10`. `F11` is on `GUI` and `F12` is on `MENU`.
33 * Brackets (`[` and `]`) available on `U` and `I`; braces (`{` and `}`) on `O` and `P`.
34 * Arrow keys on `ESDF` and `HJKL`; familiar for both Vim users and FPS gamers.
35 * `W` is `HOME`; `R` is `END`. `T` is `PAGE UP` and `G` is `PAGE DOWN`.
36 * Music controls on lower row of left hand.
37 * Volume and screen brightness on lower row of right hand.
38 * `PRINT SCREEN`, `PAUSE`, `SYSREQ`, `INSERT`, and `CLEAR` also mapped, as intelligently as possible.
39 * `Q` toggles the RGB underglow (which changes color to indicate active layer).
40 * `A` increases RGB underglow brightness (with `SHIFT`, decreases brightness).
41 * `Y` is mapped to [`KC_LOCK`](https://beta.docs.qmk.fm/using-qmk/software-features/feature_key_lock).
42
43## Contribute
44
45If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls).
46
47## License
48
49Copyright &copy; 2016-2021 @nstickney. Released under [GPL-2.0](/LICENSE).
diff --git a/users/nstickney/rules.mk b/users/nstickney/rules.mk
index f52371c79..0f189e8a4 100644
--- a/users/nstickney/rules.mk
+++ b/users/nstickney/rules.mk
@@ -1,4 +1,37 @@
1# Copyright 2021 @nstickney
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/>.
1SRC += nstickney.c 15SRC += nstickney.c
2 16
17KEY_LOCK_ENABLE = yes
18RGBLIGHT_ENABLE = yes
3TAP_DANCE_ENABLE = yes 19TAP_DANCE_ENABLE = yes
4UNICODE_ENABLE = yes \ No newline at end of file 20UNICODE_ENABLE = no
21UNICODEMAP_ENABLE = yes
22UCIS_ENABLE = no
23
24# https://github.com/qmk/qmk_firmware/issues/3224#issuecomment-399769416
25LTO_ENABLE = yes
26
27# https://beta.docs.qmk.fm/developing-qmk/qmk-reference/getting_started_make_guide#rules-mk-options
28API_SYSEX_ENABLE = no
29AUDIO_ENABLE = no
30BOOTMAGIC_ENABLE = no
31COMMAND_ENABLE = no
32CONSOLE_ENABLE = no
33MOUSEKEY_ENABLE = no
34MIDI_ENABLE = no
35NKRO_ENABLE = no
36SLEEP_LED_ENABLE = no
37VARIABLE_TRACE = no
diff --git a/users/nstickney/unicodemap.h b/users/nstickney/unicodemap.h
new file mode 100644
index 000000000..3b7d9e305
--- /dev/null
+++ b/users/nstickney/unicodemap.h
@@ -0,0 +1,106 @@
1/* Copyright 2021 @nstickney
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
18enum {
19 // Used on base
20
21 // Used on US-International
22 IEX, SS2, SS3, CUR, EUR, V14, V12, V34, LSQ, RSQ, YEN, MLT,
23 A_D, A_R, E_A, REG, THR, U_D, U_A, I_A, O_A, O_D, LDA, RDA, NOT,
24 A_A, S_S, ETH, EMD, OEL, O_S, PLC, ACT,
25 AEL, CPR, N_T, MCR, C_C, IQM,
26
27 // Used on US-International with Shift
28 SS1, GBP, DIV,
29 AXD, ACR, ECA, UCD, UCA, ICA, OCA, OCD, BKB,
30 ACA, SEC, ETC, OEC, OCS, DEG, DIS,
31 AEC, CNT, NCT, CCC,
32
33 // Added to US-International
34
35 // Added to US-International with Shift
36 LDQ, RDQ,
37 CPL
38};
39
40const uint32_t PROGMEM unicode_map[] = {
41 [IEX] = 0xA1, // ¡
42 [SS2] = 0xB2, // ²
43 [SS3] = 0xB3, // ³
44 [CUR] = 0xA4, // ¤
45 [EUR] = 0x20AC, // €
46 [V14] = 0xBC, // ¼
47 [V12] = 0xBD, // ½
48 [V34] = 0xBE, // ¾
49 [LSQ] = 0x2018, // ‘
50 [RSQ] = 0x2019, // ’
51 [YEN] = 0xA5, // ¥
52 [MLT] = 0xD7, // ×
53 [A_D] = 0xE4, // ä
54 [A_R] = 0xE5, // å
55 [E_A] = 0xE9, // é
56 [REG] = 0xAE, // ®
57 [THR] = 0xFE, // þ
58 [U_D] = 0xFC, // ü
59 [U_A] = 0xFA, // ú
60 [I_A] = 0xED, // í
61 [O_A] = 0xF3, // ó
62 [O_D] = 0xF6, // ö
63 [LDA] = 0xAB, // «
64 [RDA] = 0xBB, // »
65 [NOT] = 0xAC, // ¬
66 [A_A] = 0xE1, // á
67 [S_S] = 0xDF, // ß
68 [ETH] = 0xF0, // ð
69 [EMD] = 0x2014, // —
70 [OEL] = 0x153, // œ
71 [O_S] = 0xF8, // ø
72 [PLC] = 0xB6, // ¶
73 [ACT] = 0xB4, // ´
74 [AEL] = 0xE6, // æ
75 [CPR] = 0xA9, // ©
76 [N_T] = 0xF1, // ñ
77 [MCR] = 0xB5, // µ
78 [C_C] = 0xE7, // ç
79 [IQM] = 0xBF, // ¿
80 [SS1] = 0xB9, // ¹
81 [GBP] = 0xA3, // £
82 [DIV] = 0xF7, // ÷
83 [AXD] = 0xC4, // Ä
84 [ACR] = 0xC5, // Å
85 [ECA] = 0xC9, // É
86 [UCD] = 0xDC, // Ü
87 [UCA] = 0xDA, // Ú
88 [ICA] = 0xCD, // Í
89 [OCA] = 0xD3, // Ó
90 [OCD] = 0xD6, // Ö
91 [BKB] = 0xA6, // ¦
92 [ACA] = 0xC1, // Á
93 [SEC] = 0xA7, // §
94 [ETC] = 0xD0, // Ð
95 [OEC] = 0x152, // Œ
96 [OCS] = 0xD8, // Ø
97 [DEG] = 0xB0, // °
98 [DIS] = 0xA8, // ¨
99 [AEC] = 0xC6, // Æ
100 [CNT] = 0xA2, // ¢
101 [NCT] = 0xD1, // Ñ
102 [CCC] = 0xC7, // Ç
103 [LDQ] = 0x201C, // “
104 [RDQ] = 0x201D, // ”
105 [CPL] = 0x1F12F // 🄯
106};