diff options
| author | dnlnm <80830846+dnlnm@users.noreply.github.com> | 2025-03-04 03:22:37 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-03 11:22:37 -0800 |
| commit | f0a5db96c8a128bdf7f8321fdc1e0011160aeb3a (patch) | |
| tree | 227bedd3d832865a6da4c000e21b73f76fea3a83 /keyboards/dnlnm | |
| parent | c2979e309f9c4cc758d9f1b1f37a5a9ff33b6426 (diff) | |
Add keyboard Cloak (#24858)
Co-authored-by: jack <jack@pngu.org>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/dnlnm')
| -rw-r--r-- | keyboards/dnlnm/cloak/keyboard.json | 115 | ||||
| -rw-r--r-- | keyboards/dnlnm/cloak/keymaps/default/keymap.c | 68 | ||||
| -rw-r--r-- | keyboards/dnlnm/cloak/keymaps/default/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/dnlnm/cloak/readme.md | 25 |
4 files changed, 209 insertions, 0 deletions
diff --git a/keyboards/dnlnm/cloak/keyboard.json b/keyboards/dnlnm/cloak/keyboard.json new file mode 100644 index 0000000000..fb429e789a --- /dev/null +++ b/keyboards/dnlnm/cloak/keyboard.json | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | { | ||
| 2 | "manufacturer": "dnlnm", | ||
| 3 | "keyboard_name": "Cloak", | ||
| 4 | "maintainer": "dnlnm", | ||
| 5 | "bootloader": "stm32-dfu", | ||
| 6 | "diode_direction": "COL2ROW", | ||
| 7 | "encoder": { | ||
| 8 | "rotary": [ | ||
| 9 | {"pin_a": "A9", "pin_b": "A10", "resolution": 2}, | ||
| 10 | {"pin_a": "B4", "pin_b": "B6", "resolution": 2} | ||
| 11 | ] | ||
| 12 | }, | ||
| 13 | "features": { | ||
| 14 | "bootmagic": true, | ||
| 15 | "encoder": true, | ||
| 16 | "extrakey": true, | ||
| 17 | "mousekey": true, | ||
| 18 | "nkro": true, | ||
| 19 | "rgblight": true | ||
| 20 | }, | ||
| 21 | "matrix_pins": { | ||
| 22 | "cols": ["A8", "B15", "B14", "B13", "B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "B8"], | ||
| 23 | "rows": ["B3", "B12", "A15", "B7", "B9"] | ||
| 24 | }, | ||
| 25 | "processor": "STM32F072", | ||
| 26 | "rgblight": { | ||
| 27 | "default": { | ||
| 28 | "on": false | ||
| 29 | }, | ||
| 30 | "driver": "ws2812", | ||
| 31 | "layers": { | ||
| 32 | "blink": true, | ||
| 33 | "enabled": true, | ||
| 34 | "override_rgb": true | ||
| 35 | }, | ||
| 36 | "led_count": 12 | ||
| 37 | }, | ||
| 38 | "url": "https://github.com/dnlnm/cloak-xt-stm32", | ||
| 39 | "usb": { | ||
| 40 | "device_version": "1.0.0", | ||
| 41 | "pid": "0xFCD4", | ||
| 42 | "vid": "0x7E7E" | ||
| 43 | }, | ||
| 44 | "ws2812": { | ||
| 45 | "pin": "B5" | ||
| 46 | }, | ||
| 47 | "layouts": { | ||
| 48 | "LAYOUT": { | ||
| 49 | "layout": [ | ||
| 50 | {"matrix": [0, 0], "x": 0, "y": 0}, | ||
| 51 | {"matrix": [0, 1], "x": 1.25, "y": 0}, | ||
| 52 | {"matrix": [0, 2], "x": 2.25, "y": 0}, | ||
| 53 | {"matrix": [0, 3], "x": 3.25, "y": 0}, | ||
| 54 | {"matrix": [0, 4], "x": 4.25, "y": 0}, | ||
| 55 | {"matrix": [0, 5], "x": 5.63, "y": 0}, | ||
| 56 | {"matrix": [0, 6], "x": 6.63, "y": 0}, | ||
| 57 | {"matrix": [0, 7], "x": 7.63, "y": 0}, | ||
| 58 | {"matrix": [0, 8], "x": 8.63, "y": 0}, | ||
| 59 | {"matrix": [0, 9], "x": 10, "y": 0}, | ||
| 60 | {"matrix": [0, 10], "x": 11, "y": 0}, | ||
| 61 | {"matrix": [0, 11], "x": 12, "y": 0}, | ||
| 62 | {"matrix": [0, 12], "x": 13, "y": 0}, | ||
| 63 | {"matrix": [0, 13], "x": 14.25, "y": 0}, | ||
| 64 | {"matrix": [1, 0], "x": 0, "y": 1.25, "w": 1.5}, | ||
| 65 | {"matrix": [1, 1], "x": 1.5, "y": 1.25}, | ||
| 66 | {"matrix": [1, 2], "x": 2.5, "y": 1.25}, | ||
| 67 | {"matrix": [1, 3], "x": 3.5, "y": 1.25}, | ||
| 68 | {"matrix": [1, 4], "x": 4.5, "y": 1.25}, | ||
| 69 | {"matrix": [1, 5], "x": 5.5, "y": 1.25}, | ||
| 70 | {"matrix": [1, 6], "x": 6.5, "y": 1.25}, | ||
| 71 | {"matrix": [1, 7], "x": 7.5, "y": 1.25}, | ||
| 72 | {"matrix": [1, 8], "x": 8.5, "y": 1.25}, | ||
| 73 | {"matrix": [1, 9], "x": 9.5, "y": 1.25}, | ||
| 74 | {"matrix": [1, 10], "x": 10.5, "y": 1.25}, | ||
| 75 | {"matrix": [1, 11], "x": 11.5, "y": 1.25}, | ||
| 76 | {"matrix": [1, 12], "x": 12.5, "y": 1.25, "w": 1.5}, | ||
| 77 | {"matrix": [1, 13], "x": 14.25, "y": 1.25}, | ||
| 78 | {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.75}, | ||
| 79 | {"matrix": [2, 1], "x": 1.75, "y": 2.25}, | ||
| 80 | {"matrix": [2, 2], "x": 2.75, "y": 2.25}, | ||
| 81 | {"matrix": [2, 3], "x": 3.75, "y": 2.25}, | ||
| 82 | {"matrix": [2, 4], "x": 4.75, "y": 2.25}, | ||
| 83 | {"matrix": [2, 5], "x": 5.75, "y": 2.25}, | ||
| 84 | {"matrix": [2, 6], "x": 6.75, "y": 2.25}, | ||
| 85 | {"matrix": [2, 7], "x": 7.75, "y": 2.25}, | ||
| 86 | {"matrix": [2, 8], "x": 8.75, "y": 2.25}, | ||
| 87 | {"matrix": [2, 9], "x": 9.75, "y": 2.25}, | ||
| 88 | {"matrix": [2, 10], "x": 10.75, "y": 2.25}, | ||
| 89 | {"matrix": [2, 11], "x": 11.75, "y": 2.25, "w": 2.25}, | ||
| 90 | {"matrix": [2, 12], "x": 14.25, "y": 2.25}, | ||
| 91 | {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 2.25}, | ||
| 92 | {"matrix": [3, 1], "x": 2.25, "y": 3.25}, | ||
| 93 | {"matrix": [3, 2], "x": 3.25, "y": 3.25}, | ||
| 94 | {"matrix": [3, 3], "x": 4.25, "y": 3.25}, | ||
| 95 | {"matrix": [3, 4], "x": 5.25, "y": 3.25}, | ||
| 96 | {"matrix": [3, 5], "x": 6.25, "y": 3.25}, | ||
| 97 | {"matrix": [3, 6], "x": 7.25, "y": 3.25}, | ||
| 98 | {"matrix": [3, 7], "x": 8.25, "y": 3.25}, | ||
| 99 | {"matrix": [3, 8], "x": 9.25, "y": 3.25}, | ||
| 100 | {"matrix": [3, 9], "x": 10.25, "y": 3.25}, | ||
| 101 | {"matrix": [3, 10], "x": 11.25, "y": 3.25}, | ||
| 102 | {"matrix": [3, 11], "x": 12.25, "y": 3.25, "w": 1.75}, | ||
| 103 | {"matrix": [3, 12], "x": 14.25, "y": 3.25}, | ||
| 104 | {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, | ||
| 105 | {"matrix": [4, 1], "x": 1.25, "y": 4.25}, | ||
| 106 | {"matrix": [4, 2], "x": 2.25, "y": 4.25, "w": 1.25}, | ||
| 107 | {"matrix": [4, 6], "x": 3.5, "y": 4.25, "w": 7}, | ||
| 108 | {"matrix": [4, 10], "x": 10.5, "y": 4.25, "w": 1.25}, | ||
| 109 | {"matrix": [4, 11], "x": 11.75, "y": 4.25}, | ||
| 110 | {"matrix": [4, 12], "x": 12.75, "y": 4.25, "w": 1.25}, | ||
| 111 | {"matrix": [4, 13], "x": 14.25, "y": 4.25} | ||
| 112 | ] | ||
| 113 | } | ||
| 114 | } | ||
| 115 | } | ||
diff --git a/keyboards/dnlnm/cloak/keymaps/default/keymap.c b/keyboards/dnlnm/cloak/keymaps/default/keymap.c new file mode 100644 index 0000000000..61733d2bba --- /dev/null +++ b/keyboards/dnlnm/cloak/keymaps/default/keymap.c | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | // Copyright (C) 2025 dnlnm | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include QMK_KEYBOARD_H | ||
| 5 | |||
| 6 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 7 | |||
| 8 | [0] = LAYOUT( | ||
| 9 | KC_ESC, 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_MPLY, | ||
| 10 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_VOLU, | ||
| 11 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, KC_VOLD, | ||
| 12 | 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_MUTE, | ||
| 13 | KC_LCTL, KC_LGUI, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_PSCR), | ||
| 14 | |||
| 15 | [1] = LAYOUT( | ||
| 16 | QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 17 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 18 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 19 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 20 | _______, _______, _______, _______, _______, _______, _______, _______), | ||
| 21 | }; | ||
| 22 | |||
| 23 | #if defined(ENCODER_MAP_ENABLE) | ||
| 24 | const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | ||
| 25 | [0] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, | ||
| 26 | [1] = {ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU)}, | ||
| 27 | }; | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #ifdef RGBLIGHT_ENABLE | ||
| 31 | |||
| 32 | // Light LEDs 10 & 11 in blue when caps lock is active. | ||
| 33 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 34 | {10, 2, HSV_BLUE} // Light 4 LEDs, starting with LED 6 | ||
| 35 | ); | ||
| 36 | // Light LEDs 0 & 1 in blue when keyboard layer 1 is active | ||
| 37 | const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 38 | {0, 2, HSV_BLUE} | ||
| 39 | ); | ||
| 40 | // Light LEDs 4 & 5 in blue when keyboard layer 2 is active | ||
| 41 | const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 42 | {4, 2, HSV_BLUE} | ||
| 43 | ); | ||
| 44 | |||
| 45 | // Now define the array of layers. Later layers take precedence | ||
| 46 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 47 | my_capslock_layer, | ||
| 48 | my_layer1_layer, // Overrides caps lock layer | ||
| 49 | my_layer2_layer // Overrides other layers | ||
| 50 | ); | ||
| 51 | |||
| 52 | void keyboard_post_init_user(void) { | ||
| 53 | // Enable the LED layers | ||
| 54 | rgblight_layers = my_rgb_layers; | ||
| 55 | } | ||
| 56 | |||
| 57 | bool led_update_user(led_t led_state) { | ||
| 58 | rgblight_set_layer_state(0, led_state.caps_lock); | ||
| 59 | return true; | ||
| 60 | } | ||
| 61 | |||
| 62 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 63 | rgblight_set_layer_state(1, layer_state_cmp(state, 1)); | ||
| 64 | rgblight_set_layer_state(2, layer_state_cmp(state, 2)); | ||
| 65 | return state; | ||
| 66 | } | ||
| 67 | |||
| 68 | #endif | ||
diff --git a/keyboards/dnlnm/cloak/keymaps/default/rules.mk b/keyboards/dnlnm/cloak/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/dnlnm/cloak/keymaps/default/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| ENCODER_MAP_ENABLE = yes | |||
diff --git a/keyboards/dnlnm/cloak/readme.md b/keyboards/dnlnm/cloak/readme.md new file mode 100644 index 0000000000..99c50c8d43 --- /dev/null +++ b/keyboards/dnlnm/cloak/readme.md | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # dnlnm/cloak | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [Daniel Naim](https://github.com/dnlnm) | ||
| 6 | * Hardware Supported: Cloak-XT | ||
| 7 | * Hardware Availability: https://github.com/dnlnm/cloak-xt-stm32 | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make dnlnm/cloak:default | ||
| 12 | |||
| 13 | Flashing example for this keyboard: | ||
| 14 | |||
| 15 | make dnlnm/cloak:default:flash | ||
| 16 | |||
| 17 | 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). | ||
| 18 | |||
| 19 | ## Bootloader | ||
| 20 | |||
| 21 | Enter the bootloader in 3 ways: | ||
| 22 | |||
| 23 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 24 | * **Physical reset button**: Hold the boot button and tap the reset button on the back of the PCB | ||
| 25 | * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available | ||
