diff options
| author | Enoch <enoch965@gmail.com> | 2025-10-07 18:16:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-08 02:16:30 +0100 |
| commit | 911232abfcbceb38866fb4e1654d3ef644a498a1 (patch) | |
| tree | def96ee1d06487a2a3197b84087ce2634aca32af /keyboards | |
| parent | 4eee8c1023bccd1e4147f523de10767eddc17884 (diff) | |
add dropout keyboard (#25645)
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/enochchau/dropout/dropout.c | 33 | ||||
| -rw-r--r-- | keyboards/enochchau/dropout/keyboard.json | 60 | ||||
| -rw-r--r-- | keyboards/enochchau/dropout/keymaps/default/keymap.c | 35 | ||||
| -rw-r--r-- | keyboards/enochchau/dropout/keymaps/default/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/enochchau/dropout/readme.md | 27 |
5 files changed, 156 insertions, 0 deletions
diff --git a/keyboards/enochchau/dropout/dropout.c b/keyboards/enochchau/dropout/dropout.c new file mode 100644 index 0000000000..bef939fed1 --- /dev/null +++ b/keyboards/enochchau/dropout/dropout.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | // Copyright 2025 Enoch Chau <enoch965@gmail.com> | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | // Mimic handle_backlight_caps_lock to use num lock indicator for backlight | ||
| 7 | void handle_backlight_num_lock(led_t led_state) { | ||
| 8 | // Use backlight as num_lock indicator | ||
| 9 | uint8_t bl_toggle_lvl = 0; | ||
| 10 | bool backlight_enabled = is_backlight_enabled(); | ||
| 11 | |||
| 12 | if (led_state.num_lock && !backlight_enabled) { | ||
| 13 | // Turning num_lock ON and backlight is disabled in config | ||
| 14 | // Toggling backlight to the brightest level | ||
| 15 | bl_toggle_lvl = BACKLIGHT_LEVELS; | ||
| 16 | } else if (!led_state.num_lock && backlight_enabled) { | ||
| 17 | // Turning num_lock OFF and backlight is enabled in config | ||
| 18 | // Toggling backlight and restoring config level | ||
| 19 | bl_toggle_lvl = get_backlight_level(); | ||
| 20 | } | ||
| 21 | |||
| 22 | backlight_set(bl_toggle_lvl); | ||
| 23 | } | ||
| 24 | |||
| 25 | bool led_update_kb(led_t led_state) { | ||
| 26 | bool res = led_update_user(led_state); | ||
| 27 | if (res) { | ||
| 28 | #ifdef BACKLIGHT_ENABLE | ||
| 29 | handle_backlight_num_lock(led_state); | ||
| 30 | #endif | ||
| 31 | } | ||
| 32 | return res; | ||
| 33 | } | ||
diff --git a/keyboards/enochchau/dropout/keyboard.json b/keyboards/enochchau/dropout/keyboard.json new file mode 100644 index 0000000000..f928181ef6 --- /dev/null +++ b/keyboards/enochchau/dropout/keyboard.json | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | { | ||
| 2 | "manufacturer": "enochchau", | ||
| 3 | "keyboard_name": "dropout", | ||
| 4 | "maintainer": "enochchau", | ||
| 5 | "backlight": { | ||
| 6 | "levels": 6, | ||
| 7 | "on_state": 0, | ||
| 8 | "pin": "B6" | ||
| 9 | }, | ||
| 10 | "development_board": "promicro", | ||
| 11 | "diode_direction": "COL2ROW", | ||
| 12 | "encoder": { | ||
| 13 | "rotary": [ | ||
| 14 | {"pin_a": "D0", "pin_b": "D4"} | ||
| 15 | ] | ||
| 16 | }, | ||
| 17 | "features": { | ||
| 18 | "backlight": true, | ||
| 19 | "bootmagic": true, | ||
| 20 | "encoder": true, | ||
| 21 | "extrakey": true, | ||
| 22 | "mousekey": true, | ||
| 23 | "nkro": true | ||
| 24 | }, | ||
| 25 | "matrix_pins": { | ||
| 26 | "cols": ["B3", "B1", "D7", "C6"], | ||
| 27 | "rows": ["D1", "B2", "E6", "B4", "B5"] | ||
| 28 | }, | ||
| 29 | "tags": ["numpad"], | ||
| 30 | "url": "https://github.com/enochchau/dropout-numpad", | ||
| 31 | "usb": { | ||
| 32 | "device_version": "0.0.1", | ||
| 33 | "pid": "0x2800", | ||
| 34 | "vid": "0x9650" | ||
| 35 | }, | ||
| 36 | "layouts": { | ||
| 37 | "LAYOUT": { | ||
| 38 | "layout": [ | ||
| 39 | {"label": "Num Lock", "matrix": [0, 0], "x": 0, "y": 0}, | ||
| 40 | {"label": "/", "matrix": [0, 1], "x": 1, "y": 0}, | ||
| 41 | {"label": "*", "matrix": [0, 2], "x": 2, "y": 0}, | ||
| 42 | {"label": "Play", "matrix": [0, 3], "x": 3, "y": 0, "encoder": 0}, | ||
| 43 | {"label": "7", "matrix": [1, 0], "x": 0, "y": 1}, | ||
| 44 | {"label": "8", "matrix": [1, 1], "x": 1, "y": 1}, | ||
| 45 | {"label": "9", "matrix": [1, 2], "x": 2, "y": 1}, | ||
| 46 | {"label": "-", "matrix": [1, 3], "x": 3, "y": 1}, | ||
| 47 | {"label": "4", "matrix": [2, 0], "x": 0, "y": 2}, | ||
| 48 | {"label": "5", "matrix": [2, 1], "x": 1, "y": 2}, | ||
| 49 | {"label": "6", "matrix": [2, 2], "x": 2, "y": 2}, | ||
| 50 | {"label": "+", "matrix": [2, 3], "x": 3, "y": 2}, | ||
| 51 | {"label": "1", "matrix": [3, 0], "x": 0, "y": 3}, | ||
| 52 | {"label": "2", "matrix": [3, 1], "x": 1, "y": 3}, | ||
| 53 | {"label": "3", "matrix": [3, 2], "x": 2, "y": 3}, | ||
| 54 | {"label": "Enter", "matrix": [3, 3], "x": 3, "y": 3, "h": 2}, | ||
| 55 | {"label": "0", "matrix": [4, 0], "x": 0, "y": 4, "w": 2}, | ||
| 56 | {"label": ".", "matrix": [4, 2], "x": 2, "y": 4} | ||
| 57 | ] | ||
| 58 | } | ||
| 59 | } | ||
| 60 | } | ||
diff --git a/keyboards/enochchau/dropout/keymaps/default/keymap.c b/keyboards/enochchau/dropout/keymaps/default/keymap.c new file mode 100644 index 0000000000..15d954987e --- /dev/null +++ b/keyboards/enochchau/dropout/keymaps/default/keymap.c | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | // Copyright 2025 Enoch Chau <enoch965@gmail.com> | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include QMK_KEYBOARD_H | ||
| 5 | |||
| 6 | enum layer_names { | ||
| 7 | _BASE, | ||
| 8 | _LIGHT | ||
| 9 | }; | ||
| 10 | |||
| 11 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 12 | |||
| 13 | [_BASE] = LAYOUT( | ||
| 14 | LT(1, KC_NUM), KC_PSLS, KC_PAST, KC_MPLY, | ||
| 15 | KC_P7, KC_P8, KC_P9, KC_PMNS, | ||
| 16 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 17 | KC_P1, KC_P2, KC_P3, KC_PENT, | ||
| 18 | KC_P0, KC_PDOT | ||
| 19 | ), | ||
| 20 | |||
| 21 | [_LIGHT] = LAYOUT( | ||
| 22 | _______, _______, _______, _______, | ||
| 23 | _______, BL_UP, BL_DOWN, BL_TOGG, | ||
| 24 | _______, _______, _______, _______, | ||
| 25 | _______, _______, _______, QK_BOOT, | ||
| 26 | _______, _______ | ||
| 27 | ) | ||
| 28 | }; | ||
| 29 | |||
| 30 | #if defined(ENCODER_MAP_ENABLE) | ||
| 31 | const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | ||
| 32 | [_BASE] = {ENCODER_CCW_CW(KC_VOLU, KC_VOLD)}, | ||
| 33 | [_LIGHT] = {ENCODER_CCW_CW(_______, _______)} | ||
| 34 | }; | ||
| 35 | #endif | ||
diff --git a/keyboards/enochchau/dropout/keymaps/default/rules.mk b/keyboards/enochchau/dropout/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/enochchau/dropout/keymaps/default/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| ENCODER_MAP_ENABLE = yes | |||
diff --git a/keyboards/enochchau/dropout/readme.md b/keyboards/enochchau/dropout/readme.md new file mode 100644 index 0000000000..8d595e8606 --- /dev/null +++ b/keyboards/enochchau/dropout/readme.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # dropout | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A numpad with a rotary encoder. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Enoch Chau](https://github.com/enochchau) | ||
| 8 | * Hardware Supported: PCB w/ Pro Micro compatible development board | ||
| 9 | * Hardware Availability: [Github](https://github.com/enochchau/dropout-numpad) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make enochchau/dropout:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make enochchau/dropout:default:flash | ||
| 18 | |||
| 19 | 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). | ||
| 20 | |||
| 21 | ## Bootloader | ||
| 22 | |||
| 23 | Enter the bootloader in 3 ways: | ||
| 24 | |||
| 25 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 26 | * **Physical reset button**: Briefly press the button on the micro-controller | ||
| 27 | * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available | ||
