-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mini M keyboard support with the MiniRazz controller
- Loading branch information
1 parent
e0c7a13
commit 1e1c6c8
Showing
12 changed files
with
840 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
{ | ||
"keyboard_name": "Mini M", | ||
"manufacturer": "Unicomp", | ||
"url": "", | ||
"maintainer": "purdeaandrei", | ||
"usb": { | ||
"vid": "0x16C0", | ||
"pid": "0x27DB", | ||
"device_version": "0.0.1" | ||
}, | ||
"layouts": { | ||
"LAYOUT": { | ||
"layout": [ | ||
{"label":"Esc", "x":0, "y":0}, | ||
{"label":"F1", "x":2, "y":0}, | ||
{"label":"F2", "x":3, "y":0}, | ||
{"label":"F3", "x":4, "y":0}, | ||
{"label":"F4", "x":5, "y":0}, | ||
{"label":"F5", "x":6.5, "y":0}, | ||
{"label":"F6", "x":7.5, "y":0}, | ||
{"label":"F7", "x":8.5, "y":0}, | ||
{"label":"F8", "x":9.5, "y":0}, | ||
{"label":"F9", "x":11, "y":0}, | ||
{"label":"F10", "x":12, "y":0}, | ||
{"label":"F11", "x":13, "y":0}, | ||
{"label":"F12", "x":14, "y":0}, | ||
{"label":"Pause / SysReq", "x":15.5, "y":0}, | ||
{"label":"Scroll Lock / Num Lock", "x":16.5, "y":0}, | ||
{"label":"Pause / Reset", "x":17.5, "y":0}, | ||
|
||
{"label":"`", "x":0, "y":2}, | ||
{"label":"1", "x":1, "y":2}, | ||
{"label":"2", "x":2, "y":2}, | ||
{"label":"3", "x":3, "y":2}, | ||
{"label":"4", "x":4, "y":2}, | ||
{"label":"5", "x":5, "y":2}, | ||
{"label":"6", "x":6, "y":2}, | ||
{"label":"7", "x":7, "y":2}, | ||
{"label":"8", "x":8, "y":2}, | ||
{"label":"9", "x":9, "y":2}, | ||
{"label":"0", "x":10, "y":2}, | ||
{"label":"-", "x":11, "y":2}, | ||
{"label":"=", "x":12, "y":2}, | ||
{"label":"No", "x":13, "y":2}, | ||
{"label":"Backspace", "x":14, "y":2}, | ||
{"label":"Insert", "x":15.5, "y":2}, | ||
{"label":"Home", "x":16.5, "y":2}, | ||
{"label":"Page Up", "x":17.5, "y":2}, | ||
|
||
{"label":"Tab", "x":0, "y":3, "w":1.5}, | ||
{"label":"Q", "x":1.5, "y":3}, | ||
{"label":"W", "x":2.5, "y":3}, | ||
{"label":"E", "x":3.5, "y":3}, | ||
{"label":"R", "x":4.5, "y":3}, | ||
{"label":"T", "x":5.5, "y":3}, | ||
{"label":"Y", "x":6.5, "y":3}, | ||
{"label":"U", "x":7.5, "y":3}, | ||
{"label":"I", "x":8.5, "y":3}, | ||
{"label":"O", "x":9.5, "y":3}, | ||
{"label":"P", "x":10.5, "y":3}, | ||
{"label":"[", "x":11.5, "y":3}, | ||
{"label":"]", "x":12.5, "y":3}, | ||
{"label":"\\", "x":13.5, "y":3, "w":1.5}, | ||
{"label":"Delete", "x":15.5, "y":3}, | ||
{"label":"End", "x":16.5, "y":3}, | ||
{"label":"Page Down", "x":17.5, "y":3}, | ||
|
||
{"label":"Caps Lock", "x":0, "y":4, "w":1.75}, | ||
{"label":"A", "x":1.75, "y":4}, | ||
{"label":"S", "x":2.75, "y":4}, | ||
{"label":"D", "x":3.75, "y":4}, | ||
{"label":"F", "x":4.75, "y":4}, | ||
{"label":"G", "x":5.75, "y":4}, | ||
{"label":"H", "x":6.75, "y":4}, | ||
{"label":"J", "x":7.75, "y":4}, | ||
{"label":"K", "x":8.75, "y":4}, | ||
{"label":"L", "x":9.75, "y":4}, | ||
{"label":";", "x":10.75, "y":4}, | ||
{"label":"'", "x":11.75, "y":4}, | ||
{"label":"No", "x":12.75, "y":4}, | ||
{"label":"Enter", "x":13.75, "y":4, "w":1.25}, | ||
|
||
{"label":"Shift", "x":0, "y":5, "w":1.25}, | ||
{"label":"No", "x":1.25, "y":5}, | ||
{"label":"Z", "x":2.25, "y":5}, | ||
{"label":"X", "x":3.25, "y":5}, | ||
{"label":"C", "x":4.25, "y":5}, | ||
{"label":"V", "x":5.25, "y":5}, | ||
{"label":"B", "x":6.25, "y":5}, | ||
{"label":"N", "x":7.25, "y":5}, | ||
{"label":"M", "x":8.25, "y":5}, | ||
{"label":",", "x":9.25, "y":5}, | ||
{"label":".", "x":10.25, "y":5}, | ||
{"label":"/", "x":11.25, "y":5}, | ||
{"label":"No", "x":12.25, "y":5}, | ||
{"label":"Shift", "x":13.25, "y":5, "w":1.75}, | ||
{"label":"Up", "x":16.5, "y":5}, | ||
|
||
{"label":"Ctrl", "x":0, "y":6, "w":1.5}, | ||
{"label":"GUI", "x":1.5, "y":6}, | ||
{"label":"Alt", "x":2.5, "y":6, "w":1.5}, | ||
{"label":"Space", "x":4, "y":6, "w":6}, | ||
{"label":"Alt", "x":10, "y":6}, | ||
{"label":"GUI", "x":11, "y":6, "w":1.5}, | ||
{"label":"App", "x":12.5, "y":6}, | ||
{"label":"Ctrl", "x":13.5, "y":6, "w":1.5}, | ||
{"label":"Left", "x":15.5, "y":6}, | ||
{"label":"Down", "x":16.5, "y":6}, | ||
{"label":"Right", "x":17.5, "y":6} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* Copyright 2021 stevendlander | ||
* | ||
* 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 | ||
|
||
// Layer shortcuts | ||
enum custom_layers { | ||
_QWERTY, | ||
_NUMPAD, | ||
}; | ||
|
||
enum custom_keycodes { | ||
#ifdef VIA_ENABLE | ||
NUMSLCK = USER00, // Num Lock on shift, Scroll Lock regularly | ||
NEW_SAFE_RANGE = SAFE_RANGE, | ||
#else | ||
NUMSLCK = SAFE_RANGE, // Num Lock on shift, Scroll Lock regularly | ||
NEW_SAFE_RANGE, | ||
#endif | ||
}; | ||
|
||
#undef SAFE_RANGE | ||
#define SAFE_RANGE NEW_SAFE_RANGE | ||
|
||
// Mod key detection | ||
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) | ||
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[_QWERTY] = LAYOUT( | ||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, NUMSLCK, KC_PAUS, | ||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, | ||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
), | ||
[_NUMPAD] = LAYOUT( | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NUMSLCK, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PAST, KC_TRNS, KC_TRNS, KC_PENT, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_TRNS, KC_PDOT, KC_PSLS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
), | ||
}; | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
switch (keycode) { | ||
case NUMSLCK: { | ||
if (record->event.pressed) { | ||
if (keyboard_report->mods & MODS_SHIFT_MASK) { | ||
tap_code(KC_NUM); | ||
} else { | ||
register_code(KC_SCRL); | ||
} | ||
} else { | ||
unregister_code(KC_SCRL); | ||
} | ||
break; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
bool led_update_user(led_t led_state) { | ||
static bool num_state = false; | ||
if (num_state != led_state.num_lock) { | ||
if (led_state.num_lock) { | ||
layer_on(_NUMPAD); | ||
} else { | ||
layer_off(_NUMPAD); | ||
} | ||
num_state = led_state.num_lock; | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# The default keymap for unicomp/mini_m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
|
||
#pragma once | ||
|
||
#undef SERIAL_NUMBER | ||
#define SERIAL_NUMBER "purdea.ro:minirazz:vial:f64c2b3c" | ||
|
||
#define VIAL_KEYBOARD_UID {0x49, 0x7B, 0x5D, 0x85, 0x5F, 0xD1, 0x6E, 0xA7} | ||
#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } | ||
#define VIAL_UNLOCK_COMBO_COLS { 1, 0xd } | ||
|
||
#define DYNAMIC_KEYMAP_MACRO_COUNT 32 | ||
#define DYNAMIC_KEYMAP_LAYER_COUNT 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* Copyright 2021 stevendlander | ||
* | ||
* 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 | ||
|
||
// Layer shortcuts | ||
enum custom_layers { | ||
_QWERTY, | ||
_NUMPAD, | ||
}; | ||
|
||
enum custom_keycodes { | ||
#ifdef VIA_ENABLE | ||
NUMSLCK = USER00, // Num Lock on shift, Scroll Lock regularly | ||
NEW_SAFE_RANGE = SAFE_RANGE, | ||
#else | ||
NUMSLCK = SAFE_RANGE, // Num Lock on shift, Scroll Lock regularly | ||
NEW_SAFE_RANGE, | ||
#endif | ||
}; | ||
|
||
#undef SAFE_RANGE | ||
#define SAFE_RANGE NEW_SAFE_RANGE | ||
|
||
// Mod key detection | ||
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) | ||
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[_QWERTY] = LAYOUT( | ||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, NUMSLCK, KC_PAUS, | ||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, | ||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
), | ||
[_NUMPAD] = LAYOUT( | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NUMSLCK, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PAST, KC_TRNS, KC_TRNS, KC_PENT, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_TRNS, KC_PDOT, KC_PSLS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
), | ||
}; | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
switch (keycode) { | ||
case NUMSLCK: { | ||
if (record->event.pressed) { | ||
if (keyboard_report->mods & MODS_SHIFT_MASK) { | ||
tap_code(KC_NUM); | ||
} else { | ||
register_code(KC_SCRL); | ||
} | ||
} else { | ||
unregister_code(KC_SCRL); | ||
} | ||
break; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
bool led_update_user(led_t led_state) { | ||
static bool num_state = false; | ||
if (num_state != led_state.num_lock) { | ||
if (led_state.num_lock) { | ||
layer_on(_NUMPAD); | ||
} else { | ||
layer_off(_NUMPAD); | ||
} | ||
num_state = led_state.num_lock; | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VIA_ENABLE = yes | ||
VIAL_ENABLE = yes |
Oops, something went wrong.