Refactor: move miniaxe into kagizaraya (#22708)

Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
フィルターペーパー 2023-12-24 07:49:47 +08:00 committed by GitHub
parent 6510188138
commit 456291d04e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,43 @@
/*
Copyright 2018 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp>
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
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_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
//#define EE_HANDS
#define I2C_MASTER_LEFT
//#define I2C_MASTER_RIGHT

View file

@ -0,0 +1,97 @@
{
"keyboard_name": "MiniAxe",
"manufacturer": "ENDO Katsuhiro",
"url": "",
"maintainer": "ka2hiro",
"usb": {
"vid": "0xFEED",
"pid": "0x3939",
"device_version": "0.0.1"
},
"split": {
"soft_serial_pin": "D0"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 6,
"animations": {
"breathing": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"snake": true,
"knight": true,
"christmas": true,
"static_gradient": true,
"rgb_test": true,
"alternating": true,
"twinkle": true
}
},
"ws2812": {
"pin": "F4"
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"matrix_pins": {
"direct": [
["F1", "E6", "B0", "B2", "B3"],
["F5", "F0", "B1", "B7", "D2"],
["F6", "F7", "C7", "D5", "D3"],
["B5", "C6", "B6", null, null]
]
},
"community_layouts": ["split_3x5_3"],
"layout_aliases": {
"LAYOUT": "LAYOUT_split_3x5_3"
},
"layouts": {
"LAYOUT_split_3x5_3": {
"layout": [
{"x": 0, "y": 0, "matrix": [0, 0]},
{"x": 1, "y": 0, "matrix": [0, 1]},
{"x": 2, "y": 0, "matrix": [0, 2]},
{"x": 3, "y": 0, "matrix": [0, 3]},
{"x": 4, "y": 0, "matrix": [0, 4]},
{"x": 6, "y": 0, "matrix": [4, 0]},
{"x": 7, "y": 0, "matrix": [4, 1]},
{"x": 8, "y": 0, "matrix": [4, 2]},
{"x": 9, "y": 0, "matrix": [4, 3]},
{"x": 10, "y": 0, "matrix": [4, 4]},
{"x": 0, "y": 1, "matrix": [1, 0]},
{"x": 1, "y": 1, "matrix": [1, 1]},
{"x": 2, "y": 1, "matrix": [1, 2]},
{"x": 3, "y": 1, "matrix": [1, 3]},
{"x": 4, "y": 1, "matrix": [1, 4]},
{"x": 6, "y": 1, "matrix": [5, 0]},
{"x": 7, "y": 1, "matrix": [5, 1]},
{"x": 8, "y": 1, "matrix": [5, 2]},
{"x": 9, "y": 1, "matrix": [5, 3]},
{"x": 10, "y": 1, "matrix": [5, 4]},
{"x": 0, "y": 2, "matrix": [2, 0]},
{"x": 1, "y": 2, "matrix": [2, 1]},
{"x": 2, "y": 2, "matrix": [2, 2]},
{"x": 3, "y": 2, "matrix": [2, 3]},
{"x": 4, "y": 2, "matrix": [2, 4]},
{"x": 6, "y": 2, "matrix": [6, 0]},
{"x": 7, "y": 2, "matrix": [6, 1]},
{"x": 8, "y": 2, "matrix": [6, 2]},
{"x": 9, "y": 2, "matrix": [6, 3]},
{"x": 10, "y": 2, "matrix": [6, 4]},
{"x": 2, "y": 3, "matrix": [3, 0]},
{"x": 3, "y": 3, "matrix": [3, 1]},
{"x": 4, "y": 3, "matrix": [3, 2]},
{"x": 6, "y": 3, "matrix": [7, 0]},
{"x": 7, "y": 3, "matrix": [7, 1]},
{"x": 8, "y": 3, "matrix": [7, 2]}
]
}
}
}

View file

@ -0,0 +1,152 @@
/* Copyright 2018 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp>
*
* 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 the keycodes used by our macros in process_record_user
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
*
* ,----------------------------------. ,----------------------------------.
* | Q | W | E | R | T | | Y | U | I | O | P |
* |------+------+------+------+------| |------+------+------+------+------|
* | A | S | D | F | G | | H | J | K | L | ; |
* |------+------+------+------+------| |------+------+------+------+------|
* | Z | X | C | V | B | | N | M | , | . | / |
* `-------------+------+------+------| |------+------+------+------+------'
* | GUI | LOWER|Ctrl/Esc| |Spc/Sft| RAISE|Alt/BkSp |
* `--------------------' `--------------------'
*/
[_QWERTY] = LAYOUT_split_3x5_3(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), MT(MOD_LSFT, KC_SPC), RAISE, MT(MOD_LALT, KC_BSPC)
),
/* Raise
*
* ,----------------------------------. ,----------------------------------.
* | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
* |------+------+------+------+------| |------+------+------+------+------|
* | Tab | _ | + | | | ~ | | : | " | > | { | } |
* |------+------+------+------+------| |------+------+------+------+------|
* | Caps| - | = | \ | ` | | ; | ' | < | [ | ] |
* `-------------+------+------+------| |------+------+------+------+------'
* | | LOWER| | | Esc | RAISE| |
* `--------------------' `--------------------'
*/
[_RAISE] = LAYOUT_split_3x5_3(
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR,
KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC,
_______, _______, _______, _______, _______, _______
),
/* Lower
*
* ,----------------------------------. ,----------------------------------.
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
* |------+------+------+------+------| |------+------+------+------+------|
* | Tab | | | | | | Left | Down | Up | Right| Enter|
* |------+------+------+------+------| |------+------+------+------+------|
* | Ctrl| ` | GUI | Alt | Del | | BkSp | PgUp | PgDn | \ | ' |
* `-------------+------+------+------| |------+------+------+------+------'
* | | LOWER| | | | RAISE| |
* `--------------------' `--------------------'
*/
[_LOWER] = LAYOUT_split_3x5_3(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TAB, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT,
KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, KC_DEL, KC_BSPC, KC_PGUP, KC_PGDN, KC_BSLS, KC_QUOT,
_______, _______, _______, _______, _______, _______
),
/* Adjust (Lower + Raise)
*
* ,----------------------------------. ,----------------------------------.
* | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
* |------+------+------+------+------| |------+------+------+------+------|
* | F11 | F12 | | | | | | | | | |
* |------+------+------+------+------| |------+------+------+------+------|
* | Reset| | | | | | Prev | Next | Vol- | Vol+ | Play |
* `-------------+------+------+------| |------+------+------+------+------'
* | | LOWER| | | | RAISE| |
* `--------------------' `--------------------'
*/
[_ADJUST] = LAYOUT_split_3x5_3(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______,
QK_BOOT, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
_______, _______, _______, _______, _______, _______
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
// persistant_default_layer_set(1UL<<_QWERTY);
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

View file

@ -0,0 +1,152 @@
/* Copyright 2018 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp>
*
* 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 the keycodes used by our macros in process_record_user
enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
*
* ,----------------------------------. ,----------------------------------.
* | Q | W | E | R | T | | Y | U | I | O | P |
* |------+------+------+------+------| |------+------+------+------+------|
* | A | S | D | F | G | | H | J | K | L | ; |
* |------+------+------+------+------| |------+------+------+------+------|
* | Z | X | C | V | B | | N | M | , | . | / |
* `-------------+------+------+------| |------+------+------+------+------'
* | GUI | LOWER|Ctrl/Esc| |Spc/Sft| RAISE|Alt/BkSp |
* `--------------------' `--------------------'
*/
[_QWERTY] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), MT(MOD_LSFT, KC_SPC), RAISE, MT(MOD_LALT, KC_BSPC)
),
/* Raise
*
* ,----------------------------------. ,----------------------------------.
* | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
* |------+------+------+------+------| |------+------+------+------+------|
* | Tab | _ | + | | | ~ | | : | " | > | { | } |
* |------+------+------+------+------| |------+------+------+------+------|
* | Caps| - | = | \ | ` | | ; | ' | < | [ | ] |
* `-------------+------+------+------| |------+------+------+------+------'
* | | LOWER| | | Esc | RAISE| |
* `--------------------' `--------------------'
*/
[_RAISE] = LAYOUT(
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR,
KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC,
_______, _______, _______, _______, _______, _______
),
/* Lower
*
* ,----------------------------------. ,----------------------------------.
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
* |------+------+------+------+------| |------+------+------+------+------|
* | Tab | | | | Play | | Left | Down | Up | Right| Enter|
* |------+------+------+------+------| |------+------+------+------+------|
* | Ctrl| ` | GUI | Alt | Del | | BkSp | PgUp | PgDn | \ | ' |
* `-------------+------+------+------| |------+------+------+------+------'
* | | LOWER| | | | RAISE| |
* `--------------------' `--------------------'
*/
[_LOWER] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TAB, _______, _______, _______, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT,
KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, KC_DEL, KC_BSPC, KC_PGUP, KC_PGDN, KC_BSLS, KC_QUOT,
_______, _______, _______, _______, _______, _______
),
/* Adjust (Lower + Raise)
*
* ,----------------------------------. ,----------------------------------.
* | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
* |------+------+------+------+------| |------+------+------+------+------|
* | F11 | F12 | |RGBSAI|RGBSAD| |RGBVAI|RGBVAD| | | |
* |------+------+------+------+------| |------+------+------+------+------|
* | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| | Prev | Next | Vol- | Vol+ | Play |
* `-------------+------+------+------| |------+------+------+------+------'
* | | LOWER| | | | RAISE| |
* `--------------------' `--------------------'
*/
[_ADJUST] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______,
QK_BOOT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
_______, _______, _______, _______, _______, _______
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
// persistant_default_layer_set(1UL<<_QWERTY);
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

View file

@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes

View file

@ -0,0 +1,16 @@
MiniAxe
===
![MiniAxe](https://i.imgur.com/1ApzrCz.jpg)
Yet another split ortholinear keyboard with 3x5+3 keys.
Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro)
Hardware Supported: MiniAxe PCB, ATMEGA32U4
Hardware Availability: [@ka2hiro](https://twitter.com/ka2hiro)
Make example for this keyboard (after setting up your build environment):
make kagizaraya/miniaxe:default
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,15 @@
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DEBUG_ENABLE = no
SPLIT_KEYBOARD = yes # Use shared split_common code