diff options
| author | Christian Sandven <christian.sandven@kindly.ai> | 2022-01-29 04:28:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-28 19:28:00 -0800 |
| commit | 1af65a22487927f667e8d193dd893a9c8d9cdf38 (patch) | |
| tree | f480a10642874537c842e04637dc4d1c1c5898b8 | |
| parent | b2fcc923cb212bb118a080fc5046ae70d50a8cc5 (diff) | |
| download | qmk_firmware-1af65a22487927f667e8d193dd893a9c8d9cdf38.tar.gz qmk_firmware-1af65a22487927f667e8d193dd893a9c8d9cdf38.zip | |
[Keyboard] Add keyprez unicorn (#15998)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Joel Challis <git@zvecr.com>
| -rw-r--r-- | keyboards/keyprez/unicorn/config.h | 148 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/info.json | 10 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/keymaps/default/keymap.c | 31 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/keymaps/jorge/keymap.c | 33 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/keymaps/jorge/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/readme.md | 25 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/rules.mk | 20 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/unicorn.c | 18 | ||||
| -rw-r--r-- | keyboards/keyprez/unicorn/unicorn.h | 36 |
10 files changed, 323 insertions, 0 deletions
diff --git a/keyboards/keyprez/unicorn/config.h b/keyboards/keyprez/unicorn/config.h new file mode 100644 index 000000000..fcfc6fe92 --- /dev/null +++ b/keyboards/keyprez/unicorn/config.h | |||
| @@ -0,0 +1,148 @@ | |||
| 1 | // Copyright 2022 Keyprez (https://github.com/keyprez) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "config_common.h" | ||
| 7 | |||
| 8 | /* USB Device descriptor parameter */ | ||
| 9 | #define VENDOR_ID 0x6B7A | ||
| 10 | #define PRODUCT_ID 0x7563 | ||
| 11 | #define DEVICE_VER 0x0001 | ||
| 12 | #define MANUFACTURER keyprez | ||
| 13 | #define PRODUCT unicorn | ||
| 14 | |||
| 15 | /* key matrix size */ | ||
| 16 | #define MATRIX_ROWS 12 | ||
| 17 | #define MATRIX_COLS 8 | ||
| 18 | |||
| 19 | /* | ||
| 20 | * Keyboard Matrix Assignments | ||
| 21 | * | ||
| 22 | * Change this to how you wired your keyboard | ||
| 23 | * COLS: AVR pins used for columns, left to right | ||
| 24 | * ROWS: AVR pins used for rows, top to bottom | ||
| 25 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 26 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 27 | * | ||
| 28 | */ | ||
| 29 | #define MASTER_RIGHT | ||
| 30 | #define MATRIX_ROW_PINS { F4, D3, F6, F7, B1, B3 } | ||
| 31 | #define MATRIX_COL_PINS { F5, B2, B5, D7, B4, B6, E6, D4 } | ||
| 32 | #define MATRIX_ROW_PINS_RIGHT { F4, B2, F6, F7, B1, B3 } | ||
| 33 | #define MATRIX_COL_PINS_RIGHT { F5, D3, B5, D7, B4, B6, E6, C6 } | ||
| 34 | #define UNUSED_PINS | ||
| 35 | |||
| 36 | /* COL2ROW, ROW2COL */ | ||
| 37 | #define DIODE_DIRECTION COL2ROW | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
| 41 | */ | ||
| 42 | #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | ||
| 43 | |||
| 44 | //#define LED_NUM_LOCK_PIN B0 | ||
| 45 | //#define LED_CAPS_LOCK_PIN B1 | ||
| 46 | //#define LED_SCROLL_LOCK_PIN B2 | ||
| 47 | //#define LED_COMPOSE_PIN B3 | ||
| 48 | //#define LED_KANA_PIN B4 | ||
| 49 | |||
| 50 | //#define BACKLIGHT_PIN B7 | ||
| 51 | //#define BACKLIGHT_LEVELS 3 | ||
| 52 | //#define BACKLIGHT_BREATHING | ||
| 53 | |||
| 54 | //#define RGB_DI_PIN E2 | ||
| 55 | //#ifdef RGB_DI_PIN | ||
| 56 | //# define RGBLED_NUM 16 | ||
| 57 | //# define RGBLIGHT_HUE_STEP 8 | ||
| 58 | //# define RGBLIGHT_SAT_STEP 8 | ||
| 59 | //# define RGBLIGHT_VAL_STEP 8 | ||
| 60 | //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 61 | //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 62 | /*== all animations enable ==*/ | ||
| 63 | //# define RGBLIGHT_ANIMATIONS | ||
| 64 | /*== or choose animations ==*/ | ||
| 65 | //# define RGBLIGHT_EFFECT_BREATHING | ||
| 66 | //# define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 67 | //# define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 68 | //# define RGBLIGHT_EFFECT_SNAKE | ||
| 69 | //# define RGBLIGHT_EFFECT_KNIGHT | ||
| 70 | //# define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 71 | //# define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 72 | //# define RGBLIGHT_EFFECT_RGB_TEST | ||
| 73 | //# define RGBLIGHT_EFFECT_ALTERNATING | ||
| 74 | /*== customize breathing effect ==*/ | ||
| 75 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 76 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 77 | /*==== use exp() and sin() ====*/ | ||
| 78 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 79 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 80 | //#endif | ||
| 81 | |||
| 82 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 83 | #define DEBOUNCE 5 | ||
| 84 | |||
| 85 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 86 | //#define MATRIX_HAS_GHOST | ||
| 87 | |||
| 88 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 89 | #define LOCKING_SUPPORT_ENABLE | ||
| 90 | /* Locking resynchronize hack */ | ||
| 91 | #define LOCKING_RESYNC_ENABLE | ||
| 92 | |||
| 93 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 94 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 95 | */ | ||
| 96 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
| 97 | |||
| 98 | /* | ||
| 99 | * Force NKRO | ||
| 100 | * | ||
| 101 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 102 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 103 | * makefile for this to work.) | ||
| 104 | * | ||
| 105 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 106 | * until the next keyboard reset. | ||
| 107 | * | ||
| 108 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 109 | * fully operational during normal computer usage. | ||
| 110 | * | ||
| 111 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 112 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 113 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 114 | * power-up. | ||
| 115 | * | ||
| 116 | */ | ||
| 117 | //#define FORCE_NKRO | ||
| 118 | |||
| 119 | /* | ||
| 120 | * Feature disable options | ||
| 121 | * These options are also useful to firmware size reduction. | ||
| 122 | */ | ||
| 123 | |||
| 124 | /* disable debug print */ | ||
| 125 | //#define NO_DEBUG | ||
| 126 | |||
| 127 | /* disable print */ | ||
| 128 | //#define NO_PRINT | ||
| 129 | |||
| 130 | /* disable action features */ | ||
| 131 | //#define NO_ACTION_LAYER | ||
| 132 | //#define NO_ACTION_TAPPING | ||
| 133 | //#define NO_ACTION_ONESHOT | ||
| 134 | |||
| 135 | /* disable these deprecated features by default */ | ||
| 136 | #define NO_ACTION_MACRO | ||
| 137 | #define NO_ACTION_FUNCTION | ||
| 138 | |||
| 139 | /* Bootmagic Lite key configuration */ | ||
| 140 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 141 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
| 142 | |||
| 143 | #define ENCODERS_PAD_A { D2 } | ||
| 144 | #define ENCODERS_PAD_B { D4 } | ||
| 145 | #define ENCODER_RESOLUTIONS { 4 } | ||
| 146 | #define ENCODERS_PAD_A_RIGHT { D2 } | ||
| 147 | #define ENCODERS_PAD_B_RIGHT { D4 } | ||
| 148 | #define ENCODER_RESOLUTIONS_RIGHT {4} | ||
diff --git a/keyboards/keyprez/unicorn/info.json b/keyboards/keyprez/unicorn/info.json new file mode 100644 index 000000000..6fb2ea74e --- /dev/null +++ b/keyboards/keyprez/unicorn/info.json | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Unicorn", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "Keyprez", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT": { | ||
| 7 | "layout": [{"label":"|", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8, "y":0}, {"label":"*", "x":9, "y":0}, {"label":"(", "x":10, "y":0}, {"label":")", "x":11, "y":0}, {"label":"_", "x":12, "y":0}, {"label":"+", "x":13, "y":0}, {"label":"Backspace", "x":14, "y":0, "w":2}, {"label":"Home", "x":16, "y":0}, {"label":"Rotary", "x":17, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"q", "x":1.5, "y":1}, {"label":"w", "x":2.5, "y":1}, {"label":"e", "x":3.5, "y":1}, {"label":"r", "x":4.5, "y":1}, {"label":"t", "x":5.5, "y":1}, {"label":"y", "x":7.5, "y":1}, {"label":"u", "x":8.5, "y":1}, {"label":"i", "x":9.5, "y":1}, {"label":"o", "x":10.5, "y":1}, {"label":"p", "x":11.5, "y":1}, {"label":"\u00e5", "x":12.5, "y":1}, {"label":"^", "x":13.5, "y":1}, {"label":"Enter", "x":14.75, "y":1, "w":1.25, "h":2}, {"label":"End", "x":16, "y":1}, {"label":"Delete", "x":17, "y":1}, {"label":"Esc", "x":0, "y":2, "w":1.75}, {"label":"a", "x":1.75, "y":2}, {"label":"s", "x":2.75, "y":2}, {"label":"d", "x":3.75, "y":2}, {"label":"f", "x":4.75, "y":2}, {"label":"g", "x":5.75, "y":2}, {"label":"h", "x":7.75, "y":2}, {"label":"j", "x":8.75, "y":2}, {"label":"k", "x":9.75, "y":2}, {"label":"l", "x":10.75, "y":2}, {"label":"\u00f8", "x":11.75, "y":2}, {"label":"\u00e6", "x":12.75, "y":2}, {"label":"'", "x":13.75, "y":2}, {"label":"PgUp", "x":16, "y":2}, {"label":"Insert", "x":17, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"<", "x":1.25, "y":3}, {"label":"z", "x":2.25, "y":3}, {"label":"x", "x":3.25, "y":3}, {"label":"c", "x":4.25, "y":3}, {"label":"v", "x":5.25, "y":3}, {"label":"b", "x":6.25, "y":3}, {"label":"n", "x":8.25, "y":3}, {"label":"m", "x":9.25, "y":3}, {"label":",", "x":10.25, "y":3}, {"label":".", "x":11.25, "y":3}, {"label":"-", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"\u2191", "x":15, "y":3}, {"label":"PgDn", "x":16, "y":3}, {"label":"Copy", "x":17, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"space", "x":3.75, "y":4, "w":2.25}, {"label":"space", "x":6, "y":4, "w":1.25}, {"label":"space", "x":8.25, "y":4, "w":2.75}, {"label":"AltGr", "x":11, "y":4}, {"label":"Mod", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"label":"\u2190", "x":14, "y":4}, {"label":"\u2193", "x":15, "y":4}, {"label":"\u2192", "x":16, "y":4}, {"label":"Paste", "x":17, "y":4}] | ||
| 8 | } | ||
| 9 | } | ||
| 10 | } | ||
diff --git a/keyboards/keyprez/unicorn/keymaps/default/keymap.c b/keyboards/keyprez/unicorn/keymaps/default/keymap.c new file mode 100644 index 000000000..14a22167f --- /dev/null +++ b/keyboards/keyprez/unicorn/keymaps/default/keymap.c | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | // Copyright 2022 Keyprez (https://github.com/keyprez) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include QMK_KEYBOARD_H | ||
| 5 | |||
| 6 | // Defines names for use in layer keycodes and the keymap | ||
| 7 | enum layer_names { | ||
| 8 | _BASE, | ||
| 9 | _FN | ||
| 10 | }; | ||
| 11 | |||
| 12 | #define FN MO(_FN) | ||
| 13 | |||
| 14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 15 | [_BASE] = LAYOUT( | ||
| 16 | KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_MUTE, | ||
| 17 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_END, KC_DEL, | ||
| 18 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, KC_INSERT, | ||
| 19 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_COPY, | ||
| 20 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PASTE | ||
| 21 | ), | ||
| 22 | |||
| 23 | [_FN] = LAYOUT( | ||
| 24 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
| 25 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 26 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, | ||
| 27 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 28 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 29 | ), | ||
| 30 | }; | ||
| 31 | |||
diff --git a/keyboards/keyprez/unicorn/keymaps/default/readme.md b/keyboards/keyprez/unicorn/keymaps/default/readme.md new file mode 100644 index 000000000..f3e626cc7 --- /dev/null +++ b/keyboards/keyprez/unicorn/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for unicorn | |||
diff --git a/keyboards/keyprez/unicorn/keymaps/jorge/keymap.c b/keyboards/keyprez/unicorn/keymaps/jorge/keymap.c new file mode 100644 index 000000000..f66e5670b --- /dev/null +++ b/keyboards/keyprez/unicorn/keymaps/jorge/keymap.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | // Copyright 2022 Keyprez (https://github.com/keyprez) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include QMK_KEYBOARD_H | ||
| 5 | |||
| 6 | // Defines names for use in layer keycodes and the keymap | ||
| 7 | enum layer_names { | ||
| 8 | _BASE, | ||
| 9 | _FN, | ||
| 10 | _CMD | ||
| 11 | }; | ||
| 12 | |||
| 13 | #define FN MO(_FN) | ||
| 14 | #define CMD MO(_CMD) | ||
| 15 | |||
| 16 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 17 | [_BASE] = LAYOUT( | ||
| 18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_MUTE, | ||
| 19 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_END, KC_DEL, | ||
| 20 | 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_NUHS, KC_ENT, KC_PGUP, KC_INSERT, | ||
| 21 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_COPY, | ||
| 22 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, FN, KC_SPC, KC_RALT, FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PASTE | ||
| 23 | ), | ||
| 24 | |||
| 25 | [_FN] = LAYOUT( | ||
| 26 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
| 27 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 28 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_BRIU, _______, | ||
| 29 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, _______, | ||
| 30 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC | ||
| 31 | ), | ||
| 32 | }; | ||
| 33 | |||
diff --git a/keyboards/keyprez/unicorn/keymaps/jorge/readme.md b/keyboards/keyprez/unicorn/keymaps/jorge/readme.md new file mode 100644 index 000000000..f3e626cc7 --- /dev/null +++ b/keyboards/keyprez/unicorn/keymaps/jorge/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for unicorn | |||
diff --git a/keyboards/keyprez/unicorn/readme.md b/keyboards/keyprez/unicorn/readme.md new file mode 100644 index 000000000..2db5de362 --- /dev/null +++ b/keyboards/keyprez/unicorn/readme.md | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # Unicorn | ||
| 2 | |||
| 3 | Unicorn is a split 65% keyboard with an extra column on the right side. | ||
| 4 | It has support for optional hot swap sockets and a rotary encoder on the right side. | ||
| 5 | |||
| 6 | * Keyboard Maintainer: [Keyprez](https://github.com/keyprez) | ||
| 7 | * Hardware Supported: *Pro micro compatible controllers* | ||
| 8 | * Hardware Availability: *TBA* | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make keyprez/unicorn:default | ||
| 13 | |||
| 14 | Flashing example for this keyboard: | ||
| 15 | |||
| 16 | make keyprez/unicorns:default:flash | ||
| 17 | |||
| 18 | See 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). | ||
| 19 | |||
| 20 | ## Bootloader | ||
| 21 | |||
| 22 | Enter the bootloader in 3 ways: | ||
| 23 | |||
| 24 | * **Physical reset button**: Briefly press the button on the back of the PCB | ||
| 25 | * **Keycode in layout**: Press the Enter key while holding down the right fn key | ||
diff --git a/keyboards/keyprez/unicorn/rules.mk b/keyboards/keyprez/unicorn/rules.mk new file mode 100644 index 000000000..b529cf645 --- /dev/null +++ b/keyboards/keyprez/unicorn/rules.mk | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | NKRO_ENABLE = no # Enable N-Key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 18 | AUDIO_ENABLE = no # Audio output | ||
| 19 | SPLIT_KEYBOARD = yes | ||
| 20 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/keyprez/unicorn/unicorn.c b/keyboards/keyprez/unicorn/unicorn.c new file mode 100644 index 000000000..0ddd49658 --- /dev/null +++ b/keyboards/keyprez/unicorn/unicorn.c | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | // Copyright 2022 Keyprez (https://github.com/keyprez) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "unicorn.h" | ||
| 5 | |||
| 6 | #ifdef ENCODER_ENABLE | ||
| 7 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 8 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 9 | if (index == 0) { | ||
| 10 | if (clockwise) { | ||
| 11 | tap_code_delay(KC_VOLU, 10); | ||
| 12 | } else { | ||
| 13 | tap_code_delay(KC_VOLD, 10); | ||
| 14 | } | ||
| 15 | } | ||
| 16 | return true; | ||
| 17 | } | ||
| 18 | #endif | ||
diff --git a/keyboards/keyprez/unicorn/unicorn.h b/keyboards/keyprez/unicorn/unicorn.h new file mode 100644 index 000000000..5eb036f50 --- /dev/null +++ b/keyboards/keyprez/unicorn/unicorn.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | // Copyright 2022 Keyprez (https://github.com/keyprez) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "quantum.h" | ||
| 7 | |||
| 8 | /* This is a shortcut to help you visually see your layout. | ||
| 9 | * | ||
| 10 | * The first section contains all of the arguments representing the physical | ||
| 11 | * layout of the board and position of the keys. | ||
| 12 | * | ||
| 13 | * The second converts the arguments into a two-dimensional array which | ||
| 14 | * represents the switch matrix. | ||
| 15 | */ | ||
| 16 | #define LAYOUT( \ | ||
| 17 | LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ | ||
| 18 | LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ | ||
| 19 | LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10, \ | ||
| 20 | LD1, LD2, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD5, RD6, RD7, RD8, RD9, \ | ||
| 21 | LE1, LE2, LE3, LE5, LE6, RE1, RE2, RE3, RE4, RE5, RE6, RE7, RE8 \ | ||
| 22 | ) \ | ||
| 23 | { \ | ||
| 24 | { LA1, LA2, LA3, LA4, LA5, LA6, LA7, KC_NO }, \ | ||
| 25 | { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO, KC_NO }, \ | ||
| 26 | { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO, KC_NO }, \ | ||
| 27 | { LD1, LD2, LD3, LD4, LD5, LD6, LD7, KC_NO }, \ | ||
| 28 | { LE1, LE2, LE3, KC_NO, LE5, LE6, KC_NO, KC_NO }, \ | ||
| 29 | { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ | ||
| 30 | { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8 }, \ | ||
| 31 | { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO }, \ | ||
| 32 | { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8 }, \ | ||
| 33 | { RD1, RD2, RD3, RD4, RD5, RD6, RD7, RD8 }, \ | ||
| 34 | { RE1, RE2, RE3, RE4, RE5, RE6, RE7, RE8 }, \ | ||
| 35 | { KC_NO, KC_NO, RA9, RB9, RB8, RC10, RC9, RD9 } \ | ||
| 36 | } | ||
