Add Koolertron AMAG09 9 key macropad (#421)

* Add Koolertron AMAG09 9 key macropad

* Fix default keymap for koolertron/amag09

* Move as much as possible from C into info.json, fix layout name, and remove unnecessary LOCKING_ flags
This commit is contained in:
Andrew Litt 2023-03-28 20:48:18 -05:00 committed by GitHub
parent 594c3eeef2
commit b291cd2586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 217 additions and 0 deletions

View File

@ -0,0 +1,48 @@
{
"keyboard_name": "AMAG09",
"manufacturer": "Koolertron",
"url": "http://www.koolertron.com/koolertron-one-handed-macro-mechanical-keyboard-rgb-led-backlit-portable-mini-onehanded-mechanical-gaming-keypad-23-fully-programmable-keys-blue-switches-p-874.html",
"maintainer": "al177",
"usb": {
"vid": "0x4B54",
"pid": "0x2323",
"device_version": "0.0.1"
},
"bootloader": "bootloadhid",
"processor": "atmega32a",
"features": {
"backlight": true,
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true
},
"diode_direction": "ROW2COL",
"matrix_size": {
"cols": 3,
"rows": 3
},
"matrix_pins": {
"cols": ["B0", "B1", "B2"],
"rows": ["A0", "A1", "A2"]
},
"backlight": {
"pin": "D4"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label":"K00", "matrix": [0, 0], "x":0, "y":0},
{"label":"K01", "matrix": [0, 1], "x":1, "y":0},
{"label":"K02", "matrix": [0, 2], "x":2, "y":0},
{"label":"K10", "matrix": [1, 0], "x":0, "y":1},
{"label":"K11", "matrix": [1, 1], "x":1, "y":1},
{"label":"K12", "matrix": [1, 2], "x":2, "y":1},
{"label":"K20", "matrix": [2, 0], "x":0, "y":2},
{"label":"K21", "matrix": [2, 1], "x":1, "y":2},
{"label":"K22", "matrix": [2, 2], "x":2, "y":2}
]
}
}
}

View File

@ -0,0 +1,49 @@
/* Copyright 2023
*
* 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/>.
*/
#include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_names {
BASE,
FN1,
FN2,
FN3
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT(
KC_KP_7, KC_KP_8, KC_KP_9,
KC_KP_4, KC_KP_5, KC_KP_6,
KC_KP_1, KC_KP_2, KC_KP_3
),
[FN1] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[FN2] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[FN3] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
};
// clang-format on

View File

@ -0,0 +1,9 @@
/* Vial configuration */
#pragma once
#define VIAL_KEYBOARD_UID {0x1C, 0xA6, 0x8B, 0xCD, 0xCB, 0x42, 0x5C, 0x6F}
#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 }
#define VIAL_UNLOCK_COMBO_COLS { 2, 0 }

View File

@ -0,0 +1,49 @@
/* Copyright 2023
*
* 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/>.
*/
#include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_names {
BASE,
FN1,
FN2,
FN3
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT(
KC_KP_7, KC_KP_8, KC_KP_9,
KC_KP_4, KC_KP_5, KC_KP_6,
MO(FN1), KC_KP_2, KC_KP_3
),
[FN1] = LAYOUT(
BL_TOGG, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[FN2] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[FN3] = LAYOUT(
_______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
};
// clang-format on

View File

@ -0,0 +1,3 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
LTO_ENABLE = yes

View File

@ -0,0 +1,29 @@
{
"name": "Koolertron AMAG09",
"vendorId": "0x4B54",
"productId": "0x2323",
"lighting": "qmk_backlight",
"matrix" : {
"rows": 3,
"cols": 3
},
"layouts" : {
"keymap" : [
[
"0,0",
"0,1",
"0,2"
],
[
"1,0",
"1,1",
"1,2"
],
[
"2,0",
"2,1",
"2,2"
]
]
}
}

View File

@ -0,0 +1,29 @@
# AMAG09 (Koolertron)
![Koolertron AMAG09](https://i.imgur.com/mepvkTe.jpg)
One Handed Macro Mechanical Keyboard, 9 Key with optional RGB backlighting.
- Keyboard Maintainer: [al177](https://github.com/al177)
- Hardware Supported: AMAG09 (ATmega32A)
- Hardware Availability:
- [Amazon](https://www.amazon.com/Koolertron-Mechanical-Keyboard-One-Handed-Programmable/dp/B0998QM9L2)
Make example for this keyboard (after setting up your build environment):
make koolertron/amag09:default
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
make amag09:default:flash
make amag09:vial:flash
**Reset Key**: Hold down the *upper left* key while plugging in the keyboard.
**Tips**:
- The keyboard comes with bootloadHID installed from factory.
- The configuration here is for the single color LED keyboard. RGB versions are presumed to be i2c like the amag23
Based on keyboards/amag23 by ianmclinden
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).

View File

@ -0,0 +1 @@
# Placeholder so this board is recognized as a target