Compare commits
3 Commits
keyboard_o
...
json_custo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eaee65ac3 | ||
|
|
5b0b8ba654 | ||
|
|
0a33ce0659 |
@@ -15,5 +15,3 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
|||||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
:$(shell cp $(KEYMAP_JSON) $(KEYMAP_OUTPUT)/keymap.json)
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
|||||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||||
|
|
||||||
# Pull in rules from info.json
|
# Pull in rules from info.json
|
||||||
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
|
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
|
||||||
include $(INFO_RULES_MK)
|
include $(INFO_RULES_MK)
|
||||||
|
|
||||||
# Check for keymap.json first, so we can regenerate keymap.c
|
# Check for keymap.json first, so we can regenerate keymap.c
|
||||||
@@ -328,13 +328,13 @@ endif
|
|||||||
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||||
|
|
||||||
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
|
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
|
||||||
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYBOARD_OUTPUT)/src/info_config.h
|
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
|
||||||
|
|
||||||
$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
|
$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
|
||||||
$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h
|
$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h
|
||||||
|
|
||||||
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
|
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
|
||||||
$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYBOARD_OUTPUT)/src/layouts.h
|
$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||||
|
|
||||||
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
"minLength": 1,
|
"minLength": 1,
|
||||||
"pattern": "^[0-9a-z_]*$"
|
"pattern": "^[0-9a-z_]*$"
|
||||||
},
|
},
|
||||||
|
"keycode": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 250,
|
||||||
|
"pattern": "^[A-Z_][0-9A-Z_()]*$"
|
||||||
|
},
|
||||||
"hex_number_2d": {
|
"hex_number_2d": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"pattern": "^0x[0-9A-F]{2}$"
|
"pattern": "^0x[0-9A-F]{2}$"
|
||||||
|
|||||||
@@ -77,6 +77,10 @@
|
|||||||
"lto": {"type": "boolean"},
|
"lto": {"type": "boolean"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"custom_keycodes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {"$ref": "qmk.definitions.v1#/keycode"}
|
||||||
|
},
|
||||||
"diode_direction": {
|
"diode_direction": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["COL2ROW", "ROW2COL"]
|
"enum": ["COL2ROW", "ROW2COL"]
|
||||||
|
|||||||
@@ -6,17 +6,23 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"author": {"type": "string"},
|
"author": {"type": "string"},
|
||||||
"config": {"$ref": "qmk.keyboard.v1"},
|
"config": {"$ref": "qmk.keyboard.v1"},
|
||||||
|
"custom_keycodes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {"$ref": "qmk.definitions.v1#/keycode"}
|
||||||
|
},
|
||||||
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
"keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||||
"keyboard_overrides": {"$ref": "qmk.keyboard.v1"},
|
|
||||||
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
"keymap": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||||
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"},
|
"layout": {"$ref": "qmk.definitions.v1#/layout_macro"},
|
||||||
"layers": {
|
"layers": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {"type": "string"}
|
"items": {"$ref": "qmk.definitions.v1#/keycode"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notes": { "type": "string" }
|
"notes": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "asdf"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,17 +17,6 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
enum TWOx1800_keycodes {
|
|
||||||
ENC_BTN1 = SAFE_RANGE,
|
|
||||||
ENC_BTN2,
|
|
||||||
ENC_BTN3,
|
|
||||||
ENC_BTN4,
|
|
||||||
NEW_SAFE_RANGE
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef SAFE_RANGE
|
|
||||||
#define SAFE_RANGE NEW_SAFE_RANGE
|
|
||||||
|
|
||||||
// Encoder update function that returns true/false
|
// Encoder update function that returns true/false
|
||||||
bool encoder_update_keymap(uint8_t index, bool clockwise);
|
bool encoder_update_keymap(uint8_t index, bool clockwise);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"debounce": 5,
|
"debounce": 5,
|
||||||
"processor": "at90usb1286",
|
"processor": "at90usb1286",
|
||||||
"bootloader": "halfkay",
|
"bootloader": "halfkay",
|
||||||
|
"custom_keycodes": ["ENC_BTN1", "ENC_BTN2", "ENC_BTN3", "ENC_BTN4"],
|
||||||
"diode_direction": "ROW2COL",
|
"diode_direction": "ROW2COL",
|
||||||
"features": {
|
"features": {
|
||||||
"audio": true,
|
"audio": true,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"keyboard":"clueboard/2x1800/2019",
|
"keyboard":"clueboard/2x1800/2019",
|
||||||
"keyboard_overrides": {"keyboard_name": "keymap override"},
|
|
||||||
"keymap":"default",
|
"keymap":"default",
|
||||||
"layout":"LAYOUT_all",
|
"layout":"LAYOUT_all",
|
||||||
"layers":[
|
"layers":[
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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 "config_common.h"
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
This is the c configuration file for the keymap
|
|
||||||
|
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
|
||||||
Copyright 2015 Jack Humbert
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
/* Select hand configuration */
|
|
||||||
|
|
||||||
#define MASTER_LEFT
|
|
||||||
// #define MASTER_RIGHT
|
|
||||||
// #define EE_HANDS
|
|
||||||
|
|
||||||
#define TAPPING_FORCE_HOLD
|
|
||||||
#define TAPPING_TERM 100
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
//
|
|
||||||
// Keymaps
|
|
||||||
//
|
|
||||||
enum lyra_layers {
|
|
||||||
/* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
|
|
||||||
_QWERTY,
|
|
||||||
_FUNCTION
|
|
||||||
|
|
||||||
};
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
// Layer 0
|
|
||||||
[_QWERTY] = LAYOUT(
|
|
||||||
KC_ESC, 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_TAB, KC_LBRC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NUHS, KC_DEL,
|
|
||||||
KC_CLCK, KC_RBRC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 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_UP, KC_RSFT,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, TT(1), KC_APP, KC_PGDN, KC_SPC, KC_SPC, KC_PGUP, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
|
||||||
),
|
|
||||||
|
|
||||||
// Layer 1
|
|
||||||
[_FUNCTION] = LAYOUT(
|
|
||||||
KC_TRNS, 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_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_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_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_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
)
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CONSOLE_ENABLE = yes
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
This is the c configuration file for the keymap
|
|
||||||
|
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
|
||||||
Copyright 2015 Jack Humbert
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
/* Select hand configuration */
|
|
||||||
|
|
||||||
#define MASTER_LEFT
|
|
||||||
// #define MASTER_RIGHT
|
|
||||||
// #define EE_HANDS
|
|
||||||
|
|
||||||
#define TAPPING_FORCE_HOLD
|
|
||||||
#define TAPPING_TERM 100
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
//
|
|
||||||
// Keymaps
|
|
||||||
//
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
// Layer 0
|
|
||||||
[0] = LAYOUT(
|
|
||||||
KC_ESC, 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_TAB, KC_LBRC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NUHS, KC_DEL,
|
|
||||||
KC_CLCK, KC_RBRC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 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_UP, KC_RSFT,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, TT(1), KC_APP, KC_PGDN, KC_SPC, KC_SPC, KC_PGUP, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
|
||||||
),
|
|
||||||
|
|
||||||
// Layer 1
|
|
||||||
[1] = LAYOUT(
|
|
||||||
KC_TRNS, 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_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_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_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_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
// Layer 2
|
|
||||||
[2] = LAYOUT(
|
|
||||||
KC_TRNS, 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_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_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_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_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
// Layer 3
|
|
||||||
[3] = LAYOUT(
|
|
||||||
KC_TRNS, 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_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_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_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_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
CONSOLE_ENABLE = yes
|
|
||||||
VIA_ENABLE = yes
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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 "lyra.h"
|
|
||||||
|
|
||||||
#ifdef OLED_DRIVER_ENABLE
|
|
||||||
|
|
||||||
// 'lyralogooled', 32x128px
|
|
||||||
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|
||||||
if (is_keyboard_master()) {
|
|
||||||
return OLED_ROTATION_270;
|
|
||||||
}
|
|
||||||
return rotation;
|
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__((weak)) void oled_task_user(void) {
|
|
||||||
if (is_keyboard_master()) {
|
|
||||||
oled_write_P(PSTR(" "), false);
|
|
||||||
# ifdef WPM_ENABLE
|
|
||||||
uint8_t n = get_current_wpm();
|
|
||||||
char wpm_counter[4];
|
|
||||||
wpm_counter[3] = '\0';
|
|
||||||
wpm_counter[2] = '0' + n % 10;
|
|
||||||
wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
|
|
||||||
wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
|
|
||||||
oled_write(wpm_counter, false);
|
|
||||||
oled_write_ln_P(PSTR(" WPM"), false);
|
|
||||||
# else
|
|
||||||
oled_advance_page(true);
|
|
||||||
# endif
|
|
||||||
oled_advance_page(true);
|
|
||||||
led_t led_usb_state = host_keyboard_led_state();
|
|
||||||
oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock);
|
|
||||||
oled_advance_page(true); oled_advance_page(true);
|
|
||||||
oled_write_ln_P(PSTR("Lyra"), false);
|
|
||||||
oled_write_ln_P(PSTR("v1.1"), false);
|
|
||||||
oled_write_ln_P(PSTR("by"), false);
|
|
||||||
oled_write_P(PSTR("Dom C"), false);
|
|
||||||
} else {
|
|
||||||
static const char PROGMEM QMK_logo[] = {
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x18, 0x0c, 0x04, 0x06, 0x02,
|
|
||||||
0x02, 0x82, 0xc0, 0xf0, 0x38, 0x8c, 0xf2, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x18, 0x30, 0x20, 0xa0, 0xe0, 0xf8,
|
|
||||||
0x3e, 0x1f, 0x13, 0x0c, 0x06, 0xc3, 0xf0, 0x60, 0x00, 0x80, 0xf0, 0xe0, 0x00, 0x38, 0xfe, 0x67,
|
|
||||||
0x7b, 0xa5, 0xf3, 0xf0, 0x70, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x30, 0x20, 0x00, 0x00,
|
|
||||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0x3e, 0x61, 0xdf,
|
|
||||||
0xde, 0xde, 0x01, 0xff, 0xfe, 0x00, 0x80, 0x80, 0x80, 0xff, 0xc0, 0xdf, 0xdf, 0xdf, 0xe0, 0xff,
|
|
||||||
0x7f, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0xfe, 0xc1, 0xfd, 0x7d, 0xc3, 0xfd, 0x7d,
|
|
||||||
0xc3, 0xfe, 0xfc, 0x30, 0xea, 0xd5, 0xd5, 0xd5, 0xc3, 0xff, 0xfe, 0x7e, 0xc1, 0xfd, 0x7d, 0x7d,
|
|
||||||
0xc3, 0xfe, 0xfc, 0x3f, 0xe1, 0xff, 0xff, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xf7, 0xe6, 0x00, 0x00,
|
|
||||||
0x00, 0x78, 0xc4, 0xc2, 0x82, 0x82, 0x82, 0x82, 0xc2, 0xe4, 0x74, 0x7c, 0x3f, 0x1f, 0x31, 0x60,
|
|
||||||
0xe0, 0xc0, 0x80, 0x9c, 0xbf, 0xe7, 0xf1, 0x78, 0x3e, 0x1f, 0x0b, 0x04, 0x02, 0x01, 0x00, 0x1c,
|
|
||||||
0x3e, 0x2f, 0x13, 0x10, 0x0c, 0x1e, 0x3f, 0x2f, 0x13, 0x09, 0x1c, 0x3e, 0x2f, 0x10, 0x08, 0x06,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06,
|
|
||||||
0x06, 0x06, 0x07, 0x03, 0x7f, 0xc1, 0xbe, 0xbe, 0xbe, 0xa6, 0xe7, 0xc7, 0x60, 0xd4, 0xaa, 0xaa,
|
|
||||||
0xaa, 0x86, 0xfe, 0xfc, 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xc4, 0xaa, 0xaa, 0xaa,
|
|
||||||
0xa6, 0xfc, 0xf8, 0xff, 0x02, 0xff, 0xff, 0x60, 0xd4, 0xaa, 0xaa, 0xaa, 0x86, 0xfe, 0xfc, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x24,
|
|
||||||
0x32, 0x1b, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x78, 0x70, 0x70, 0x70, 0x30, 0x38,
|
|
||||||
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
|
|
||||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01,
|
|
||||||
0x01, 0x01, 0x07, 0x0d, 0x0e, 0x07, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
||||||
oled_write_raw_P(QMK_logo, sizeof(QMK_logo));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef KEYBOARD_lyra_rev1
|
|
||||||
#include "rev1.h"
|
|
||||||
#endif
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# Lyra Keyboard
|
|
||||||
By Domanic Calleja - https://github.com/Malevolti
|
|
||||||
|
|
||||||
Lyra is 7x5 keys column-staggered split keyboard. Based on Sofle, Lily58, Corne and Helix keyboards.
|
|
||||||
There is an open source PCB available via https://github.com/Malevolti/Lyra
|
|
||||||
Instructions for handwiring and hand-wire specific case STLs are available for home 3d printing
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
|
||||||
|
|
||||||
make lyra:default
|
|
||||||
|
|
||||||
Flashing example for this keyboard:
|
|
||||||
|
|
||||||
make lyra:default:flash
|
|
||||||
|
|
||||||
Press reset button on the keyboard when asked.
|
|
||||||
|
|
||||||
Disconnect the first half, connect the second one and repeat the process.
|
|
||||||
|
|
||||||
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).
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
#define VENDOR_ID 0x4443 //DC
|
|
||||||
#define PRODUCT_ID 0x4C43 //LC
|
|
||||||
#define DEVICE_VER 0x3031 //01
|
|
||||||
#define MANUFACTURER Dom
|
|
||||||
#define PRODUCT Lyra
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
// Rows are doubled-up
|
|
||||||
#define MATRIX_ROWS 10
|
|
||||||
#define MATRIX_COLS 7
|
|
||||||
|
|
||||||
// wiring of each half
|
|
||||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
|
||||||
#define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 }
|
|
||||||
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
#define TAPPING_TERM 100
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
|
||||||
//#define MATRIX_HAS_GHOST
|
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
|
||||||
#define DEBOUNCE 5
|
|
||||||
|
|
||||||
/* communication between sides */
|
|
||||||
#define USE_SERIAL
|
|
||||||
#define SERIAL_USE_MULTI_TRANSACTION
|
|
||||||
#define SOFT_SERIAL_PIN D2
|
|
||||||
|
|
||||||
#define NO_ACTION_MACRO
|
|
||||||
#define NO_ACTION_FUNCTION
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
{
|
|
||||||
"keyboard_name": "lyra",
|
|
||||||
"url": "",
|
|
||||||
"maintainer": "malevolti",
|
|
||||||
"layouts": {
|
|
||||||
"LAYOUT": {
|
|
||||||
"layout": [
|
|
||||||
{"x": 0, "y": 0.3},
|
|
||||||
{"x": 1, "y": 0.4},
|
|
||||||
{"x": 2, "y": 0.3},
|
|
||||||
{"x": 3, "y": 0.1},
|
|
||||||
{"x": 4, "y": 0},
|
|
||||||
{"x": 5, "y": 0.1},
|
|
||||||
{"x": 6, "y": 0.25},
|
|
||||||
|
|
||||||
{"x": 8, "y": 0.25},
|
|
||||||
{"x": 9, "y": 0.1},
|
|
||||||
{"x": 10, "y": 0},
|
|
||||||
{"x": 11, "y": 0.1},
|
|
||||||
{"x": 12, "y": 0.3},
|
|
||||||
{"x": 13, "y": 0.4},
|
|
||||||
{"x": 14, "y": 0.3},
|
|
||||||
|
|
||||||
{"x": 0, "y": 1.3},
|
|
||||||
{"x": 1, "y": 1.4},
|
|
||||||
{"x": 2, "y": 1.3},
|
|
||||||
{"x": 3, "y": 1.1},
|
|
||||||
{"x": 4, "y": 1},
|
|
||||||
{"x": 5, "y": 1.1},
|
|
||||||
{"x": 6, "y": 1.25},
|
|
||||||
|
|
||||||
{"x": 8, "y": 1.25},
|
|
||||||
{"x": 9, "y": 1.1},
|
|
||||||
{"x": 10, "y": 1},
|
|
||||||
{"x": 11, "y": 1.1},
|
|
||||||
{"x": 12, "y": 1.3},
|
|
||||||
{"x": 13, "y": 1.4},
|
|
||||||
{"x": 14, "y": 1.3},
|
|
||||||
|
|
||||||
{"x": 0, "y": 2.3},
|
|
||||||
{"x": 1, "y": 2.4},
|
|
||||||
{"x": 2, "y": 2.3},
|
|
||||||
{"x": 3, "y": 2.1},
|
|
||||||
{"x": 4, "y": 2},
|
|
||||||
{"x": 5, "y": 2.1},
|
|
||||||
{"x": 6, "y": 2.25},
|
|
||||||
|
|
||||||
{"x": 8, "y": 2.25},
|
|
||||||
{"x": 9, "y": 2.1},
|
|
||||||
{"x": 10, "y": 2},
|
|
||||||
{"x": 11, "y": 2.1},
|
|
||||||
{"x": 12, "y": 2.3},
|
|
||||||
{"x": 13, "y": 2.4},
|
|
||||||
{"x": 14, "y": 2.3},
|
|
||||||
|
|
||||||
{"x": 0, "y": 3.3},
|
|
||||||
{"x": 1, "y": 3.4},
|
|
||||||
{"x": 2, "y": 3.3},
|
|
||||||
{"x": 3, "y": 3.1},
|
|
||||||
{"x": 4, "y": 3},
|
|
||||||
{"x": 5, "y": 3.1},
|
|
||||||
{"x": 6, "y": 3.25},
|
|
||||||
|
|
||||||
{"x": 8, "y": 3.25},
|
|
||||||
{"x": 9, "y": 3.1},
|
|
||||||
{"x": 10, "y": 3},
|
|
||||||
{"x": 11, "y": 3.1},
|
|
||||||
{"x": 12, "y": 3.3},
|
|
||||||
{"x": 13, "y": 3.4},
|
|
||||||
{"x": 14, "y": 3.3},
|
|
||||||
|
|
||||||
{"x": 0, "y": 4.3},
|
|
||||||
{"x": 1, "y": 4.4},
|
|
||||||
{"x": 2, "y": 4.3},
|
|
||||||
{"x": 3, "y": 4.1},
|
|
||||||
{"x": 4, "y": 4},
|
|
||||||
{"x": 5, "y": 4.1},
|
|
||||||
{"x": 6.25, "y": 4.5},
|
|
||||||
|
|
||||||
{"x": 7.75, "y": 4.5},
|
|
||||||
{"x": 9, "y": 4.1},
|
|
||||||
{"x": 10, "y": 4},
|
|
||||||
{"x": 11, "y": 4.1},
|
|
||||||
{"x": 12, "y": 4.3},
|
|
||||||
{"x": 13, "y": 4.4},
|
|
||||||
{"x": 14, "y": 4.3}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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 "rev1.h"
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* Copyright 2021 Domanic Calleja
|
|
||||||
*
|
|
||||||
* 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 "lyra.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define LAYOUT( \
|
|
||||||
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
|
||||||
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
|
||||||
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
|
||||||
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
|
|
||||||
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ L00, L01, L02, L03, L04, L05, L06 }, \
|
|
||||||
{ L10, L11, L12, L13, L14, L15, L16 }, \
|
|
||||||
{ L20, L21, L22, L23, L24, L25, L26 }, \
|
|
||||||
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
|
||||||
{ L40, L41, L42, L43, L44, L45, L46 }, \
|
|
||||||
{ R06, R05, R04, R03, R02, R01, R00 }, \
|
|
||||||
{ R16, R15, R14, R13, R12, R11, R10 }, \
|
|
||||||
{ R26, R25, R24, R23, R22, R21, R20 }, \
|
|
||||||
{ R36, R35, R34, R33, R32, R31, R30 }, \
|
|
||||||
{ R46, R45, R44, R43, R42, R41, R40 } \
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# MCU name
|
|
||||||
MCU = atmega32u4
|
|
||||||
|
|
||||||
# Bootloader selection
|
|
||||||
BOOTLOADER = caterina
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# change yes to no to disable
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
|
||||||
AUDIO_ENABLE = no # Audio output
|
|
||||||
|
|
||||||
SPLIT_KEYBOARD = yes
|
|
||||||
OLED_ENABLE = yes
|
|
||||||
WPM_ENABLE = yes
|
|
||||||
LTO_ENABLE = yes
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2021 mechlovin
|
|
||||||
|
|
||||||
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 "config_common.h"
|
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
#define VENDOR_ID 0x4D4C
|
|
||||||
#define PRODUCT_ID 0xD180
|
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER Mechlovin.Studio
|
|
||||||
#define PRODUCT Olly JF
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
#define MATRIX_ROWS 6
|
|
||||||
#define MATRIX_COLS 19
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Keyboard Matrix Assignments
|
|
||||||
*
|
|
||||||
* Change this to how you wired your keyboard
|
|
||||||
* COLS: AVR pins used for columns, left to right
|
|
||||||
* ROWS: AVR pins used for rows, top to bottom
|
|
||||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
|
||||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#define MATRIX_ROW_PINS { D5, D6, A5, A4, A3, A6}
|
|
||||||
#define UNUSED_PINS
|
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL */
|
|
||||||
#define DIODE_DIRECTION ROW2COL
|
|
||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
|
||||||
#define BACKLIGHT_BREATHING
|
|
||||||
|
|
||||||
#define LED_NUM_LOCK_PIN B1
|
|
||||||
#define LED_CAPS_LOCK_PIN B0
|
|
||||||
#define LED_SCROLL_LOCK_PIN B2
|
|
||||||
#define LED_PIN_ON_STATE 1
|
|
||||||
|
|
||||||
#define RGB_DI_PIN B3
|
|
||||||
#define RGBLED_NUM 27
|
|
||||||
#define RGBLIGHT_LIMIT_VAL 255
|
|
||||||
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
|
||||||
/*== all animations enable ==*/
|
|
||||||
#define RGBLIGHT_EFFECT_BREATHING
|
|
||||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
|
||||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
|
||||||
#define RGBLIGHT_EFFECT_SNAKE
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT
|
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
|
||||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
|
||||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
|
||||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
|
||||||
#define RGBLIGHT_EFFECT_TWINKLE
|
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
|
||||||
#define DEBOUNCE 5
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
{
|
|
||||||
"keyboard_name": "Mechlovin Olly",
|
|
||||||
"url": "",
|
|
||||||
"maintainer": "Mechlovin' Studio",
|
|
||||||
"layouts": {
|
|
||||||
"LAYOUT_all": {
|
|
||||||
"layout": [
|
|
||||||
{"label":"K00 (B0,B7)", "x":0, "y":0},
|
|
||||||
{"label":"K01 (B0,C0)", "x":1.5, "y":0},
|
|
||||||
{"label":"K02 (B0,C1)", "x":2.5, "y":0},
|
|
||||||
{"label":"K03 (B0,C2)", "x":3.5, "y":0},
|
|
||||||
{"label":"K04 (B0,C3)", "x":4.5, "y":0},
|
|
||||||
{"label":"K05 (B0,C4)", "x":6, "y":0},
|
|
||||||
{"label":"K06 (B0,C5)", "x":7, "y":0},
|
|
||||||
{"label":"K07 (B0,C6)", "x":8, "y":0},
|
|
||||||
{"label":"K08 (B0,C7)", "x":9, "y":0},
|
|
||||||
{"label":"K09 (B0,D0)", "x":10.5, "y":0},
|
|
||||||
{"label":"K0A (B0,D1)", "x":11.5, "y":0},
|
|
||||||
{"label":"K0B (B0,D2)", "x":12.5, "y":0},
|
|
||||||
{"label":"K0C (B0,D3)", "x":13.5, "y":0},
|
|
||||||
{"label":"K0E (B0,D5)", "x":15.25, "y":0},
|
|
||||||
{"label":"K0F (B0,D6)", "x":16.5, "y":0},
|
|
||||||
{"label":"K0G (B0,D7)", "x":17.5, "y":0},
|
|
||||||
{"label":"K0H (B0,E0)", "x":18.5, "y":0},
|
|
||||||
{"label":"K0I (B0,E1)", "x":19.5, "y":0},
|
|
||||||
{"label":"K10 (B1,B7)", "x":0, "y":1.5},
|
|
||||||
{"label":"K11 (B1,C0)", "x":1, "y":1.5},
|
|
||||||
{"label":"K12 (B1,C1)", "x":2, "y":1.5},
|
|
||||||
{"label":"K13 (B1,C2)", "x":3, "y":1.5},
|
|
||||||
{"label":"K14 (B1,C3)", "x":4, "y":1.5},
|
|
||||||
{"label":"K15 (B1,C4)", "x":5, "y":1.5},
|
|
||||||
{"label":"K16 (B1,C5)", "x":6, "y":1.5},
|
|
||||||
{"label":"K17 (B1,C6)", "x":7, "y":1.5},
|
|
||||||
{"label":"K18 (B1,C7)", "x":8, "y":1.5},
|
|
||||||
{"label":"K19 (B1,D0)", "x":9, "y":1.5},
|
|
||||||
{"label":"K1A (B1,D1)", "x":10, "y":1.5},
|
|
||||||
{"label":"K1B (B1,D2)", "x":11, "y":1.5},
|
|
||||||
{"label":"K1C (B1,D3)", "x":12, "y":1.5},
|
|
||||||
{"label":"K1D (B1,D4)", "x":13, "y":1.5},
|
|
||||||
{"label":"K0D (B0,D4)", "x":14, "y":1.5},
|
|
||||||
{"label":"K1E (B1,D5)", "x":15.25, "y":1.5},
|
|
||||||
{"label":"K1F (B1,D6)", "x":16.5, "y":1.5},
|
|
||||||
{"label":"K1G (B1,D7)", "x":17.5, "y":1.5},
|
|
||||||
{"label":"K1H (B1,E0)", "x":18.5, "y":1.5},
|
|
||||||
{"label":"K1I (B1,E1)", "x":19.5, "y":1.5},
|
|
||||||
{"label":"K20 (B2,B7)", "x":0, "y":2.5, "w":1.5},
|
|
||||||
{"label":"K21 (B2,C0)", "x":1.5, "y":2.5},
|
|
||||||
{"label":"K22 (B2,C1)", "x":2.5, "y":2.5},
|
|
||||||
{"label":"K23 (B2,C2)", "x":3.5, "y":2.5},
|
|
||||||
{"label":"K24 (B2,C3)", "x":4.5, "y":2.5},
|
|
||||||
{"label":"K25 (B2,C4)", "x":5.5, "y":2.5},
|
|
||||||
{"label":"K26 (B2,C5)", "x":6.5, "y":2.5},
|
|
||||||
{"label":"K27 (B2,C6)", "x":7.5, "y":2.5},
|
|
||||||
{"label":"K28 (B2,C7)", "x":8.5, "y":2.5},
|
|
||||||
{"label":"K29 (B2,D0)", "x":9.5, "y":2.5},
|
|
||||||
{"label":"K2A (B2,D1)", "x":10.5, "y":2.5},
|
|
||||||
{"label":"K2B (B2,D2)", "x":11.5, "y":2.5},
|
|
||||||
{"label":"K2C (B2,D3)", "x":12.5, "y":2.5},
|
|
||||||
{"label":"K2D (B2,D4)", "x":13.5, "y":2.5, "w":1.5},
|
|
||||||
{"label":"K2E (B2,D5)", "x":15.25, "y":2.5},
|
|
||||||
{"label":"K2F (B2,D6)", "x":16.5, "y":2.5},
|
|
||||||
{"label":"K2G (B2,D7)", "x":17.5, "y":2.5},
|
|
||||||
{"label":"K2H (B2,E0)", "x":18.5, "y":2.5},
|
|
||||||
{"label":"K2I (B2,E1)", "x":19.5, "y":2.5},
|
|
||||||
{"label":"K30 (B3,B7)", "x":0, "y":3.5, "w":1.75},
|
|
||||||
{"label":"K31 (B3,C0)", "x":1.75, "y":3.5},
|
|
||||||
{"label":"K32 (B3,C1)", "x":2.75, "y":3.5},
|
|
||||||
{"label":"K33 (B3,C2)", "x":3.75, "y":3.5},
|
|
||||||
{"label":"K34 (B3,C3)", "x":4.75, "y":3.5},
|
|
||||||
{"label":"K35 (B3,C4)", "x":5.75, "y":3.5},
|
|
||||||
{"label":"K36 (B3,C5)", "x":6.75, "y":3.5},
|
|
||||||
{"label":"K37 (B3,C6)", "x":7.75, "y":3.5},
|
|
||||||
{"label":"K38 (B3,C7)", "x":8.75, "y":3.5},
|
|
||||||
{"label":"K39 (B3,D0)", "x":9.75, "y":3.5},
|
|
||||||
{"label":"K3A (B3,D1)", "x":10.75, "y":3.5},
|
|
||||||
{"label":"K3B (B3,D2)", "x":11.75, "y":3.5},
|
|
||||||
{"label":"K3C (B3,D3)", "x":12.75, "y":3.5},
|
|
||||||
{"label":"K3D (B3,D4)", "x":13.75, "y":3.5, "w":1.25},
|
|
||||||
{"label":"K3F (B3,D6)", "x":16.5, "y":3.5},
|
|
||||||
{"label":"K3G (B3,D7)", "x":17.5, "y":3.5},
|
|
||||||
{"label":"K3H (B3,E0)", "x":18.5, "y":3.5},
|
|
||||||
{"label":"K3I (B3,E1)", "x":19.5, "y":3.5},
|
|
||||||
{"label":"K40 (B4,B7)", "x":0, "y":4.5, "w":1.25},
|
|
||||||
{"label":"K41 (B4,C0)", "x":1.25, "y":4.5},
|
|
||||||
{"label":"K42 (B4,C1)", "x":2.25, "y":4.5},
|
|
||||||
{"label":"K43 (B4,C2)", "x":3.25, "y":4.5},
|
|
||||||
{"label":"K44 (B4,C3)", "x":4.25, "y":4.5},
|
|
||||||
{"label":"K45 (B4,C4)", "x":5.25, "y":4.5},
|
|
||||||
{"label":"K46 (B4,C5)", "x":6.25, "y":4.5},
|
|
||||||
{"label":"K47 (B4,C6)", "x":7.25, "y":4.5},
|
|
||||||
{"label":"K48 (B4,C7)", "x":8.25, "y":4.5},
|
|
||||||
{"label":"K49 (B4,D0)", "x":9.25, "y":4.5},
|
|
||||||
{"label":"K4A (B4,D1)", "x":10.25, "y":4.5},
|
|
||||||
{"label":"K4B (B4,D2)", "x":11.25, "y":4.5},
|
|
||||||
{"label":"K4C (B4,D3)", "x":12.25, "y":4.5, "w":1.75},
|
|
||||||
{"label":"K4D (B4,D4)", "x":14, "y":4.5},
|
|
||||||
{"label":"K4E (B4,D5)", "x":15.25, "y":4.75},
|
|
||||||
{"label":"K4F (B4,D6)", "x":16.5, "y":4.5},
|
|
||||||
{"label":"K4G (B4,D7)", "x":17.5, "y":4.5},
|
|
||||||
{"label":"K4H (B4,E0)", "x":18.5, "y":4.5},
|
|
||||||
{"label":"K4I (B4,E1)", "x":19.5, "y":4.5},
|
|
||||||
{"label":"K50 (B5,B7)", "x":0, "y":5.5, "w":1.5},
|
|
||||||
{"label":"K51 (B5,C0)", "x":1.5, "y":5.5},
|
|
||||||
{"label":"K53 (B5,C2)", "x":2.5, "y":5.5, "w":1.5},
|
|
||||||
{"label":"K56 (B5,C5)", "x":4, "y":5.5, "w":6.25},
|
|
||||||
{"label":"K5A (B5,D1)", "x":10.25, "y":5.5, "w":1.25},
|
|
||||||
{"label":"K5B (B5,D2)", "x":11.5, "y":5.5, "w":1.25},
|
|
||||||
{"label":"K5C (B5,D3)", "x":12.75, "y":5.5, "w":1.25},
|
|
||||||
{"label":"K5D (B5,D4)", "x":14.25, "y":5.75},
|
|
||||||
{"label":"K5E (B5,D5)", "x":15.25, "y":5.75},
|
|
||||||
{"label":"K5F (B5,D6)", "x":16.25, "y":5.75},
|
|
||||||
{"label":"K5G (B5,D7)", "x":17.5, "y":5.5},
|
|
||||||
{"label":"K5H (B5,E0)", "x":18.5, "y":5.5},
|
|
||||||
{"label":"K5I (B5,E1)", "x":19.5, "y":5.5}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/* Copyright 2021 mechlovin
|
|
||||||
*
|
|
||||||
* 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 "jf.h"
|
|
||||||
|
|
||||||
|
|
||||||
void led_init_ports(void) {
|
|
||||||
setPinOutput(C0);
|
|
||||||
setPinOutput(D0);
|
|
||||||
setPinOutput(D1);
|
|
||||||
setPinOutput(C1);
|
|
||||||
setPinOutput(C6);
|
|
||||||
setPinOutput(B0);
|
|
||||||
setPinOutput(B1);
|
|
||||||
setPinOutput(B2);
|
|
||||||
}
|
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
|
||||||
writePin(D1, layer_state_cmp(state, 1));
|
|
||||||
writePin(D0, layer_state_cmp(state, 2));
|
|
||||||
writePin(C1, layer_state_cmp(state, 3));
|
|
||||||
writePin(C0, layer_state_cmp(state, 4));
|
|
||||||
writePin(C6, layer_state_cmp(state, 5));
|
|
||||||
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
/* Copyright 2021 mechlovin
|
|
||||||
*
|
|
||||||
* 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_all( \
|
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, K0H, K0I, \
|
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K0D, K1E, K1F, K1G, K1H, K1I, \
|
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \
|
|
||||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \
|
|
||||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, \
|
|
||||||
K50, K51, K53, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I \
|
|
||||||
) { \
|
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \
|
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I }, \
|
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \
|
|
||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \
|
|
||||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I }, \
|
|
||||||
{ K50, K51, KC_NO, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I }, \
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/* Copyright 2021 mechlovin
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
[0] = LAYOUT_all(
|
|
||||||
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_F13, KC_INS, KC_HOME, KC_PGUP, KC_PSCR,
|
|
||||||
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_DEL, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS,
|
|
||||||
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_P7, KC_P8, KC_P9, KC_PMNS,
|
|
||||||
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_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
|
||||||
KC_LSFT, KC_SPC, 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_P1, KC_P2, KC_P3, KC_PENT,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
|
||||||
),
|
|
||||||
[1] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
[2] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
[3] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# The default keymap for Olly JF
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2021 mechlovin
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1607
|
|
||||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 6
|
|
||||||
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
/* Copyright 2021 mechlovin
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
[0] = LAYOUT_all(
|
|
||||||
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_F13, KC_INS, KC_HOME, KC_PGUP, KC_PSCR,
|
|
||||||
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_DEL, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS,
|
|
||||||
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_P7, KC_P8, KC_P9, KC_PMNS,
|
|
||||||
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_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
|
||||||
KC_LSFT, KC_SPC, 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_P1, KC_P2, KC_P3, KC_PENT,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
|
||||||
),
|
|
||||||
[1] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
[2] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
[3] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
[4] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
[5] = LAYOUT_all(
|
|
||||||
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_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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# The VIA keymap for Olly JF
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
VIA_ENABLE = yes
|
|
||||||
LTO_ENABLE = yes
|
|
||||||
@@ -1,462 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar
|
|
||||||
Copyright 2019 Evy Dekkers
|
|
||||||
|
|
||||||
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 <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "wait.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "matrix.h"
|
|
||||||
#include "debounce.h"
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
#ifdef DIRECT_PINS
|
|
||||||
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
|
|
||||||
#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
|
|
||||||
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
|
||||||
//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// matrix code
|
|
||||||
|
|
||||||
#ifdef DIRECT_PINS
|
|
||||||
|
|
||||||
static void init_pins(void) {
|
|
||||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
|
||||||
pin_t pin = direct_pins[row][col];
|
|
||||||
if (pin != NO_PIN) {
|
|
||||||
setPinInputHigh(pin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
|
|
||||||
matrix_row_t last_row_value = current_matrix[current_row];
|
|
||||||
current_matrix[current_row] = 0;
|
|
||||||
|
|
||||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
|
||||||
pin_t pin = direct_pins[current_row][col_index];
|
|
||||||
if (pin != NO_PIN) {
|
|
||||||
current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (last_row_value != current_matrix[current_row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif (DIODE_DIRECTION == COL2ROW)
|
|
||||||
|
|
||||||
static void select_row(uint8_t row) {
|
|
||||||
setPinOutput(row_pins[row]);
|
|
||||||
writePinLow(row_pins[row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
|
|
||||||
|
|
||||||
static void unselect_rows(void) {
|
|
||||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
|
||||||
setPinInputHigh(row_pins[x]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void init_pins(void) {
|
|
||||||
unselect_rows();
|
|
||||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
|
||||||
setPinInputHigh(col_pins[x]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
|
|
||||||
// Store last value of row prior to reading
|
|
||||||
matrix_row_t last_row_value = current_matrix[current_row];
|
|
||||||
|
|
||||||
// Clear data in matrix row
|
|
||||||
current_matrix[current_row] = 0;
|
|
||||||
|
|
||||||
// Select row and wait for row selecton to stabilize
|
|
||||||
select_row(current_row);
|
|
||||||
wait_us(30);
|
|
||||||
|
|
||||||
// For each col...
|
|
||||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
|
||||||
|
|
||||||
// Select the col pin to read (active low)
|
|
||||||
uint8_t pin_state = readPin(col_pins[col_index]);
|
|
||||||
|
|
||||||
// Populate the matrix row with the state of the col pin
|
|
||||||
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unselect row
|
|
||||||
unselect_row(current_row);
|
|
||||||
|
|
||||||
return (last_row_value != current_matrix[current_row]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif (DIODE_DIRECTION == ROW2COL)
|
|
||||||
|
|
||||||
/* Cols 0 - 16
|
|
||||||
* These columns use two 74HC138 3 to 8 bit demultiplexer. B4, C7 is the enable pin, must be set high (1) to use it.
|
|
||||||
*
|
|
||||||
* col / pin: PA0 PA1 PA2 PB4 PC7 PC2 PC3 PC5
|
|
||||||
* 0: 0 ── 0 ── 0 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 1: 0 ── 0 ── 1 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 2: 0 ── 1 ── 0 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 3: 0 ── 1 ── 1 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 4: 1 ── 0 ── 0 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 5: 1 ── 0 ── 1 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 6: 1 ── 1 ── 0 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 7: 1 ── 1 ── 1 1 ── 0 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 8: 1 ── 1 ── 1 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
* 9: 0 ── 0 ── 0 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*10: 0 ── 0 ── 1 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*11: 0 ── 1 ── 0 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*12: 0 ── 1 ── 1 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*13: 1 ── 0 ── 0 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*14: 1 ── 0 ── 1 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*15: 1 ── 1 ── 0 0 ── 1 0 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*16: 0 ── 0 ── 0 0 ── 0 1 0 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*17: 0 ── 0 ── 0 0 ── 0 0 1 0
|
|
||||||
* ────────────────────────────────────────────
|
|
||||||
*18: 0 ── 0 ── 0 0 ── 0 0 0 1
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static void select_col(uint8_t col) {
|
|
||||||
switch (col) {
|
|
||||||
case 0:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(B4);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinHigh(C7);
|
|
||||||
break;
|
|
||||||
case 16:
|
|
||||||
writePinLow(C2);
|
|
||||||
break;
|
|
||||||
case 17:
|
|
||||||
writePinLow(C3);
|
|
||||||
break;
|
|
||||||
case 18:
|
|
||||||
writePinLow(C5);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_col(uint8_t col) {
|
|
||||||
switch (col) {
|
|
||||||
case 0:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(B4);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinLow(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
writePinLow(A0);
|
|
||||||
writePinLow(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
writePinLow(C7);
|
|
||||||
break;
|
|
||||||
case 16:
|
|
||||||
writePinHigh(C2);
|
|
||||||
break;
|
|
||||||
case 17:
|
|
||||||
writePinHigh(C3);
|
|
||||||
break;
|
|
||||||
case 18:
|
|
||||||
writePinHigh(C5);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void unselect_cols(void) {
|
|
||||||
//Native
|
|
||||||
writePinHigh(C2);
|
|
||||||
writePinHigh(C3);
|
|
||||||
writePinHigh(C5);
|
|
||||||
|
|
||||||
//Demultiplexer
|
|
||||||
writePinLow(B4);
|
|
||||||
writePinLow(C7);
|
|
||||||
writePinHigh(A0);
|
|
||||||
writePinHigh(A1);
|
|
||||||
writePinHigh(A2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void init_pins(void) {
|
|
||||||
unselect_cols();
|
|
||||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
|
||||||
setPinInputHigh(row_pins[x]);
|
|
||||||
}
|
|
||||||
setPinOutput(A0);
|
|
||||||
setPinOutput(A1);
|
|
||||||
setPinOutput(A2);
|
|
||||||
setPinOutput(B4);
|
|
||||||
setPinOutput(C7);
|
|
||||||
setPinOutput(C2);
|
|
||||||
setPinOutput(C3);
|
|
||||||
setPinOutput(C5);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
|
|
||||||
bool matrix_changed = false;
|
|
||||||
|
|
||||||
// Select col and wait for col selecton to stabilize
|
|
||||||
select_col(current_col);
|
|
||||||
wait_us(30);
|
|
||||||
|
|
||||||
// For each row...
|
|
||||||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
|
|
||||||
// Store last value of row prior to reading
|
|
||||||
matrix_row_t last_row_value = current_matrix[row_index];
|
|
||||||
|
|
||||||
// Check row pin state
|
|
||||||
if (readPin(row_pins[row_index]) == 0) {
|
|
||||||
// Pin LO, set col bit
|
|
||||||
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
|
|
||||||
} else {
|
|
||||||
// Pin HI, clear col bit
|
|
||||||
current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine if the matrix changed state
|
|
||||||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) {
|
|
||||||
matrix_changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unselect col
|
|
||||||
unselect_col(current_col);
|
|
||||||
|
|
||||||
return matrix_changed;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void matrix_init_custom(void) {
|
|
||||||
// initialize key pins
|
|
||||||
init_pins();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
|
||||||
bool changed = false;
|
|
||||||
|
|
||||||
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
|
|
||||||
// Set row, read cols
|
|
||||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
|
|
||||||
changed |= read_cols_on_row(current_matrix, current_row);
|
|
||||||
}
|
|
||||||
#elif (DIODE_DIRECTION == ROW2COL)
|
|
||||||
// Set col, read rows
|
|
||||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
|
||||||
changed |= read_rows_on_col(current_matrix, current_col);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return changed;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# Mechlovin Olly JF
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Olly JF PCB, compatible Duck Jetfire keyboard.
|
|
||||||
|
|
||||||
* Keyboard Maintainer: [Mechlovin' Studio](https://mechlovin.studio/)
|
|
||||||
* Hardware Supported: Jetfire Korean Kustom
|
|
||||||
* Hardware Availability: [Mechlovin' Studio](https://mechlovin.studio/)
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
|
||||||
|
|
||||||
make mechlovin/olly/jf:default
|
|
||||||
|
|
||||||
Flashing example for this keyboard:
|
|
||||||
|
|
||||||
make mechlovin/olly/jf:default:flash
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
**Reset Key:** 2 ways to put the Olly JF into bootloader:
|
|
||||||
By keycode: Tap RESET keycode.
|
|
||||||
By bootloader: hold ESC key while plugging in
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# MCU name
|
|
||||||
MCU = atmega32a
|
|
||||||
|
|
||||||
# Processor frequency
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
# Bootloader selection
|
|
||||||
BOOTLOADER = USBasp
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# change yes to no to disable
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
|
||||||
AUDIO_ENABLE = no # Audio output
|
|
||||||
CUSTOM_MATRIX = lite
|
|
||||||
|
|
||||||
SRC += matrix.c
|
|
||||||
@@ -42,7 +42,7 @@ def format_json(cli):
|
|||||||
if json_encoder == KeymapJSONEncoder and 'layout' in json_file:
|
if json_encoder == KeymapJSONEncoder and 'layout' in json_file:
|
||||||
# Attempt to format the keycodes.
|
# Attempt to format the keycodes.
|
||||||
layout = json_file['layout']
|
layout = json_file['layout']
|
||||||
info_data = info_json(json_file['keyboard'], overrides=json_file.get('keyboard_overrides'))
|
info_data = info_json(json_file['keyboard'])
|
||||||
|
|
||||||
if layout in info_data.get('layout_aliases', {}):
|
if layout in info_data.get('layout_aliases', {}):
|
||||||
layout = json_file['layout'] = info_data['layout_aliases'][layout]
|
layout = json_file['layout'] = info_data['layout_aliases'][layout]
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ from pathlib import Path
|
|||||||
from dotty_dict import dotty
|
from dotty_dict import dotty
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.info import info_json, get_keyboard_overrides
|
from qmk.info import info_json
|
||||||
from qmk.json_schema import json_load
|
from qmk.json_schema import json_load, validate
|
||||||
from qmk.keyboard import keyboard_completer, keyboard_folder
|
from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||||
|
from qmk.keymap import locate_keymap
|
||||||
from qmk.path import normpath
|
from qmk.path import normpath
|
||||||
|
|
||||||
|
|
||||||
@@ -157,12 +158,19 @@ def generate_split_config(kb_info_json, config_h_lines):
|
|||||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate config.h for.')
|
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate config.h for.')
|
||||||
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to get overrides from.')
|
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to generate config.h for.')
|
||||||
@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True)
|
@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True)
|
||||||
def generate_config_h(cli):
|
def generate_config_h(cli):
|
||||||
"""Generates the info_config.h file.
|
"""Generates the info_config.h file.
|
||||||
"""
|
"""
|
||||||
kb_info_json = dotty(info_json(cli.args.keyboard, overrides=get_keyboard_overrides(cli.args.keyboard, cli.args.keymap)))
|
# Determine our keyboard/keymap
|
||||||
|
if cli.args.keymap:
|
||||||
|
km = locate_keymap(cli.args.keyboard, cli.args.keymap)
|
||||||
|
km_json = json_load(km)
|
||||||
|
validate(km_json, 'qmk.keymap.v1')
|
||||||
|
kb_info_json = dotty(km_json.get('config', {}))
|
||||||
|
else:
|
||||||
|
kb_info_json = dotty(info_json(cli.args.keyboard))
|
||||||
|
|
||||||
# Build the info_config.h file.
|
# Build the info_config.h file.
|
||||||
config_h_lines = ['/* This file was generated by `qmk generate-config-h`. Do not edit or copy.' ' */', '', '#pragma once']
|
config_h_lines = ['/* This file was generated by `qmk generate-config-h`. Do not edit or copy.' ' */', '', '#pragma once']
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from dotty_dict import dotty
|
|||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.decorators import automagic_keyboard
|
from qmk.decorators import automagic_keyboard
|
||||||
from qmk.info import info_json, get_keyboard_overrides
|
from qmk.info import info_json
|
||||||
from qmk.path import is_keyboard, normpath
|
from qmk.path import is_keyboard, normpath
|
||||||
from qmk.keyboard import keyboard_completer
|
from qmk.keyboard import keyboard_completer
|
||||||
|
|
||||||
@@ -12,7 +12,6 @@ from qmk.keyboard import keyboard_completer
|
|||||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
@cli.argument('-kb', '--keyboard', completer=keyboard_completer, help='Keyboard to generate LUFA Keyboard.h for.')
|
@cli.argument('-kb', '--keyboard', completer=keyboard_completer, help='Keyboard to generate LUFA Keyboard.h for.')
|
||||||
@cli.argument('-km', '--keymap', arg_only=True, help='Keyboard to generate LUFA Keyboard.h for.')
|
|
||||||
@cli.subcommand('Used by the make system to generate LUFA Keyboard.h from info.json', hidden=True)
|
@cli.subcommand('Used by the make system to generate LUFA Keyboard.h from info.json', hidden=True)
|
||||||
@automagic_keyboard
|
@automagic_keyboard
|
||||||
def generate_dfu_header(cli):
|
def generate_dfu_header(cli):
|
||||||
@@ -29,7 +28,7 @@ def generate_dfu_header(cli):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Build the Keyboard.h file.
|
# Build the Keyboard.h file.
|
||||||
kb_info_json = dotty(info_json(cli.config.generate_dfu_header.keyboard, overrides=get_keyboard_overrides(cli.args.keyboard, cli.args.keymap)))
|
kb_info_json = dotty(info_json(cli.config.generate_dfu_header.keyboard))
|
||||||
|
|
||||||
keyboard_h_lines = ['/* This file was generated by `qmk generate-dfu-header`. Do not edit or copy.' ' */', '', '#pragma once']
|
keyboard_h_lines = ['/* This file was generated by `qmk generate-dfu-header`. Do not edit or copy.' ' */', '', '#pragma once']
|
||||||
keyboard_h_lines.append(f'#define MANUFACTURER {kb_info_json["manufacturer"]}')
|
keyboard_h_lines.append(f'#define MANUFACTURER {kb_info_json["manufacturer"]}')
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from jsonschema import Draft7Validator, RefResolver, validators
|
|||||||
from milc import cli
|
from milc import cli
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from qmk.decorators import automagic_keyboard
|
from qmk.decorators import automagic_keyboard, automagic_keymap
|
||||||
from qmk.info import info_json
|
from qmk.info import info_json
|
||||||
from qmk.json_encoders import InfoJSONEncoder
|
from qmk.json_encoders import InfoJSONEncoder
|
||||||
from qmk.json_schema import compile_schema_store
|
from qmk.json_schema import compile_schema_store
|
||||||
@@ -46,10 +46,12 @@ def strip_info_json(kb_info_json):
|
|||||||
|
|
||||||
|
|
||||||
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to show info for.')
|
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to show info for.')
|
||||||
|
@cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.')
|
||||||
@cli.argument('-o', '--output', arg_only=True, completer=FilesCompleter, help='Write the output the specified file, overwriting if necessary.')
|
@cli.argument('-o', '--output', arg_only=True, completer=FilesCompleter, help='Write the output the specified file, overwriting if necessary.')
|
||||||
@cli.argument('-ow', '--overwrite', arg_only=True, action='store_true', help='Overwrite the existing info.json. (Overrides the location of --output)')
|
@cli.argument('-ow', '--overwrite', arg_only=True, action='store_true', help='Overwrite the existing info.json. (Overrides the location of --output)')
|
||||||
@cli.subcommand('Generate an info.json file for a keyboard.', hidden=False if cli.config.user.developer else True)
|
@cli.subcommand('Generate an info.json file for a keyboard.', hidden=False if cli.config.user.developer else True)
|
||||||
@automagic_keyboard
|
@automagic_keyboard
|
||||||
|
@automagic_keymap
|
||||||
def generate_info_json(cli):
|
def generate_info_json(cli):
|
||||||
"""Generate an info.json file for a keyboard
|
"""Generate an info.json file for a keyboard
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
"""
|
"""
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.info import info_json, get_keyboard_overrides
|
from qmk.info import info_json
|
||||||
from qmk.keyboard import keyboard_completer, keyboard_folder
|
from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||||
from qmk.path import normpath
|
from qmk.path import normpath
|
||||||
|
|
||||||
|
|
||||||
def would_populate_layout_h(keyboard, keymap):
|
def would_populate_layout_h(keyboard):
|
||||||
"""Detect if a given keyboard is doing data driven layouts
|
"""Detect if a given keyboard is doing data driven layouts
|
||||||
"""
|
"""
|
||||||
# Build the info.json file
|
# Build the info.json file
|
||||||
kb_info_json = info_json(keyboard, overrides=get_keyboard_overrides(keyboard, keymap))
|
kb_info_json = info_json(keyboard)
|
||||||
|
|
||||||
for layout_name in kb_info_json['layouts']:
|
for layout_name in kb_info_json['layouts']:
|
||||||
if kb_info_json['layouts'][layout_name]['c_macro']:
|
if kb_info_json['layouts'][layout_name]['c_macro']:
|
||||||
@@ -29,12 +29,11 @@ def would_populate_layout_h(keyboard, keymap):
|
|||||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.h for.')
|
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.h for.')
|
||||||
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap name to check for overrides.')
|
|
||||||
@cli.subcommand('Used by the make system to generate keyboard.h from info.json', hidden=True)
|
@cli.subcommand('Used by the make system to generate keyboard.h from info.json', hidden=True)
|
||||||
def generate_keyboard_h(cli):
|
def generate_keyboard_h(cli):
|
||||||
"""Generates the keyboard.h file.
|
"""Generates the keyboard.h file.
|
||||||
"""
|
"""
|
||||||
has_layout_h = would_populate_layout_h(cli.args.keyboard, cli.args.keymap)
|
has_layout_h = would_populate_layout_h(cli.args.keyboard)
|
||||||
|
|
||||||
# Build the layouts.h file.
|
# Build the layouts.h file.
|
||||||
keyboard_h_lines = ['/* This file was generated by `qmk generate-keyboard-h`. Do not edit or copy.' ' */', '', '#pragma once', '#include "quantum.h"']
|
keyboard_h_lines = ['/* This file was generated by `qmk generate-keyboard-h`. Do not edit or copy.' ' */', '', '#pragma once', '#include "quantum.h"']
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from milc import cli
|
|||||||
|
|
||||||
from qmk.constants import COL_LETTERS, ROW_LETTERS
|
from qmk.constants import COL_LETTERS, ROW_LETTERS
|
||||||
from qmk.decorators import automagic_keyboard, automagic_keymap
|
from qmk.decorators import automagic_keyboard, automagic_keymap
|
||||||
from qmk.info import info_json, get_keyboard_overrides
|
from qmk.info import info_json
|
||||||
from qmk.keyboard import keyboard_completer, keyboard_folder
|
from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||||
from qmk.path import is_keyboard, normpath
|
from qmk.path import is_keyboard, normpath
|
||||||
|
|
||||||
@@ -18,7 +18,6 @@ usb_properties = {
|
|||||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to generate config.h for.')
|
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to generate config.h for.')
|
||||||
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to get overrides from.')
|
|
||||||
@cli.subcommand('Used by the make system to generate layouts.h from info.json', hidden=True)
|
@cli.subcommand('Used by the make system to generate layouts.h from info.json', hidden=True)
|
||||||
@automagic_keyboard
|
@automagic_keyboard
|
||||||
@automagic_keymap
|
@automagic_keymap
|
||||||
@@ -36,7 +35,7 @@ def generate_layouts(cli):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Build the info.json file
|
# Build the info.json file
|
||||||
kb_info_json = info_json(cli.config.generate_layouts.keyboard, overrides=get_keyboard_overrides(cli.config.generate_layouts.keyboard, cli.args.keymap))
|
kb_info_json = info_json(cli.config.generate_layouts.keyboard)
|
||||||
|
|
||||||
# Build the layouts.h file.
|
# Build the layouts.h file.
|
||||||
layouts_h_lines = ['/* This file was generated by `qmk generate-layouts`. Do not edit or copy.' ' */', '', '#pragma once']
|
layouts_h_lines = ['/* This file was generated by `qmk generate-layouts`. Do not edit or copy.' ' */', '', '#pragma once']
|
||||||
@@ -52,6 +51,23 @@ def generate_layouts(cli):
|
|||||||
cli.log.error('%s: Invalid matrix config.', cli.config.generate_layouts.keyboard)
|
cli.log.error('%s: Invalid matrix config.', cli.config.generate_layouts.keyboard)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if 'custom_keycodes' in kb_info_json:
|
||||||
|
layouts_h_lines.append('\n#ifndef __ASSEMBLER__')
|
||||||
|
layouts_h_lines.append('\n#include "quantum_keycodes.h"')
|
||||||
|
layouts_h_lines.append('\nenum custom_keycodes {')
|
||||||
|
first = True
|
||||||
|
for keycode in kb_info_json['custom_keycodes']:
|
||||||
|
if first:
|
||||||
|
first = False
|
||||||
|
layouts_h_lines.append(f'\t{keycode} = SAFE_RANGE,')
|
||||||
|
else:
|
||||||
|
layouts_h_lines.append(f'\t{keycode},')
|
||||||
|
layouts_h_lines.append('\tNEW_SAFE_RANGE')
|
||||||
|
layouts_h_lines.append('};\n')
|
||||||
|
layouts_h_lines.append('#undef SAFE_RANGE')
|
||||||
|
layouts_h_lines.append('#define SAFE_RANGE NEW_SAFE_RANGE')
|
||||||
|
layouts_h_lines.append('#endif // __ASSEMBLER__')
|
||||||
|
|
||||||
for layout_name in kb_info_json['layouts']:
|
for layout_name in kb_info_json['layouts']:
|
||||||
if kb_info_json['layouts'][layout_name]['c_macro']:
|
if kb_info_json['layouts'][layout_name]['c_macro']:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ from pathlib import Path
|
|||||||
from dotty_dict import dotty
|
from dotty_dict import dotty
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.info import info_json, get_keyboard_overrides
|
from qmk.info import info_json
|
||||||
from qmk.json_schema import json_load
|
from qmk.json_schema import json_load, validate
|
||||||
from qmk.keyboard import keyboard_completer, keyboard_folder
|
from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||||
|
from qmk.keymap import locate_keymap
|
||||||
from qmk.path import normpath
|
from qmk.path import normpath
|
||||||
|
|
||||||
|
|
||||||
@@ -39,13 +40,21 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict):
|
|||||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
@cli.argument('-e', '--escape', arg_only=True, action='store_true', help="Escape spaces in quiet mode")
|
@cli.argument('-e', '--escape', arg_only=True, action='store_true', help="Escape spaces in quiet mode")
|
||||||
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate rules.mk for.')
|
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate rules.mk for.')
|
||||||
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap name to check overrides for.')
|
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to generate rules.mk for.')
|
||||||
@cli.subcommand('Used by the make system to generate rules.mk from info.json', hidden=True)
|
@cli.subcommand('Used by the make system to generate rules.mk from info.json', hidden=True)
|
||||||
def generate_rules_mk(cli):
|
def generate_rules_mk(cli):
|
||||||
"""Generates a rules.mk file from info.json.
|
"""Generates a rules.mk file from info.json.
|
||||||
"""
|
"""
|
||||||
|
# Determine our keyboard/keymap
|
||||||
|
if cli.args.keymap:
|
||||||
|
km = locate_keymap(cli.args.keyboard, cli.args.keymap)
|
||||||
|
km_json = json_load(km)
|
||||||
|
validate(km_json, 'qmk.keymap.v1')
|
||||||
|
kb_info_json = dotty(km_json.get('config', {}))
|
||||||
|
else:
|
||||||
|
kb_info_json = dotty(info_json(cli.args.keyboard))
|
||||||
|
|
||||||
info_rules_map = json_load(Path('data/mappings/info_rules.json'))
|
info_rules_map = json_load(Path('data/mappings/info_rules.json'))
|
||||||
kb_info_json = dotty(info_json(cli.args.keyboard, overrides=get_keyboard_overrides(cli.args.keyboard, cli.args.keymap)))
|
|
||||||
rules_mk_lines = ['# This file was generated by `qmk generate-rules-mk`. Do not edit or copy.', '']
|
rules_mk_lines = ['# This file was generated by `qmk generate-rules-mk`. Do not edit or copy.', '']
|
||||||
|
|
||||||
# Iterate through the info_rules map to generate basic rules
|
# Iterate through the info_rules map to generate basic rules
|
||||||
|
|||||||
@@ -18,19 +18,23 @@ from qmk.path import is_keyboard
|
|||||||
UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf')
|
UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf')
|
||||||
|
|
||||||
|
|
||||||
def show_keymap(kb_info_json, keymap_data, title_caps=True):
|
def show_keymap(kb_info_json, title_caps=True):
|
||||||
"""Render the keymap in ascii art.
|
"""Render the keymap in ascii art.
|
||||||
"""
|
"""
|
||||||
layout_name = keymap_data['layout']
|
keymap_path = locate_keymap(cli.config.info.keyboard, cli.config.info.keymap)
|
||||||
layout_name = kb_info_json.get('layout_aliases', {}).get(layout_name, layout_name) # Resolve alias names
|
|
||||||
|
|
||||||
for layer_num, layer in enumerate(keymap_data['layers']):
|
if keymap_path and keymap_path.suffix == '.json':
|
||||||
if title_caps:
|
keymap_data = json.load(keymap_path.open(encoding='utf-8'))
|
||||||
cli.echo('{fg_cyan}Keymap %s Layer %s{fg_reset}:', cli.config.info.keymap, layer_num)
|
layout_name = keymap_data['layout']
|
||||||
else:
|
layout_name = kb_info_json.get('layout_aliases', {}).get(layout_name, layout_name) # Resolve alias names
|
||||||
cli.echo('{fg_cyan}keymap.%s.layer.%s{fg_reset}:', cli.config.info.keymap, layer_num)
|
|
||||||
|
|
||||||
print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, layer))
|
for layer_num, layer in enumerate(keymap_data['layers']):
|
||||||
|
if title_caps:
|
||||||
|
cli.echo('{fg_cyan}Keymap %s Layer %s{fg_reset}:', cli.config.info.keymap, layer_num)
|
||||||
|
else:
|
||||||
|
cli.echo('{fg_cyan}keymap.%s.layer.%s{fg_reset}:', cli.config.info.keymap, layer_num)
|
||||||
|
|
||||||
|
print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, layer))
|
||||||
|
|
||||||
|
|
||||||
def show_layouts(kb_info_json, title_caps=True):
|
def show_layouts(kb_info_json, title_caps=True):
|
||||||
@@ -157,27 +161,19 @@ def info(cli):
|
|||||||
print_parsed_rules_mk(cli.config.info.keyboard)
|
print_parsed_rules_mk(cli.config.info.keyboard)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Pull in keymap overrides if necessary
|
|
||||||
keymap_path = locate_keymap(cli.config.info.keyboard, cli.config.info.keymap) if cli.config.info.keymap else None
|
|
||||||
keymap_data = json.load(keymap_path.open(encoding='utf-8')) if keymap_path and keymap_path.suffix == '.json' else None
|
|
||||||
|
|
||||||
# Build the info.json file
|
# Build the info.json file
|
||||||
overrides = keymap_data.get('keyboard_overrides') if keymap_data else None
|
kb_info_json = info_json(cli.config.info.keyboard)
|
||||||
kb_info_json = info_json(cli.config.info.keyboard, overrides=overrides)
|
|
||||||
|
|
||||||
# Output in the requested format
|
# Output in the requested format
|
||||||
if cli.args.format == 'json':
|
if cli.args.format == 'json':
|
||||||
print(json.dumps(kb_info_json, cls=InfoJSONEncoder))
|
print(json.dumps(kb_info_json, cls=InfoJSONEncoder))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
elif cli.args.format == 'text':
|
elif cli.args.format == 'text':
|
||||||
print_dotted_output(kb_info_json)
|
print_dotted_output(kb_info_json)
|
||||||
title_caps = False
|
title_caps = False
|
||||||
|
|
||||||
elif cli.args.format == 'friendly':
|
elif cli.args.format == 'friendly':
|
||||||
print_friendly_output(kb_info_json)
|
print_friendly_output(kb_info_json)
|
||||||
title_caps = True
|
title_caps = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
cli.log.error('Unknown format: %s', cli.args.format)
|
cli.log.error('Unknown format: %s', cli.args.format)
|
||||||
return False
|
return False
|
||||||
@@ -188,5 +184,5 @@ def info(cli):
|
|||||||
if cli.config.info.matrix:
|
if cli.config.info.matrix:
|
||||||
show_matrix(kb_info_json, title_caps)
|
show_matrix(kb_info_json, title_caps)
|
||||||
|
|
||||||
if keymap_data:
|
if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file':
|
||||||
show_keymap(kb_info_json, keymap_data, title_caps)
|
show_keymap(kb_info_json, title_caps)
|
||||||
|
|||||||
@@ -76,12 +76,10 @@ def lint(cli):
|
|||||||
cli.log.warning('Both --all-kb and --keyboard passed, --all-kb takes presidence.')
|
cli.log.warning('Both --all-kb and --keyboard passed, --all-kb takes presidence.')
|
||||||
|
|
||||||
keyboard_list = list_keyboards()
|
keyboard_list = list_keyboards()
|
||||||
|
|
||||||
elif not cli.config.lint.keyboard:
|
elif not cli.config.lint.keyboard:
|
||||||
cli.log.error('Missing required arguments: --keyboard or --all-kb')
|
cli.log.error('Missing required arguments: --keyboard or --all-kb')
|
||||||
cli.print_help()
|
cli.print_help()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
else:
|
else:
|
||||||
keyboard_list = cli.config.lint.keyboard.split(',')
|
keyboard_list = cli.config.lint.keyboard.split(',')
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from milc import cli
|
|||||||
|
|
||||||
import qmk.keymap
|
import qmk.keymap
|
||||||
from qmk.constants import QMK_FIRMWARE, KEYBOARD_OUTPUT_PREFIX
|
from qmk.constants import QMK_FIRMWARE, KEYBOARD_OUTPUT_PREFIX
|
||||||
from qmk.json_schema import json_load, validate
|
from qmk.json_schema import json_load
|
||||||
|
|
||||||
time_fmt = '%Y-%m-%d-%H:%M:%S'
|
time_fmt = '%Y-%m-%d-%H:%M:%S'
|
||||||
|
|
||||||
@@ -194,12 +194,6 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
|
|||||||
version_h = Path('quantum/version.h')
|
version_h = Path('quantum/version.h')
|
||||||
version_h.write_text(create_version_h())
|
version_h.write_text(create_version_h())
|
||||||
|
|
||||||
# Write the keymap json out
|
|
||||||
json_output = keymap_output / 'keymap.json'
|
|
||||||
|
|
||||||
keymap_output.mkdir(exist_ok=True, parents=True)
|
|
||||||
json.dump(user_keymap, json_output.open('w', encoding='utf-8'))
|
|
||||||
|
|
||||||
# Return a command that can be run to make the keymap and flash if given
|
# Return a command that can be run to make the keymap and flash if given
|
||||||
verbose = 'true' if cli.config.general.verbose else 'false'
|
verbose = 'true' if cli.config.general.verbose else 'false'
|
||||||
color = 'true' if cli.config.general.color else 'false'
|
color = 'true' if cli.config.general.color else 'false'
|
||||||
@@ -248,10 +242,8 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
|
|||||||
def parse_configurator_json(configurator_file):
|
def parse_configurator_json(configurator_file):
|
||||||
"""Open and parse a configurator json export
|
"""Open and parse a configurator json export
|
||||||
"""
|
"""
|
||||||
|
# FIXME(skullydazed/anyone): Add validation here
|
||||||
user_keymap = json.load(configurator_file)
|
user_keymap = json.load(configurator_file)
|
||||||
|
|
||||||
validate(user_keymap, 'qmk.keymap.v1')
|
|
||||||
|
|
||||||
orig_keyboard = user_keymap['keyboard']
|
orig_keyboard = user_keymap['keyboard']
|
||||||
aliases = json_load(Path('data/mappings/keyboard_aliases.json'))
|
aliases = json_load(Path('data/mappings/keyboard_aliases.json'))
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Functions that help us generate and use info.json files.
|
"""Functions that help us generate and use info.json files.
|
||||||
"""
|
"""
|
||||||
import json
|
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -8,7 +7,7 @@ import jsonschema
|
|||||||
from dotty_dict import dotty
|
from dotty_dict import dotty
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.constants import CHIBIOS_PROCESSORS, KEYBOARD_OUTPUT_PREFIX, LUFA_PROCESSORS, VUSB_PROCESSORS
|
from qmk.constants import CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS
|
||||||
from qmk.c_parse import find_layouts
|
from qmk.c_parse import find_layouts
|
||||||
from qmk.json_schema import deep_update, json_load, validate
|
from qmk.json_schema import deep_update, json_load, validate
|
||||||
from qmk.keyboard import config_h, rules_mk
|
from qmk.keyboard import config_h, rules_mk
|
||||||
@@ -26,7 +25,7 @@ def _valid_community_layout(layout):
|
|||||||
return (Path('layouts/default') / layout).exists()
|
return (Path('layouts/default') / layout).exists()
|
||||||
|
|
||||||
|
|
||||||
def info_json(keyboard, *, overrides=None):
|
def info_json(keyboard):
|
||||||
"""Generate the info.json data for a specific keyboard.
|
"""Generate the info.json data for a specific keyboard.
|
||||||
"""
|
"""
|
||||||
cur_dir = Path('keyboards')
|
cur_dir = Path('keyboards')
|
||||||
@@ -60,14 +59,11 @@ def info_json(keyboard, *, overrides=None):
|
|||||||
layout_json['c_macro'] = True
|
layout_json['c_macro'] = True
|
||||||
info_data['layouts'][layout_name] = layout_json
|
info_data['layouts'][layout_name] = layout_json
|
||||||
|
|
||||||
# Merge in the data from info.json, config.h, rules.mk, and overrides
|
# Merge in the data from info.json, config.h, and rules.mk
|
||||||
info_data = merge_info_jsons(keyboard, info_data)
|
info_data = merge_info_jsons(keyboard, info_data)
|
||||||
info_data = _extract_rules_mk(info_data)
|
info_data = _extract_rules_mk(info_data)
|
||||||
info_data = _extract_config_h(info_data)
|
info_data = _extract_config_h(info_data)
|
||||||
|
|
||||||
if overrides:
|
|
||||||
info_data = merge_info_data(info_data, overrides)
|
|
||||||
|
|
||||||
# Ensure that we have matrix row and column counts
|
# Ensure that we have matrix row and column counts
|
||||||
info_data = _matrix_size(info_data)
|
info_data = _matrix_size(info_data)
|
||||||
|
|
||||||
@@ -106,27 +102,6 @@ def info_json(keyboard, *, overrides=None):
|
|||||||
return info_data
|
return info_data
|
||||||
|
|
||||||
|
|
||||||
def get_keyboard_overrides(keyboard, keymap=None):
|
|
||||||
"""Checks for keyboard_overrides.json in the keyboard build directory and returns them if it exists.
|
|
||||||
"""
|
|
||||||
if not keymap:
|
|
||||||
return None
|
|
||||||
|
|
||||||
keyboard_filesafe = keyboard.replace('/', '_')
|
|
||||||
keymap_filesafe = f'{keyboard_filesafe}_{keymap}' if keymap else keyboard_filesafe
|
|
||||||
keymap_output = Path(f'{KEYBOARD_OUTPUT_PREFIX}{keymap_filesafe}')
|
|
||||||
keymap_file = keymap_output / 'keymap.json'
|
|
||||||
|
|
||||||
if keymap_file.exists():
|
|
||||||
keymap_json = json.load(keymap_file.open('r', encoding='utf-8'))
|
|
||||||
|
|
||||||
if 'keyboard_overrides' in keymap_json:
|
|
||||||
return keymap_json['keyboard_overrides']
|
|
||||||
|
|
||||||
if 'config' in keymap_json:
|
|
||||||
return keymap_json['config']
|
|
||||||
|
|
||||||
|
|
||||||
def _extract_features(info_data, rules):
|
def _extract_features(info_data, rules):
|
||||||
"""Find all the features enabled in rules.mk.
|
"""Find all the features enabled in rules.mk.
|
||||||
"""
|
"""
|
||||||
@@ -685,38 +660,6 @@ def unknown_processor_rules(info_data, rules):
|
|||||||
return info_data
|
return info_data
|
||||||
|
|
||||||
|
|
||||||
def merge_info_data(info_data, new_info_data):
|
|
||||||
"""Return a merged copy of info_data and new_info_data.
|
|
||||||
"""
|
|
||||||
if 'layout_aliases' in new_info_data:
|
|
||||||
info_data['layout_aliases'] = {**info_data.get('layout_aliases', {}), **new_info_data['layout_aliases']}
|
|
||||||
del new_info_data['layout_aliases']
|
|
||||||
|
|
||||||
for layout_name, layout in new_info_data.get('layouts', {}).items():
|
|
||||||
if layout_name in info_data.get('layout_aliases', {}):
|
|
||||||
_log_warning(info_data, f"info.json uses alias name {layout_name} instead of {info_data['layout_aliases'][layout_name]}")
|
|
||||||
layout_name = info_data['layout_aliases'][layout_name]
|
|
||||||
|
|
||||||
if layout_name in info_data['layouts']:
|
|
||||||
if len(info_data['layouts'][layout_name]['layout']) != len(layout['layout']):
|
|
||||||
msg = '%s: %s: Number of elements in info.json does not match! info.json:%s != %s:%s'
|
|
||||||
_log_error(info_data, msg % (info_data['keyboard_folder'], layout_name, len(layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout'])))
|
|
||||||
else:
|
|
||||||
for new_key, existing_key in zip(layout['layout'], info_data['layouts'][layout_name]['layout']):
|
|
||||||
existing_key.update(new_key)
|
|
||||||
else:
|
|
||||||
layout['c_macro'] = False
|
|
||||||
info_data['layouts'][layout_name] = layout
|
|
||||||
|
|
||||||
# Update info_data with the new data
|
|
||||||
if 'layouts' in new_info_data:
|
|
||||||
del new_info_data['layouts']
|
|
||||||
|
|
||||||
deep_update(info_data, new_info_data)
|
|
||||||
|
|
||||||
return info_data
|
|
||||||
|
|
||||||
|
|
||||||
def merge_info_jsons(keyboard, info_data):
|
def merge_info_jsons(keyboard, info_data):
|
||||||
"""Return a merged copy of all the info.json files for a keyboard.
|
"""Return a merged copy of all the info.json files for a keyboard.
|
||||||
"""
|
"""
|
||||||
@@ -737,7 +680,31 @@ def merge_info_jsons(keyboard, info_data):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Merge layout data in
|
# Merge layout data in
|
||||||
merge_info_data(info_data, new_info_data)
|
if 'layout_aliases' in new_info_data:
|
||||||
|
info_data['layout_aliases'] = {**info_data.get('layout_aliases', {}), **new_info_data['layout_aliases']}
|
||||||
|
del new_info_data['layout_aliases']
|
||||||
|
|
||||||
|
for layout_name, layout in new_info_data.get('layouts', {}).items():
|
||||||
|
if layout_name in info_data.get('layout_aliases', {}):
|
||||||
|
_log_warning(info_data, f"info.json uses alias name {layout_name} instead of {info_data['layout_aliases'][layout_name]}")
|
||||||
|
layout_name = info_data['layout_aliases'][layout_name]
|
||||||
|
|
||||||
|
if layout_name in info_data['layouts']:
|
||||||
|
if len(info_data['layouts'][layout_name]['layout']) != len(layout['layout']):
|
||||||
|
msg = '%s: %s: Number of elements in info.json does not match! info.json:%s != %s:%s'
|
||||||
|
_log_error(info_data, msg % (info_data['keyboard_folder'], layout_name, len(layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout'])))
|
||||||
|
else:
|
||||||
|
for new_key, existing_key in zip(layout['layout'], info_data['layouts'][layout_name]['layout']):
|
||||||
|
existing_key.update(new_key)
|
||||||
|
else:
|
||||||
|
layout['c_macro'] = False
|
||||||
|
info_data['layouts'][layout_name] = layout
|
||||||
|
|
||||||
|
# Update info_data with the new data
|
||||||
|
if 'layouts' in new_info_data:
|
||||||
|
del new_info_data['layouts']
|
||||||
|
|
||||||
|
deep_update(info_data, new_info_data)
|
||||||
|
|
||||||
return info_data
|
return info_data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user