Skip to content

Commit

Permalink
[Keyboard] New IDOBAO ID61 (a.k.a. Denwir D60) (qmk#17362)
Browse files Browse the repository at this point in the history
* initial upload

* adjust keymap

* Delete config.h

* Update post.rules.mk

* remapped to correct pins

* add idobao keymap

* disable underglow

* minor fix

* right menu on windows

* imgur

* ID61_process_special_k() function

* KC_APP fix

* Update keymap.c

* pre-pr touchups

* enum layouts

* review changes recommended by tzarc

* refactor special keys to common lib

* rename layout and add info.json labels

* account for 15 possible USER keys

* post drashna review

* Fn Arrow keys added

* post review edits

* use bitmask instead of bool array in specialk.c

* move to community layout
  • Loading branch information
silvinor authored and ramonimbao committed Nov 28, 2022
1 parent 24b3028 commit a84ca26
Show file tree
Hide file tree
Showing 15 changed files with 896 additions and 0 deletions.
93 changes: 93 additions & 0 deletions keyboards/idobao/id61/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// Copyright 2022 Vino Rodrigues (@vinorodrigues)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "config_common.h"

/* key matrix size */
// #define MATRIX_ROWS 5
// #define MATRIX_COLS 15

/* ----------------
* RGB Matrix stuff
* ---------------- */

#define RGB_DI_PIN F0

// RGB Matrix config
#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE)

#ifndef ID61_DISABLE_UNDERGLOW
#define DRIVER_LED_TOTAL 71
#else
#define DRIVER_LED_TOTAL 61 // = 71 - 10
#endif

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to {x} out of 255. If not defined maximum brightness is set to 255

#define RGB_MATRIX_KEYPRESSES

#define ENABLE_RGB_MATRIX_SOLID_COLOR // Static single color
#define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes
#define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation
#define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right
#define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness
#define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard
#define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard
#define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation
#define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back
#define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left
#define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right

/* RGB_MATRIX_FRAMEBUFFER_EFFECTS) */
// #define ENABLE_RGB_MATRIX_TYPING_HEATMAP
// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN

/* RGB_MATRIX_KEYPRESSES) | defined(RGB_MATRIX_KEYRELEASES) */
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
#endif // RGB_MATRIX_ENABLE

/* -----------------------
* Feature disable options
* These options are also useful to firmware size reduction.
* ----------------------- */

/* disable debug print */
// #define NO_DEBUG

/* disable print */
// #define NO_PRINT

/* disable action features */
// #define NO_ACTION_LAYER
// #define NO_ACTION_TAPPING
// #define NO_ACTION_ONESHOT
68 changes: 68 additions & 0 deletions keyboards/idobao/id61/id61.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright 2022 Vino Rodrigues (@vinorodrigues)
// SPDX-License-Identifier: GPL-2.0-or-later

#include "id61.h"

#define __ NO_LED

#if defined(RGB_MATRIX_ENABLE)

/* Pre-key
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │60 │59 │58 │57 │56 │55 │54 │53 │52 │51 │50 │49 │48 │ 47 │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │ 46 │45 │44 │43 │42 │41 │40 │39 │38 │37 │36 │35 │34 │ 33 │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
* │ 32 │31 │30 │29 │28 │27 │26 │25 │24 │23 │22 │21 │ 20 │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
* │ 19 │18 │17 │16 │15 │14 │13 │12 │11 │10 │ 9 │ 8 │
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*
* Underglow (from top / [Esc] = top left)
* ┌────┬────┬────┬────┬────┐
* │ 61 │ 62 │ 63 │ 64 │ 65 │
* ├────┴────┴────┴────┴────┤
* ├────┬────┬────┬────┬────┤
* │ 70 │ 69 │ 68 │ 67 │ 66 │
* └────┴────┴────┴────┴────┘
*/

led_config_t g_led_config = { {
// Key Matrix to LED Index
{ 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47 },
{ 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33 },
{ 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, __ },
{ 19, __, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __ },
{ 7, 6, 5, __, __, __, 4, __, __, __, 3, 2, 1, 0 },
}, {
// LED Index to Physical Position
// generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser
/* NB: Reverse order! */
{224,64 }, {204,64 }, {184,64 }, {163,64 }, {103,64 }, { 42,64 }, { 22,64 }, { 2,64 },
{212,48 }, {182,48 }, {165,48 }, {149,48 }, {133,48 }, {117,48 }, {101,48 }, { 85,48 }, { 69,48 }, { 52,48 }, { 36,48 }, { 10,48 },
{216,32 }, {190,32 }, {174,32 }, {157,32 }, {141,32 }, {125,32 }, {109,32 }, { 93,32 }, { 77,32 }, { 61,32 }, { 44,32 }, { 28,32 }, { 6,32 },
{222,16 }, {202,16 }, {186,16 }, {170,16 }, {153,16 }, {137,16 }, {121,16 }, {105,16 }, { 89,16 }, { 73,16 }, { 57,16 }, { 40,16 }, { 24,16 }, { 4,16 },
{218,0 }, {194,0 }, {178,0 }, {161,0 }, {145,0 }, {129,0 }, {113,0 }, { 97,0 }, { 81,0 }, { 65,0 }, { 48,0 }, { 32,0 }, { 16,0 }, { 0,0 }
// underglow LEDs (positions pushed to nearest edge to match edge key colors)
#ifndef ID61_DISABLE_UNDERGLOW
, { 0,0 }, { 56,0 }, { 112,0 }, {168,0 }, {224,0 },
{224,64 }, {168,64 }, {112,64 }, { 56,64 }, { 0,64 }
#endif
}, {
// LED Index to Flag
/* NB: Reverse order! */
1, 1, 1, 1, 4, 1, 1, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
// underglow LEDs
#ifndef ID61_DISABLE_UNDERGLOW
, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2
#endif
} };

#endif // RGB_MATRIX_ENABLE
6 changes: 6 additions & 0 deletions keyboards/idobao/id61/id61.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2022 Vino Rodrigues (@vinorodrigues)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "quantum.h"
101 changes: 101 additions & 0 deletions keyboards/idobao/id61/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"manufacturer": "IDOBAO",
"keyboard_name": "ID61",
"maintainer": "vinorodrigues",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
"debounce": 5,
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"backlight": false,
"rgblight": false
},
"matrix_pins": {
"cols": ["C7", "F6", "F5", "F4", "F1", "B7", "D5", "D1", "D2", "D3", "D4", "D0", "D6", "D7"],
"rows": ["B0", "B1", "B2", "B3", "F7"]
},
"processor": "atmega32u4",
"url": "https://idobao.net/search?type=product&q=id61*",
"usb": {
"device_version": "1.0.0",
"pid": "0x0061",
"vid": "0x6964"
},
"community_layouts": ["60_ansi"],
"layouts": {
"LAYOUT_60_ansi": {
"layout": [
{ "label": "Esc", "matrix": [0, 0], "x":0, "y":0 },
{ "label": "1!", "matrix": [0, 1], "x":1, "y":0 },
{ "label": "2@", "matrix": [0, 2], "x":2, "y":0 },
{ "label": "3#", "matrix": [0, 3], "x":3, "y":0 },
{ "label": "4$", "matrix": [0, 4], "x":4, "y":0 },
{ "label": "5%", "matrix": [0, 5], "x":5, "y":0 },
{ "label": "6^", "matrix": [0, 6], "x":6, "y":0 },
{ "label": "7&", "matrix": [0, 7], "x":7, "y":0 },
{ "label": "8*", "matrix": [0, 8], "x":8, "y":0 },
{ "label": "9(", "matrix": [0, 9], "x":9, "y":0 },
{ "label": "0)", "matrix": [0, 10], "x":10, "y":0 },
{ "label": "-_", "matrix": [0, 11], "x":11, "y":0 },
{ "label": "=+", "matrix": [0, 12], "x":12, "y":0 },
{ "label": "Backspace", "matrix": [0, 13], "x":13, "y":0, "w":2 },

{ "label": "Tab", "matrix": [1, 0], "x":0, "y":1, "w":1.5 },
{ "label": "Q", "matrix": [1, 1], "x":1.5, "y":1 },
{ "label": "W", "matrix": [1, 2], "x":2.5, "y":1 },
{ "label": "E", "matrix": [1, 3], "x":3.5, "y":1 },
{ "label": "R", "matrix": [1, 4], "x":4.5, "y":1 },
{ "label": "T", "matrix": [1, 5], "x":5.5, "y":1 },
{ "label": "Y", "matrix": [1, 6], "x":6.5, "y":1 },
{ "label": "U", "matrix": [1, 7], "x":7.5, "y":1 },
{ "label": "I", "matrix": [1, 8], "x":8.5, "y":1 },
{ "label": "O", "matrix": [1, 9], "x":9.5, "y":1 },
{ "label": "P", "matrix": [1, 10], "x":10.5, "y":1 },
{ "label": "[{", "matrix": [1, 11], "x":11.5, "y":1 },
{ "label": "]}", "matrix": [1, 12], "x":12.5, "y":1 },
{ "label": "\\|", "matrix": [1, 13], "x":13.5, "y":1, "w":1.5 },

{ "label": "Caps Lock", "matrix": [2, 0], "x":0, "y":2, "w":1.75 },
{ "label": "A", "matrix": [2, 1], "x":1.75, "y":2 },
{ "label": "S", "matrix": [2, 2], "x":2.75, "y":2 },
{ "label": "D", "matrix": [2, 3], "x":3.75, "y":2 },
{ "label": "F", "matrix": [2, 4], "x":4.75, "y":2 },
{ "label": "G", "matrix": [2, 5], "x":5.75, "y":2 },
{ "label": "H", "matrix": [2, 6], "x":6.75, "y":2 },
{ "label": "J", "matrix": [2, 7], "x":7.75, "y":2 },
{ "label": "K", "matrix": [2, 8], "x":8.75, "y":2 },
{ "label": "L", "matrix": [2, 9], "x":9.75, "y":2 },
{ "label": ";:", "matrix": [2, 10], "x":10.75, "y":2 },
{ "label": "'\"", "matrix": [2, 11], "x":11.75, "y":2 },
{ "label": "Enter", "matrix": [2, 12], "x":12.75, "y":2, "w":2.25 },

{ "label": "Shift", "matrix": [3, 0], "x":0, "y":3, "w":2.25 },
{ "label": "Z", "matrix": [3, 2], "x":2.25, "y":3 },
{ "label": "X", "matrix": [3, 3], "x":3.25, "y":3 },
{ "label": "C", "matrix": [3, 4], "x":4.25, "y":3 },
{ "label": "V", "matrix": [3, 5], "x":5.25, "y":3 },
{ "label": "B", "matrix": [3, 6], "x":6.25, "y":3 },
{ "label": "N", "matrix": [3, 7], "x":7.25, "y":3 },
{ "label": "M", "matrix": [3, 8], "x":8.25, "y":3 },
{ "label": ",<", "matrix": [3, 9], "x":9.25, "y":3 },
{ "label": ".>", "matrix": [3, 10], "x":10.25, "y":3 },
{ "label": "/?", "matrix": [3, 11], "x":11.25, "y":3 },
{ "label": "Shift", "matrix": [3, 12], "x":12.25, "y":3, "w":2.75 },

{ "label": "Ctrl", "matrix": [4, 0], "x":0, "y":4, "w":1.25 },
{ "label": "GUI", "matrix": [4, 1], "x":1.25, "y":4, "w":1.25 },
{ "label": "Alt", "matrix": [4, 2], "x":2.5, "y":4, "w":1.25 },
{ "label": "Space", "matrix": [4, 6], "x":3.75, "y":4, "w":6.25 },
{ "label": "Fn", "matrix": [4, 10], "x":10, "y":4, "w":1.25 },
{ "label": "Alt", "matrix": [4, 11], "x":11.25, "y":4, "w":1.25 },
{ "label": "Menu", "matrix": [4, 12], "x":12.5, "y":4, "w":1.25 },
{ "label": "Ctrl", "matrix": [4, 13], "x":13.75, "y":4, "w":1.25 }
]
}
}
}
Loading

0 comments on commit a84ca26

Please sign in to comment.