diff options
| author | Jonathan Rascher <jon@bcat.name> | 2021-12-29 04:56:16 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-29 02:56:16 -0800 |
| commit | 9475767e7a0e0c6e0ceccc446bec848002d6fc77 (patch) | |
| tree | 9c27b94053392f09b4e9542419ad60b25548f854 | |
| parent | c6ad3bf23d10d806c784c4cc3ceb7491a874de69 (diff) | |
| download | qmk_firmware-9475767e7a0e0c6e0ceccc446bec848002d6fc77.tar.gz qmk_firmware-9475767e7a0e0c6e0ceccc446bec848002d6fc77.zip | |
[Keymap] Add initial Unicorne keyboard layout for bcat (#15613)
| -rw-r--r-- | keyboards/yanghu/unicorne/keymaps/bcat/config.h | 19 | ||||
| -rw-r--r-- | keyboards/yanghu/unicorne/keymaps/bcat/keymap.c | 83 | ||||
| -rw-r--r-- | keyboards/yanghu/unicorne/keymaps/bcat/readme.md | 33 | ||||
| -rw-r--r-- | keyboards/yanghu/unicorne/keymaps/bcat/rules.mk | 1 | ||||
| -rwxr-xr-x | users/bcat/compile.sh | 1 | ||||
| -rw-r--r-- | users/bcat/readme.md | 1 | ||||
| -rw-r--r-- | users/bcat/rules.mk | 2 |
7 files changed, 139 insertions, 1 deletions
diff --git a/keyboards/yanghu/unicorne/keymaps/bcat/config.h b/keyboards/yanghu/unicorne/keymaps/bcat/config.h new file mode 100644 index 000000000..6a27f2aa9 --- /dev/null +++ b/keyboards/yanghu/unicorne/keymaps/bcat/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2021 Jonathan Rascher | ||
| 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 | #define BCAT_ORTHO_LAYERS | ||
diff --git a/keyboards/yanghu/unicorne/keymaps/bcat/keymap.c b/keyboards/yanghu/unicorne/keymaps/bcat/keymap.c new file mode 100644 index 000000000..3da9f880a --- /dev/null +++ b/keyboards/yanghu/unicorne/keymaps/bcat/keymap.c | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* Copyright 2021 Jonathan Rascher | ||
| 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 QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | #include "bcat.h" | ||
| 20 | |||
| 21 | #if defined(OLED_ENABLE) | ||
| 22 | # include "bcat_oled.h" | ||
| 23 | #endif | ||
| 24 | |||
| 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 26 | // clang-format off | ||
| 27 | /* Default layer: http://www.keyboard-layout-editor.com/#/gists/b6d0b16a913e7d1faeafc9fc751c413f */ | ||
| 28 | [LAYER_DEFAULT] = LAYOUT( | ||
| 29 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 30 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 31 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 32 | KC_MPLY, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_MUTE | ||
| 33 | ), | ||
| 34 | /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/99dd65d3b857a272be7a1804b20bc266 */ | ||
| 35 | [LAYER_LOWER] = LAYOUT( | ||
| 36 | MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | ||
| 37 | KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, | ||
| 38 | _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, | ||
| 39 | _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 40 | ), | ||
| 41 | /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/cf9e899867763dc45b65917ce4cf93ff */ | ||
| 42 | [LAYER_RAISE] = LAYOUT( | ||
| 43 | KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | ||
| 44 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, | ||
| 45 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, | ||
| 46 | _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 47 | ), | ||
| 48 | /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/7eb0f1c437169f30cc18eac271ad2302 */ | ||
| 49 | [LAYER_ADJUST] = LAYOUT( | ||
| 50 | _______, MU_TOG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, | ||
| 51 | _______, MU_MOD, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, | ||
| 52 | _______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, | ||
| 53 | _______, _______, _______, _______, RGB_TOG, _______, _______, _______ | ||
| 54 | ), | ||
| 55 | // clang-format on | ||
| 56 | }; | ||
| 57 | |||
| 58 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 59 | switch (index) { | ||
| 60 | case 0: | ||
| 61 | /* Left encoder (scrolling) */ | ||
| 62 | tap_code(clockwise ? KC_PGDN : KC_PGUP); | ||
| 63 | return false; | ||
| 64 | case 1: | ||
| 65 | /* Right encoder (volume) */ | ||
| 66 | tap_code(clockwise ? KC_VOLU : KC_VOLD); | ||
| 67 | return false; | ||
| 68 | default: | ||
| 69 | return true; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | #if defined(OLED_ENABLE) | ||
| 74 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } | ||
| 75 | |||
| 76 | void oled_task_keymap(const oled_keyboard_state_t *keyboard_state) { | ||
| 77 | render_oled_layers(); | ||
| 78 | oled_advance_page(/*clearPageRemainder=*/false); | ||
| 79 | oled_advance_page(/*clearPageRemainder=*/false); | ||
| 80 | render_oled_wpm(keyboard_state->wpm); | ||
| 81 | render_oled_pet(/*col=*/0, /*line=*/6, keyboard_state); | ||
| 82 | } | ||
| 83 | #endif | ||
diff --git a/keyboards/yanghu/unicorne/keymaps/bcat/readme.md b/keyboards/yanghu/unicorne/keymaps/bcat/readme.md new file mode 100644 index 000000000..5c30911d5 --- /dev/null +++ b/keyboards/yanghu/unicorne/keymaps/bcat/readme.md | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # bcat's Unicorne layout | ||
| 2 | |||
| 3 | This ergo layout follows my preferred [split 3x6 + 3 thumb | ||
| 4 | keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat) | ||
| 5 | layout, adding bindings for the two rotary encoders on the bottom row. (The | ||
| 6 | left encoder scrolls vertically and the right encoder adjusts volume.) Also, | ||
| 7 | since the Unicorne keyboard has a speaker, I added bindings on the adjust layer | ||
| 8 | to activate and configure music mode. Finally, an adorable unicorn prances on | ||
| 9 | the OLED, running faster the quicker you type. | ||
| 10 | |||
| 11 | ## Default layer | ||
| 12 | |||
| 13 |  | ||
| 14 | |||
| 15 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/b6d0b16a913e7d1faeafc9fc751c413f)) | ||
| 16 | |||
| 17 | ## Lower layer | ||
| 18 | |||
| 19 |  | ||
| 20 | |||
| 21 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/99dd65d3b857a272be7a1804b20bc266)) | ||
| 22 | |||
| 23 | ## Raise layer | ||
| 24 | |||
| 25 |  | ||
| 26 | |||
| 27 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/cf9e899867763dc45b65917ce4cf93ff)) | ||
| 28 | |||
| 29 | ## Adjust layer | ||
| 30 | |||
| 31 |  | ||
| 32 | |||
| 33 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/7eb0f1c437169f30cc18eac271ad2302)) | ||
diff --git a/keyboards/yanghu/unicorne/keymaps/bcat/rules.mk b/keyboards/yanghu/unicorne/keymaps/bcat/rules.mk new file mode 100644 index 000000000..e9a4fda1f --- /dev/null +++ b/keyboards/yanghu/unicorne/keymaps/bcat/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| BCAT_OLED_PET = isda | |||
diff --git a/users/bcat/compile.sh b/users/bcat/compile.sh index 81551f0ec..9d5e58b1a 100755 --- a/users/bcat/compile.sh +++ b/users/bcat/compile.sh | |||
| @@ -49,3 +49,4 @@ compile kbdfans/kbd67/hotswap 65_ansi_blocker_split_bs | |||
| 49 | compile keebio/bdn9/rev1 | 49 | compile keebio/bdn9/rev1 |
| 50 | compile keebio/quefrency/rev1 | 50 | compile keebio/quefrency/rev1 |
| 51 | compile lily58/rev1 | 51 | compile lily58/rev1 |
| 52 | compile yanghu/unicorne/f411 | ||
diff --git a/users/bcat/readme.md b/users/bcat/readme.md index bb73a53bf..3650e8ee4 100644 --- a/users/bcat/readme.md +++ b/users/bcat/readme.md | |||
| @@ -24,6 +24,7 @@ AN-C, CannonKeys Instant60, DZ60. | |||
| 24 | ### Ergo | 24 | ### Ergo |
| 25 | 25 | ||
| 26 | * [Lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) | 26 | * [Lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) |
| 27 | * [Unicorne](https://github.com/qmk/qmk_firmware/tree/master/keyboards/yanghu/unicorne/keymaps/bcat) | ||
| 27 | 28 | ||
| 28 | ### Ortho | 29 | ### Ortho |
| 29 | 30 | ||
diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index bb4bb11d8..1ad2ee0aa 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Enable Bootmagic Lite for keyboards that don't have an easily accessible | 1 | # Enable Bootmagic Lite for keyboards that don't have an easily accessible |
| 2 | # reset button, but keep it disabled for all others to reduce firmware size. | 2 | # reset button, but keep it disabled for all others to reduce firmware size. |
| 3 | ifneq ($(filter $(strip $(KEYBOARD)),ai03/polaris dz60 kbdfans/kbd67/hotswap),) | 3 | ifneq ($(filter $(strip $(KEYBOARD)),ai03/polaris dz60 kbdfans/kbd67/hotswap yanghu/unicorne/f411),) |
| 4 | BOOTMAGIC_ENABLE = yes | 4 | BOOTMAGIC_ENABLE = yes |
| 5 | else | 5 | else |
| 6 | BOOTMAGIC_ENABLE = no | 6 | BOOTMAGIC_ENABLE = no |
