aboutsummaryrefslogtreecommitdiff
path: root/keyboards/wren
diff options
context:
space:
mode:
authorWalter Hanley <walterphanley@gmail.com>2022-01-06 19:38:42 -0600
committerGitHub <noreply@github.com>2022-01-06 17:38:42 -0800
commitdb8cf0b872a1350f11d2de931f7b375feaec69c2 (patch)
tree0bb81fa745f3dcf0c310dd1308a3ded6e3aa45aa /keyboards/wren
parent845529782ef13a3d3f86443cf74082832eb71d9d (diff)
downloadqmk_firmware-db8cf0b872a1350f11d2de931f7b375feaec69c2.tar.gz
qmk_firmware-db8cf0b872a1350f11d2de931f7b375feaec69c2.zip
[Keyboard] Add Support for Wren Keyboard (#14570)
* initial prime_o commit * Cleaned up comments, other things. * Updated keymap to use standard seven-underscore KC_TRNS notation * initial prime_o commit * Cleaned up comments, other things. * Updated keymap to use standard seven-underscore KC_TRNS notation * Initial Code for Wren Keyboard This is the initial hardware test commit for the wren. More detailed keymaps will be added soon. * Update layout and add author * Add PCB Image and Clarify Bootloader Instructions * Update config.h Updating config.h to remove mentions to LED backlighting (not supported on this PCB) * Update wren.h to match PR checklist * Roll back addition of code that should have been in wren.h * Update /default/keymap.c Make keyboard.c "pristine" to the best of my ability and add information about configuring a "non-standard" layout. * Update readme.md * Update keymap readmes to match PR checklist * Update readme.md * Final touches before PR * Un-delete non-wren files * Create rules.mk * Create config.h * Update keyboards/wren/keymaps/walterhanley/keymap.c * Update keyboards/wren/keymaps/walterhanley/keymap.c * Update keyboards/wren/wren.c As per feedback, move encoder definition to wren.c from keymap.c. * Update keyboards/wren/keymaps/walterhanley/keymap.c As per feedback, move encoder definition to wren.c from keymap.c * Update keyboards/wren/keymaps/default/keymap.c As per feedback, move encoder definition to wren.c from keymap.c * Create Keymap-Level config.h I've been dealing with some issues with this board over-drawing power on certain devices; this should fix that issue on my build without affecting other users. * Add bells and whistles to personal keymap This update adds bells and whistles to my personal keymap. I couldn't figure out how to modify rotary encoder functionality for just my personal layout with the definition in wren.c, so I moved it back into the individual keymaps. Please let me know if this is an issue and I can look into possible alternative implementations. * Update to match drashna's requested changes * Update keymap.c This update refines drashna's requested changes. * Update keymap.c Fix typo
Diffstat (limited to 'keyboards/wren')
-rw-r--r--keyboards/wren/config.h125
-rw-r--r--keyboards/wren/keymaps/default/keymap.c36
-rw-r--r--keyboards/wren/keymaps/default/readme.md11
-rw-r--r--keyboards/wren/keymaps/walterhanley/config.h20
-rw-r--r--keyboards/wren/keymaps/walterhanley/keymap.c170
-rw-r--r--keyboards/wren/keymaps/walterhanley/readme.md12
-rw-r--r--keyboards/wren/readme.md27
-rw-r--r--keyboards/wren/rules.mk21
-rw-r--r--keyboards/wren/wren.c35
-rw-r--r--keyboards/wren/wren.h46
10 files changed, 503 insertions, 0 deletions
diff --git a/keyboards/wren/config.h b/keyboards/wren/config.h
new file mode 100644
index 000000000..93b8468c1
--- /dev/null
+++ b/keyboards/wren/config.h
@@ -0,0 +1,125 @@
1/*
2Copyright 2021 Walter Hanley
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#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED
24#define PRODUCT_ID 0x0000
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Walter Hanley
27#define PRODUCT wren
28
29/* key matrix size */
30// Rows are doubled-up (Bottom set of rows are used for the right half)
31#define MATRIX_ROWS 10
32#define MATRIX_COLS 10
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43 */
44#define MATRIX_ROW_PINS { D3, D2, C6, D4, B5 }
45#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D7, F0 }
46#define UNUSED_PINS
47
48// define encoders
49#define ENCODERS_PAD_A \
50 { E6 }
51#define ENCODERS_PAD_B \
52 { B4 }
53#define ENCODERS_PAD_A_RIGHT \
54 { B4 }
55#define ENCODERS_PAD_B_RIGHT \
56 { E6 }
57
58/* COL2ROW, ROW2COL */
59#define DIODE_DIRECTION COL2ROW
60
61/*
62 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
63 */
64#define USE_I2C
65
66/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
67#define DEBOUNCE 5
68
69/* define if matrix has ghost (lacks anti-ghosting diodes) */
70//#define MATRIX_HAS_GHOST
71
72/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
73#define LOCKING_SUPPORT_ENABLE
74/* Locking resynchronize hack */
75#define LOCKING_RESYNC_ENABLE
76
77/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
78 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
79 */
80//#define GRAVE_ESC_CTRL_OVERRIDE
81
82/*
83 * Force NKRO
84 *
85 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
86 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
87 * makefile for this to work.)
88 *
89 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
90 * until the next keyboard reset.
91 *
92 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
93 * fully operational during normal computer usage.
94 *
95 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
96 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
97 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
98 * power-up.
99 *
100 */
101//#define FORCE_NKRO
102
103/*
104 * Feature disable options
105 * These options are also useful to firmware size reduction.
106 */
107
108/* disable debug print */
109//#define NO_DEBUG
110
111/* disable print */
112//#define NO_PRINT
113
114/* disable action features */
115//#define NO_ACTION_LAYER
116//#define NO_ACTION_TAPPING
117//#define NO_ACTION_ONESHOT
118
119/* disable these deprecated features by default */
120#define NO_ACTION_MACRO
121#define NO_ACTION_FUNCTION
122
123/* Bootmagic Lite key configuration */
124//#define BOOTMAGIC_LITE_ROW 0
125//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/wren/keymaps/default/keymap.c b/keyboards/wren/keymaps/default/keymap.c
new file mode 100644
index 000000000..637e0e08b
--- /dev/null
+++ b/keyboards/wren/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
1/* Copyright 2021 Walter Hanley
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#include QMK_KEYBOARD_H
17
18// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE
21};
22
23/* This layout preserves the entire keyboard matrix, but only includes keycodes
24 * for a numpad/nav cluster configuration. Depending on your configuration, you
25 * may need to replace some of the existing KC_NO values with actual keycodes.
26 */
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 /* Base */
29 [_BASE] = LAYOUT(
30 KC_PSLS, KC_7, KC_8, KC_9, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_INS, KC_HOME, KC_PGUP, KC_NO,
31 KC_PAST, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_NO,
32 KC_PMNS, KC_1, KC_2, KC_3, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_UP, KC_NO, KC_NO,
33 KC_PPLS, KC_0, KC_DOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
34 KC_NLCK, KC_LALT, KC_LGUI, KC_BSPC, KC_ENT, KC_SPC, KC_DEL, KC_RGUI, KC_RALT, KC_MUTE
35 )
36};
diff --git a/keyboards/wren/keymaps/default/readme.md b/keyboards/wren/keymaps/default/readme.md
new file mode 100644
index 000000000..7227050dd
--- /dev/null
+++ b/keyboards/wren/keymaps/default/readme.md
@@ -0,0 +1,11 @@
1![Default Layout](https://github.com/walterhanley/wren-keyboard/blob/main/images/author-layout.png?raw=true)
2
3# Default Wren Layout
4
5This is the default Wren layout, which lacks any layers. It should be fairly
6straightforward, with the sole exception of the equals key in the place of the
7grave key and the grave key in the place of the delete key.
8
9This layout preserves the entire keyboard matrix, but only includes keycodes
10for a numpad/nav cluster configuration. Depending on your configuration, you
11may need to replace some of the existing KC_NO values with actual keycodes.
diff --git a/keyboards/wren/keymaps/walterhanley/config.h b/keyboards/wren/keymaps/walterhanley/config.h
new file mode 100644
index 000000000..3dd5b47c1
--- /dev/null
+++ b/keyboards/wren/keymaps/walterhanley/config.h
@@ -0,0 +1,20 @@
1/* Copyright 2021 Walter Hanley
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// Lower board power consumption to boost compatibility
20#define USB_MAX_POWER_CONSUMPTION 250
diff --git a/keyboards/wren/keymaps/walterhanley/keymap.c b/keyboards/wren/keymaps/walterhanley/keymap.c
new file mode 100644
index 000000000..ee4b6f373
--- /dev/null
+++ b/keyboards/wren/keymaps/walterhanley/keymap.c
@@ -0,0 +1,170 @@
1/* Copyright 2021 Walter Hanley
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#include QMK_KEYBOARD_H
17
18// Cmd-tab tablesetting
19bool is_cmd_tab_active = false;
20uint16_t cmd_tab_timer = 0;
21
22// Alt-tab tablesetting
23bool is_alt_tab_active = false;
24uint16_t alt_tab_timer = 0;
25
26// Defines keycode alias
27#define ECTL LCTL_T(KC_ESC)
28#define EGUI LGUI_T(KC_ESC)
29#define DELSYM LT(_SYMBOL, KC_DEL)
30#define SCLNAV LT(_NAV, KC_SCLN)
31#define TGNLCK TG(_NLCK)
32
33// Defines names for use in layer keycodes and the keymap
34enum layer_names {
35 _MAC,
36 _WIN,
37 _NLCK,
38 _SYMBOL,
39 _NAV
40};
41
42// Defines the keycodes used by our macros in process_record_user
43enum custom_keycodes {
44 NSEAL = SAFE_RANGE,
45};
46
47const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
48 /* Mac */
49 [_MAC] = LAYOUT(
50 KC_PSLS, KC_7, KC_8, KC_9, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_INS, KC_HOME, KC_PGUP, KC_NO,
51 KC_PAST, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_NO,
52 KC_PMNS, KC_1, KC_2, KC_3, ECTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLNAV, KC_QUOT, KC_NO, KC_UP, KC_NO, KC_NO,
53 KC_PPLS, KC_0, KC_DOT, KC_ENT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
54 TGNLCK, KC_LALT, KC_LGUI, KC_BSPC, KC_ENT, KC_SPC, DELSYM, KC_RGUI, KC_RALT, KC_MUTE
55 ),
56
57 /* Windows */
58 [_WIN] = LAYOUT(
59 KC_PSLS, KC_7, KC_8, KC_9, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_INS, KC_HOME, KC_PGUP, KC_NO,
60 KC_PAST, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_NO,
61 KC_PMNS, KC_1, KC_2, KC_3, EGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLNAV, KC_QUOT, KC_NO, KC_UP, KC_NO, KC_NO,
62 KC_PPLS, KC_0, KC_DOT, KC_ENT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
63 TGNLCK, KC_LALT, KC_LCTL, KC_BSPC, KC_ENT, KC_SPC, DELSYM, KC_RCTL, KC_RALT, KC_MUTE
64 ),
65
66 /* In-Keyboard Numlock */
67 [_NLCK] = LAYOUT(
68 KC_PSLS, KC_HOME, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
69 KC_PAST, KC_LEFT, KC_5, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
70 KC_PMNS, KC_END, KC_DOWN, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
71 KC_PPLS, KC_INS, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
72 TGNLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______
73 ),
74
75 /* Symbols, F-Keys, and Text Macros */
76 [_SYMBOL] = LAYOUT(
77 NSEAL, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______,
78 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
79 _______, _______, _______, _______, _______, _______, KC_UNDS, KC_LCBR, KC_LBRC, _______, _______, KC_RBRC, KC_RCBR, KC_MINS, _______, _______, _______, _______, _______, _______,
80 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
81 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
82 ),
83
84 /* Nav Cluster and Settings*/
85 [_NAV] = LAYOUT(
86 DF(_MAC), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
87 DF(_WIN), _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
88 _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
89 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
90 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
91 )
92};
93
94bool encoder_update_user(uint8_t index, bool clockwise) {
95 if (index == 0) { /* First encoder */
96 // Encoder functionality for _MAC layer
97 if (IS_LAYER_ON(_MAC))
98 {
99 if (clockwise) {
100 if (!is_cmd_tab_active) {
101 is_cmd_tab_active = true;
102 register_code(KC_LGUI);
103 }
104 cmd_tab_timer = timer_read();
105 tap_code16(KC_TAB);
106 } else {
107 if (!is_cmd_tab_active) {
108 is_cmd_tab_active = true;
109 register_code(KC_LGUI);
110 }
111 cmd_tab_timer = timer_read();
112 tap_code16(S(KC_TAB));
113 }
114 }
115 // Encoder functionality for _WIN layer
116 else if (IS_LAYER_ON(_WIN)) {
117 if (clockwise) {
118 if (!is_alt_tab_active) {
119 is_alt_tab_active = true;
120 register_code(KC_LALT);
121 }
122 alt_tab_timer = timer_read();
123 tap_code16(KC_TAB);
124 } else {
125 if (!is_alt_tab_active) {
126 is_alt_tab_active = true;
127 register_code(KC_LALT);
128 }
129 alt_tab_timer = timer_read();
130 tap_code16(S(KC_TAB));
131 }
132 }
133 } else if (index == 1) { /* Second encoder */
134 if (clockwise) {
135 tap_code(KC_VOLU);
136 } else {
137 tap_code(KC_VOLD);
138 }
139 }
140 return true;
141}
142
143bool process_record_user(uint16_t keycode, keyrecord_t *record) {
144 switch (keycode) {
145 case NSEAL:
146 if (record->event.pressed) {
147 // when keycode NSEAL is pressed
148 SEND_STRING("What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little 'clever' comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.");
149 } else {
150 // when keycode NSEAL is released
151 }
152 break;
153 }
154 return true;
155}
156
157void matrix_scan_user(void) {
158 if (is_cmd_tab_active) {
159 if (timer_elapsed(cmd_tab_timer) > 1000) {
160 unregister_code(KC_LGUI);
161 is_cmd_tab_active = false;
162 }
163 }
164 if (is_alt_tab_active) {
165 if (timer_elapsed(alt_tab_timer) > 1000) {
166 unregister_code(KC_LALT);
167 is_alt_tab_active = false;
168 }
169 }
170}
diff --git a/keyboards/wren/keymaps/walterhanley/readme.md b/keyboards/wren/keymaps/walterhanley/readme.md
new file mode 100644
index 000000000..27e32360d
--- /dev/null
+++ b/keyboards/wren/keymaps/walterhanley/readme.md
@@ -0,0 +1,12 @@
1![Author's Layout](https://github.com/walterhanley/wren-keyboard/blob/main/images/author-layout.png?raw=true)
2
3# Author's Wren Layout
4
5This is my personal Wren layout, which includes a few layers and macros that
6I find useful. It started as a clone of the default keymap, but will likely
7diverge more as time goes on.
8
9Please note that this layout preserves the entire keyboard matrix, but only
10includes keycodes for a numpad/nav cluster configuration. Depending on your
11configuration, you may need to replace some of the existing KC_NO values
12with actual keycodes.
diff --git a/keyboards/wren/readme.md b/keyboards/wren/readme.md
new file mode 100644
index 000000000..8de95734d
--- /dev/null
+++ b/keyboards/wren/readme.md
@@ -0,0 +1,27 @@
1# Wren
2
3![Wren PCB](https://raw.githubusercontent.com/walterhanley/wren-keyboard/main/images/wren-universal.png)
4![Wren Layout](https://raw.githubusercontent.com/walterhanley/wren-keyboard/main/images/author-layout.png)
5
6A split ergonomic "system keyboard" aimed at providing numpad and nav cluster functionality. For more information, please see the [project repo](https://github.com/walterhanley/wren-keyboard).
7
8* Keyboard Maintainer: [Walter Hanley](https://github.com/walterhanley)
9* Hardware Supported: Wren Universal PCB and Elite C (Pro Micro configurations likely supported but not tested)
10* Hardware Availability: Source files available at [project repository](https://github.com/walterhanley/wren-keyboard)
11
12Make example for this keyboard (after setting up your build environment):
13
14 make wren:default
15
16Flashing example for this keyboard:
17
18 make wren:default:flash
19
20See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
21
22## Bootloader
23
24Enter the bootloader in 2 ways:
25
26* **Physical reset button**: Briefly press the button on the front of the PCB below the microcontroler
27* **Keycode in layout**: Press the key mapped to `RESET` if it is available
diff --git a/keyboards/wren/rules.mk b/keyboards/wren/rules.mk
new file mode 100644
index 000000000..76e0fdf55
--- /dev/null
+++ b/keyboards/wren/rules.mk
@@ -0,0 +1,21 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
16NKRO_ENABLE = no # USB Nkey Rollover
17BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
18RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
19AUDIO_ENABLE = no # Audio output
20ENCODER_ENABLE = yes # Enables the use of one or more encoders
21SPLIT_KEYBOARD = yes # Enables split keyboard
diff --git a/keyboards/wren/wren.c b/keyboards/wren/wren.c
new file mode 100644
index 000000000..487c9d307
--- /dev/null
+++ b/keyboards/wren/wren.c
@@ -0,0 +1,35 @@
1/* Copyright 2021 Walter Hanley
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#include "wren.h"
18
19bool encoder_update_kb(uint8_t index, bool clockwise) {
20 if (!encoder_update_user(index, clockwise)) { return false; }
21 if (index == 0) { /* First encoder */
22 if (clockwise) {
23 tap_code(KC_PGDN);
24 } else {
25 tap_code(KC_PGUP);
26 }
27 } else if (index == 1) { /* Second encoder */
28 if (clockwise) {
29 tap_code(KC_VOLU);
30 } else {
31 tap_code(KC_VOLD);
32 }
33 }
34 return true;
35}
diff --git a/keyboards/wren/wren.h b/keyboards/wren/wren.h
new file mode 100644
index 000000000..ee589fe23
--- /dev/null
+++ b/keyboards/wren/wren.h
@@ -0,0 +1,46 @@
1/* Copyright 2021 Walter Hanley
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 "quantum.h"
20
21/* This is a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT( \
30 L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, R00, R01, R02, R03, R04, R05, R06, R07, R08, R09, \
31 L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, \
32 L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, \
33 L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, \
34 LT0, LT1, LT2, LT3, LT4, RT0, RT1, RT2, RT3, RT4 \
35) { \
36 { L09, L08, L07, L06, L05, L04, L03, L02, L01, L00 }, \
37 { L19, L18, L17, L16, L15, L14, L13, L12, L11, L10 }, \
38 { L29, L28, L27, L26, L25, L24, L23, L22, L21, L20 }, \
39 { L39, L38, L37, L36, L35, L34, L33, L32, L31, L30 }, \
40 { LT4, LT3, LT2, LT1, LT0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
41 { R00, R01, R02, R03, R04, R05, R06, R07, R08, R09 }, \
42 { R10, R11, R12, R13, R14, R15, R16, R17, R18, R19 }, \
43 { R20, R21, R22, R23, R24, R25, R26, R27, R28, R29 }, \
44 { R30, R31, R32, R33, R34, R35, R36, R37, R38, R39 }, \
45 { RT0, RT1, RT2, RT3, RT4, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
46}