Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09370a95db | ||
|
|
e9ffc53476 | ||
|
|
480a391929 | ||
|
|
154336ee27 | ||
|
|
d4ccb2e0e6 | ||
|
|
5e65af3a76 | ||
|
|
e4a0f841e1 | ||
|
|
4867a9b1e6 | ||
|
|
9a9eaa8100 | ||
|
|
339e29d5af | ||
|
|
b568999769 |
No files matched your search
+8
-2
@@ -469,9 +469,15 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
|||||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
||||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||||
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \
|
QUANTUM_LIB_SRC += i2c_master.c \
|
||||||
i2c_master.c \
|
|
||||||
i2c_slave.c
|
i2c_slave.c
|
||||||
|
|
||||||
|
SERIAL_DRIVER ?= bitbang
|
||||||
|
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
|
||||||
|
QUANTUM_LIB_SRC += serial.c
|
||||||
|
else
|
||||||
|
QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||||
endif
|
endif
|
||||||
|
|||||||
+16
-2
@@ -141,14 +141,28 @@ qmk docs [-p PORT]
|
|||||||
|
|
||||||
## `qmk doctor`
|
## `qmk doctor`
|
||||||
|
|
||||||
This command examines your environment and alerts you to potential build or flash problems.
|
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||||
|
|
||||||
**Usage**:
|
**Usage**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk doctor
|
qmk doctor [-y] [-n]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
Check your environment for problems and prompt to fix them:
|
||||||
|
|
||||||
|
qmk doctor
|
||||||
|
|
||||||
|
Check your environment and automatically fix any problems found:
|
||||||
|
|
||||||
|
qmk doctor -y
|
||||||
|
|
||||||
|
Check your environment and report problems only:
|
||||||
|
|
||||||
|
qmk doctor -n
|
||||||
|
|
||||||
## `qmk json-keymap`
|
## `qmk json-keymap`
|
||||||
|
|
||||||
Creates a keymap.c from a QMK Configurator export.
|
Creates a keymap.c from a QMK Configurator export.
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
+106
-23
@@ -1,13 +1,29 @@
|
|||||||
#ifndef CONFIG_H
|
/*
|
||||||
#define CONFIG_H
|
Copyright 2020
|
||||||
|
|
||||||
|
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"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0x1209
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x2328
|
#define PRODUCT_ID 0x7169
|
||||||
#define DEVICE_VER 0x501
|
#define DEVICE_VER 0x0501
|
||||||
#define MANUFACTURER K.T.E.C.
|
#define MANUFACTURER KTEC
|
||||||
#define PRODUCT Daisy
|
#define PRODUCT Daisy
|
||||||
#define DESCRIPTION qmk port for Daisy
|
#define DESCRIPTION qmk port for Daisy
|
||||||
|
|
||||||
@@ -32,22 +48,59 @@
|
|||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
#define BACKLIGHT_PIN D0
|
#define BACKLIGHT_PIN D0
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
#define BACKLIGHT_LEVELS 6
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
|
||||||
|
#define RGB_DI_PIN C7
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
# define RGBLED_NUM 8
|
||||||
|
# define RGBLIGHT_HUE_STEP 12
|
||||||
|
# define RGBLIGHT_SAT_STEP 25
|
||||||
|
# define RGBLIGHT_VAL_STEP 12
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
# define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #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
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force NKRO
|
* Force NKRO
|
||||||
*
|
*
|
||||||
@@ -81,6 +134,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
/* control how magic key switches layers */
|
/* control how magic key switches layers */
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
@@ -90,8 +147,8 @@
|
|||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
//#define MAGIC_KEY_HELP1 H
|
//#define MAGIC_KEY_HELP H
|
||||||
//#define MAGIC_KEY_HELP2 SLASH
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
//#define MAGIC_KEY_DEBUG D
|
//#define MAGIC_KEY_DEBUG D
|
||||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
//#define MAGIC_KEY_DEBUG_KBD K
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
@@ -99,9 +156,8 @@
|
|||||||
//#define MAGIC_KEY_VERSION V
|
//#define MAGIC_KEY_VERSION V
|
||||||
//#define MAGIC_KEY_STATUS S
|
//#define MAGIC_KEY_STATUS S
|
||||||
//#define MAGIC_KEY_CONSOLE C
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
|
||||||
//#define MAGIC_KEY_LAYER0 0
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
//#define MAGIC_KEY_LAYER1 1
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
//#define MAGIC_KEY_LAYER2 2
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
//#define MAGIC_KEY_LAYER3 3
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
@@ -111,9 +167,11 @@
|
|||||||
//#define MAGIC_KEY_LAYER7 7
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
//#define MAGIC_KEY_LAYER8 8
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
//#define MAGIC_KEY_LAYER9 9
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
//#define MAGIC_KEY_LOCK CAPS
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
//#define MAGIC_KEY_EEPROM E
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
//#define MAGIC_KEY_NKRO N
|
//#define MAGIC_KEY_NKRO N
|
||||||
//#define MAGIC_KEY_SLEEP_LED Z
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
@@ -132,17 +190,12 @@
|
|||||||
//#define NO_ACTION_LAYER
|
//#define NO_ACTION_LAYER
|
||||||
//#define NO_ACTION_TAPPING
|
//#define NO_ACTION_TAPPING
|
||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
// ws2812 options
|
|
||||||
#define RGB_DI_PIN C7 // pin the DI on the ws2812 is hooked-up to
|
|
||||||
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
|
||||||
#define RGBLED_NUM 8 // number of LEDs
|
|
||||||
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
|
||||||
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
|
||||||
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* MIDI options
|
* MIDI options
|
||||||
*/
|
*/
|
||||||
@@ -166,4 +219,34 @@
|
|||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
+33
-13
@@ -1,15 +1,35 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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 "daisy.h"
|
#include "daisy.h"
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
led_init_ports();
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
keyboard_pre_init_user();
|
||||||
// output low
|
}
|
||||||
DDRC |= (1<<PC6);
|
|
||||||
PORTC &= ~(1<<PC6);
|
void led_init_ports(void) {
|
||||||
} else {
|
setPinOutput(C6);
|
||||||
// Hi-Z
|
writePinHigh(C6);
|
||||||
DDRC &= ~(1<<PC6);
|
}
|
||||||
PORTC &= ~(1<<PC6);
|
|
||||||
}
|
bool led_update_kb(led_t led_state) {
|
||||||
led_set_user(usb_led);
|
if (led_update_user(led_state)) {
|
||||||
}
|
writePin(C6, !led_state.caps_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
+45
-13
@@ -1,19 +1,51 @@
|
|||||||
#ifndef DAISY_H
|
/* Copyright 2020
|
||||||
#define DAISY_H
|
*
|
||||||
|
* 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"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||||
K30, K31, K32, K34, K35, K37, K38, K39 \
|
K30, K31, K32, K34, K35, K37, K38, K39 \
|
||||||
) \
|
) { \
|
||||||
{ \
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
|
||||||
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#define LAYOUT_625_space( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||||
|
K30, K31, K32, K35, K38, K39 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||||
|
{ K30, K31, K32, KC_NO, KC_NO, K35, KC_NO, KC_NO, K38, K39, K3A } \
|
||||||
|
}
|
||||||
+103
-14
@@ -1,18 +1,107 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Daisy",
|
"keyboard_name": "Daisy",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 12,
|
"width": 12,
|
||||||
"height": 4,
|
"height": 4,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"key_count": 42,
|
"key_count": 42,
|
||||||
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3, "w": 1.25}, {"label": "K34", "x": 3.5, "y": 3, "w": 2.25}, {"label": "K35", "x": 5.75, "y": 3, "w": 2.75}, {"label": "K37", "x": 8.5, "y": 3, "w": 1.25}, {"label": "K38", "x": 9.75, "y": 3}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}]
|
"layout": [
|
||||||
},
|
{"x": 0, "y": 0},
|
||||||
|
{"x": 1, "y": 0},
|
||||||
|
{"x": 2, "y": 0},
|
||||||
|
{"x": 3, "y": 0},
|
||||||
|
{"x": 4, "y": 0},
|
||||||
|
{"x": 5, "y": 0},
|
||||||
|
{"x": 6, "y": 0},
|
||||||
|
{"x": 7, "y": 0},
|
||||||
|
{"x": 8, "y": 0},
|
||||||
|
{"x": 9, "y": 0},
|
||||||
|
{"x": 10, "y": 0},
|
||||||
|
{"x": 11, "y": 0},
|
||||||
|
|
||||||
"LAYOUT_625_space": {
|
{"x": 0, "y": 1, "w": 1.25},
|
||||||
"key_count": 40,
|
{"x": 1.25, "y": 1},
|
||||||
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3}, {"x": 3.25, "y": 3, "w": 6.25}, {"label": "K38", "x": 9.5, "y": 3, "w": 1.25}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}]
|
{"x": 2.25, "y": 1},
|
||||||
|
{"x": 3.25, "y": 1},
|
||||||
|
{"x": 4.25, "y": 1},
|
||||||
|
{"x": 5.25, "y": 1},
|
||||||
|
{"x": 6.25, "y": 1},
|
||||||
|
{"x": 7.25, "y": 1},
|
||||||
|
{"x": 8.25, "y": 1},
|
||||||
|
{"x": 9.25, "y": 1},
|
||||||
|
{"x": 10.25, "y": 1, "w": 1.75},
|
||||||
|
|
||||||
|
{"x": 0, "y": 2, "w": 1.75},
|
||||||
|
{"x": 1.75, "y": 2},
|
||||||
|
{"x": 2.75, "y": 2},
|
||||||
|
{"x": 3.75, "y": 2},
|
||||||
|
{"x": 4.75, "y": 2},
|
||||||
|
{"x": 5.75, "y": 2},
|
||||||
|
{"x": 6.75, "y": 2},
|
||||||
|
{"x": 7.75, "y": 2},
|
||||||
|
{"x": 8.75, "y": 2},
|
||||||
|
{"x": 9.75, "y": 2},
|
||||||
|
{"x": 10.75, "y": 2, "w": 1.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 3, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 3},
|
||||||
|
{"x": 2.25, "y": 3, "w": 1.25},
|
||||||
|
{"x": 3.5, "y": 3, "w": 2.25},
|
||||||
|
{"x": 5.75, "y": 3, "w": 2.75},
|
||||||
|
{"x": 8.5, "y": 3, "w": 1.25},
|
||||||
|
{"x": 9.75, "y": 3},
|
||||||
|
{"x": 10.75, "y": 3, "w": 1.25}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_625_space": {
|
||||||
|
"key_count": 40,
|
||||||
|
"layout": [
|
||||||
|
{"x": 0, "y": 0},
|
||||||
|
{"x": 1, "y": 0},
|
||||||
|
{"x": 2, "y": 0},
|
||||||
|
{"x": 3, "y": 0},
|
||||||
|
{"x": 4, "y": 0},
|
||||||
|
{"x": 5, "y": 0},
|
||||||
|
{"x": 6, "y": 0},
|
||||||
|
{"x": 7, "y": 0},
|
||||||
|
{"x": 8, "y": 0},
|
||||||
|
{"x": 9, "y": 0},
|
||||||
|
{"x": 10, "y": 0},
|
||||||
|
{"x": 11, "y": 0},
|
||||||
|
|
||||||
|
{"x": 0, "y": 1, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 1},
|
||||||
|
{"x": 2.25, "y": 1},
|
||||||
|
{"x": 3.25, "y": 1},
|
||||||
|
{"x": 4.25, "y": 1},
|
||||||
|
{"x": 5.25, "y": 1},
|
||||||
|
{"x": 6.25, "y": 1},
|
||||||
|
{"x": 7.25, "y": 1},
|
||||||
|
{"x": 8.25, "y": 1},
|
||||||
|
{"x": 9.25, "y": 1},
|
||||||
|
{"x": 10.25, "y": 1, "w": 1.75},
|
||||||
|
|
||||||
|
{"x": 0, "y": 2, "w": 1.75},
|
||||||
|
{"x": 1.75, "y": 2},
|
||||||
|
{"x": 2.75, "y": 2},
|
||||||
|
{"x": 3.75, "y": 2},
|
||||||
|
{"x": 4.75, "y": 2},
|
||||||
|
{"x": 5.75, "y": 2},
|
||||||
|
{"x": 6.75, "y": 2},
|
||||||
|
{"x": 7.75, "y": 2},
|
||||||
|
{"x": 8.75, "y": 2},
|
||||||
|
{"x": 9.75, "y": 2},
|
||||||
|
{"x": 10.75, "y": 2, "w": 1.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 3, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 3},
|
||||||
|
{"x": 2.25, "y": 3},
|
||||||
|
{"x": 3.25, "y": 3, "w": 6.25},
|
||||||
|
{"x": 9.5, "y": 3, "w": 1.25},
|
||||||
|
{"x": 10.75, "y": 3, "w": 1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,92 +1,83 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
// Layer shorthand
|
enum layer_names {
|
||||||
#define _BL 0
|
_BL,
|
||||||
#define _LW 1
|
_LW,
|
||||||
#define _RS 2
|
_RS
|
||||||
|
|
||||||
enum layer_keycodes {
|
|
||||||
QWERTY = SAFE_RANGE, LOWER, RAISE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LW)
|
||||||
|
#define RAISE MO(_RS)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base Layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
|
||||||
|
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||||
|
* │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
|
||||||
|
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
|
||||||
|
* │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │
|
||||||
|
* ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
|
||||||
|
* │Ctrl│GUI│Alt │ │ Backspace│Lowr│Rse│ Alt│
|
||||||
|
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT(
|
||||||
|
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
/* Base Layer
|
/* Function Layer 1 (Lower)
|
||||||
* .-----------------------------------------------------------------------.
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
* | ESC | Q | W | E | R | T | Y | U | I | O | P | \| |
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
|
||||||
* |-----------------------------------------------------------------------|
|
* └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
|
||||||
* | TAB | A | S | D | F | G | H | J | K | L | ENTER |
|
* │ │ = │ ▴ │ │ │ │ [ │ ] │ ; │ ' │ │
|
||||||
* |-----------------------------------------------------------------------|
|
* ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
|
||||||
* | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? |
|
* │ │ ◂ │ ▾ │ ▸ │ │ │ │ │ │ │ │
|
||||||
* |-----------------------------------------------------------------------|
|
* ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
|
||||||
* | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT |
|
* │ │ │ │ │ Delete │ │ │ │
|
||||||
* '-----------------------------------------------------------------------'
|
* └────┴───┴────┴────────└──────────┘────┴───┴────┘
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT(
|
[_LW] = LAYOUT(
|
||||||
GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
_______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
|
_______, _______, _______, _______, KC_DEL, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Function Layer
|
|
||||||
* .-----------------------------------------------------------------------.
|
|
||||||
* | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | =+ | UP | | | | [{ | ]} | ;: | '" | |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | LEFT| DOWN |RIGHT| | | | | | | |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | | | | DELETE | | | |
|
|
||||||
* '-----------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_LW] = LAYOUT(
|
|
||||||
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_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS,
|
|
||||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
/* Second Function Layer
|
|
||||||
* .-----------------------------------------------------------------------.
|
|
||||||
* | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | | | | | | | |
|
|
||||||
* '-----------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_RS] = LAYOUT(
|
|
||||||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS,
|
|
||||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
};
|
/* Function Layer 2 (Raise)
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
* │Rst│F1 │F2 │F3 │F4 │F5 │F6 │ │Hom│PgU│ │ │
|
||||||
switch (keycode) {
|
* └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
|
||||||
case LOWER:
|
* │ │F7 │F8 │F9 │F10│F11│F12│ │ ; │ ' │ │
|
||||||
if(record->event.pressed){
|
* ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
|
||||||
layer_on(_LW);
|
* │ │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│ │
|
||||||
} else {
|
* ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
|
||||||
layer_off(_LW);
|
* │ │ │ │ │ │ │ │ │
|
||||||
}
|
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
|
||||||
return false;
|
*/
|
||||||
break;
|
[_RS] = LAYOUT(
|
||||||
case RAISE:
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
|
||||||
if(record->event.pressed){
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
|
||||||
layer_on(_RS);
|
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
|
||||||
} else {
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
layer_off(_RS);
|
)
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
@@ -1,5 +1 @@
|
|||||||

|
# The default keymap for Daisy
|
||||||
|
|
||||||
# Default Daisy Layout
|
|
||||||
|
|
||||||
This is the default layout as offered by KPRepublic's TMK firmware for the Daisy with a few minor tweaks for usability made by me.
|
|
||||||
@@ -1,29 +1,15 @@
|
|||||||
# Daisy
|
# Daisy
|
||||||
|
|
||||||
A 40% keyboard kit sold by KPRepublic.
|

|
||||||
|
|
||||||
Keyboard Maintainer: westfoxtrot (https://github.com/westfoxtrot)
|
A 40% keyboard kit sold by KPrepublic.
|
||||||
Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
|
|
||||||
Hardware Availability: http://tinyurl.com/yc26lq22
|
* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot)
|
||||||
|
* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
|
||||||
|
* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make daisy:default
|
make daisy:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
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).
|
||||||
|
|
||||||
|
|
||||||
# Other Keymaps
|
|
||||||
|
|
||||||
The "default" keymap included is the layout I personally use on the Daisy and the one I have found the most comfortable.
|
|
||||||
|
|
||||||
A printable picture showing this layout is available here: https://imgur.com/9mSF0yf
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make daisy:[default|<name>]
|
|
||||||
```
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
|
|
||||||
I personally had issues with the bootloader on my Daisy PCB and was unable to flash a firmware to the board after the first time. I replaced the bootloader with the one available in the repository at ../../util/bootloader_atmega32u4_1_0_0.hex
|
|
||||||
+16
-14
@@ -11,20 +11,22 @@ MCU = atmega32u4
|
|||||||
# ATmega328P USBasp
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = atmel-dfu
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
# QMK Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change yes to no to disable
|
||||||
# the appropriate keymap folder that will get included automatically
|
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
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
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -41,4 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
@@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,4 +39,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -25,16 +25,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,4 +39,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -25,13 +25,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -33,3 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define RGBLED_NUM 5
|
#define RGBLED_NUM 5
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
@@ -27,16 +27,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
+62
-324
@@ -8,330 +8,68 @@
|
|||||||
"LAYOUT_60_iso": {
|
"LAYOUT_60_iso": {
|
||||||
"key_count": 62,
|
"key_count": 62,
|
||||||
"layout": [
|
"layout": [
|
||||||
{
|
{"label":"\\u00ac", "x":0, "y":0},
|
||||||
"label": "\\u00ac",
|
{"label":"!", "x":1, "y":0},
|
||||||
"x": 0,
|
{"label":"\"", "x":2, "y":0},
|
||||||
"y": 0
|
{"label":"\\u00a3", "x":3, "y":0},
|
||||||
},
|
{"label":"$", "x":4, "y":0},
|
||||||
{
|
{"label":"%", "x":5, "y":0},
|
||||||
"label": "!",
|
{"label":"^", "x":6, "y":0},
|
||||||
"x": 1,
|
{"label":"&", "x":7, "y":0},
|
||||||
"y": 0
|
{"label":"*", "x":8, "y":0},
|
||||||
},
|
{"label":"(", "x":9, "y":0},
|
||||||
{
|
{"label":")", "x":10, "y":0},
|
||||||
"label": "\"",
|
{"label":"_", "x":11, "y":0},
|
||||||
"x": 2,
|
{"label":"+", "x":12, "y":0},
|
||||||
"y": 0
|
{"label":"Backspace", "x":13, "y":0, "w":2},
|
||||||
},
|
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||||
{
|
{"label":"Q", "x":1.5, "y":1},
|
||||||
"label": "\\u00a3",
|
{"label":"W", "x":2.5, "y":1},
|
||||||
"x": 3,
|
{"label":"E", "x":3.5, "y":1},
|
||||||
"y": 0
|
{"label":"R", "x":4.5, "y":1},
|
||||||
},
|
{"label":"T", "x":5.5, "y":1},
|
||||||
{
|
{"label":"Y", "x":6.5, "y":1},
|
||||||
"label": "$",
|
{"label":"U", "x":7.5, "y":1},
|
||||||
"x": 4,
|
{"label":"I", "x":8.5, "y":1},
|
||||||
"y": 0
|
{"label":"O", "x":9.5, "y":1},
|
||||||
},
|
{"label":"P", "x":10.5, "y":1},
|
||||||
{
|
{"label":"{", "x":11.5, "y":1},
|
||||||
"label": "%",
|
{"label":"}", "x":12.5, "y":1},
|
||||||
"x": 5,
|
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||||
"y": 0
|
{"label":"A", "x":1.75, "y":2},
|
||||||
},
|
{"label":"S", "x":2.75, "y":2},
|
||||||
{
|
{"label":"D", "x":3.75, "y":2},
|
||||||
"label": "^",
|
{"label":"F", "x":4.75, "y":2},
|
||||||
"x": 6,
|
{"label":"G", "x":5.75, "y":2},
|
||||||
"y": 0
|
{"label":"H", "x":6.75, "y":2},
|
||||||
},
|
{"label":"J", "x":7.75, "y":2},
|
||||||
{
|
{"label":"K", "x":8.75, "y":2},
|
||||||
"label": "&",
|
{"label":"L", "x":9.75, "y":2},
|
||||||
"x": 7,
|
{"label":":", "x":10.75, "y":2},
|
||||||
"y": 0
|
{"label":"@", "x":11.75, "y":2},
|
||||||
},
|
{"label":"~", "x":12.75, "y":2},
|
||||||
{
|
{"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
|
||||||
"label": "*",
|
{"label":"Shift", "x":0, "y":3, "w":1.25},
|
||||||
"x": 8,
|
{"label":"|", "x":1.25, "y":3},
|
||||||
"y": 0
|
{"label":"Z", "x":2.25, "y":3},
|
||||||
},
|
{"label":"X", "x":3.25, "y":3},
|
||||||
{
|
{"label":"C", "x":4.25, "y":3},
|
||||||
"label": "(",
|
{"label":"V", "x":5.25, "y":3},
|
||||||
"x": 9,
|
{"label":"B", "x":6.25, "y":3},
|
||||||
"y": 0
|
{"label":"N", "x":7.25, "y":3},
|
||||||
},
|
{"label":"M", "x":8.25, "y":3},
|
||||||
{
|
{"label":"<", "x":9.25, "y":3},
|
||||||
"label": ")",
|
{"label":">", "x":10.25, "y":3},
|
||||||
"x": 10,
|
{"label":"?", "x":11.25, "y":3},
|
||||||
"y": 0
|
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
|
||||||
},
|
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||||
{
|
{"label":"Win", "x":1.25, "y":4, "w":1.25},
|
||||||
"label": "_",
|
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
|
||||||
"x": 11,
|
{"x":3.75, "y":4, "w":6.25},
|
||||||
"y": 0
|
{"label":"AltGr", "x":10, "y":4, "w":1.25},
|
||||||
},
|
{"label":"Win", "x":11.25, "y":4, "w":1.25},
|
||||||
{
|
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
|
||||||
"label": "+",
|
{"label":"Ctrl", "x":13.75, "y":4, "w":1.25}
|
||||||
"x": 12,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Backspace",
|
|
||||||
"x": 13,
|
|
||||||
"y": 0,
|
|
||||||
"w": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Tab",
|
|
||||||
"x": 0,
|
|
||||||
"y": 1,
|
|
||||||
"w": 1.5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Q",
|
|
||||||
"x": 1.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "W",
|
|
||||||
"x": 2.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "E",
|
|
||||||
"x": 3.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "R",
|
|
||||||
"x": 4.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "T",
|
|
||||||
"x": 5.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Y",
|
|
||||||
"x": 6.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "U",
|
|
||||||
"x": 7.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "I",
|
|
||||||
"x": 8.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "O",
|
|
||||||
"x": 9.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "P",
|
|
||||||
"x": 10.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "{",
|
|
||||||
"x": 11.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "}",
|
|
||||||
"x": 12.5,
|
|
||||||
"y": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Enter",
|
|
||||||
"x": 13.75,
|
|
||||||
"y": 1,
|
|
||||||
"w": 1.25,
|
|
||||||
"h": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Caps Lock",
|
|
||||||
"x": 0,
|
|
||||||
"y": 2,
|
|
||||||
"w": 1.75
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "A",
|
|
||||||
"x": 1.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "S",
|
|
||||||
"x": 2.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "D",
|
|
||||||
"x": 3.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "F",
|
|
||||||
"x": 4.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "G",
|
|
||||||
"x": 5.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "H",
|
|
||||||
"x": 6.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "J",
|
|
||||||
"x": 7.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "K",
|
|
||||||
"x": 8.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "L",
|
|
||||||
"x": 9.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": ":",
|
|
||||||
"x": 10.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "@",
|
|
||||||
"x": 11.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "~",
|
|
||||||
"x": 12.75,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Shift",
|
|
||||||
"x": 0,
|
|
||||||
"y": 3,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "|",
|
|
||||||
"x": 1.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Z",
|
|
||||||
"x": 2.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "X",
|
|
||||||
"x": 3.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "C",
|
|
||||||
"x": 4.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "V",
|
|
||||||
"x": 5.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "B",
|
|
||||||
"x": 6.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "N",
|
|
||||||
"x": 7.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "M",
|
|
||||||
"x": 8.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "<",
|
|
||||||
"x": 9.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": ">",
|
|
||||||
"x": 10.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "?",
|
|
||||||
"x": 11.25,
|
|
||||||
"y": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Shift",
|
|
||||||
"x": 12.25,
|
|
||||||
"y": 3,
|
|
||||||
"w": 2.75
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Ctrl",
|
|
||||||
"x": 0,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Win",
|
|
||||||
"x": 1.25,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Alt",
|
|
||||||
"x": 2.5,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"x": 3.75,
|
|
||||||
"y": 4,
|
|
||||||
"w": 6.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "AltGr",
|
|
||||||
"x": 10,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Win",
|
|
||||||
"x": 11.25,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Menu",
|
|
||||||
"x": 12.5,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Ctrl",
|
|
||||||
"x": 13.75,
|
|
||||||
"y": 4,
|
|
||||||
"w": 1.25
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-1
@@ -16,10 +16,21 @@
|
|||||||
|
|
||||||
#include "j80.h"
|
#include "j80.h"
|
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) {
|
||||||
|
led_init_ports();
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
setPinOutput(D0);
|
||||||
|
setPinOutput(D1);
|
||||||
|
setPinOutput(D6);
|
||||||
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, led_state.caps_lock);
|
|
||||||
writePin(D0, led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
writePinHigh(D0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -25,14 +25,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
/* Copyright 2019 Rozakin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL1 1
|
||||||
|
#define _FL2 2
|
||||||
|
#define _FL3 3
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* _BL: Base Layer(Default) - For ISO enter use ANSI enter
|
||||||
|
* ,------------------------------------------------------------. ,--------------.
|
||||||
|
* |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11| f12| |Prnt|ScLk|Paus|
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | ~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| | Ins|Home|PgUp|
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | Del| End|PgDn|
|
||||||
|
* |------------------------------------------------------------| `--------------'
|
||||||
|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|
|
||||||
|
* |------------------------------------------------------------| ,----.
|
||||||
|
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift|Mo(1)| | Up |
|
||||||
|
* |------------------------------------------------------------| ,--------------.
|
||||||
|
* |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | |Left| Dn |Rght|
|
||||||
|
* `------------------------------------------------------------' `--------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL1), KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
/* _FL1: Function Layer 1 - For ISO enter use ANSI enter
|
||||||
|
* ,------------------------------------------------------------. ,--------------.
|
||||||
|
* | | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | | | | |RST| | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| `--------------'
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| ,----.
|
||||||
|
* | | | | | | | | | |Bl-|Bl+| | Mute| | |Vol+|
|
||||||
|
* |------------------------------------------------------------| ,--------------.
|
||||||
|
* | | | | BL_Toggle | | | | | | |Vol-| |
|
||||||
|
* `------------------------------------------------------------' `--------------'
|
||||||
|
*/
|
||||||
|
[_FL1] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU,
|
||||||
|
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______),
|
||||||
|
/* _FL2: Function Layer 2 - For ISO enter use ANSI enter
|
||||||
|
* ,------------------------------------------------------------. ,--------------.
|
||||||
|
* | | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| `--------------'
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| ,----.
|
||||||
|
* | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| ,--------------.
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `------------------------------------------------------------' `--------------'
|
||||||
|
*/
|
||||||
|
[_FL2] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
/* _FL3: Function Layer 3 - For ISO enter use ANSI enter
|
||||||
|
* ,------------------------------------------------------------. ,--------------.
|
||||||
|
* | | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| |--------------|
|
||||||
|
* | | | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| `--------------'
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| ,----.
|
||||||
|
* | | | | | | | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------------| ,--------------.
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `------------------------------------------------------------' `--------------'
|
||||||
|
*/
|
||||||
|
[_FL3] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The VIA keymap for Noxary 280
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 yohei <[email protected]>
|
||||||
|
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 0xFEED
|
||||||
|
#define PRODUCT_ID 0xE80A
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER yohewi
|
||||||
|
#define PRODUCT NumAtreus
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for NumAtreus
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 11
|
||||||
|
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { C6, D7, E6, B4 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D2, D1, D0, D4 }
|
||||||
|
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
//#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
|
||||||
|
// keyboard RGB LED support
|
||||||
|
//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
|
||||||
|
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
|
||||||
|
#define RGBLED_NUM 6
|
||||||
|
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 200
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
|
||||||
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
|
// USB_MAX_POWER_CONSUMPTION value for stonehenge30 keyboard
|
||||||
|
// 120 RGBoff, OLEDoff
|
||||||
|
// 120 OLED
|
||||||
|
// 330 RGB 6
|
||||||
|
// 300 RGB 32
|
||||||
|
// 310 OLED & RGB 32
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 400
|
||||||
|
#else
|
||||||
|
// fix iPhone and iPad power adapter issue
|
||||||
|
// iOS device need lessthan 100
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "numatreus",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 13,
|
||||||
|
"height": 4.7,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
|
||||||
|
enum layer_number {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT( /* Qwerty */
|
||||||
|
/*
|
||||||
|
* Q W E R T || Y U I O P
|
||||||
|
* A S D F G || H J K L ;
|
||||||
|
* Z X C V B || N M , . /
|
||||||
|
* SFT TAB CTL LW space bksp||ALT Ent RS - ' =
|
||||||
|
*/
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P ,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH ,
|
||||||
|
KC_LSFT, KC_TAB, KC_LCTL, MO(_LOWER), KC_SPC, KC_BSPC, KC_LALT, KC_ENT, MO(_RAISE), KC_MINS, KC_QUOT, KC_PEQL
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 1 2 3 4 5 || 6 7 8 9 0
|
||||||
|
* F1 F2 F3 F4 F5 || F6 F7 F8 F9 F10
|
||||||
|
* F11 F12 ( ) & || ` [ ] + \
|
||||||
|
* lower insert super shift space bksp|| alt Ent fn . - =
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT( /* [> RAISE <] */
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||||
|
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_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_LBRC, KC_RBRC, KC_PSLS, KC_BSLS ,
|
||||||
|
KC_NO, KC_INS, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_TRNS, KC_DOT, KC_PMNS, KC_EQL ),
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ! @ # $ % || ^ & * ( )
|
||||||
|
* DEL ESC || PGDN PGUP PSCR
|
||||||
|
* CAPS volup ENT reset || UP
|
||||||
|
* voldn super shift space bspc|| alt ent LEFT DOWN RGHT
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT( /* [> LOWER <] */
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN ,
|
||||||
|
KC_DELT, KC_ESC, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_PSCR, KC_NO, KC_NO,
|
||||||
|
KC_CAPS, KC_VOLU, KC_NO, KC_ENT, RESET, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO ,
|
||||||
|
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT )
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
// WindowsでJIS配列として認識しているときに、オシャレなUS配列用キーキャップを使うためのキーマップです。
|
||||||
|
// Google日本語入力の場合、以下のキー設定を行うとLower,Raiseのタップでそれぞれ半角入力と全角入力を切り替えできるようになります。
|
||||||
|
// ・Henkan(入力文字なし/直接入力)に「IMEを有効化」を割り当て
|
||||||
|
// ・Muhenkan(入力文字なし/直接入力)に「IMEを無効化」を割り当て
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_jp.h" // qmk_firmware-master/quantum/keymap_extras/keymap_jp.h 日本語キーボード設定用
|
||||||
|
#include <sendstring_jis.h> // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_number {
|
||||||
|
_QWERTY,
|
||||||
|
_HDBX,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_GAME,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
HDBX,
|
||||||
|
MCR1, // マクロ1
|
||||||
|
MCR2, // マクロ2
|
||||||
|
MCR3, // マクロ3
|
||||||
|
MCR4, // マクロ4
|
||||||
|
MCR5, // マクロ5
|
||||||
|
WN_SCLN, // タップでJISの「:」 シフトでJISの「;」 (Windows)
|
||||||
|
DM_PLY1,
|
||||||
|
DM_PLY2,
|
||||||
|
DM_REC1,
|
||||||
|
DM_REC2,
|
||||||
|
DM_RSTP,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Use Dynamic macro
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define LOWER LT(_LOWER, KC_MHEN) // タップで無変換 ホールドでLower
|
||||||
|
#define RAISE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise
|
||||||
|
#define GUI_ESC GUI_T(KC_ESC) // タップでESC ホールドでGUI
|
||||||
|
#define SFT_BS SFT_T(KC_BSPC) // タップでBackSpace ホールドでSHIFT
|
||||||
|
#define CTL_ENT CTL_T(KC_ENT) // タップでEnter ホールドでCTRL
|
||||||
|
#define CTL_TAB CTL_T(KC_TAB) // タップでTAB ホールドでCTRL
|
||||||
|
#define SFT_DEL SFT_T(KC_DEL) // タップでDELETE ホールドでSHIFT
|
||||||
|
#define ALT_LBR ALT_T(JP_LBRC) // タップで[ ホールドでALT
|
||||||
|
#define SFT_RBR SFT_T(JP_RBRC) // タップで] ホールドでSHIFT
|
||||||
|
#define SFT_SPC S(KC_SPC) // Shift + Space
|
||||||
|
#define WN_CAPS S(KC_CAPS) // Caps Lock (Windows)
|
||||||
|
#define GAME TO(_GAME) // _GAMEレイヤーへ移動
|
||||||
|
#define ADJUST TO(_ADJUST) // _ADJUSTレイヤーへ移動
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty配列
|
||||||
|
* ,----------------------------------. ,----------------------------------.
|
||||||
|
* | Q | W | E | R | T | | Y | U | I | O | P |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | A | S | D | F | G | | H | J | K | L | ; |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | Z | X | C | V | B | | N | M | , | . | / |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* |Alt/[ |WINESC| ~ |Sft/Bs|Lower |CtlEnt|Space |Raise |CtrlTb| - | ' |Sft/] |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, WN_SCLN,
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||||
|
ALT_LBR, GUI_ESC, JP_TILD, SFT_BS, LOWER, CTL_ENT, KC_SPC, RAISE, CTL_TAB, KC_MINS, JP_QUOT, SFT_RBR
|
||||||
|
),
|
||||||
|
|
||||||
|
/* HDBX配列 デフォルトレイヤーをこの配列にしたい場合は、AdjustレイヤーでK (Lower + Raise + K)
|
||||||
|
* ,----------------------------------. ,----------------------------------.
|
||||||
|
* | Q | W | E | , | . | | Y | D | P | F | : |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | A | I | O | U | G | | M | N | T | R | S |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | Z | X | C | V | B | | H | J | K | L | / |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* |Alt/[ |WINESC| ~ |Sft/Bs|Lower |CtlEnt|Space |Raise |CtrlTb| - | ' |Sft/] |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_HDBX] = LAYOUT(
|
||||||
|
KC_Q, KC_W, KC_E, KC_COMM, KC_DOT, KC_Y, KC_D, KC_P, KC_F, WN_SCLN,
|
||||||
|
KC_A, KC_I, KC_O, KC_U, KC_G, KC_M, KC_N, KC_T, KC_R, KC_S,
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H, KC_J, KC_K, KC_L, KC_SLSH,
|
||||||
|
ALT_LBR, GUI_ESC, JP_TILD, SFT_BS, LOWER, CTL_ENT, KC_SPC, RAISE, CTL_TAB, KC_MINS, JP_QUOT, SFT_RBR
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,----------------------------------. ,----------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | | 7 | 8 | 9 | . | Bspc |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | F6 | F7 | F8 | F9 | F10 | | 4 | 5 | 6 | + | * |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* |Zen/Ha|ScLock|Pause | F11 | F12 | | 1 | 2 | 3 | - | / |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Alt | WIN | ` |SftDel|Lower | Ctrl |SftSpc|Raise | 0 | , | = |Enter |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_7, KC_8, KC_9, KC_DOT, KC_BSPC,
|
||||||
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_4, KC_5, KC_6, KC_PPLS, KC_PAST,
|
||||||
|
KC_ZKHK, KC_SLCK, KC_PAUS, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_PMNS, KC_PSLS,
|
||||||
|
KC_LALT, KC_LGUI, JP_GRV, SFT_DEL, _______, KC_LCTL, SFT_SPC, _______, KC_0, KC_COMM, JP_EQL, KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,----------------------------------. ,----------------------------------.
|
||||||
|
* | ! | @ | # | $ | % | | Home | App | Ins | Calc |PrtScr|
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | ^ | & | * | \ | | | | Left | Down | Up |Right | ; |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | ` | { | } | < | > | | End | Mute | ( | ) | ? |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Alt | WIN | ` | Del |Lower | Ctrl | Caps |Raise | Ctrl | _ | " |Shift |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_APP, KC_INS, KC_CALC, KC_PSCR,
|
||||||
|
JP_CIRC, JP_AMPR, JP_ASTR, JP_YEN, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN,
|
||||||
|
JP_GRV, JP_LCBR, JP_RCBR, KC_LT, KC_GT, KC_END, KC_MUTE, JP_LPRN, JP_RPRN, KC_QUES,
|
||||||
|
KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQT, KC_RSFT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* GAME ゲームやテンキー固定で使用するレイヤーです。AdjustレイヤーでGを押下して遷移。戻るときはtoBaseから。
|
||||||
|
* ,----------------------------------. ,----------------------------------.
|
||||||
|
* | Q | Up | E | R | T | | 7 | 8 | 9 | . | Bspc |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | Left | Down |Right | F | G | | 4 | 5 | 6 | + | * |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | Z | X | C | V | B | | 1 | 2 | 3 | - | / |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Alt | Esc | Tab |Shift |Space | Ctrl |toBase| \ | 0 | , | = |Enter |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_GAME] = LAYOUT(
|
||||||
|
KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_7, KC_8, KC_9, KC_DOT, KC_BSPC,
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_4, KC_5, KC_6, KC_PPLS, KC_PAST,
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_3, KC_PMNS, KC_PSLS,
|
||||||
|
KC_LALT, KC_ESC, KC_TAB, KC_LSFT, KC_SPC, KC_LCTL, ADJUST, JP_YEN, KC_0, KC_COMM, JP_EQL, KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,----------------------------------. ,----------------------------------.
|
||||||
|
* | MCR1 | MCR2 | MCR3 | MCR4 | MCR5 | |DyMcr1|DyMcr2|RcMcr1|RcMcr2|StpRec|
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | | | | |ToGAME| | |Qwerty| HDBX | | |
|
||||||
|
* |------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* |RESET | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
MCR1, MCR2, MCR3, MCR4, MCR5, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX, QWERTY, HDBX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
RESET, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case HDBX:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_HDBX);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
static bool lshift = false;
|
||||||
|
case WN_SCLN: // コロン「;:」
|
||||||
|
if (record->event.pressed) {
|
||||||
|
lshift = get_mods() & MOD_BIT(KC_LSFT);
|
||||||
|
if (lshift) {
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
tap_code(JP_SCLN);
|
||||||
|
} else {
|
||||||
|
tap_code(JP_SCLN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MCR1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("0123456789"); // 送信文字列
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MCR2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("hogehoge\n"); // 送信文字列
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MCR3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("[email protected]"); // 送信文字列
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MCR4:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("\"\""SS_TAP(X_LEFT)); // 送信文字列
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case MCR5:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("<>"SS_TAP(X_LEFT)); // 送信文字列
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
DYNAMIC_MACRO_ENABLE = yes
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
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
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#ifdef TAPPING_TERM
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#endif
|
||||||
|
#define TAPPING_TERM 225
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#ifdef MOUSEKEY_ENABLE
|
||||||
|
#undef MOUSEKEY_INTERVAL
|
||||||
|
#define MOUSEKEY_INTERVAL 1
|
||||||
|
|
||||||
|
#undef MOUSEKEY_TIME_TO_MAX
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 150
|
||||||
|
|
||||||
|
#undef MOUSEKEY_MAX_SPEED
|
||||||
|
#define MOUSEKEY_MAX_SPEED 3
|
||||||
|
|
||||||
|
#undef MOUSEKEY_MOVE_DELTA
|
||||||
|
#define MOUSEKEY_MOVE_DELTA 4
|
||||||
|
|
||||||
|
#undef MOUSEKEY_DELAY
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Selection of RGBLIGHT MODE to use.
|
||||||
|
#if defined(LED_ANIMATIONS)
|
||||||
|
//#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
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_jp.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
//Following line allows macro to read current RGB settings
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_number {
|
||||||
|
_BASE = 0,
|
||||||
|
_NUMPAD,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
BASE = SAFE_RANGE,
|
||||||
|
NUMPAD,
|
||||||
|
KANJI,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
RGBRST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum tapdances{
|
||||||
|
TD_CODO = 0,
|
||||||
|
// TD_MNUB,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layer Mode aliases
|
||||||
|
#define KC_LOWER LOWER
|
||||||
|
#define KC_RAISE RAISE
|
||||||
|
#define KC_ADJST ADJUST
|
||||||
|
#define KC_DLNP NUMPAD //DF(_NUMPAD)
|
||||||
|
#define KC_DLBS BASE //DF(_BASE)
|
||||||
|
|
||||||
|
#define KC_ZSFT LSFT_T(KC_Z)
|
||||||
|
#define KC_MNSF LSFT_T(KC_MINS)
|
||||||
|
#define KC_ESCT LCTL_T(KC_ESC)
|
||||||
|
#define KC_TBAL LALT_T(KC_TAB)
|
||||||
|
#define KC_11SF LSFT_T(KC_F11)
|
||||||
|
#define KC_ALAP LALT_T(KC_APP)
|
||||||
|
#define KC_JEQL LSFT(KC_MINS)
|
||||||
|
#define KC_WLCK LALT(KC_L)
|
||||||
|
#define KC_SFEQ LSFT(KC_MINS)
|
||||||
|
#define KC_SFPL LSFT(KC_SCLN)
|
||||||
|
#define KC_SFAS LSFT(KC_QUOT)
|
||||||
|
|
||||||
|
#define KC_CODO TD(TD_CODO)
|
||||||
|
// #define KC_MNUB TD(TD_MNUB)
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
|
||||||
|
// [TD_MNUB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, LSFT(KC_RO)),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
//,----------------------------------. ,----------------------------------.
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_ZSFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_CODO, KC_UP, KC_MNSF,
|
||||||
|
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||||
|
KC_ESCT, KC_TBAL, KC_LGUI, KC_LOWER, KC_BSPC, KC_BSPC, KC_SPC, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NUMPAD] = LAYOUT(
|
||||||
|
//,----------------------------------. ,----------------------------------.
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PAST, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PAST, KC_NLCK,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PPLS, KC_QUOT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_QUOT,
|
||||||
|
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||||
|
KC_DLBS, KC_P0, KC_PDOT, KC_SFEQ, KC_SPC, KC_DEL, KC_SPC, KC_DLBS, KC_P0, KC_PDOT, KC_SFEQ, KC_BSPC
|
||||||
|
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
//,----------------------------------. ,----------------------------------.
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_11SF, KC_F12, KC_DLNP, KANJI, KC_ENT, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO,
|
||||||
|
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
//,----------------------------------. ,----------------------------------.
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_QUOT, KC_4, KC_5, KC_6, KC_MINS,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PPLS,
|
||||||
|
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WLCK, KC_TRNS, KC_0, KC_DOT, KC_JEQL
|
||||||
|
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
//,----------------------------------. ,----------------------------------.
|
||||||
|
RESET, RGBRST, AG_NORM, AG_SWAP, KC_CAPS, XXXXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_SLCK, XXXXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN,
|
||||||
|
//|------+------+------+------+------| |------+------+------+------+------|
|
||||||
|
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NLCK, XXXXXXX, KC_BTN1, KC_BTN2, KC_MS_U, XXXXXXX,
|
||||||
|
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||||
|
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R
|
||||||
|
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#define L_BASE _BASE
|
||||||
|
#define L_NUMPAD (1<<_NUMPAD)
|
||||||
|
|
||||||
|
static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||||
|
|
||||||
|
pressed ? layer_on(layer1) : layer_off(layer1);
|
||||||
|
IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
|
||||||
|
}
|
||||||
|
|
||||||
|
int RGB_current_mode;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
bool result = false;
|
||||||
|
switch (keycode) {
|
||||||
|
case BASE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
default_layer_set(L_BASE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NUMPAD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
default_layer_set(L_NUMPAD);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
|
||||||
|
break;
|
||||||
|
case KANJI:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keymap_config.swap_lalt_lgui == false) {
|
||||||
|
register_code(KC_LANG2);
|
||||||
|
} else {
|
||||||
|
tap_code16(A(KC_GRV));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_LANG2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||||
|
case RGB_MOD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgblight_mode(RGB_current_mode);
|
||||||
|
rgblight_step();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGBRST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_update_rgblight_default();
|
||||||
|
rgblight_enable();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
LED_ANIMATIONS = yes
|
||||||
|
|
||||||
|
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||||
|
OPT_DEFS += -DLED_ANIMATIONS
|
||||||
|
endif
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
|
||||||
|
enum layer_number {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
BASE = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* q w e r t || y u i o p
|
||||||
|
* a s d f g || h j k l ;
|
||||||
|
* z x c v b || n m , . \
|
||||||
|
* esc tab ctl lw spc bspc|| GRV ent RS / alt -
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT( /* Qwerty */
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P ,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,
|
||||||
|
SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_BSLS) ,
|
||||||
|
KC_ESC, KC_TAB, KC_LCTL, MO(_LOWER), KC_SPC, KC_BSPC, LALT(KC_GRV), KC_ENT, MO(_RAISE), KC_DOT, KC_RALT, KC_MINS ),
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 1 2 3 4 5 || 6 7 8 9 0
|
||||||
|
* # < > = - || _ + ENT
|
||||||
|
* [ ] ( ) & || ` . UP \
|
||||||
|
* TRANS TRANS TRANS TRANS TRANS TRANS|| TRANS TRANS RS LEFT DPWM RGHT
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT( /* [> RAISE <] */
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||||
|
KC_HASH, KC_LABK, KC_RABK, KC_EQL, KC_MINS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_ENT ,
|
||||||
|
KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_TRNS, KC_DOT, KC_UP, KC_BSLS ,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT ),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ! @ # $ % || ^ & * ( )
|
||||||
|
* F1 F2 F3 F4 F5 || F6 F7 F8 F9 F10
|
||||||
|
* F11 F12 reset || , UP \
|
||||||
|
* TRNS TRNS TRNS TRNS TRNS TRNS||TRNS TRNS TRNS LEFT DPWM RGHT
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT( /* [> LOWER <] */
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN ,
|
||||||
|
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_NO, KC_NO, RESET, KC_TRNS, KC_TRNS, KC_QUOT, KC_UP, KC_BSLS ,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, TO(_QWERTY), KC_LEFT, KC_DOWN, KC_RGHT )
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "numatreus.h"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
// The first section contains all of the arguements
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# NumAtreus
|
||||||
|
|
||||||
|
A small mechanical keyboard that is based around the shape of the human hand.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: yohewi(yohewi@gmail.com)
|
||||||
|
* Hardware Supported: NumAtreus, PCB
|
||||||
|
* Hardware Availability: [Case Data](https://github.com/yohewi/NumAtreuscase)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make numatreus: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).
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
#BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
#MIDI_ENABLE = no # MIDI controls
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
#BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
#TAP_DANCE_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
LED_ANIMATIONS = no
|
||||||
|
|
||||||
|
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||||
|
OPT_DEFS += -DLED_ANIMATIONS
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -26,16 +26,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -27,14 +27,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -26,16 +26,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFBFB
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x0050
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER funderburker
|
#define MANUFACTURER funderburker
|
||||||
#define PRODUCT TMO50
|
#define PRODUCT TMO50
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2019 funderburker
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#define LT1_SPC LT(1, KC_SPC)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// Default layer
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_TRNS, 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_BSPC,
|
||||||
|
KC_TRNS, KC_LCTL, 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_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2),
|
||||||
|
KC_TRNS, KC_LALT, KC_LGUI, LT1_SPC, LT1_SPC, KC_RALT, MO(3)
|
||||||
|
),
|
||||||
|
|
||||||
|
// Fn1 layer
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
|
||||||
|
KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
// Fn2 layer
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
// Fn3 layer
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
RESET, 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The VIA default layout
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -25,9 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
MIDI_ENABLE = no # MIDI support
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -25,16 +25,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -26,16 +26,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -26,16 +26,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -26,14 +26,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,6 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
writePinHigh(D0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
|
|||||||
+177
-64
@@ -1,14 +1,18 @@
|
|||||||
"""QMK Python Doctor
|
"""QMK Doctor
|
||||||
|
|
||||||
Check up for QMK environment.
|
Check out the user's QMK environment and make sure it's ready to compile.
|
||||||
"""
|
"""
|
||||||
import os
|
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import glob
|
from pathlib import Path
|
||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
from qmk import submodules
|
||||||
|
from qmk.questions import yesno
|
||||||
|
|
||||||
|
ESSENTIAL_BINARIES = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk']
|
||||||
|
ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa']
|
||||||
|
|
||||||
|
|
||||||
def _udev_rule(vid, pid=None):
|
def _udev_rule(vid, pid=None):
|
||||||
@@ -20,6 +24,137 @@ def _udev_rule(vid, pid=None):
|
|||||||
return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid
|
return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid
|
||||||
|
|
||||||
|
|
||||||
|
def check_binaries():
|
||||||
|
"""Iterates through ESSENTIAL_BINARIES and tests them.
|
||||||
|
"""
|
||||||
|
ok = True
|
||||||
|
|
||||||
|
for binary in ESSENTIAL_BINARIES:
|
||||||
|
if not is_executable(binary):
|
||||||
|
ok = False
|
||||||
|
|
||||||
|
return ok
|
||||||
|
|
||||||
|
|
||||||
|
def check_submodules():
|
||||||
|
"""Iterates through all submodules to make sure they're cloned and up to date.
|
||||||
|
"""
|
||||||
|
ok = True
|
||||||
|
|
||||||
|
for submodule in submodules.status().values():
|
||||||
|
if submodule['status'] is None:
|
||||||
|
if submodule['name'] in ESSENTIAL_SUBMODULES:
|
||||||
|
cli.log.error('Submodule %s has not yet been cloned!', submodule['name'])
|
||||||
|
ok = False
|
||||||
|
else:
|
||||||
|
cli.log.warn('Submodule %s is not available.', submodule['name'])
|
||||||
|
elif not submodule['status']:
|
||||||
|
if submodule['name'] in ESSENTIAL_SUBMODULES:
|
||||||
|
cli.log.warn('Submodule %s is not up to date!')
|
||||||
|
|
||||||
|
return ok
|
||||||
|
|
||||||
|
|
||||||
|
def check_udev_rules():
|
||||||
|
"""Make sure the udev rules look good.
|
||||||
|
"""
|
||||||
|
ok = True
|
||||||
|
udev_dir = Path("/etc/udev/rules.d/")
|
||||||
|
desired_rules = {
|
||||||
|
'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")},
|
||||||
|
'tmk': {_udev_rule("feed")},
|
||||||
|
'input_club': {_udev_rule("1c11")},
|
||||||
|
'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")},
|
||||||
|
'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'},
|
||||||
|
}
|
||||||
|
|
||||||
|
if udev_dir.exists():
|
||||||
|
udev_rules = [str(rule_file) for rule_file in udev_dir.glob('*.rules')]
|
||||||
|
current_rules = set()
|
||||||
|
|
||||||
|
# Collect all rules from the config files
|
||||||
|
for rule_file in udev_rules:
|
||||||
|
with open(rule_file, "r") as fd:
|
||||||
|
for line in fd.readlines():
|
||||||
|
line = line.strip()
|
||||||
|
if not line.startswith("#") and len(line):
|
||||||
|
current_rules.add(line)
|
||||||
|
|
||||||
|
# Check if the desired rules are among the currently present rules
|
||||||
|
for bootloader, rules in desired_rules.items():
|
||||||
|
if not rules.issubset(current_rules):
|
||||||
|
# If the rules for catalina are not present, check if ModemManager is running
|
||||||
|
if bootloader == "caterina":
|
||||||
|
if check_modem_manager():
|
||||||
|
ok = False
|
||||||
|
cli.log.warn("{bg_yellow}Detected ModemManager without udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.")
|
||||||
|
else:
|
||||||
|
cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader)
|
||||||
|
|
||||||
|
return ok
|
||||||
|
|
||||||
|
|
||||||
|
def check_modem_manager():
|
||||||
|
"""Returns True if ModemManager is running.
|
||||||
|
"""
|
||||||
|
if shutil.which("systemctl"):
|
||||||
|
mm_check = subprocess.run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10)
|
||||||
|
if mm_check.returncode == 0:
|
||||||
|
return True
|
||||||
|
|
||||||
|
else:
|
||||||
|
cli.log.warn("Can't find systemctl to check for ModemManager.")
|
||||||
|
|
||||||
|
|
||||||
|
def is_executable(command):
|
||||||
|
"""Returns True if command exists and can be executed.
|
||||||
|
"""
|
||||||
|
# Make sure the command is in the path.
|
||||||
|
res = shutil.which(command)
|
||||||
|
if res is None:
|
||||||
|
cli.log.error("{fg_red}Can't find %s in your path.", command)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Make sure the command can be executed
|
||||||
|
check = subprocess.run([command, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5)
|
||||||
|
if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1
|
||||||
|
cli.log.debug('Found {fg_cyan}%s', command)
|
||||||
|
return True
|
||||||
|
|
||||||
|
cli.log.error("{fg_red}Can't run `%s --version`", command)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def os_test_linux():
|
||||||
|
"""Run the Linux specific tests.
|
||||||
|
"""
|
||||||
|
cli.log.info("Detected {fg_cyan}Linux.")
|
||||||
|
ok = True
|
||||||
|
|
||||||
|
if not check_udev_rules():
|
||||||
|
ok = False
|
||||||
|
|
||||||
|
return ok
|
||||||
|
|
||||||
|
|
||||||
|
def os_test_macos():
|
||||||
|
"""Run the Mac specific tests.
|
||||||
|
"""
|
||||||
|
cli.log.info("Detected {fg_cyan}macOS.")
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def os_test_windows():
|
||||||
|
"""Run the Windows specific tests.
|
||||||
|
"""
|
||||||
|
cli.log.info("Detected {fg_cyan}Windows.")
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.')
|
||||||
|
@cli.argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.')
|
||||||
@cli.subcommand('Basic QMK environment checks')
|
@cli.subcommand('Basic QMK environment checks')
|
||||||
def doctor(cli):
|
def doctor(cli):
|
||||||
"""Basic QMK environment checks.
|
"""Basic QMK environment checks.
|
||||||
@@ -30,75 +165,53 @@ def doctor(cli):
|
|||||||
* [ ] Compile a trivial program with each compiler
|
* [ ] Compile a trivial program with each compiler
|
||||||
"""
|
"""
|
||||||
cli.log.info('QMK Doctor is checking your environment.')
|
cli.log.info('QMK Doctor is checking your environment.')
|
||||||
|
|
||||||
# Make sure the basic CLI tools we need are available and can be executed.
|
|
||||||
binaries = ['dfu-programmer', 'avrdude', 'dfu-util', 'avr-gcc', 'arm-none-eabi-gcc', 'bin/qmk']
|
|
||||||
ok = True
|
ok = True
|
||||||
|
|
||||||
for binary in binaries:
|
|
||||||
res = shutil.which(binary)
|
|
||||||
if res is None:
|
|
||||||
cli.log.error("{fg_red}QMK can't find %s in your path.", binary)
|
|
||||||
ok = False
|
|
||||||
else:
|
|
||||||
check = subprocess.run([binary, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=5)
|
|
||||||
if check.returncode in [0, 1]:
|
|
||||||
cli.log.info('Found {fg_cyan}%s', binary)
|
|
||||||
else:
|
|
||||||
cli.log.error("{fg_red}Can't run `%s --version`", binary)
|
|
||||||
ok = False
|
|
||||||
|
|
||||||
# Determine our OS and run platform specific tests
|
# Determine our OS and run platform specific tests
|
||||||
OS = platform.system() # noqa (N806), uppercase name is ok in this instance
|
OS = platform.system() # noqa (N806), uppercase name is ok in this instance
|
||||||
|
|
||||||
if OS == "Darwin":
|
if OS == 'Darwin':
|
||||||
cli.log.info("Detected {fg_cyan}macOS.")
|
if not os_test_macos():
|
||||||
|
ok = False
|
||||||
elif OS == "Linux":
|
elif OS == 'Linux':
|
||||||
cli.log.info("Detected {fg_cyan}Linux.")
|
if not os_test_linux():
|
||||||
# Checking for udev rules
|
ok = False
|
||||||
udev_dir = "/etc/udev/rules.d/"
|
elif OS == 'Windows':
|
||||||
# These are the recommended udev rules
|
if not os_test_windows():
|
||||||
desired_rules = {
|
ok = False
|
||||||
'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")},
|
|
||||||
'tmk': {_udev_rule("feed")},
|
|
||||||
'input_club': {_udev_rule("1c11")},
|
|
||||||
'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")},
|
|
||||||
'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'},
|
|
||||||
}
|
|
||||||
|
|
||||||
if os.path.exists(udev_dir):
|
|
||||||
udev_rules = [rule for rule in glob.iglob(os.path.join(udev_dir, "*.rules")) if os.path.isfile(rule)]
|
|
||||||
# Collect all rules from the config files
|
|
||||||
current_rules = set()
|
|
||||||
for rule in udev_rules:
|
|
||||||
with open(rule, "r") as fd:
|
|
||||||
for line in fd.readlines():
|
|
||||||
line = line.strip()
|
|
||||||
if not line.startswith("#") and len(line):
|
|
||||||
current_rules.add(line)
|
|
||||||
|
|
||||||
# Check if the desired rules are among the currently present rules
|
|
||||||
for bootloader, rules in desired_rules.items():
|
|
||||||
if not rules.issubset(current_rules):
|
|
||||||
# If the rules for catalina are not present, check if ModemManager is running
|
|
||||||
if bootloader == "caterina":
|
|
||||||
if shutil.which("systemctl"):
|
|
||||||
mm_check = subprocess.run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10)
|
|
||||||
if mm_check.returncode == 0:
|
|
||||||
ok = False
|
|
||||||
cli.log.warn("{bg_yellow}Detected ModemManager without udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.")
|
|
||||||
else:
|
|
||||||
cli.log.warn("Can't find systemctl to check for ModemManager.")
|
|
||||||
else:
|
|
||||||
cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
cli.log.info("Assuming {fg_cyan}Windows.")
|
cli.log.error('Unsupported OS detected: %s', OS)
|
||||||
|
ok = False
|
||||||
|
|
||||||
|
# Make sure the basic CLI tools we need are available and can be executed.
|
||||||
|
bin_ok = check_binaries()
|
||||||
|
|
||||||
|
if not bin_ok:
|
||||||
|
if yesno('Would you like to install dependencies?', default=True):
|
||||||
|
subprocess.run(['util/qmk_install.sh'])
|
||||||
|
bin_ok = check_binaries()
|
||||||
|
|
||||||
|
if bin_ok:
|
||||||
|
cli.log.info('All dependencies are installed.')
|
||||||
|
else:
|
||||||
|
ok = False
|
||||||
|
|
||||||
|
# Check out the QMK submodules
|
||||||
|
sub_ok = check_submodules()
|
||||||
|
|
||||||
|
if sub_ok:
|
||||||
|
cli.log.info('Submodules are up to date.')
|
||||||
|
else:
|
||||||
|
if yesno('Would you like to clone the submodules?', default=True):
|
||||||
|
submodules.update()
|
||||||
|
sub_ok = check_submodules()
|
||||||
|
|
||||||
|
if not sub_ok:
|
||||||
|
ok = False
|
||||||
|
|
||||||
# Report a summary of our findings to the user
|
# Report a summary of our findings to the user
|
||||||
if ok:
|
if ok:
|
||||||
cli.log.info('{fg_green}QMK is ready to go')
|
cli.log.info('{fg_green}QMK is ready to go')
|
||||||
else:
|
else:
|
||||||
cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.')
|
cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.')
|
||||||
# FIXME(skullydazed): Link to a document about troubleshooting, or discord or something
|
# FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
"""Functions to collect user input.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from milc import cli, format_ansi
|
||||||
|
|
||||||
|
|
||||||
|
def yesno(prompt, *args, default=None, **kwargs):
|
||||||
|
"""Displays prompt to the user and gets a yes or no response.
|
||||||
|
|
||||||
|
Returns True for a yes and False for a no.
|
||||||
|
|
||||||
|
If you add `--yes` and `--no` arguments to your program the user can answer questions by passing command line flags.
|
||||||
|
|
||||||
|
@add_argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.')
|
||||||
|
@add_argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.')
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
prompt
|
||||||
|
The prompt to present to the user. Can include ANSI and format strings like milc's `cli.print()`.
|
||||||
|
|
||||||
|
default
|
||||||
|
Whether to default to a Yes or No when the user presses enter.
|
||||||
|
|
||||||
|
None- force the user to enter Y or N
|
||||||
|
|
||||||
|
True- Default to yes
|
||||||
|
|
||||||
|
False- Default to no
|
||||||
|
"""
|
||||||
|
if not args and kwargs:
|
||||||
|
args = kwargs
|
||||||
|
|
||||||
|
if 'no' in cli.args and cli.args.no:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if 'yes' in cli.args and cli.args.yes:
|
||||||
|
return True
|
||||||
|
|
||||||
|
if default is not None:
|
||||||
|
if default:
|
||||||
|
prompt = prompt + ' [Y/n] '
|
||||||
|
else:
|
||||||
|
prompt = prompt + ' [y/N] '
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print()
|
||||||
|
answer = input(format_ansi(prompt % args))
|
||||||
|
print()
|
||||||
|
|
||||||
|
if not answer and prompt is not None:
|
||||||
|
return default
|
||||||
|
|
||||||
|
elif answer.lower() in ['y', 'yes']:
|
||||||
|
return True
|
||||||
|
|
||||||
|
elif answer.lower() in ['n', 'no']:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def question(prompt, *args, default=None, confirm=False, answer_type=str, **kwargs):
|
||||||
|
"""Prompt the user to answer a question with a free-form input.
|
||||||
|
|
||||||
|
prompt
|
||||||
|
The prompt to present to the user. Can include ANSI and format strings like milc's `cli.print()`.
|
||||||
|
|
||||||
|
default
|
||||||
|
The value to return when the user doesn't enter any value. Use None to prompt until they enter a value.
|
||||||
|
|
||||||
|
answer_type
|
||||||
|
Specify a type function for the answer. Will re-prompt the user if the function raises any errors. Common choices here include int, float, and decimal.Decimal.
|
||||||
|
"""
|
||||||
|
if not args and kwargs:
|
||||||
|
args = kwargs
|
||||||
|
|
||||||
|
if default is not None:
|
||||||
|
prompt = '%s [%s] ' % (prompt, default)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print()
|
||||||
|
answer = input(format_ansi(prompt % args))
|
||||||
|
print()
|
||||||
|
|
||||||
|
if answer:
|
||||||
|
if confirm:
|
||||||
|
if yesno('Is the answer "%s" correct?', answer, default=True):
|
||||||
|
try:
|
||||||
|
return answer_type(answer)
|
||||||
|
except Exception as e:
|
||||||
|
cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e))
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
return answer_type(answer)
|
||||||
|
except Exception as e:
|
||||||
|
cli.log.error('Could not convert answer (%s) to type %s: %s', answer, answer_type.__name__, str(e))
|
||||||
|
|
||||||
|
elif default is not None:
|
||||||
|
return default
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
"""Functions for working with QMK's submodules.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
def status():
|
||||||
|
"""Returns a dictionary of submodules.
|
||||||
|
|
||||||
|
Each entry is a dict of the form:
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'submodule_name',
|
||||||
|
'status': None/False/True,
|
||||||
|
'githash': '<sha-1 hash for the submodule>
|
||||||
|
}
|
||||||
|
|
||||||
|
status is None when the submodule doesn't exist, False when it's out of date, and True when it's current
|
||||||
|
"""
|
||||||
|
submodules = {}
|
||||||
|
git_cmd = subprocess.run(['git', 'submodule', 'status'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=30, universal_newlines=True)
|
||||||
|
|
||||||
|
for line in git_cmd.stdout.split('\n'):
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
|
||||||
|
status = line[0]
|
||||||
|
githash, submodule = line[1:].split()[:2]
|
||||||
|
submodules[submodule] = {'name': submodule, 'githash': githash}
|
||||||
|
|
||||||
|
if status == '-':
|
||||||
|
submodules[submodule]['status'] = None
|
||||||
|
elif status == '+':
|
||||||
|
submodules[submodule]['status'] = False
|
||||||
|
elif status == ' ':
|
||||||
|
submodules[submodule]['status'] = True
|
||||||
|
else:
|
||||||
|
raise ValueError('Unknown `git submodule status` sha-1 prefix character: "%s"' % status)
|
||||||
|
|
||||||
|
return submodules
|
||||||
|
|
||||||
|
|
||||||
|
def update(submodules=None):
|
||||||
|
"""Update the submodules.
|
||||||
|
|
||||||
|
submodules
|
||||||
|
A string containing a single submodule or a list of submodules.
|
||||||
|
"""
|
||||||
|
git_sync_cmd = ['git', 'submodule', 'sync']
|
||||||
|
git_update_cmd = ['git', 'submodule', 'update', '--init']
|
||||||
|
|
||||||
|
if submodules is None:
|
||||||
|
# Update everything
|
||||||
|
git_sync_cmd.append('--recursive')
|
||||||
|
git_update_cmd.append('--recursive')
|
||||||
|
subprocess.run(git_sync_cmd, check=True)
|
||||||
|
subprocess.run(git_update_cmd, check=True)
|
||||||
|
|
||||||
|
else:
|
||||||
|
if isinstance(submodules, str):
|
||||||
|
# Update only a single submodule
|
||||||
|
git_sync_cmd.append(submodules)
|
||||||
|
git_update_cmd.append(submodules)
|
||||||
|
subprocess.run(git_sync_cmd, check=True)
|
||||||
|
subprocess.run(git_update_cmd, check=True)
|
||||||
|
|
||||||
|
else:
|
||||||
|
# Update submodules in a list
|
||||||
|
for submodule in submodules:
|
||||||
|
subprocess.run(git_sync_cmd + [submodule], check=True)
|
||||||
|
subprocess.run(git_update_cmd + [submodule], check=True)
|
||||||
@@ -120,7 +120,8 @@ static void putchw(void* putp, putcf putf, int n, char z, char* bf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void tfp_format(void* putp, putcf putf, char* fmt, va_list va) {
|
void tfp_format(void* putp, putcf putf, char* fmt, va_list va) {
|
||||||
char bf[12];
|
// This used to handle max of 12, but binary support jumps this to at least 32
|
||||||
|
char bf[36];
|
||||||
|
|
||||||
char ch;
|
char ch;
|
||||||
|
|
||||||
|
|||||||
@@ -175,61 +175,61 @@ typedef struct {
|
|||||||
} usb_driver_config_t;
|
} usb_driver_config_t;
|
||||||
|
|
||||||
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
|
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
|
||||||
#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
|
#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
|
||||||
{ \
|
{ \
|
||||||
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
||||||
.in_ep_config = \
|
.in_ep_config = \
|
||||||
{ \
|
{ \
|
||||||
stream##_IN_MODE, /* Interrupt EP */ \
|
stream##_IN_MODE, /* Interrupt EP */ \
|
||||||
NULL, /* SETUP packet notification callback */ \
|
NULL, /* SETUP packet notification callback */ \
|
||||||
qmkusbDataTransmitted, /* IN notification callback */ \
|
qmkusbDataTransmitted, /* IN notification callback */ \
|
||||||
NULL, /* OUT notification callback */ \
|
NULL, /* OUT notification callback */ \
|
||||||
stream##_EPSIZE, /* IN maximum packet size */ \
|
stream##_EPSIZE, /* IN maximum packet size */ \
|
||||||
0, /* OUT maximum packet size */ \
|
0, /* OUT maximum packet size */ \
|
||||||
NULL, /* IN Endpoint state */ \
|
NULL, /* IN Endpoint state */ \
|
||||||
NULL, /* OUT endpoint state */ \
|
NULL, /* OUT endpoint state */ \
|
||||||
2, /* IN multiplier */ \
|
2, /* IN multiplier */ \
|
||||||
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
||||||
}, \
|
}, \
|
||||||
.out_ep_config = \
|
.out_ep_config = \
|
||||||
{ \
|
{ \
|
||||||
stream##_OUT_MODE, /* Interrupt EP */ \
|
stream##_OUT_MODE, /* Interrupt EP */ \
|
||||||
NULL, /* SETUP packet notification callback */ \
|
NULL, /* SETUP packet notification callback */ \
|
||||||
NULL, /* IN notification callback */ \
|
NULL, /* IN notification callback */ \
|
||||||
qmkusbDataReceived, /* OUT notification callback */ \
|
qmkusbDataReceived, /* OUT notification callback */ \
|
||||||
0, /* IN maximum packet size */ \
|
0, /* IN maximum packet size */ \
|
||||||
stream##_EPSIZE, /* OUT maximum packet size */ \
|
stream##_EPSIZE, /* OUT maximum packet size */ \
|
||||||
NULL, /* IN Endpoint state */ \
|
NULL, /* IN Endpoint state */ \
|
||||||
NULL, /* OUT endpoint state */ \
|
NULL, /* OUT endpoint state */ \
|
||||||
2, /* IN multiplier */ \
|
2, /* IN multiplier */ \
|
||||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||||
}, \
|
}, \
|
||||||
.int_ep_config = \
|
.int_ep_config = \
|
||||||
{ \
|
{ \
|
||||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
|
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
|
||||||
NULL, /* SETUP packet notification callback */ \
|
NULL, /* SETUP packet notification callback */ \
|
||||||
qmkusbInterruptTransmitted, /* IN notification callback */ \
|
qmkusbInterruptTransmitted, /* IN notification callback */ \
|
||||||
NULL, /* OUT notification callback */ \
|
NULL, /* OUT notification callback */ \
|
||||||
CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
|
CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
|
||||||
0, /* OUT maximum packet size */ \
|
0, /* OUT maximum packet size */ \
|
||||||
NULL, /* IN Endpoint state */ \
|
NULL, /* IN Endpoint state */ \
|
||||||
NULL, /* OUT endpoint state */ \
|
NULL, /* OUT endpoint state */ \
|
||||||
2, /* IN multiplier */ \
|
2, /* IN multiplier */ \
|
||||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||||
}, \
|
}, \
|
||||||
.config = { \
|
.config = { \
|
||||||
.usbp = &USB_DRIVER, \
|
.usbp = &USB_DRIVER, \
|
||||||
.bulk_in = stream##_IN_EPNUM, \
|
.bulk_in = stream##_IN_EPNUM, \
|
||||||
.bulk_out = stream##_OUT_EPNUM, \
|
.bulk_out = stream##_OUT_EPNUM, \
|
||||||
.int_in = notification, \
|
.int_in = notification, \
|
||||||
.in_buffers = stream##_IN_CAPACITY, \
|
.in_buffers = stream##_IN_CAPACITY, \
|
||||||
.out_buffers = stream##_OUT_CAPACITY, \
|
.out_buffers = stream##_OUT_CAPACITY, \
|
||||||
.in_size = stream##_EPSIZE, \
|
.in_size = stream##_EPSIZE, \
|
||||||
.out_size = stream##_EPSIZE, \
|
.out_size = stream##_EPSIZE, \
|
||||||
.fixed_size = fixedsize, \
|
.fixed_size = fixedsize, \
|
||||||
.ib = (uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
.ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
||||||
.ob = (uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
.ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
Reference in new issue
Block a user