-
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.
- Loading branch information
1 parent
5a969cd
commit fbf8cfd
Showing
4 changed files
with
352 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,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 |
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,248 @@ | ||
{ | ||
"name": "Mini M with MiniRazz controller", | ||
"lighting": "none", | ||
"customKeycodes": [ | ||
{"name": "NumScr\nLock", "title": "Shift-ScrollLock behaves as NumLock", "shortName": "NUMSLCK"} | ||
], | ||
"matrix": { | ||
"rows": 12, | ||
"cols": 16 | ||
}, | ||
"layouts": { | ||
"labels": [ | ||
[ | ||
"Enter Key", | ||
"Small Enter", | ||
"ANSI Enter", | ||
"ISO Enter" | ||
], | ||
[ | ||
"Backspace", | ||
"Split Backspace", | ||
"Merged Backspace" | ||
], | ||
[ | ||
"Left Shift", | ||
"Split Left Shift", | ||
"Merged Left Shift" | ||
], | ||
[ | ||
"Right Shift", | ||
"Split Right Shift", | ||
"Merged Right Shift" | ||
], | ||
[ | ||
"Spacebar", | ||
"Small Spacebar", | ||
"Big Spacebar" | ||
] | ||
], | ||
"keymap": [ | ||
[ | ||
"0,1", | ||
{ | ||
"x": 1 | ||
}, | ||
"2,2", | ||
"0,4", | ||
"0,5", | ||
"0,6", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"1,8", | ||
"3,8", | ||
"4,8", | ||
"5,8", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"6,8", | ||
"6,10", | ||
"6,11", | ||
"7,11", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"6,13", | ||
"7,13", | ||
"11,15" | ||
], | ||
[ | ||
{ | ||
"y": 1 | ||
}, | ||
"0,0", | ||
"3,2", | ||
"6,2", | ||
"7,2", | ||
"4,2", | ||
"0,2", | ||
"1,7", | ||
"5,7", | ||
"10,7", | ||
"9,7", | ||
"8,7", | ||
"6,12", | ||
"6,9", | ||
"7,12\n\n\n1,0", | ||
"8,9\n\n\n1,0", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"8,12", | ||
"9,13", | ||
"10,12", | ||
{ | ||
"x": 0.75, | ||
"w": 2 | ||
}, | ||
"8,9\n\n\n1,1" | ||
], | ||
[ | ||
{ | ||
"w": 1.5 | ||
}, | ||
"2,12", | ||
"1,2", | ||
"5,2", | ||
"10,2", | ||
"9,2", | ||
"8,2", | ||
"3,7", | ||
"6,7", | ||
"7,7", | ||
"4,7", | ||
"0,7", | ||
"5,9", | ||
"10,9", | ||
{ | ||
"w": 1.5 | ||
}, | ||
"9,9\n\n\n0,0", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"11,13", | ||
"8,11", | ||
"10,13", | ||
{ | ||
"x": 1.25, | ||
"w": 1.5 | ||
}, | ||
"9,9\n\n\n0,1", | ||
{ | ||
"x": 1.5, | ||
"w": 1.25, | ||
"h": 2 | ||
}, | ||
"0,13\n\n\n0,2" | ||
], | ||
[ | ||
{ | ||
"w": 1.75 | ||
}, | ||
"1,0", | ||
"2,11", | ||
"2,0", | ||
"2,1", | ||
"2,3", | ||
"2,4", | ||
"11,5", | ||
"11,8", | ||
"11,6", | ||
"11,9", | ||
"11,10", | ||
"11,12", | ||
"1,13\n\n\n0,0", | ||
{ | ||
"w": 1.25 | ||
}, | ||
"0,13\n\n\n0,0", | ||
{ | ||
"x": 4, | ||
"w": 2.25 | ||
}, | ||
"0,13\n\n\n0,1", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"1,13\n\n\n0,2" | ||
], | ||
[ | ||
{ | ||
"w": 1.25 | ||
}, | ||
"4,15\n\n\n2,0", | ||
"1,1\n\n\n2,0", | ||
"2,5", | ||
"2,8", | ||
"2,6", | ||
"2,9", | ||
"2,10", | ||
"11,11", | ||
"11,0", | ||
"11,1", | ||
"11,3", | ||
"11,4", | ||
"0,3\n\n\n3,0", | ||
{ | ||
"w": 1.75 | ||
}, | ||
"1,15\n\n\n3,0", | ||
{ | ||
"x": 1.5 | ||
}, | ||
"8,10" | ||
], | ||
[ | ||
{ | ||
"w": 1.5 | ||
}, | ||
"4,14", | ||
"3,11", | ||
{ | ||
"w": 1.5 | ||
}, | ||
"0,12", | ||
{ | ||
"w": 6 | ||
}, | ||
"10,0\n\n\n4,0", | ||
"9,3\n\n\n4,0", | ||
{ | ||
"w": 1.5 | ||
}, | ||
"5,10", | ||
"10,4", | ||
{ | ||
"w": 1.5 | ||
}, | ||
"1,14", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"9,4", | ||
"10,11", | ||
"10,10" | ||
], | ||
[ | ||
{ | ||
"y": 0.5, | ||
"w": 2.25 | ||
}, | ||
"4,15\n\n\n2,1", | ||
{ | ||
"x": 1.75, | ||
"w": 7 | ||
}, | ||
"10,0\n\n\n4,1", | ||
{ | ||
"x": 1.25, | ||
"w": 2.75 | ||
}, | ||
"1,15\n\n\n3,1" | ||
] | ||
] | ||
} | ||
} |