aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorDaniel H Klein <danielklein@utexas.edu>2018-04-05 23:44:28 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2018-04-05 23:44:28 -0700
commit4feaf1fd764a09fe4e6eb1c8223a7f0540e52a77 (patch)
tree665c9e238321cb4543d6152f53cc85be69bca4cc /keyboards
parentd777a058642326921785961d6a2e10f2eb826c44 (diff)
downloadqmk_firmware-4feaf1fd764a09fe4e6eb1c8223a7f0540e52a77.tar.gz
qmk_firmware-4feaf1fd764a09fe4e6eb1c8223a7f0540e52a77.zip
Add Nyquist keymap (#2692)
* nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/nyquist/keymaps/danielhklein/config.h25
-rw-r--r--keyboards/nyquist/keymaps/danielhklein/keymap.c148
-rw-r--r--keyboards/nyquist/keymaps/danielhklein/rules.mk34
3 files changed, 207 insertions, 0 deletions
diff --git a/keyboards/nyquist/keymaps/danielhklein/config.h b/keyboards/nyquist/keymaps/danielhklein/config.h
new file mode 100644
index 000000000..7ed90b6cd
--- /dev/null
+++ b/keyboards/nyquist/keymaps/danielhklein/config.h
@@ -0,0 +1,25 @@
1/*
2Copyright 2017 James Morgan <ja.morgan1@outlook.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18
19#define TAPPING_TERM 150
20#define USE_SERIAL
21#define EE_HANDS
22
23#ifdef SUBPROJECT_rev1
24 #include "../../rev1/config.h"
25#endif
diff --git a/keyboards/nyquist/keymaps/danielhklein/keymap.c b/keyboards/nyquist/keymaps/danielhklein/keymap.c
new file mode 100644
index 000000000..1eae967b9
--- /dev/null
+++ b/keyboards/nyquist/keymaps/danielhklein/keymap.c
@@ -0,0 +1,148 @@
1#include "nyquist.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5/*
6 Keymap is loosely based on DivergeJM's Nyquist keymap
7 Major changes made:
8 - DVORAK, COLEMAK, FUNCTION, MOUSE, and ADJUST layers have been removed
9 - right 2u key performs backspace, not enter
10 - no right ctrl key
11 - direction keys added to bottom row
12 - LOWER layer controls function keys, media controls, and underglow
13*/
14extern keymap_config_t keymap_config;
15
16enum custom_layers {
17 _QWERTY,
18 _LOWER,
19 _RAISE
20};
21
22enum custom_keycodes {
23 QWERTY = SAFE_RANGE,
24 LOWER,
25 RAISE
26};
27
28 // Enable these functions using FUNC(n) macro.
29 const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5
30 [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
31 [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_BSPC) //Hold for momentary Raise layer, Tap for Backspace,
32 };
33
34#define SPC_LWR FUNC(0)
35#define BSP_RSE FUNC(1)
36
37// Fillers to make layering more clear
38#define _______ KC_TRNS
39#define XXXXXXX KC_NO
40
41// Underglow setup
42#define RGBLIGHT_SLEEP
43#define RGBLIGHT_ANIMATIONS
44
45const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
46
47/* QWERTY
48 * .----------------------------------------. .-----------------------------------------.
49 * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | [ |
50 * |-----+------+------+------+------+------| |------+------+------+------+------+------|
51 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ] |
52 * |-----+------+------+------+------+------| |------+------+------+------+------+------|
53 * | Caps| A | S | D | F | G | | H | J | K | L | ; | " |
54 * |-----+------+------+------+------+------| |------+------+------+------+------+------|
55 * |Lshft| Z | X | C | V | B | | N | M | , | . | / |Enter |
56 * |-----+------+------+------+------+------| |------+------+------+------+------+------|
57 * | | Ctrl | LAlt | LGui | Bspc/Raise | | Spc/Lower | Left | Down | Up |Right |
58 * `----------------------------------------' '-----------------------------------------'
59 */
60
61[_QWERTY] = KEYMAP(
62 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRACKET, \
63 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRACKET, \
64 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
66 XXXXXXX, KC_LCTL, KC_LALT, KC_LGUI, BSP_RSE, BSP_RSE, SPC_LWR, SPC_LWR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67 ),
68
69/* Raise
70 * ,-----------------------------------------. .-----------------------------------------.
71 * | | | | | | | | = | / | * | - | \ | Del |
72 * |------+------+------+------+------+------| |------+------+------+------+------+------|
73 * | | | | | | | | 7 | 8 | 9 | + | ` | |
74 * |------+------+------+------+------+------| |------+------+------+------+------+------|
75 * | | | | | | | | 4 | 5 | 6 | Enter| | |
76 * |------+------+------+------+------+------| |------+------+------+------+------+------|
77 * | Lshft| | | | | | | 1 | 2 | 3 | Space| | |
78 * |------+------+------+------+------+------| |------+------+------+------+------+------|
79 * | | | | | Bspc/Raise | | 0 | . | Bspc | | |
80 * `-----------------------------------------' `-----------------------------------------'
81 */
82
83[_RAISE] = KEYMAP( \
84 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PSLS, KC_PAST, KC_MINS, KC_BSLS, KC_DEL, \
85 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PPLS, KC_GRV, XXXXXXX,\
86 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PENT, XXXXXXX, XXXXXXX,\
87 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_SPC, XXXXXXX, XXXXXXX,\
88 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_0, KC_0, KC_DOT, KC_BSPC, XXXXXXX, XXXXXXX \
89),
90
91/* Lower
92 * ,-----------------------------------------. .-----------------------------------------.
93 * | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | |
94 * |------+------+------+------+------+------| |------+------+------+------+------+------|
95 * | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | | |
96 * |------+------+------+------+------+------| |------+------+------+------+------+------|
97 * | >/|| | Mute | Vol- | Vol+ | |<< | >>| | | | | | | | |
98 * |------+------+------+------+------+------| |------+------+------+------+------+------|
99 * |RGB IO|RGB >>|RGB <<|Hue++ |Hue-- | | | | | | | | |
100 * |------+------+------+------+------+------| |------+------+------+------+------+------|
101 * |Sat++ |Sat-- |Val++ |Val-- | | | Spc/Lower | | | | |
102 * `-----------------------------------------' `-----------------------------------------'
103*/
104
105[_LOWER] = KEYMAP( \
106 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
107 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
108 KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
109 RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
110 RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
111 ),
112
113};
114
115void persistent_default_layer_set(uint16_t default_layer) {
116 eeconfig_update_default_layer(default_layer);
117 default_layer_set(default_layer);
118}
119
120/* Cases to switch default layer to QWERTY, COLEMAK or DVORAK
121 and to access ADJUST layer to access the switch keys */
122bool process_record_user(uint16_t keycode, keyrecord_t *record) {
123 switch (keycode) {
124 case QWERTY:
125 if (record->event.pressed) {
126 set_single_persistent_default_layer(_QWERTY);
127 }
128 return false;
129 break;
130 case LOWER:
131 if (record->event.pressed) {
132 layer_on(_LOWER);
133 } else {
134 layer_off(_LOWER);
135 }
136 return false;
137 break;
138 case RAISE:
139 if (record->event.pressed) {
140 layer_on(_RAISE);
141 } else {
142 layer_off(_RAISE);
143 }
144 return false;
145 break;
146 }
147 return true;
148}
diff --git a/keyboards/nyquist/keymaps/danielhklein/rules.mk b/keyboards/nyquist/keymaps/danielhklein/rules.mk
new file mode 100644
index 000000000..ba799d47f
--- /dev/null
+++ b/keyboards/nyquist/keymaps/danielhklein/rules.mk
@@ -0,0 +1,34 @@
1# Copyright 2017 James Morgan <ja.morgan1@outlook.com>
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# QMK Build Options
18# change to "no" to disable the options, or define them in the Makefile in
19# the appropriate keymap folder that will get included automatically
20#
21BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
22MOUSEKEY_ENABLE = no # Mouse keys(+4700)
23EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
24CONSOLE_ENABLE = no # Console for debug(+400)
25COMMAND_ENABLE = yes # Commands for debug and configuration
26NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
27BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
28MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
29AUDIO_ENABLE = no # Audio output on port C6
30UNICODE_ENABLE = no # Unicode
31BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
32RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
33SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
34TAP_DANCE_ENABLE = no # Enable Tap Dance