[Keyboard] Add IDOBAO ID80 (#8728)
* id80: New keyboard (IDOBAO ID80)
Add initial support for the IDOBAO ID80 keyboard.
Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor. The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.
* id80: Update default keymap to match stock
Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.
* id80: Add Caps Lock indicator support
Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically. Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.
* id80: Remove placeholder functions
The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.
* id80: Use Esc as the Bootmagic Lite activation key
The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.
* id80: Update info.json
Replace info.json generated by the KBF to QMK converter with another
version generated using http://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/). The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).
* id80: Enable NKRO
The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.
* id80: Use unique USB vendor/product ID
Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.
* id80: Fix right modifiers in the default keymap
For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.
* id80: Remove empty row 6 (F0) from matrix
The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows. However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part). Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.
* id80: Update row numbers in the LAYOUT macro
Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.
* id80: Set RGBLED_NUM to 20 to match the actual PCB
The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain. However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
2020-04-13 00:55:01 +02:00
|
|
|
/* Copyright 2020 Sergey Vlasov <sigprof@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "quantum.h"
|
|
|
|
|
|
|
|
#define LAYOUT( \
|
|
|
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, KA7, KA5, KA4, KA3, KA6, KA2, \
|
|
|
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, K98, K97, K95, K94, K96, K92, \
|
|
|
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K88, K87, K85, K84, K83, K82, \
|
|
|
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K78, K77, K75, K74, \
|
|
|
|
K10, K12, K13, K14, K15, K16, K17, K18, K68, K67, K65, K64, K63, \
|
|
|
|
K00, K01, K02, K06, K08, K07, K05, K04, K03 \
|
|
|
|
) { \
|
2020-04-29 12:52:15 +02:00
|
|
|
{ K00, K10, K20, K30, K40, K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
|
|
|
{ K01, KC_NO, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
|
|
|
{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, K82, K92, KA2 }, \
|
|
|
|
{ K03, K13, K23, K33, K43, K53, K63, KC_NO, K83, KC_NO, KA3 }, \
|
|
|
|
{ K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4 }, \
|
|
|
|
{ K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, KA5 }, \
|
|
|
|
{ K06, K16, K26, K36, K46, K56, KC_NO, KC_NO, KC_NO, K96, KA6 }, \
|
|
|
|
{ K07, K17, K27, K37, K47, K57, K67, K77, K87, K97, KA7 }, \
|
|
|
|
{ K08, K18, K28, K38, K48, K58, K68, K78, K88, K98, KC_NO }, \
|
[Keyboard] Add IDOBAO ID80 (#8728)
* id80: New keyboard (IDOBAO ID80)
Add initial support for the IDOBAO ID80 keyboard.
Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor. The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.
* id80: Update default keymap to match stock
Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.
* id80: Add Caps Lock indicator support
Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically. Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.
* id80: Remove placeholder functions
The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.
* id80: Use Esc as the Bootmagic Lite activation key
The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.
* id80: Update info.json
Replace info.json generated by the KBF to QMK converter with another
version generated using http://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/). The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).
* id80: Enable NKRO
The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.
* id80: Use unique USB vendor/product ID
Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.
* id80: Fix right modifiers in the default keymap
For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.
* id80: Remove empty row 6 (F0) from matrix
The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows. However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part). Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.
* id80: Update row numbers in the LAYOUT macro
Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.
* id80: Set RGBLED_NUM to 20 to match the actual PCB
The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain. However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
2020-04-13 00:55:01 +02:00
|
|
|
}
|