mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-08-15 17:13:22 -04:00
Merge pull request #13 from t4corun/klor
Adding setup for KLOR and OLED overhauls
This commit is contained in:
commit
5b714b8303
52 changed files with 6959 additions and 259 deletions
|
@ -5,4 +5,5 @@
|
|||
# keyboards\barbellboards\rollow\info.json
|
||||
# keyboards\barbellboards\rollow\rules.mk
|
||||
|
||||
LTO_ENABLE = no
|
||||
CONVERT_TO = promicro_rp2040
|
|
@ -1,6 +1,7 @@
|
|||
# override userspace defaults
|
||||
|
||||
DYNAMIC_MACRO_ENABLE = no
|
||||
WPM_ENABLE = no
|
||||
|
||||
# override keyboard defaults
|
||||
# keyboards\crkbd\info.json
|
||||
|
|
4
keyboards/klor/2040/2040.c
Normal file
4
keyboards/klor/2040/2040.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
// Copyright 2022 @geigeigeist
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#include "2040.h"
|
6
keyboards/klor/2040/2040.h
Normal file
6
keyboards/klor/2040/2040.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Copyright 2022 @geigeigeist
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "klor.h"
|
13
keyboards/klor/2040/config.h
Normal file
13
keyboards/klor/2040/config.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2022 @geigeigeist
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
// here you find only RP2040 specific configurations
|
||||
|
||||
#pragma once
|
||||
|
||||
// ┌─────────────────────────────────────────────────┐
|
||||
// │ a u d i o │
|
||||
// └─────────────────────────────────────────────────┘
|
||||
|
||||
#define AUDIO_PWM_DRIVER PWMD4
|
||||
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B
|
||||
#define AUDIO_STATE_TIMER GPTD4
|
7
keyboards/klor/2040/halconf.h
Normal file
7
keyboards/klor/2040/halconf.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_PAL TRUE
|
||||
|
||||
#include_next <halconf.h>
|
12
keyboards/klor/2040/mcuconf.h
Normal file
12
keyboards/klor/2040/mcuconf.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C1 TRUE
|
||||
|
||||
#undef RP_PWM_USE_PWM4
|
||||
#define RP_PWM_USE_PWM4 TRUE
|
||||
|
||||
#undef RP_PWM_USE_TIM1
|
||||
#define RP_PWM_USE_TIM1 TRUE
|
21
keyboards/klor/2040/readme.md
Normal file
21
keyboards/klor/2040/readme.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# KLOR keyboard with RP2040 MCU
|
||||
|
||||
This is the RP2040 revision of the firmware.
|
||||
You can use several RP2040 based MCUs with Pro Micro formfactor.
|
||||
By default the config is setup for the pinout of the Sparkfun Pro Micro RP2040, which is used by most of the RP2040 based MCUs. Since the KB2040/Blok/Elite-Pi have a slightly different pinout you need to change this line
|
||||
`CONVERT_TO = promicro_rp2040`
|
||||
to one of tis lines
|
||||
`CONVERT_TO = kb2040`
|
||||
`CONVERT_TO = blok`
|
||||
`CONVERT_TO = elite_pi`
|
||||
in the `/2040/rules.mk` file.
|
||||
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
- **Keycode in layout**: Press the key mapped to `QK_BOOTLOADER` if it is configured.
|
||||
- **Physical reset button**: Quick double-tap on the reset button soldered on the PCB.
|
||||
- **Controller boot button**: Hold the `BOOT` button on the controller and plug in the USB.
|
||||
- **Bootmagic reset**: Hold down the top left key on the left half and plug in the controller.
|
15
keyboards/klor/2040/rules.mk
Normal file
15
keyboards/klor/2040/rules.mk
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Ignore some warnings during the build, likely to be fixed before RP2040 PR is merged
|
||||
ALLOW_WARNINGS = yes
|
||||
|
||||
# PIO serial/WS2812 drivers must be used on RP2040
|
||||
SERIAL_DRIVER = vendor
|
||||
WS2812_DRIVER = vendor
|
||||
|
||||
# CONVERTER - if you use a listed MCU comment the first line and uncomment the appropiate line
|
||||
CONVERT_TO = promicro_rp2040
|
||||
#CONVERT_TO = kb2040
|
||||
#CONVERT_TO = blok
|
||||
#CONVERT_TO = elite_pi
|
||||
|
||||
# AUDIO
|
||||
AUDIO_DRIVER = pwm_hardware
|
73
keyboards/klor/config.h
Normal file
73
keyboards/klor/config.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
Copyright 2022 GEIST <@geigeigeist>
|
||||
|
||||
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
|
||||
|
||||
// Most configuration will be found in info.json
|
||||
|
||||
// ┌─────────────────────────────────────────────────┐
|
||||
// │ o l e d s │
|
||||
// └─────────────────────────────────────────────────┘
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
# define OLED_DISPLAY_128X64
|
||||
# define OLED_FONT_H "./lib/glcdfont.c"
|
||||
#endif
|
||||
|
||||
// ┌─────────────────────────────────────────────────┐
|
||||
// │ a u d i o │
|
||||
// └─────────────────────────────────────────────────┘
|
||||
|
||||
#define AUDIO_PIN B5
|
||||
#define AUDIO_DAC_SAMPLE_MAX 4095U
|
||||
#define AUDIO_VOICE_DEFAULT butts_fader
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define KLOR_SOUND W__NOTE(_DS0), W__NOTE(_DS1), H__NOTE(_DS2), H__NOTE(_DS3), Q__NOTE(_DS4), Q__NOTE(_DS5), E__NOTE(_DS6), E__NOTE(_DS7), S__NOTE(_DS8), Q__NOTE(_GS0)
|
||||
# define BYE_SOUND H__NOTE(_DS4), H__NOTE(_DS3), W__NOTE(_DS1)
|
||||
|
||||
# define STARTUP_SONG SONG(KLOR_SOUND)
|
||||
# define GOODBYE_SONG SONG(BYE_SOUND)
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND) }
|
||||
#endif
|
||||
|
||||
// ┌─────────────────────────────────────────────────┐
|
||||
// │ h a p t i c f e e d b a c k │
|
||||
// └─────────────────────────────────────────────────┘
|
||||
|
||||
#if defined(HAPTIC_ENABLE) && defined(HAPTIC_DRV2605L)
|
||||
# define DRV2605L_FB_ERM_LRA 1
|
||||
# define DRV2605L_FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
|
||||
# define DRV2605L_FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3
|
||||
# define DRV2605L_RATED_VOLTAGE 2
|
||||
# define DRV2605L_V_PEAK 2.8
|
||||
# define DRV2605L_V_RMS 2.0
|
||||
# define DRV2605L_F_LRA 150 // resonance freq
|
||||
# define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
|
||||
#endif
|
||||
|
||||
// ┌─────────────────────────────────────────────────┐
|
||||
// │ t r a c k b a l l │
|
||||
// └─────────────────────────────────────────────────┘
|
||||
|
||||
#ifdef POINTING_DEVICE_ENABLE
|
||||
# define PAW3204_SCLK_PIN D0
|
||||
# define PAW3204_SDIO_PIN D1
|
||||
# define POINTING_DEVICE_AUTO_MOUSE_ENABLE
|
||||
# define AUTO_MOUSE_DELAY 300
|
||||
#endif
|
275
keyboards/klor/info.json
Normal file
275
keyboards/klor/info.json
Normal file
|
@ -0,0 +1,275 @@
|
|||
{
|
||||
"keyboard_name": "KLOR",
|
||||
"url": "https://github.com/GEIGEIGEIST/KLOR",
|
||||
"manufacturer": "GEIST",
|
||||
"usb": {
|
||||
"vid": "0x3A3C",
|
||||
"pid": "0x0001",
|
||||
"device_version": "1.3.0"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"matrix_pins": {
|
||||
"cols": [ "F6", "F7", "B1", "B3", "B2", "B6" ],
|
||||
"rows": [ "C6", "D7", "E6", "B4" ]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"build": {
|
||||
"lto": false
|
||||
},
|
||||
"features": {
|
||||
"audio": false,
|
||||
"backlight": false,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"encoder": true,
|
||||
"extrakey": false,
|
||||
"grave_esc": false,
|
||||
"haptic": false,
|
||||
"magic": false,
|
||||
"mousekey": false,
|
||||
"music": false,
|
||||
"oled": true,
|
||||
"rgb_matrix": false,
|
||||
"rgblight": false,
|
||||
"space_cadet": false,
|
||||
"swap_hands": true
|
||||
},
|
||||
"mouse_key": {
|
||||
"enabled": false
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{
|
||||
"pin_a": "F5",
|
||||
"pin_b": "F4",
|
||||
"resolution": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"encoder": {
|
||||
"right": {
|
||||
"rotary": [
|
||||
{
|
||||
"pin_a": "F4",
|
||||
"pin_b": "F5",
|
||||
"resolution": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"soft_serial_pin": "D2",
|
||||
"transport": {
|
||||
"protocol": "serial",
|
||||
"sync": {
|
||||
"matrix_state": true,
|
||||
"oled": true,
|
||||
"haptic": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 42,
|
||||
"split_count": [21, 21]
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812",
|
||||
"led_count": 42,
|
||||
"split_count": [21, 21],
|
||||
"max_brightness": 180,
|
||||
"sleep": true,
|
||||
"default": {
|
||||
"hue": 35
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"audio": {
|
||||
"voices": true
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_konrad": {
|
||||
"layout": [
|
||||
{"label": "L01", "matrix": [0, 1], "x": 3, "y": 0.25},
|
||||
{"label": "L02", "matrix": [0, 2], "x": 13, "y": 0.25},
|
||||
{"label": "L03", "matrix": [0, 3], "x": 4, "y": 0.75},
|
||||
{"label": "L04", "matrix": [0, 4], "x": 12, "y": 0.75},
|
||||
{"label": "L05", "matrix": [0, 5], "x": 5, "y": 1},
|
||||
{"label": "R00", "matrix": [4, 5], "x": 11, "y": 1},
|
||||
{"label": "R01", "matrix": [4, 4], "x": 3, "y": 1.25},
|
||||
{"label": "R02", "matrix": [4, 3], "x": 13, "y": 1.25},
|
||||
{"label": "R03", "matrix": [4, 2], "x": 4, "y": 1.75},
|
||||
{"label": "R04", "matrix": [4, 1], "x": 12, "y": 1.75},
|
||||
{"label": "L10", "matrix": [1, 0], "x": 5, "y": 2},
|
||||
{"label": "L11", "matrix": [1, 1], "x": 11, "y": 2},
|
||||
{"label": "L12", "matrix": [1, 2], "x": 3, "y": 2.25},
|
||||
{"label": "L13", "matrix": [1, 3], "x": 13, "y": 2.25},
|
||||
{"label": "L14", "matrix": [1, 4], "x": 4, "y": 2.75},
|
||||
{"label": "L15", "matrix": [1, 5], "x": 12, "y": 2.75},
|
||||
{"label": "R10", "matrix": [5, 5], "x": 5, "y": 3},
|
||||
{"label": "R11", "matrix": [5, 4], "x": 11, "y": 3},
|
||||
{"label": "R12", "matrix": [5, 3], "x": 6.25, "y": 3.25},
|
||||
{"label": "R13", "matrix": [5, 2], "x": 9.75, "y": 3.25},
|
||||
{"label": "R14", "matrix": [5, 1], "x": -0.5, "y": -0.4499999999999993},
|
||||
{"label": "R15", "matrix": [5, 0], "x": -0.5, "y": -4.149999999999999},
|
||||
{"label": "L20", "matrix": [2, 0], "x": -0.5, "y": -6.149999999999999},
|
||||
{"label": "L21", "matrix": [2, 1], "x": -0.5, "y": -5.149999999999999},
|
||||
{"label": "L22", "matrix": [2, 2], "x": -0.5, "y": -4.149999999999999},
|
||||
{"label": "L23", "matrix": [2, 3], "x": -0.25, "y": -5.499999999999999},
|
||||
{"label": "L24", "matrix": [2, 4], "x": 0.75, "y": -4.699999999999998},
|
||||
{"label": "L25", "matrix": [2, 5], "x": -0.25, "y": -4.499999999999999},
|
||||
{"label": "L35", "matrix": [3, 5], "x": 0.75, "y": -3.6999999999999984},
|
||||
{"label": "R30", "matrix": [7, 5], "x": -0.25, "y": -3.4999999999999987},
|
||||
{"label": "R20", "matrix": [6, 5], "x": -0.5, "y": -7.199999999999998},
|
||||
{"label": "R21", "matrix": [6, 4], "x": -0.5, "y": -7.199999999999998},
|
||||
{"label": "R22", "matrix": [6, 3], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "R23", "matrix": [6, 2], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "R24", "matrix": [6, 1], "x": -1, "y": -12.249999999999998},
|
||||
{"label": "R25", "matrix": [6, 0], "x": -2, "y": -11.449999999999998},
|
||||
{"label": "L31", "matrix": [3, 1], "x": -1, "y": -11.249999999999998},
|
||||
{"label": "L32", "matrix": [3, 2], "x": -2, "y": -10.449999999999998},
|
||||
{"label": "L33", "matrix": [3, 3], "x": -1, "y": -10.249999999999998},
|
||||
{"label": "R32", "matrix": [7, 3], "x": -0.75, "y": -12.249999999999998},
|
||||
{"label": "R33", "matrix": [7, 2], "x": -0.75, "y": -11.249999999999998},
|
||||
{"label": "R34", "matrix": [7, 1], "x": -0.75, "y": -10.249999999999998}
|
||||
]
|
||||
},
|
||||
"LAYOUT_polydactyl": {
|
||||
"layout": [
|
||||
{"label": "L01", "matrix": [0, 1], "x": 3, "y": 0.25},
|
||||
{"label": "L02", "matrix": [0, 2], "x": 13, "y": 0.25},
|
||||
{"label": "L03", "matrix": [0, 3], "x": 4, "y": 0.75},
|
||||
{"label": "L04", "matrix": [0, 4], "x": 12, "y": 0.75},
|
||||
{"label": "L05", "matrix": [0, 5], "x": 5, "y": 1},
|
||||
{"label": "R00", "matrix": [4, 5], "x": 11, "y": 1},
|
||||
{"label": "R01", "matrix": [4, 4], "x": 3, "y": 1.25},
|
||||
{"label": "R02", "matrix": [4, 3], "x": 13, "y": 1.25},
|
||||
{"label": "R03", "matrix": [4, 2], "x": 4, "y": 1.75},
|
||||
{"label": "R04", "matrix": [4, 1], "x": 12, "y": 1.75},
|
||||
{"label": "L10", "matrix": [1, 0], "x": 5, "y": 2},
|
||||
{"label": "L11", "matrix": [1, 1], "x": 11, "y": 2},
|
||||
{"label": "L12", "matrix": [1, 2], "x": 3, "y": 2.25},
|
||||
{"label": "L13", "matrix": [1, 3], "x": 13, "y": 2.25},
|
||||
{"label": "L14", "matrix": [1, 4], "x": 4, "y": 2.75},
|
||||
{"label": "L15", "matrix": [1, 5], "x": 12, "y": 2.75},
|
||||
{"label": "R10", "matrix": [5, 5], "x": 5, "y": 3},
|
||||
{"label": "R11", "matrix": [5, 4], "x": 11, "y": 3},
|
||||
{"label": "R12", "matrix": [5, 3], "x": 6.25, "y": 3.25},
|
||||
{"label": "R13", "matrix": [5, 2], "x": 9.75, "y": 3.25},
|
||||
{"label": "R14", "matrix": [5, 1], "x": -0.5, "y": -0.4500000000000002},
|
||||
{"label": "R15", "matrix": [5, 0], "x": -0.5, "y": -4.15},
|
||||
{"label": "L20", "matrix": [2, 0], "x": -0.5, "y": -6.15},
|
||||
{"label": "L21", "matrix": [2, 1], "x": -0.5, "y": -5.15},
|
||||
{"label": "L22", "matrix": [2, 2], "x": -0.5, "y": -4.15},
|
||||
{"label": "L23", "matrix": [2, 3], "x": -0.25, "y": -5.5},
|
||||
{"label": "L24", "matrix": [2, 4], "x": 0.75, "y": -4.7},
|
||||
{"label": "L25", "matrix": [2, 5], "x": -0.25, "y": -4.500000000000001},
|
||||
{"label": "L35", "matrix": [3, 5], "x": 0.75, "y": -3.7000000000000006},
|
||||
{"label": "R30", "matrix": [7, 5], "x": -0.25, "y": -3.5000000000000004},
|
||||
{"label": "R20", "matrix": [6, 5], "x": -0.5, "y": -7.200000000000001},
|
||||
{"label": "R21", "matrix": [6, 4], "x": -0.5, "y": -7.200000000000001},
|
||||
{"label": "R22", "matrix": [6, 3], "x": -0.5, "y": -7.200000000000001},
|
||||
{"label": "R23", "matrix": [6, 2], "x": -0.5, "y": -10.9},
|
||||
{"label": "R24", "matrix": [6, 1], "x": -0.5, "y": -10.9},
|
||||
{"label": "R25", "matrix": [6, 0], "x": -0.5, "y": -10.9},
|
||||
{"label": "L31", "matrix": [3, 1], "x": -1, "y": -12.250000000000002},
|
||||
{"label": "L32", "matrix": [3, 2], "x": -2, "y": -11.450000000000001},
|
||||
{"label": "L33", "matrix": [3, 3], "x": -1, "y": -11.250000000000002},
|
||||
{"label": "L34", "matrix": [3, 4], "x": -2, "y": -10.450000000000001},
|
||||
{"label": "R31", "matrix": [7, 4], "x": -1, "y": -10.250000000000002},
|
||||
{"label": "R32", "matrix": [7, 3], "x": -0.75, "y": -12.250000000000002},
|
||||
{"label": "R33", "matrix": [7, 2], "x": -0.75, "y": -11.250000000000002},
|
||||
{"label": "R34", "matrix": [7, 1], "x": -0.75, "y": -10.250000000000002}
|
||||
]
|
||||
},
|
||||
"LAYOUT_saegewerk": {
|
||||
"layout": [
|
||||
{"label": "L01", "matrix": [0, 1], "x": 2.25, "y": 0.25},
|
||||
{"label": "L02", "matrix": [0, 2], "x": 12.25, "y": 0.25},
|
||||
{"label": "L03", "matrix": [0, 3], "x": 3.25, "y": 0.75},
|
||||
{"label": "L04", "matrix": [0, 4], "x": 11.25, "y": 0.75},
|
||||
{"label": "L05", "matrix": [0, 5], "x": 4.25, "y": 1},
|
||||
{"label": "R00", "matrix": [4, 5], "x": 10.25, "y": 1},
|
||||
{"label": "R01", "matrix": [4, 4], "x": 2.25, "y": 1.25},
|
||||
{"label": "R02", "matrix": [4, 3], "x": 12.25, "y": 1.25},
|
||||
{"label": "R03", "matrix": [4, 2], "x": 3.25, "y": 1.75},
|
||||
{"label": "R04", "matrix": [4, 1], "x": 11.25, "y": 1.75},
|
||||
{"label": "L11", "matrix": [1, 1], "x": 4.25, "y": 2},
|
||||
{"label": "L12", "matrix": [1, 2], "x": 10.25, "y": 2},
|
||||
{"label": "L13", "matrix": [1, 3], "x": 2.25, "y": 2.25},
|
||||
{"label": "L14", "matrix": [1, 4], "x": 12.25, "y": 2.25},
|
||||
{"label": "L15", "matrix": [1, 5], "x": 3.25, "y": 2.75},
|
||||
{"label": "R10", "matrix": [5, 5], "x": 11.25, "y": 2.75},
|
||||
{"label": "R11", "matrix": [5, 4], "x": 4.25, "y": 3},
|
||||
{"label": "R12", "matrix": [5, 3], "x": 10.25, "y": 3},
|
||||
{"label": "R13", "matrix": [5, 2], "x": 5.5, "y": 3.25},
|
||||
{"label": "R14", "matrix": [5, 1], "x": 9, "y": 3.25},
|
||||
{"label": "L21", "matrix": [2, 1], "x": -0.5, "y": -0.4499999999999993},
|
||||
{"label": "L22", "matrix": [2, 2], "x": -0.5, "y": -4.149999999999999},
|
||||
{"label": "L23", "matrix": [2, 3], "x": -1.25, "y": -6.149999999999999},
|
||||
{"label": "L24", "matrix": [2, 4], "x": -1.25, "y": -5.149999999999999},
|
||||
{"label": "L25", "matrix": [2, 5], "x": -1.25, "y": -4.149999999999999},
|
||||
{"label": "L35", "matrix": [3, 5], "x": -1, "y": -5.499999999999999},
|
||||
{"label": "R30", "matrix": [7, 5], "x": -1, "y": -4.499999999999999},
|
||||
{"label": "R20", "matrix": [6, 5], "x": -1, "y": -3.4999999999999987},
|
||||
{"label": "R21", "matrix": [6, 4], "x": -0.5, "y": -7.199999999999998},
|
||||
{"label": "R22", "matrix": [6, 3], "x": -0.5, "y": -7.199999999999998},
|
||||
{"label": "R23", "matrix": [6, 2], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "R24", "matrix": [6, 1], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "L31", "matrix": [3, 1], "x": -1.75, "y": -12.249999999999998},
|
||||
{"label": "L32", "matrix": [3, 2], "x": -1.75, "y": -11.249999999999998},
|
||||
{"label": "L33", "matrix": [3, 3], "x": -1.75, "y": -10.249999999999998},
|
||||
{"label": "R32", "matrix": [7, 3], "x": -1.5, "y": -12.249999999999998},
|
||||
{"label": "R33", "matrix": [7, 2], "x": -1.5, "y": -11.249999999999998},
|
||||
{"label": "R34", "matrix": [7, 1], "x": -1.5, "y": -10.249999999999998}
|
||||
]
|
||||
},
|
||||
"LAYOUT_yubitsume": {
|
||||
"layout": [
|
||||
{"label": "L01", "matrix": [0, 1], "x": 2.25, "y": 0.25},
|
||||
{"label": "L02", "matrix": [0, 2], "x": 12.25, "y": 0.25},
|
||||
{"label": "L03", "matrix": [0, 3], "x": 3.25, "y": 0.75},
|
||||
{"label": "L04", "matrix": [0, 4], "x": 11.25, "y": 0.75},
|
||||
{"label": "L05", "matrix": [0, 5], "x": 4.25, "y": 1},
|
||||
{"label": "R00", "matrix": [4, 5], "x": 10.25, "y": 1},
|
||||
{"label": "R01", "matrix": [4, 4], "x": 2.25, "y": 1.25},
|
||||
{"label": "R02", "matrix": [4, 3], "x": 12.25, "y": 1.25},
|
||||
{"label": "R03", "matrix": [4, 2], "x": 3.25, "y": 1.75},
|
||||
{"label": "R04", "matrix": [4, 1], "x": 11.25, "y": 1.75},
|
||||
{"label": "L11", "matrix": [1, 1], "x": 4.25, "y": 2},
|
||||
{"label": "L12", "matrix": [1, 2], "x": 10.25, "y": 2},
|
||||
{"label": "L13", "matrix": [1, 3], "x": 2.25, "y": 2.25},
|
||||
{"label": "L14", "matrix": [1, 4], "x": 12.25, "y": 2.25},
|
||||
{"label": "L15", "matrix": [1, 5], "x": 3.25, "y": 2.75},
|
||||
{"label": "R10", "matrix": [5, 5], "x": 11.25, "y": 2.75},
|
||||
{"label": "R11", "matrix": [5, 4], "x": 4.25, "y": 3},
|
||||
{"label": "R12", "matrix": [5, 3], "x": 10.25, "y": 3},
|
||||
{"label": "R13", "matrix": [5, 2], "x": 5.5, "y": 3.25},
|
||||
{"label": "R14", "matrix": [5, 1], "x": 9, "y": 3.25},
|
||||
{"label": "L21", "matrix": [2, 1], "x": -0.5, "y": -0.4499999999999993},
|
||||
{"label": "L22", "matrix": [2, 2], "x": -0.5, "y": -4.149999999999999},
|
||||
{"label": "L23", "matrix": [2, 3], "x": -1.25, "y": -6.149999999999999},
|
||||
{"label": "L24", "matrix": [2, 4], "x": -1.25, "y": -5.149999999999999},
|
||||
{"label": "L25", "matrix": [2, 5], "x": -1.25, "y": -4.149999999999999},
|
||||
{"label": "L35", "matrix": [3, 5], "x": -1, "y": -5.499999999999999},
|
||||
{"label": "R30", "matrix": [7, 5], "x": -1, "y": -4.499999999999999},
|
||||
{"label": "R20", "matrix": [6, 5], "x": -1, "y": -3.4999999999999987},
|
||||
{"label": "R21", "matrix": [6, 4], "x": -0.5, "y": -7.199999999999998},
|
||||
{"label": "R22", "matrix": [6, 3], "x": -0.5, "y": -7.199999999999998},
|
||||
{"label": "R23", "matrix": [6, 2], "x": -0.5, "y": -7.199999999999999},
|
||||
{"label": "R24", "matrix": [6, 1], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "L31", "matrix": [3, 1], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "L32", "matrix": [3, 2], "x": -0.5, "y": -10.899999999999999},
|
||||
{"label": "L33", "matrix": [3, 3], "x": -1.75, "y": -12.25},
|
||||
{"label": "L34", "matrix": [3, 4], "x": -1.75, "y": -11.25},
|
||||
{"label": "R31", "matrix": [7, 4], "x": -1.75, "y": -10.25},
|
||||
{"label": "R32", "matrix": [7, 3], "x": -1.5, "y": -12.25},
|
||||
{"label": "R33", "matrix": [7, 2], "x": -1.5, "y": -11.25},
|
||||
{"label": "R34", "matrix": [7, 1], "x": -1.5, "y": -10.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
82
keyboards/klor/keymaps/default/config.h
Normal file
82
keyboards/klor/keymaps/default/config.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
#pragma once
|
||||
|
||||
/* The way how "handedness" is decided (which half is which),
|
||||
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
|
||||
for more options.
|
||||
*/
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
|
||||
//#define TAPPING_TERM 170
|
||||
#define TAPPING_TERM 170
|
||||
|
||||
|
||||
// Auto Shift
|
||||
#define NO_AUTO_SHIFT_ALPHA
|
||||
#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
|
||||
#define AUTO_SHIFT_NO_SETUP
|
||||
|
||||
#undef LOCKING_SUPPORT_ENABLE
|
||||
#undef LOCKING_RESYNC_ENABLE
|
||||
#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_MUSIC_MODE
|
||||
|
||||
//#define COMBO_COUNT 1
|
||||
|
||||
|
||||
// RGB matrix support
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effect
|
||||
|
||||
//# define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_COLOR
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
# define ENABLE_RGB_MATRIX_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
//# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
# define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
//# define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
//# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
# define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
# define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
//# define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
//# define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined ├─────────────────────────────┐
|
||||
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
//# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined ├────────────┐
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
//# define ENABLE_RGB_MATRIX_SPLASH
|
||||
# define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#endif
|
774
keyboards/klor/keymaps/default/keymap.c
Normal file
774
keyboards/klor/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,774 @@
|
|||
/*
|
||||
|
||||
█ █ █ ▄▄▄▀▀▀▀▀▀▄▄▄ █▀▀▀▀▀▀▀▀▀▀█
|
||||
█ █ █ ▄▀ ▀▄ █ █
|
||||
█ █ █ ▄▀ ▀▄ █ █
|
||||
█ █ █ █ █ █ █
|
||||
█ █ █ █ █ █ █
|
||||
█ █ █ █ █ █▄▄▄▄▄▄▄▄▄▄█
|
||||
█ █ █ █ █ █ █ █
|
||||
█ █ █ █ █ █ █ █
|
||||
█ █ █ █ ▀▄ ▄▀ █ █
|
||||
██ █ █ ▀▄ ▄▀ █ █
|
||||
█ █ █▄▄▄▄▄▄▄▄ ▀▀▀▄▄▄▄▄▄▀▀▀ █ █
|
||||
|
||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
||||
D E F A U L T
|
||||
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "klor.h"
|
||||
|
||||
// this should be handled by common_rules.mk but the code doesn't work without it
|
||||
#ifdef HAPTIC_ENABLE
|
||||
#include "drivers/haptic/drv2605l.h"
|
||||
#endif //HAPTIC ENABLE
|
||||
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ D E F I N I T I O N S │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e l a y e r s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
enum klor_layers {
|
||||
/* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e k e y c o d e s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
OS_SWAP,
|
||||
MAKE_H,
|
||||
};
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e m a c r o n a m e s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
// LEFT HAND HOME ROW MODS ├───────────────────────────────────┐
|
||||
|
||||
#define GUI_A MT(MOD_LGUI, KC_A)
|
||||
#define ALT_R MT(MOD_LALT, KC_R)
|
||||
#define CTL_S MT(MOD_LCTL, KC_S)
|
||||
#define SHT_T MT(MOD_LSFT, KC_T)
|
||||
|
||||
// RIGHT HAND HOME ROW MODS ├───────────────────────────────────┐
|
||||
|
||||
#define SHT_N MT(MOD_RSFT, KC_N)
|
||||
#define CTL_E MT(MOD_LCTL, KC_E)
|
||||
#define ALT_I MT(MOD_LALT, KC_I)
|
||||
#define GUI_O MT(MOD_LGUI, KC_O)
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e s o u n d s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define WINXP_SOUND W__NOTE(_DS6), Q__NOTE(_DS5), H__NOTE(_AS5), H__NOTE(_GS5), H__NOTE(_DS5), H__NOTE(_DS6), H__NOTE(_AS5)
|
||||
#define MAC_SOUND S__NOTE(_CS5), B__NOTE(_C5)
|
||||
|
||||
float winxp_song[][2] = SONG(WINXP_SOUND);
|
||||
float mac_song[][2] = SONG(MAC_SOUND);
|
||||
#endif // AUDIO_ENABLE
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ K E Y M A P S │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ q w e r t y │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ Q │ W │ E │ R │ T │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ Y │ U │ I │ O │ P │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ TAB │ A │ S │ D │ F │ G ├─╯ ╰─┤ H │ J │ K │ L │ ; │ " │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ DEL │ Z │ X │ C │ V │ B ││ MUTE ││PLY/PSE ││ N │ M │ , │ . │ / │ SHIFT │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ CTRL │ LOWER │ SPACE │ ALT ││ CMD/WIN │ ENTER │ RAISE │ BSPACE │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_QWERTY] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_DEL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MPLY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, LOWER, KC_SPC, KC_LALT, KC_LGUI, KC_ENT, RAISE, KC_BSPC
|
||||
),
|
||||
|
||||
/*
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ c o l e m a k │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ Q │ W │ F │ P │ G │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ J │ L │ U │ Y │ ; │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ TAB │ A │ R │ S │ T │ D ├─╯ ╰─┤ H │ N │ E │ I │ O │ " │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ DEL │ Z │ X │ C │ V │ B ││ SHIFT ││PLY/PSE ││ K │ M │ , │ . │ / │ SHIFT │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ CTRL │ LOWER │ SPACE │ ALT ││ CMD/WIN │ ENTER │ RAISE │ BSPCE │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_COLEMAK] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
|
||||
KC_TAB, GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O, KC_QUOT,
|
||||
KC_Q, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_MPLY, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
|
||||
KC_DEL, LOWER, KC_SPC, KC_ESC, KC_LGUI, KC_ENT, RAISE, KC_BSPC
|
||||
),
|
||||
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ l o w e r │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ CAPSLCK │ NUMLCK │ ↑ │ = │ { │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ } │ 7 │ 8 │ 9 │ + │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ ESC │ HOME │ ← │ ↓ │ → │ [ ├─╯ ╰─┤ ] │ 4 │ 5 │ 6 │ - │ ' │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ END │ PG↑ │ SAVE │ PG↓ │ ( ││ MUTE ││PLY/PSE ││ ) │ 1 │ 2 │ 3 │ * │ ▼ │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ ▼ │ ▼ │ ▼ │ ▼ ││ ▼ │ ▼ │ ADJUST │ 0 │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_LOWER] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_CAPS, KC_NUM, KC_UP, KC_EQL, KC_LCBR, KC_RCBR, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_ESC, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_MINS, KC_DQT,
|
||||
XXXXXXX, KC_END, KC_PGUP, C(KC_S), KC_PGDN, KC_LPRN, KC_MUTE, KC_MPLY, KC_RPRN, KC_P1, KC_P2, KC_P3, KC_PAST, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_P0
|
||||
),
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ r a i s e │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ ! │ @ │ # │ $ │ % │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ ^ │ & │ │ ° │ / │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ │ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ │ ││ MUTE ││PLY/PSE ││ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ │ ADJUST │ ▼ │ ▼ ││ ▼ │ ▼ │ ▼ │ ▼ │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_RAISE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, RALT(KC_U),RALT(KC_3),KC_BSLS,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ a d j u s t │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ AUDIO │ HAPTIC │ RGB HUE │ RGB MOD │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ F7 │ F8 │ F9 │ F14 │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ RESET │ DEBUG │ QWERTY │ RGB SAT │ │ ├─╯ ╰─┤ │ F4 │ F5 │ F6 │ F12 │ F13 │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ MAKE │ OS SWAP │ COLEMAK │ RGB VAL │ │ ││ MUTE ││PLY/PSE ││ │ F1 │ F2 │ F3 │ F10 │ F11 │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ ▼ │ ▼ │ ▼ │ ▼ ││ ▼ │ ▼ │ ▼ │ ▼ │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_ADJUST] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
AU_TOGG, HF_TOGG, RGB_HUI, RGB_MOD, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F14,
|
||||
QK_BOOT, DB_TOGG, QWERTY, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F12, KC_F13,
|
||||
QK_MAKE, OS_SWAP, COLEMAK, RGB_VAI, XXXXXXX, XXXXXXX, KC_MUTE, KC_MPLY, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F10, KC_F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e p o l y d a c t y l │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ │ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ │ ││ ││ ││ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ │ │ │ ││ │ │ │ │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e k o n r a d │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ │ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ │ ││ ││ ││ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ │ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌─────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e y u b i t s u m e │
|
||||
└─────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ││ ││ ││ │ │ │ │ │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ │ │ │ ││ │ │ │ │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌─────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e s a e g e w e r k │
|
||||
└─────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ││ ││ ││ │ │ │ │ │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ │ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ H A P T I C F E E D B A C K │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Call the post init code.
|
||||
#if HAPTIC_ENABLE
|
||||
haptic_disable(); // disables per key haptic feedback by default
|
||||
#endif //HAPTIC ENABLE
|
||||
}
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ O L E D │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d y n a m i c m a c r o │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
char layer_state_str[24];
|
||||
char o_text[24] = "";
|
||||
int dmacro_num = 0;
|
||||
|
||||
#ifdef DYNAMIC_MACRO_ENABLE
|
||||
char dmacro_text[4][24] = { "", "RECORDING", "STOP RECORDING", "PLAY RECORDING"};
|
||||
static uint16_t dmacro_timer;
|
||||
const char PROGMEM rec_ico[] = {0xD1, 0xE1, 0};
|
||||
const char PROGMEM stop_ico[] = {0xD3, 0xE1, 0};
|
||||
const char PROGMEM play_ico[] = {0xD2, 0xE1, 0};
|
||||
|
||||
|
||||
// DYNMACRO RECORD ├─────────────────────────────────────────────────────────────┐
|
||||
void dynamic_macro_record_start_user(void) {
|
||||
dmacro_num = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
// DYNMACRO STOP RECORDING ├─────────────────────────────────────────────────────┐
|
||||
void dynamic_macro_record_end_user(int8_t direction) {
|
||||
dmacro_num = 2;
|
||||
dmacro_timer = timer_read();
|
||||
return;
|
||||
}
|
||||
|
||||
// DYNMACRO PLAY RECORDING ├─────────────────────────────────────────────────────┐
|
||||
void dynamic_macro_play_user(int8_t direction) {
|
||||
dmacro_num = 3;
|
||||
dmacro_timer = timer_read();
|
||||
return;
|
||||
}
|
||||
#endif //DYNAMIC_MACRO_ENABLE
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef DYNAMIC_MACRO_ENABLE
|
||||
// DynMacroTimer
|
||||
if(dmacro_num > 0){
|
||||
if (timer_elapsed(dmacro_timer) < 3000) {
|
||||
strcpy ( o_text, dmacro_text[dmacro_num] );
|
||||
}
|
||||
else {
|
||||
if (dmacro_num == 1) {
|
||||
strcpy ( o_text, dmacro_text[1] );
|
||||
}
|
||||
else {
|
||||
strcpy ( o_text, layer_state_str );
|
||||
dmacro_num = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //DYNAMIC_MACRO_ENABLE
|
||||
}
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ o l e d g r a p h i c s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
void render_os_lock_status(void) {
|
||||
static const char PROGMEM sep_v[] = {0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0};
|
||||
static const char PROGMEM sep_h1[] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0};
|
||||
static const char PROGMEM sep_h2[] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0};
|
||||
static const char PROGMEM face_1[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xE1, 0};
|
||||
static const char PROGMEM face_2[] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xE1, 0};
|
||||
static const char PROGMEM os_m_1[] = {0x95, 0x96, 0};
|
||||
static const char PROGMEM os_m_2[] = {0xB5, 0xB6, 0};
|
||||
static const char PROGMEM os_w_1[] = {0x97, 0x98, 0};
|
||||
static const char PROGMEM os_w_2[] = {0xB7, 0xB8, 0};
|
||||
static const char PROGMEM s_lock[] = {0x8F, 0x90, 0};
|
||||
static const char PROGMEM n_lock[] = {0x91, 0x92, 0};
|
||||
static const char PROGMEM c_lock[] = {0x93, 0x94, 0};
|
||||
static const char PROGMEM b_lock[] = {0xE1, 0xE1, 0};
|
||||
#ifdef AUDIO_ENABLE
|
||||
static const char PROGMEM aud_en[] = {0xAF, 0xB0, 0};
|
||||
static const char PROGMEM aud_di[] = {0xCF, 0xD0, 0};
|
||||
#endif
|
||||
#ifdef HAPTIC_ENABLE
|
||||
static const char PROGMEM hap_en[] = {0xB1, 0xB2, 0};
|
||||
#endif
|
||||
|
||||
// os mode status ────────────────────────────────────────┐
|
||||
|
||||
oled_write_ln_P(sep_v, false);
|
||||
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(os_m_1, false); // ──── MAC
|
||||
} else {
|
||||
oled_write_P(os_w_1, false); // ──── WIN
|
||||
}
|
||||
|
||||
oled_write_P(sep_h1, false);
|
||||
oled_write_P(face_1, false);
|
||||
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(os_m_2, false); // ──── MAC
|
||||
} else {
|
||||
oled_write_P(os_w_2, false); // ──── WIN
|
||||
}
|
||||
|
||||
oled_write_P(sep_h1, false);
|
||||
oled_write_P(face_2, false);
|
||||
oled_write_ln_P(sep_v, false);
|
||||
|
||||
|
||||
// lock key layer status ─────────────────────────────────┐
|
||||
|
||||
led_t led_usb_state = host_keyboard_led_state();
|
||||
|
||||
if (led_usb_state.num_lock) {
|
||||
oled_write_P(n_lock, false); // ──── NUMLOCK
|
||||
} else {
|
||||
oled_write_P(b_lock, false);
|
||||
}
|
||||
if (led_usb_state.caps_lock) {
|
||||
oled_write_P(c_lock, false); // ─── CAPSLOCK
|
||||
} else {
|
||||
oled_write_P(b_lock, false);
|
||||
}
|
||||
if (led_usb_state.scroll_lock) { // ─ SCROLLLOCK
|
||||
oled_write_P(s_lock, false);
|
||||
} else {
|
||||
oled_write_P(b_lock, false);
|
||||
}
|
||||
|
||||
// hardware feature status ──────────────────────────────┐
|
||||
|
||||
oled_write_P(sep_h2, false);
|
||||
|
||||
#ifndef AUDIO_ENABLE
|
||||
oled_write_P(b_lock, false);
|
||||
#endif
|
||||
#ifndef HAPTIC_ENABLE
|
||||
oled_write_P(b_lock, false);
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE // ────────────────── AUDIO
|
||||
if (is_audio_on()) {
|
||||
oled_write_P(aud_en, false);
|
||||
} else {
|
||||
oled_write_P(aud_di, false);
|
||||
}
|
||||
#endif // AUDIO ENABLE
|
||||
|
||||
#ifdef HAPTIC_ENABLE // ─────────────── HAPTIC
|
||||
oled_write_P(hap_en, false);
|
||||
#endif // HAPTIC ENABLE
|
||||
}
|
||||
|
||||
|
||||
// layer status ──────────────────────────────────────────┐
|
||||
|
||||
int layerstate = 0;
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
switch (get_highest_layer(layer_state | default_layer_state)) {
|
||||
case 0:
|
||||
strcpy ( layer_state_str, "BASE COLEMAK");
|
||||
break;
|
||||
case 1:
|
||||
strcpy ( layer_state_str, "BASE QWERTY");
|
||||
break;
|
||||
case 2:
|
||||
strcpy ( layer_state_str, "LOWER");
|
||||
break;
|
||||
case 3:
|
||||
strcpy ( layer_state_str, "RAISE");
|
||||
break;
|
||||
case 4:
|
||||
strcpy ( layer_state_str, "ADJUST");
|
||||
break;
|
||||
default:
|
||||
strcpy ( layer_state_str, "XXXXXX");
|
||||
}
|
||||
if (dmacro_num < 1) {
|
||||
strcpy ( o_text, layer_state_str );
|
||||
}
|
||||
//return state;
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ w r i t e t o o l e d │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
if (is_keyboard_master()) { // ────────────────────────── PRIMARY SIDE
|
||||
|
||||
// layer status ──────────────────────────────────────────────────┐
|
||||
#ifdef DYNAMIC_MACRO_ENABLE
|
||||
if(dmacro_num == 1){ oled_write_P(rec_ico, false); }
|
||||
if(dmacro_num == 2){ oled_write_P(stop_ico, false); }
|
||||
if(dmacro_num == 3){ oled_write_P(play_ico, false); }
|
||||
#endif //DYNAMIC_MACRO_ENABLE
|
||||
|
||||
oled_write_ln(o_text, false);
|
||||
render_os_lock_status();
|
||||
|
||||
} else { // ─────────────────────────────────────────── SECONDARY SIDE
|
||||
|
||||
// KLOR face ─────────────────────────────────────────────────────┐
|
||||
|
||||
static const char PROGMEM klor_face[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
oled_write_raw_P(klor_face, sizeof(klor_face));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
|
||||
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SHT_T:
|
||||
return TAPPING_TERM - 150;
|
||||
case SHT_N:
|
||||
return TAPPING_TERM - 150;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ M A C R O S │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
case OS_SWAP:
|
||||
if (record->event.pressed) {
|
||||
if (!keymap_config.swap_lctl_lgui) {
|
||||
keymap_config.swap_lctl_lgui = true; // ─── MAC
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(mac_song);
|
||||
#endif // AUDIO_ENABLE
|
||||
}
|
||||
else {
|
||||
keymap_config.swap_lctl_lgui = false; // ─── WIN
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(winxp_song);
|
||||
#endif // AUDIO_ENABLE
|
||||
}
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_PULSING_STRONG_1_100);
|
||||
#endif // HAPTIC_ENABLE
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
clear_keyboard(); // ──── clear to prevent stuck keys
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ l a y e r │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_TRANSITION_HUM_1_100);
|
||||
#endif // HAPTIC_ENABLE
|
||||
}
|
||||
return false;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_TRANSITION_HUM_1_100);
|
||||
#endif // HAPTIC_ENABLE
|
||||
}
|
||||
return false;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ q m k │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
case MAKE_H:
|
||||
if (record->event.pressed) {
|
||||
#ifdef KEYBOARD_klor_kb2040
|
||||
SEND_STRING ("qmk compile -kb klor/2040 -km default");
|
||||
#else
|
||||
SEND_STRING ("qmk compile -kb klor -km default");
|
||||
#endif
|
||||
tap_code(KC_ENTER);
|
||||
}
|
||||
break;
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ p r o d u c t i v i t y │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
case KC_MPLY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_SHARP_CLICK_100);
|
||||
#endif // HAPTIC_ENABL
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ E N C O D E R │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ e n c o d e r L │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ e n c o d e r R │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
} else if (index == 1) {
|
||||
if(IS_LAYER_ON(_LOWER)){
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
}else {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // ENCODER_ENABLE
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
▐█ ▟▛ ▐█ ▄▆▀▀▀▀▀▀▆▄ ▐█▀▀▀▀▀█▌
|
||||
▐█ ▟▛ ▐█ ▟▛ ▜▙ ▐█ █▌
|
||||
▐█ ▟▛ ▐█ ▐█ █▋▐█ █▌
|
||||
▐█ ▟█▙ ▐█ ▐█ █▋▐█▀▀▜█▀▀▘
|
||||
▐█▟▛ ▜▙ ▐█ ▜▙ ▟▛ ▐█ ▜▙
|
||||
▐█▛ ▜▙ ▐█▄▄▄▄ ▀▜▆▄▄▄▄▆▛▀ ▐█ ▜▙
|
||||
|
||||
▄██████████████▄
|
||||
████████████████
|
||||
▄██████▀ ▀████▀ ▀██████▄
|
||||
███████▄ ▄████▄ ▄███████
|
||||
███████████▀▀▀▀███████████
|
||||
▀█████████▀ ▄▄ ▀█████████▀
|
||||
████▀ ▄██▄ ▀████
|
||||
████▄▄████▄▄████
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
14
keyboards/klor/keymaps/default/rules.mk
Normal file
14
keyboards/klor/keymaps/default/rules.mk
Normal file
|
@ -0,0 +1,14 @@
|
|||
EXTRAKEY_ENABLE = yes
|
||||
|
||||
DYNAMIC_MACRO_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
KEY_OVERRIDE_ENABLE = no
|
||||
|
||||
# These features will be disabled in post_rules.mk if using an AVR MCU
|
||||
AUDIO_ENABLE = yes
|
||||
MUSIC_ENABLE = yes
|
||||
HAPTIC_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no
|
||||
|
||||
# Choose your layout
|
||||
KLOR_CONFIG = polydactyl
|
82
keyboards/klor/keymaps/saegewerk/config.h
Normal file
82
keyboards/klor/keymaps/saegewerk/config.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
#pragma once
|
||||
|
||||
/* The way how "handedness" is decided (which half is which),
|
||||
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
|
||||
for more options.
|
||||
*/
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
|
||||
//#define TAPPING_TERM 170
|
||||
#define TAPPING_TERM 170
|
||||
|
||||
|
||||
// Auto Shift
|
||||
#define NO_AUTO_SHIFT_ALPHA
|
||||
#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
|
||||
#define AUTO_SHIFT_NO_SETUP
|
||||
|
||||
#undef LOCKING_SUPPORT_ENABLE
|
||||
#undef LOCKING_RESYNC_ENABLE
|
||||
#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_MUSIC_MODE
|
||||
|
||||
//#define COMBO_COUNT 1
|
||||
|
||||
|
||||
// RGB matrix support
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effect
|
||||
|
||||
//# define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_COLOR
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
# define ENABLE_RGB_MATRIX_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
//# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
# define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
//# define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
//# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
# define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
# define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
//# define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
//# define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined ├─────────────────────────────┐
|
||||
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
//# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined ├────────────┐
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
//# define ENABLE_RGB_MATRIX_SPLASH
|
||||
# define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
//# define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#endif
|
774
keyboards/klor/keymaps/saegewerk/keymap.c
Normal file
774
keyboards/klor/keymaps/saegewerk/keymap.c
Normal file
|
@ -0,0 +1,774 @@
|
|||
/*
|
||||
|
||||
█ █ █ ▄▄▄▀▀▀▀▀▀▄▄▄ █▀▀▀▀▀▀▀▀▀▀█
|
||||
█ █ █ ▄▀ ▀▄ █ █
|
||||
█ █ █ ▄▀ ▀▄ █ █
|
||||
█ █ █ █ █ █ █
|
||||
█ █ █ █ █ █ █
|
||||
█ █ █ █ █ █▄▄▄▄▄▄▄▄▄▄█
|
||||
█ █ █ █ █ █ █ █
|
||||
█ █ █ █ █ █ █ █
|
||||
█ █ █ █ ▀▄ ▄▀ █ █
|
||||
██ █ █ ▀▄ ▄▀ █ █
|
||||
█ █ █▄▄▄▄▄▄▄▄ ▀▀▀▄▄▄▄▄▄▀▀▀ █ █
|
||||
|
||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
||||
D E F A U L T
|
||||
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "klor.h"
|
||||
|
||||
// this should be handled by common_rules.mk but the code doesn't work without it
|
||||
#ifdef HAPTIC_ENABLE
|
||||
#include "drivers/haptic/drv2605l.h"
|
||||
#endif //HAPTIC ENABLE
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ D E F I N I T I O N S │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e l a y e r s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
enum klor_layers {
|
||||
/* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e k e y c o d e s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
OS_SWAP,
|
||||
MAKE_H,
|
||||
};
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e m a c r o n a m e s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
// LEFT HAND HOME ROW MODS ├───────────────────────────────────┐
|
||||
|
||||
#define GUI_A MT(MOD_LGUI, KC_A)
|
||||
#define ALT_R MT(MOD_LALT, KC_R)
|
||||
#define CTL_S MT(MOD_LCTL, KC_S)
|
||||
#define SHT_T MT(MOD_LSFT, KC_T)
|
||||
|
||||
// RIGHT HAND HOME ROW MODS ├───────────────────────────────────┐
|
||||
|
||||
#define SHT_N MT(MOD_RSFT, KC_N)
|
||||
#define CTL_E MT(MOD_LCTL, KC_E)
|
||||
#define ALT_I MT(MOD_LALT, KC_I)
|
||||
#define GUI_O MT(MOD_LGUI, KC_O)
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d e f i n e s o u n d s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define WINXP_SOUND W__NOTE(_DS6), Q__NOTE(_DS5), H__NOTE(_AS5), H__NOTE(_GS5), H__NOTE(_DS5), H__NOTE(_DS6), H__NOTE(_AS5)
|
||||
#define MAC_SOUND S__NOTE(_CS5), B__NOTE(_C5)
|
||||
|
||||
float winxp_song[][2] = SONG(WINXP_SOUND);
|
||||
float mac_song[][2] = SONG(MAC_SOUND);
|
||||
#endif // AUDIO_ENABLE
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ K E Y M A P S │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ q w e r t y │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ Q │ W │ E │ R │ T │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ Y │ U │ I │ O │ P │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ A │ S │ D │ F │ G ├─╯ ╰─┤ H │ J │ K │ L │ ; │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ Z │ X │ C │ V │ B ││ MUTE ││PLY/PSE ││ N │ M │ , │ . │ / │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ CTRL │ LOWER │ SPACE │ │ ENTER │ RAISE │ BSPACE │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_QWERTY] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MPLY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
|
||||
),
|
||||
|
||||
/*
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ c o l e m a k │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ Q │ W │ F │ P │ G │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ J │ L │ U │ Y │ ; │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ A │ R │ S │ T │ D ├─╯ ╰─┤ H │ N │ E │ I │ O │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ Z │ X │ C │ V │ B ││ SHIFT ││PLY/PSE ││ K │ M │ , │ . │ / │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ CTRL │ LOWER │ SPACE │ │ ENTER │ RAISE │ BSPCE │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_COLEMAK] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
|
||||
GUI_A, ALT_R, CTL_S, SHT_T, KC_D, KC_H, SHT_N, CTL_E, ALT_I, GUI_O,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_MPLY, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
KC_DEL, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC
|
||||
),
|
||||
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ l o w e r │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ CAPSLCK │ NUMLCK │ ↑ │ = │ { │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ } │ 7 │ 8 │ 9 │ + │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ HOME │ ← │ ↓ │ → │ [ ├─╯ ╰─┤ ] │ 4 │ 5 │ 6 │ - │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ END │ PG↑ │ SAVE │ PG↓ │ ( ││ MUTE ││PLY/PSE ││ ) │ 1 │ 2 │ 3 │ * │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ ▼ │ ▼ │ ▼ │ │ ▼ │ ADJUST │ 0 │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_LOWER] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_CAPS, KC_NUM, KC_UP, KC_EQL, KC_LCBR, KC_RCBR, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_MINS,
|
||||
KC_END, KC_PGUP, C(KC_S), KC_PGDN, KC_LPRN, KC_MUTE, KC_MPLY, KC_RPRN, KC_P1, KC_P2, KC_P3, KC_PAST,
|
||||
_______, _______, _______, _______, _______, KC_P0
|
||||
),
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ r a i s e │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ ! │ @ │ # │ $ │ % │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ ^ │ & │ │ ° │ / │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ ESC │ │ ALT │ TAB │ DEL ││ MUTE ││PLY/PSE ││ " │ SHIFT │ CMD/WIN │ │ │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ │ ADJUST │ ▼ │ │ ▼ │ ▼ │ ▼ │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_RAISE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, RALT(KC_U),RALT(KC_3),KC_BSLS,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_ESC, XXXXXXX, KC_LALT, KC_TAB, KC_DEL, KC_MUTE, KC_MPLY, KC_QUOT, KC_RSFT, KC_LGUI, XXXXXXX, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ a d j u s t │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ AUDIO │ HAPTIC │ RGB HUE │ RGB MOD │ RESET │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ F7 │ F8 │ F9 │ F11 │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ DEBUG │ QWERTY │ RGB SAT │ │ MAKE ├─╯ ╰─┤ │ F4 │ F5 │ F6 │ F12 │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ OS SWAP │ COLEMAK │ RGB VAL │ │ ││ MUTE ││PLY/PSE ││ │ F1 │ F2 │ F3 │ F10 │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ ▼ │ ▼ │ ▼ │ │ ▼ │ ▼ │ ▼ │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘ */
|
||||
|
||||
[_ADJUST] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
AU_TOGG, HF_TOGG, RGB_HUI, RGB_MOD, QK_BOOT, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F11,
|
||||
DB_TOGG, QWERTY, RGB_SAI, XXXXXXX, QK_MAKE, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F12,
|
||||
OS_SWAP, COLEMAK, RGB_VAI, XXXXXXX, XXXXXXX, KC_MUTE, KC_MPLY, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F10,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
/*
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e p o l y d a c t y l │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ │ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ │ ││ ││ ││ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ │ │ │ ││ │ │ │ │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌───────────────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e k o n r a d │
|
||||
└───────────────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐
|
||||
│ │ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ │ ││ ││ ││ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┴─────────┘
|
||||
│ │ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌─────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e y u b i t s u m e │
|
||||
└─────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ││ ││ ││ │ │ │ │ │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┼╰────────╯╰────────╯┼─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ │ │ │ ││ │ │ │ │
|
||||
└─────────┴─────────┴─────────┴─────────┘└─────────┴─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
|
||||
|
||||
┌─────────────────────────────────────────────────┐
|
||||
│ t e m p l a t e s a e g e w e r k │
|
||||
└─────────────────────────────────────────────────┘
|
||||
┌─────────┬─────────┬─────────┬─────────┬─────────┐ ┌─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ │ │ │ │ │ ╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮╭╮ │ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤ │╰╯╰╯╰╯╰╯╰╯╰╯╰╯╰╯│ ├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ├─╯ ╰─┤ │ │ │ │ │
|
||||
├─────────┼─────────┼─────────┼─────────┼─────────┤╭────────╮╭────────╮├─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ │ │ │ │ ││ ││ ││ │ │ │ │ │
|
||||
└─────────┴─────────┼─────────┼─────────┼─────────┤╰────────╯╰────────╯├─────────┼─────────┼─────────┼─────────┴─────────┘
|
||||
│ │ │ │ │ │ │ │
|
||||
└─────────┴─────────┴─────────┘ └─────────┴─────────┴─────────┘
|
||||
|
||||
[_TEMPLATE] = KLOR_LAYOUT(
|
||||
//╷ ╷ ╷ ╷ ╷ ╷ ╷╷ ╷ ╷ ╷ ╷ ╷ ╷
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ H A P T I C F E E D B A C K │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Call the post init code.
|
||||
#if HAPTIC_ENABLE
|
||||
haptic_disable(); // disables per key haptic feedback by default
|
||||
#endif //HAPTIC ENABLE
|
||||
}
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ O L E D │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ d y n a m i c m a c r o │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
char layer_state_str[24];
|
||||
char o_text[24] = "";
|
||||
int dmacro_num = 0;
|
||||
|
||||
#ifdef DYNAMIC_MACRO_ENABLE
|
||||
char dmacro_text[4][24] = { "", "RECORDING", "STOP RECORDING", "PLAY RECORDING"};
|
||||
static uint16_t dmacro_timer;
|
||||
const char PROGMEM rec_ico[] = {0xD1, 0xE1, 0};
|
||||
const char PROGMEM stop_ico[] = {0xD3, 0xE1, 0};
|
||||
const char PROGMEM play_ico[] = {0xD2, 0xE1, 0};
|
||||
|
||||
|
||||
// DYNMACRO RECORD ├─────────────────────────────────────────────────────────────┐
|
||||
void dynamic_macro_record_start_user(void) {
|
||||
dmacro_num = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
// DYNMACRO STOP RECORDING ├─────────────────────────────────────────────────────┐
|
||||
void dynamic_macro_record_end_user(int8_t direction) {
|
||||
dmacro_num = 2;
|
||||
dmacro_timer = timer_read();
|
||||
return;
|
||||
}
|
||||
|
||||
// DYNMACRO PLAY RECORDING ├─────────────────────────────────────────────────────┐
|
||||
void dynamic_macro_play_user(int8_t direction) {
|
||||
dmacro_num = 3;
|
||||
dmacro_timer = timer_read();
|
||||
return;
|
||||
}
|
||||
#endif //DYNAMIC_MACRO_ENABLE
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef DYNAMIC_MACRO_ENABLE
|
||||
// DynMacroTimer
|
||||
if(dmacro_num > 0){
|
||||
if (timer_elapsed(dmacro_timer) < 3000) {
|
||||
strcpy ( o_text, dmacro_text[dmacro_num] );
|
||||
}
|
||||
else {
|
||||
if (dmacro_num == 1) {
|
||||
strcpy ( o_text, dmacro_text[1] );
|
||||
}
|
||||
else {
|
||||
strcpy ( o_text, layer_state_str );
|
||||
dmacro_num = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //DYNAMIC_MACRO_ENABLE
|
||||
}
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ o l e d g r a p h i c s │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
void render_os_lock_status(void) {
|
||||
static const char PROGMEM sep_v[] = {0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0};
|
||||
static const char PROGMEM sep_h1[] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0};
|
||||
static const char PROGMEM sep_h2[] = {0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0};
|
||||
static const char PROGMEM face_1[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xE1, 0};
|
||||
static const char PROGMEM face_2[] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xE1, 0};
|
||||
static const char PROGMEM os_m_1[] = {0x95, 0x96, 0};
|
||||
static const char PROGMEM os_m_2[] = {0xB5, 0xB6, 0};
|
||||
static const char PROGMEM os_w_1[] = {0x97, 0x98, 0};
|
||||
static const char PROGMEM os_w_2[] = {0xB7, 0xB8, 0};
|
||||
static const char PROGMEM s_lock[] = {0x8F, 0x90, 0};
|
||||
static const char PROGMEM n_lock[] = {0x91, 0x92, 0};
|
||||
static const char PROGMEM c_lock[] = {0x93, 0x94, 0};
|
||||
static const char PROGMEM b_lock[] = {0xE1, 0xE1, 0};
|
||||
#ifdef AUDIO_ENABLE
|
||||
static const char PROGMEM aud_en[] = {0xAF, 0xB0, 0};
|
||||
static const char PROGMEM aud_di[] = {0xCF, 0xD0, 0};
|
||||
#endif
|
||||
#ifdef HAPTIC_ENABLE
|
||||
static const char PROGMEM hap_en[] = {0xB1, 0xB2, 0};
|
||||
#endif
|
||||
|
||||
// os mode status ────────────────────────────────────────┐
|
||||
|
||||
oled_write_ln_P(sep_v, false);
|
||||
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(os_m_1, false); // ──── MAC
|
||||
} else {
|
||||
oled_write_P(os_w_1, false); // ──── WIN
|
||||
}
|
||||
|
||||
oled_write_P(sep_h1, false);
|
||||
oled_write_P(face_1, false);
|
||||
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(os_m_2, false); // ──── MAC
|
||||
} else {
|
||||
oled_write_P(os_w_2, false); // ──── WIN
|
||||
}
|
||||
|
||||
oled_write_P(sep_h1, false);
|
||||
oled_write_P(face_2, false);
|
||||
oled_write_ln_P(sep_v, false);
|
||||
|
||||
|
||||
// lock key layer status ─────────────────────────────────┐
|
||||
|
||||
led_t led_usb_state = host_keyboard_led_state();
|
||||
|
||||
if (led_usb_state.num_lock) {
|
||||
oled_write_P(n_lock, false); // ──── NUMLOCK
|
||||
} else {
|
||||
oled_write_P(b_lock, false);
|
||||
}
|
||||
if (led_usb_state.caps_lock) {
|
||||
oled_write_P(c_lock, false); // ─── CAPSLOCK
|
||||
} else {
|
||||
oled_write_P(b_lock, false);
|
||||
}
|
||||
if (led_usb_state.scroll_lock) { // ─ SCROLLLOCK
|
||||
oled_write_P(s_lock, false);
|
||||
} else {
|
||||
oled_write_P(b_lock, false);
|
||||
}
|
||||
|
||||
// hardware feature status ──────────────────────────────┐
|
||||
|
||||
oled_write_P(sep_h2, false);
|
||||
|
||||
#ifndef AUDIO_ENABLE
|
||||
oled_write_P(b_lock, false);
|
||||
#endif
|
||||
#ifndef HAPTIC_ENABLE
|
||||
oled_write_P(b_lock, false);
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE // ────────────────── AUDIO
|
||||
if (is_audio_on()) {
|
||||
oled_write_P(aud_en, false);
|
||||
} else {
|
||||
oled_write_P(aud_di, false);
|
||||
}
|
||||
#endif // AUDIO ENABLE
|
||||
|
||||
#ifdef HAPTIC_ENABLE // ─────────────── HAPTIC
|
||||
oled_write_P(hap_en, false);
|
||||
#endif // HAPTIC ENABLE
|
||||
}
|
||||
|
||||
|
||||
// layer status ──────────────────────────────────────────┐
|
||||
|
||||
int layerstate = 0;
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
switch (get_highest_layer(layer_state | default_layer_state)) {
|
||||
case 0:
|
||||
strcpy ( layer_state_str, "BASE COLEMAK");
|
||||
break;
|
||||
case 1:
|
||||
strcpy ( layer_state_str, "BASE QWERTY");
|
||||
break;
|
||||
case 2:
|
||||
strcpy ( layer_state_str, "LOWER");
|
||||
break;
|
||||
case 3:
|
||||
strcpy ( layer_state_str, "RAISE");
|
||||
break;
|
||||
case 4:
|
||||
strcpy ( layer_state_str, "ADJUST");
|
||||
break;
|
||||
default:
|
||||
strcpy ( layer_state_str, "XXXXXX");
|
||||
}
|
||||
if (dmacro_num < 1) {
|
||||
strcpy ( o_text, layer_state_str );
|
||||
}
|
||||
//return state;
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ w r i t e t o o l e d │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
if (is_keyboard_master()) { // ────────────────────────── PRIMARY SIDE
|
||||
|
||||
// layer status ──────────────────────────────────────────────────┐
|
||||
#ifdef DYNAMIC_MACRO_ENABLE
|
||||
if(dmacro_num == 1){ oled_write_P(rec_ico, false); }
|
||||
if(dmacro_num == 2){ oled_write_P(stop_ico, false); }
|
||||
if(dmacro_num == 3){ oled_write_P(play_ico, false); }
|
||||
#endif //DYNAMIC_MACRO_ENABLE
|
||||
|
||||
oled_write_ln(o_text, false);
|
||||
render_os_lock_status();
|
||||
|
||||
} else { // ─────────────────────────────────────────── SECONDARY SIDE
|
||||
|
||||
// KLOR face ─────────────────────────────────────────────────────┐
|
||||
|
||||
static const char PROGMEM klor_face[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
oled_write_raw_P(klor_face, sizeof(klor_face));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
|
||||
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SHT_T:
|
||||
return TAPPING_TERM - 150;
|
||||
case SHT_N:
|
||||
return TAPPING_TERM - 150;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ M A C R O S │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
case OS_SWAP:
|
||||
if (record->event.pressed) {
|
||||
if (!keymap_config.swap_lctl_lgui) {
|
||||
keymap_config.swap_lctl_lgui = true; // ─── MAC
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(mac_song);
|
||||
#endif // AUDIO_ENABLE
|
||||
}
|
||||
else {
|
||||
keymap_config.swap_lctl_lgui = false; // ─── WIN
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(winxp_song);
|
||||
#endif // AUDIO_ENABLE
|
||||
}
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_PULSING_STRONG_1_100);
|
||||
#endif // HAPTIC_ENABLE
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
clear_keyboard(); // ──── clear to prevent stuck keys
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ l a y e r │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_TRANSITION_HUM_1_100);
|
||||
#endif // HAPTIC_ENABLE
|
||||
}
|
||||
return false;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_TRANSITION_HUM_1_100);
|
||||
#endif // HAPTIC_ENABLE
|
||||
}
|
||||
return false;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ q m k │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
case MAKE_H:
|
||||
if (record->event.pressed) {
|
||||
#ifdef KEYBOARD_klor_kb2040
|
||||
SEND_STRING ("qmk compile -kb klor/2040 -km default");
|
||||
#else
|
||||
SEND_STRING ("qmk compile -kb klor -km default");
|
||||
#endif
|
||||
tap_code(KC_ENTER);
|
||||
}
|
||||
break;
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ p r o d u c t i v i t y │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
case KC_MPLY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef HAPTIC_ENABLE
|
||||
drv2605l_pulse(DRV2605L_EFFECT_SHARP_CLICK_100);
|
||||
#endif // HAPTIC_ENABL
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ E N C O D E R │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ e n c o d e r L │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
|
||||
// ┌───────────────────────────────────────────────────────────┐
|
||||
// │ e n c o d e r R │
|
||||
// └───────────────────────────────────────────────────────────┘
|
||||
|
||||
} else if (index == 1) {
|
||||
if(IS_LAYER_ON(_LOWER)){
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
}else {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // ENCODER_ENABLE
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
▐█ ▟▛ ▐█ ▄▆▀▀▀▀▀▀▆▄ ▐█▀▀▀▀▀█▌
|
||||
▐█ ▟▛ ▐█ ▟▛ ▜▙ ▐█ █▌
|
||||
▐█ ▟▛ ▐█ ▐█ █▋▐█ █▌
|
||||
▐█ ▟█▙ ▐█ ▐█ █▋▐█▀▀▜█▀▀▘
|
||||
▐█▟▛ ▜▙ ▐█ ▜▙ ▟▛ ▐█ ▜▙
|
||||
▐█▛ ▜▙ ▐█▄▄▄▄ ▀▜▆▄▄▄▄▆▛▀ ▐█ ▜▙
|
||||
|
||||
▄██████████████▄
|
||||
████████████████
|
||||
▄██████▀ ▀████▀ ▀██████▄
|
||||
███████▄ ▄████▄ ▄███████
|
||||
███████████▀▀▀▀███████████
|
||||
▀█████████▀ ▄▄ ▀█████████▀
|
||||
████▀ ▄██▄ ▀████
|
||||
████▄▄████▄▄████
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
14
keyboards/klor/keymaps/saegewerk/rules.mk
Normal file
14
keyboards/klor/keymaps/saegewerk/rules.mk
Normal file
|
@ -0,0 +1,14 @@
|
|||
EXTRAKEY_ENABLE = yes
|
||||
|
||||
DYNAMIC_MACRO_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
KEY_OVERRIDE_ENABLE = no
|
||||
|
||||
# These features will be disabled in post_rules.mk if using an AVR MCU
|
||||
AUDIO_ENABLE = yes
|
||||
MUSIC_ENABLE = yes
|
||||
HAPTIC_ENABLE = yes
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
|
||||
# Choose your layout
|
||||
KLOR_CONFIG = saegewerk
|
|
@ -0,0 +1 @@
|
|||
# pragma once
|
|
@ -0,0 +1,47 @@
|
|||
#include "t4corun.h"
|
||||
|
||||
#define LAYOUT_klor_wrapper(...) KLOR_LAYOUT(__VA_ARGS__)
|
||||
|
||||
#define LAYOUT_3x5_3_keymap( \
|
||||
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, \
|
||||
k32, k33, k34, k35, k36, k37 \
|
||||
) \
|
||||
LAYOUT_klor_wrapper ( \
|
||||
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, k32, k37, k25, k26, k27, k28, k29, \
|
||||
KC_BTN1, k33, k34, k35, k36, KC_BTN4 \
|
||||
)
|
||||
|
||||
#define KLOR(...) LAYOUT_3x5_3_keymap(__VA_ARGS__)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KLOR(LAYER_QWERTY),
|
||||
[_COLEMAK_DH] = KLOR(LAYER_COLEMAK_DH),
|
||||
[_GAME] = KLOR(LAYER_GAME),
|
||||
[_NAVIGATION] = KLOR(LAYER_NAVIGATION),
|
||||
[_NUMBER] = KLOR(LAYER_NUMBER),
|
||||
[_SYMBOL] = KLOR(LAYER_SYMBOL),
|
||||
[_CONFIG] = KLOR(LAYER_CONFIG)
|
||||
|
||||
};
|
||||
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
|
||||
[_QWERTY] = { ENCODER_CCW_CW(KC_WH_U, KC_WH_D), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_COLEMAK_DH] = { ENCODER_CCW_CW(KC_WH_U, KC_WH_D), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_GAME] = { ENCODER_CCW_CW(KC_WH_U, KC_WH_D), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_NAVIGATION] = { ENCODER_CCW_CW(ZOOMOUT, ZOOMIN), ENCODER_CCW_CW(___x___, ___x___) },
|
||||
[_NUMBER] = { ENCODER_CCW_CW(___x___, ___x___), ENCODER_CCW_CW(KC_LEFT, KC_RGHT) },
|
||||
[_SYMBOL] = { ENCODER_CCW_CW(___x___, ___x___), ENCODER_CCW_CW(___x___, ___x___) },
|
||||
[_CONFIG] = { ENCODER_CCW_CW(RBSELYR, BASELYR), ENCODER_CCW_CW(TR_RRMD, TR_RMOD) }
|
||||
|
||||
};
|
||||
|
||||
#endif
|
1
keyboards/klor/keymaps/t4corun/readme.md
Normal file
1
keyboards/klor/keymaps/t4corun/readme.md
Normal file
|
@ -0,0 +1 @@
|
|||
This is my keymap
|
|
@ -0,0 +1,15 @@
|
|||
# override userspace defaults
|
||||
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
|
||||
# override keyboard defaults
|
||||
# keyboards\klor\info.json
|
||||
# keyboards\klor\rules.mk
|
||||
# keyboards\klor\2040\rules.mk
|
||||
AUDIO_ENABLE = yes
|
||||
HAPTIC_ENABLE = yes
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
SWAP_HANDS_ENABLE = no
|
||||
|
||||
# Choose your layout
|
||||
KLOR_CONFIG = saegewerk
|
314
keyboards/klor/klor.c
Normal file
314
keyboards/klor/klor.c
Normal file
|
@ -0,0 +1,314 @@
|
|||
/* Copyright 2022
|
||||
* GEIST @geigeigeist
|
||||
*
|
||||
* 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 "klor.h"
|
||||
|
||||
#ifdef KLOR_POLYDACTYL
|
||||
# define LAYOUT_polydactyl( \
|
||||
L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, L35, R30, R20, R21, R22, R23, R24, R25, \
|
||||
L31, L32, L33, L34, R31, R32, R33, R34 \
|
||||
) \
|
||||
{ \
|
||||
{ ___, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ ___, L31, L32, L33, L34, L35 }, \
|
||||
{ ___, R04, R03, R02, R01, R00 }, \
|
||||
{ R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R25, R24, R23, R22, R21, R20 }, \
|
||||
{ ___, R34, R33, R32, R31, R30 }, \
|
||||
}
|
||||
|
||||
#elif defined(KLOR_KONRAD)
|
||||
# define LAYOUT_konrad( \
|
||||
L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||
L20, L21, L22, L23, L24, L25, L35, R30, R20, R21, R22, R23, R24, R25, \
|
||||
L31, L32, L33, R32, R33, R34 \
|
||||
) \
|
||||
{ \
|
||||
{ ___, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ ___, L31, L32, L33, ___, L35 }, \
|
||||
{ ___, R04, R03, R02, R01, R00 }, \
|
||||
{ R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R25, R24, R23, R22, R21, R20 }, \
|
||||
{ ___, R34, R33, R32, ___, R30 }, \
|
||||
}
|
||||
|
||||
#elif defined(KLOR_YUBITSUME)
|
||||
# define LAYOUT_yubitsume( \
|
||||
L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, \
|
||||
L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, \
|
||||
L21, L22, L23, L24, L25, L35, R30, R20, R21, R22, R23, R24, \
|
||||
L31, L32, L33, L34, R31, R32, R33, R34 \
|
||||
) \
|
||||
{ \
|
||||
{ ___, L01, L02, L03, L04, L05 }, \
|
||||
{ ___, L11, L12, L13, L14, L15 }, \
|
||||
{ ___, L21, L22, L23, L24, L25 }, \
|
||||
{ ___, L31, L32, L33, L34, L35 }, \
|
||||
{ ___, R04, R03, R02, R01, R00 }, \
|
||||
{ ___, R14, R13, R12, R11, R10 }, \
|
||||
{ ___, R24, R23, R22, R21, R20 }, \
|
||||
{ ___, R34, R33, R32, R31, R30 }, \
|
||||
}
|
||||
|
||||
#elif defined(KLOR_SAEGEWERK)
|
||||
# define LAYOUT_saegewerk( \
|
||||
L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, \
|
||||
L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, \
|
||||
L21, L22, L23, L24, L25, L35, R30, R20, R21, R22, R23, R24, \
|
||||
L31, L32, L33, R32, R33, R34 \
|
||||
) \
|
||||
{ \
|
||||
{ ___, L01, L02, L03, L04, L05 }, \
|
||||
{ ___, L11, L12, L13, L14, L15 }, \
|
||||
{ ___, L21, L22, L23, L24, L25 }, \
|
||||
{ ___, L31, L32, L33, ___, L35 }, \
|
||||
{ ___, R04, R03, R02, R01, R00 }, \
|
||||
{ ___, R14, R13, R12, R11, R10 }, \
|
||||
{ ___, R24, R23, R22, R21, R20 }, \
|
||||
{ ___, R34, R33, R32, ___, R30 }, \
|
||||
}
|
||||
#endif //KLOR_POLYDACTL
|
||||
|
||||
|
||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_180;
|
||||
}
|
||||
|
||||
|
||||
//#ifdef HAPTIC_ENABLE
|
||||
//#include "drivers/haptic/DRV2605L.h"
|
||||
//#endif //HAPTIC ENABLE
|
||||
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
|
||||
__attribute__ ((weak))
|
||||
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] =
|
||||
|
||||
/* ORIGINAL LAYOUT
|
||||
{ // LEFT
|
||||
{ {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0} }, \
|
||||
{ {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1} }, \
|
||||
{ {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2} }, \
|
||||
{ {0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3} }, \
|
||||
// RIGHT
|
||||
{ {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4} }, \
|
||||
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \
|
||||
{ {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6} }, \
|
||||
{ {0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7} }, \
|
||||
};
|
||||
*/
|
||||
|
||||
// MIRRORED LAYOUT
|
||||
{ // LEFT
|
||||
{ {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4} }, \
|
||||
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \
|
||||
{ {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6} }, \
|
||||
{ {0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7} }, \
|
||||
// RIGHT
|
||||
{ {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0} }, \
|
||||
{ {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1} }, \
|
||||
{ {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2} }, \
|
||||
{ {0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3} }, \
|
||||
};
|
||||
|
||||
#endif //SWAP_HANDS_ENABLE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
// Physical layout ────────────────────────────────────────────────────
|
||||
//
|
||||
// ┌────────────────────┐ ┌────────────────────┐
|
||||
// │ 18 13 12 06 05 │ │ 26 27 33 34 39 │
|
||||
//┌───┴────────────────────┤ ├────────────────────┴───┐
|
||||
//│ 20 17 14 11 07 04 │ │ 25 28 32 35 38 40 │
|
||||
//├────────────────────────┤ ├────────────────────────┤
|
||||
//│ 19 16 15 10 08 03 │ │ 24 29 31 36 37 41 │
|
||||
//└───────────────┬────────┴───────┐ ┌───────┴────────┬───────────────┘
|
||||
// │ 09 02 01 00 │ │ 21 22 23 30 │
|
||||
// └────────────────┘ └────────────────┘
|
||||
//
|
||||
//
|
||||
// Electrical layout ───────────────────────────────────────
|
||||
//
|
||||
// C 00──01──02──03──04──05────06──07──08──09──10──11 R
|
||||
// ┌────────────────────┐┌────────────────────┐ │
|
||||
// X │ 18 13 12 06 05 ││ 26 27 33 34 39 │ X 0
|
||||
// ┌───┴────────────────────┤├────────────────────┴───┐ │
|
||||
// │ 20 17 14 11 07 04 ││ 25 28 32 35 38 40 │ 1
|
||||
// ├────────────────────────┤├────────────────────────┤ │
|
||||
// │ 19 16 15 10 08 03 ││ 24 29 31 36 37 41 │ 2
|
||||
// └───┬────────────────┬───┘└───┬────────────────┬───┘ │
|
||||
// X │ 09 02 01 00 │ X X │ 21 22 23 30 │ X 3
|
||||
// └────────────────┘ └────────────────┘
|
||||
|
||||
|
||||
|
||||
# if defined (KLOR_POLYDACTYL) || defined(KLOR_YUBITSUME)
|
||||
// POLYDACTYL / YUBITSUME
|
||||
// use this matrix if you use the polydactyl or yubitsume layout ────────────────────────────────────┐
|
||||
led_config_t g_led_config = { {
|
||||
//COL 00 01 02 03 04 05 ROW
|
||||
{ NO_LED, 18, 13, 12, 6, 5 },//00
|
||||
{ 19, 17, 14, 11, 7, 4 },//01
|
||||
{ 20, 16, 15, 10, 8, 3 },//02
|
||||
{ NO_LED, 9, 2, 1, 0, NO_LED },//03
|
||||
{ NO_LED, 37, 34, 33, 27, 26 },//00
|
||||
{ 40, 38, 35, 32, 28, 25 },//01
|
||||
{ 41, 39, 36, 31, 29, 24 },//02
|
||||
{ NO_LED, 30, 23, 22, 21, NO_LED } //03
|
||||
}, {
|
||||
//LEFT
|
||||
//thumb1 ▼ thumb2 ▼ thumb3 ▼ C0 R3 ▼ C0 R2 ▼ C0 R1 ▼ C1 R1 ▼
|
||||
{ 102, 63 }, { 89, 54 }, { 74, 49 }, { 75, 34 }, { 75, 21 }, { 75, 8 }, { 60, 6 },
|
||||
//C1 R2 ▼ C1 R3 ▼ thumb4 ▼ C2 R3 ▼ C2 R2 ▼ C2 R1 ▼ C3 R1 ▼
|
||||
{ 60, 19 }, { 60, 32 }, { 58, 48 }, { 46, 25 }, { 46, 12 }, { 46, 0 }, { 29, 7 },
|
||||
//C3 R2 ▼ C3 R3 ▼ C4 R3 ▼ C4 R2 ▼ C4 R1 ▼ C5 R2 ▼ C5 R3 ▼
|
||||
{ 30, 20 }, { 31, 33 }, { 17, 42 }, { 15, 30 }, { 13, 17 }, { 0, 28 }, { 3, 41 },
|
||||
//RIGHT
|
||||
//thumb1 ▼ thumb2 ▼ thumb3 ▼ C0 R3 ▼ C0 R2 ▼ C0 R1 ▼ C1 R1 ▼
|
||||
{ 122, 63 }, { 135, 54 }, { 150, 49 }, { 149, 34 }, { 149, 21 }, { 149, 8 }, { 163, 6 },
|
||||
//C1 R2 ▼ C1 R3 ▼ thumb4 ▼ C2 R3 ▼ C2 R2 ▼ C2 R1 ▼ C3 R1 ▼
|
||||
{ 163, 19 }, { 163, 32 }, { 166, 48 }, { 178, 25 }, { 178, 12 }, { 178, 0 }, { 195, 7 },
|
||||
//C3 R2 ▼ C3 R3 ▼ C4 R3 ▼ C4 R2 ▼ C4 R1 ▼ C5 R2 ▼ C5 R3 ▼
|
||||
{ 194, 20 }, { 193, 33 }, { 206, 42 }, { 209, 30 }, { 211, 17 }, { 224, 28 }, { 221, 41 }
|
||||
}, {
|
||||
//LEFT
|
||||
1, 1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 1, 1,
|
||||
//RIGHT
|
||||
1, 1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 1, 1
|
||||
} };
|
||||
// ────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
|
||||
|
||||
# elif defined(KLOR_KONRAD)
|
||||
// KONRAD
|
||||
// use this matrix if you use the konrad layout ───────────────────────────────────────────────────────┐
|
||||
led_config_t g_led_config = { {
|
||||
//COL 00 01 02 03 04 05 ROW
|
||||
{ NO_LED, 17, 12, 11, 5, 4 },//00
|
||||
{ 18, 16, 13, 10, 6, 3 },//01
|
||||
{ 19, 15, 14, 9, 7, 2 },//02
|
||||
{ NO_LED, 8, 1, 0, NO_LED, NO_LED },//03
|
||||
{ NO_LED, 37, 32, 31, 25, 24 },//00
|
||||
{ 38, 36, 33, 30, 26, 23 },//01
|
||||
{ 39, 35, 34, 29, 27, 22 },//02
|
||||
{ NO_LED, 28, 21, 20, NO_LED, NO_LED } //03
|
||||
}, {
|
||||
//LEFT
|
||||
//thumb1 ▼ thumb2 ▼ thumb3 ▼ C0 R3 ▼ C0 R2 ▼ C0 R1 ▼ C1 R1 ▼
|
||||
{ 89, 54 }, { 74, 49 }, { 75, 34 }, { 75, 21 }, { 75, 8 }, { 60, 6 },
|
||||
//C1 R2 ▼ C1 R3 ▼ thumb4 ▼ C2 R3 ▼ C2 R2 ▼ C2 R1 ▼ C3 R1 ▼
|
||||
{ 60, 19 }, { 60, 32 }, { 58, 48 }, { 46, 25 }, { 46, 12 }, { 46, 0 }, { 29, 7 },
|
||||
//C3 R2 ▼ C3 R3 ▼ C4 R3 ▼ C4 R2 ▼ C4 R1 ▼ C5 R2 ▼ C5 R3 ▼
|
||||
{ 30, 20 }, { 31, 33 }, { 17, 42 }, { 15, 30 }, { 13, 17 }, { 0, 28 }, { 3, 41 },
|
||||
//RIGHT
|
||||
//thumb1 ▼ thumb2 ▼ thumb3 ▼ C0 R3 ▼ C0 R2 ▼ C0 R1 ▼ C1 R1 ▼
|
||||
{ 135, 54 }, { 150, 49 }, { 149, 34 }, { 149, 21 }, { 149, 8 }, { 163, 6 },
|
||||
//C1 R2 ▼ C1 R3 ▼ thumb4 ▼ C2 R3 ▼ C2 R2 ▼ C2 R1 ▼ C3 R1 ▼
|
||||
{ 163, 19 }, { 163, 32 }, { 166, 48 }, { 178, 25 }, { 178, 12 }, { 178, 0 }, { 195, 7 },
|
||||
//C3 R2 ▼ C3 R3 ▼ C4 R3 ▼ C4 R2 ▼ C4 R1 ▼ C5 R2 ▼ C5 R3 ▼
|
||||
{ 194, 20 }, { 193, 33 }, { 206, 42 }, { 209, 30 }, { 211, 17 }, { 224, 28 }, { 221, 41 }
|
||||
}, {
|
||||
//LEFT
|
||||
1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 1, 1,
|
||||
//RIGHT
|
||||
1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 1, 1
|
||||
} };
|
||||
|
||||
// ────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
# elif defined(KLOR_SAEGEWERK)
|
||||
// SAEGEWERK
|
||||
// use this matrix if you use the saegewerk layout ────────────────────────────────────────────────────┐
|
||||
led_config_t g_led_config = { {
|
||||
//COL 00 01 02 03 04 05 ROW
|
||||
{ NO_LED, 17, 12, 11, 5, 4 },//00
|
||||
{ NO_LED, 16, 13, 10, 6, 3 },//01
|
||||
{ NO_LED, 15, 14, 9, 7, 2 },//02
|
||||
{ NO_LED, 8, 1, 0, NO_LED, NO_LED },//03
|
||||
{ NO_LED, 35, 30, 29, 23, 22 },//00
|
||||
{ NO_LED, 34, 31, 28, 24, 21 },//01
|
||||
{ NO_LED, 33, 32, 27, 25, 20 },//02
|
||||
{ NO_LED, 26, 19, 18, NO_LED, NO_LED } //03
|
||||
}, {
|
||||
//LEFT
|
||||
//thumb1 ▼ thumb2 ▼ thumb3 ▼ C0 R3 ▼ C0 R2 ▼ C0 R1 ▼ C1 R1 ▼
|
||||
{ 89, 54 }, { 74, 49 }, { 75, 34 }, { 75, 21 }, { 75, 8 }, { 60, 6 },
|
||||
//C1 R2 ▼ C1 R3 ▼ thumb4 ▼ C2 R3 ▼ C2 R2 ▼ C2 R1 ▼ C3 R1 ▼
|
||||
{ 60, 19 }, { 60, 32 }, { 58, 48 }, { 46, 25 }, { 46, 12 }, { 46, 0 }, { 29, 7 },
|
||||
//C3 R2 ▼ C3 R3 ▼ C4 R3 ▼ C4 R2 ▼ C4 R1 ▼ C5 R2 ▼ C5 R3 ▼
|
||||
{ 30, 20 }, { 31, 33 }, { 17, 42 }, { 15, 30 }, { 13, 17 },
|
||||
//RIGHT
|
||||
//thumb1 ▼ thumb2 ▼ thumb3 ▼ C0 R3 ▼ C0 R2 ▼ C0 R1 ▼ C1 R1 ▼
|
||||
{ 135, 54 }, { 150, 49 }, { 149, 34 }, { 149, 21 }, { 149, 8 }, { 163, 6 },
|
||||
//C1 R2 ▼ C1 R3 ▼ thumb4 ▼ C2 R3 ▼ C2 R2 ▼ C2 R1 ▼ C3 R1 ▼
|
||||
{ 163, 19 }, { 163, 32 }, { 166, 48 }, { 178, 25 }, { 178, 12 }, { 178, 0 }, { 195, 7 },
|
||||
//C3 R2 ▼ C3 R3 ▼ C4 R3 ▼ C4 R2 ▼ C4 R1 ▼ C5 R2 ▼ C5 R3 ▼
|
||||
{ 194, 20 }, { 193, 33 }, { 206, 42 }, { 209, 30 }, { 211, 17 }
|
||||
}, {
|
||||
//LEFT
|
||||
1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4,
|
||||
//RIGHT
|
||||
1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4
|
||||
} };
|
||||
|
||||
// ────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
# endif //KLOR_POLYDACTL || KLOR_YUBITSUME
|
||||
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
#endif //RGB_MATRIX_ENABLE
|
||||
|
||||
|
||||
|
43
keyboards/klor/klor.h
Normal file
43
keyboards/klor/klor.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/* Copyright 2022
|
||||
* GEIST @geigeigeist
|
||||
*
|
||||
* 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"
|
||||
|
||||
/* This 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.
|
||||
*/
|
||||
|
||||
// readability
|
||||
#define ___ KC_NO
|
||||
|
||||
|
||||
// it does not like it when the macro starts with LAYOUT...
|
||||
#ifdef KLOR_POLYDACTYL
|
||||
# define KLOR_LAYOUT(...) LAYOUT_polydactyl(__VA_ARGS__)
|
||||
#elif defined(KLOR_KONRAD)
|
||||
# define KLOR_LAYOUT(...) LAYOUT_konrad(__VA_ARGS__)
|
||||
#elif defined(KLOR_YUBITSUME)
|
||||
# define KLOR_LAYOUT(...) LAYOUT_yubitsume(__VA_ARGS__)
|
||||
#elif defined(KLOR_SAEGEWERK)
|
||||
# define KLOR_LAYOUT(...) LAYOUT_saegewerk(__VA_ARGS__)
|
||||
#endif //KLOR_POLYDACTL
|
233
keyboards/klor/lib/glcdfont.c
Normal file
233
keyboards/klor/lib/glcdfont.c
Normal file
|
@ -0,0 +1,233 @@
|
|||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char PROGMEM font[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xB6, 0xFF, 0xB6, 0x94, 0x00,
|
||||
0x08, 0x0C, 0x7E, 0x0C, 0x08, 0x00,
|
||||
0x10, 0x30, 0x7E, 0x30, 0x10, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00,
|
||||
0x2E, 0x2A, 0x7F, 0x2A, 0x3A, 0x00,
|
||||
0x20, 0x12, 0x08, 0x24, 0x02, 0x00,
|
||||
0x37, 0x49, 0x49, 0x37, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x7F, 0x51, 0x49, 0x45, 0x7F, 0x00,
|
||||
0x08, 0x04, 0x02, 0x7F, 0x00, 0x00,
|
||||
0x71, 0x49, 0x49, 0x49, 0x4F, 0x00,
|
||||
0x41, 0x41, 0x49, 0x49, 0x77, 0x00,
|
||||
0x0F, 0x10, 0x10, 0x10, 0x7F, 0x00,
|
||||
0x4F, 0x49, 0x49, 0x49, 0x71, 0x00,
|
||||
0x7E, 0x49, 0x49, 0x49, 0x70, 0x00,
|
||||
0x01, 0x01, 0x71, 0x09, 0x07, 0x00,
|
||||
0x77, 0x49, 0x49, 0x49, 0x77, 0x00,
|
||||
0x07, 0x49, 0x49, 0x49, 0x3F, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x01, 0x01, 0x59, 0x09, 0x0F, 0x00,
|
||||
0x7F, 0x41, 0x5D, 0x59, 0x4F, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x7F, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x76, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x41, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x49, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x09, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x49, 0x7B, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x00, 0x7F, 0x00, 0x00, 0x00,
|
||||
0x70, 0x40, 0x40, 0x40, 0x7F, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x77, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x01, 0x1F, 0x01, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x0F, 0x00,
|
||||
0x7F, 0x41, 0x71, 0x41, 0x7F, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x19, 0x6F, 0x00,
|
||||
0x47, 0x49, 0x49, 0x49, 0x79, 0x00,
|
||||
0x01, 0x01, 0x7F, 0x01, 0x01, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x7F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x7F, 0x40, 0x7F, 0x40, 0x7F, 0x00,
|
||||
0x77, 0x08, 0x08, 0x08, 0x77, 0x00,
|
||||
0x4F, 0x48, 0x48, 0x48, 0x7F, 0x00,
|
||||
0x61, 0x51, 0x49, 0x45, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x00, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x7F, 0x00, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x00, 0x07, 0x08, 0x00, 0x00,
|
||||
0x60, 0x54, 0x54, 0x54, 0x7C, 0x00,
|
||||
0x7F, 0x44, 0x44, 0x44, 0x78, 0x00,
|
||||
0x7C, 0x44, 0x44, 0x44, 0x44, 0x00,
|
||||
0x78, 0x44, 0x44, 0x44, 0x7F, 0x00,
|
||||
0x7C, 0x54, 0x54, 0x54, 0x5C, 0x00,
|
||||
0x08, 0x7F, 0x09, 0x09, 0x09, 0x00,
|
||||
0x38, 0xA4, 0xA4, 0xA4, 0xFC, 0x00,
|
||||
0x7F, 0x04, 0x04, 0x04, 0x78, 0x00,
|
||||
0x00, 0x00, 0x7D, 0x00, 0x00, 0x00,
|
||||
0x70, 0x40, 0x40, 0x7D, 0x00, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x76, 0x00,
|
||||
0x00, 0x00, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x7C, 0x04, 0x7C, 0x04, 0x7C, 0x00,
|
||||
0x7C, 0x04, 0x04, 0x04, 0x78, 0x00,
|
||||
0x7C, 0x44, 0x44, 0x44, 0x7C, 0x00,
|
||||
0xFC, 0x24, 0x24, 0x24, 0x38, 0x00,
|
||||
0x38, 0x24, 0x24, 0x24, 0xFC, 0x00,
|
||||
0x7C, 0x04, 0x04, 0x04, 0x04, 0x00,
|
||||
0x5C, 0x54, 0x54, 0x54, 0x74, 0x00,
|
||||
0x04, 0x04, 0x7F, 0x04, 0x04, 0x00,
|
||||
0x7C, 0x40, 0x40, 0x40, 0x7C, 0x00,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||
0x7C, 0x40, 0x7C, 0x40, 0x7C, 0x00,
|
||||
0x6C, 0x10, 0x10, 0x10, 0x6C, 0x00,
|
||||
0xBC, 0xA0, 0xA0, 0xA0, 0xFC, 0x00,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0,
|
||||
0xF0, 0xFE, 0xFF, 0x9F, 0x0F, 0x0F,
|
||||
0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||
0x0F, 0x0F, 0x9F, 0xFF, 0xFE, 0xF0,
|
||||
0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xE0, 0x10, 0x08, 0x04, 0x02, 0x02,
|
||||
0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x02, 0x02, 0x02, 0x04, 0x08,
|
||||
0x10, 0xE0, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0xFF,
|
||||
0x7F, 0x51, 0x55, 0x55, 0x45, 0x7F,
|
||||
0x41, 0x5F, 0x5F, 0x5F, 0x7F, 0x00,
|
||||
0x7F, 0x41, 0x7B, 0x77, 0x41, 0x7F,
|
||||
0x41, 0x5F, 0x5F, 0x5F, 0x7F, 0x00,
|
||||
0x7F, 0x41, 0x5D, 0x5D, 0x5D, 0x7F,
|
||||
0x41, 0x5F, 0x5F, 0x5F, 0x7F, 0x00,
|
||||
0xC0, 0xE0, 0xF0, 0xF0, 0xF0, 0xE0,
|
||||
0xE6, 0xF7, 0xF3, 0xF0, 0x60, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00,
|
||||
0xF8, 0x1C, 0xDE, 0x1F, 0xFF, 0xFF,
|
||||
0xFF, 0x1F, 0xDE, 0x1C, 0xF8, 0x00,
|
||||
0xC0, 0xE2, 0xB4, 0xF8, 0xF8, 0xF8,
|
||||
0xF8, 0xF8, 0xB4, 0xE2, 0xC0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F,
|
||||
0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||
0x87, 0xE1, 0xF9, 0xF9, 0xE1, 0x87,
|
||||
0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00,
|
||||
0xFF, 0x00, 0x00, 0xC0, 0x30, 0x0C,
|
||||
0x33, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00,
|
||||
0xFF, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x38, 0xC8, 0x08, 0x08, 0x0F,
|
||||
0x7E, 0x00, 0x00, 0x7F, 0x00, 0x00,
|
||||
0x78, 0x00, 0x00, 0x7E, 0x00, 0x00,
|
||||
0x24, 0x24, 0x12, 0x12, 0x24, 0x24,
|
||||
0x48, 0x48, 0x24, 0x24, 0x12, 0x12,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x3F,
|
||||
0x3F, 0x7F, 0x7F, 0x38, 0x10, 0x00,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00,
|
||||
0x0F, 0x14, 0x21, 0x40, 0x45, 0x41,
|
||||
0x45, 0x40, 0x21, 0x14, 0x0F, 0x00,
|
||||
0x7D, 0x7D, 0x7D, 0x7D, 0x7D, 0x7D,
|
||||
0x7D, 0x7D, 0x7D, 0x7D, 0x7D, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x0C, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0x0C, 0x30, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3F, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x01, 0x02, 0x04, 0x08, 0x10, 0x10,
|
||||
0x10, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x10, 0x10, 0x10, 0x08, 0x04,
|
||||
0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3F, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x0C, 0x30,
|
||||
0x40, 0x00, 0x00, 0x40, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x40, 0x00, 0x00,
|
||||
0x1C, 0x3E, 0x3E, 0x3E, 0x1C, 0x00,
|
||||
0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x00,
|
||||
0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
3159
keyboards/klor/lib/klorimation.h
Normal file
3159
keyboards/klor/lib/klorimation.h
Normal file
File diff suppressed because it is too large
Load diff
15
keyboards/klor/lib/klounds.h
Normal file
15
keyboards/klor/lib/klounds.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2022 @geigeigeist
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
#define WINXP_SOUND W__NOTE(_DS6), Q__NOTE(_DS5), H__NOTE(_AS5), H__NOTE(_GS5), H__NOTE(_DS5), H__NOTE(_DS6), H__NOTE(_AS5)
|
||||
#define MAC_SOUND S__NOTE(_CS5), B__NOTE(_C5)
|
||||
#define CAPSON_SOUND Q__NOTE(_DS1)
|
||||
#define CAPSOFF_SOUND Q__NOTE(_DS5)
|
||||
|
||||
float winxp_song[][2] = SONG(WINXP_SOUND);
|
||||
float mac_song[][2] = SONG(MAC_SOUND);
|
||||
float capson_song[][2] = SONG(CAPSON_SOUND);
|
||||
float capsoff_song[][2] = SONG(CAPSOFF_SOUND);
|
||||
|
15
keyboards/klor/post_rules.mk
Normal file
15
keyboards/klor/post_rules.mk
Normal file
|
@ -0,0 +1,15 @@
|
|||
VALID_KLOR_CONFIG := polydactyl konrad yubitsume saegewerk
|
||||
|
||||
ifeq ($(filter $(KLOR_CONFIG),$(VALID_KLOR_CONFIG)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid KLOR_LAYOUT,KLOR_LAYOUT="$(KLOR_CONFIG)" is not a valid KLOR Layout)
|
||||
else
|
||||
OPT_DEFS += -DKLOR_$(strip $(shell echo $(KLOR_CONFIG) | tr '[:lower:]' '[:upper:]'))
|
||||
endif
|
||||
|
||||
# Turn off features for AVR Processors due to memory size
|
||||
ifeq ($(strip $(PLATFORM)),AVR)
|
||||
AUDIO_ENABLE = no
|
||||
MUSIC_ENABLE = no
|
||||
HAPTIC_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no
|
||||
endif
|
40
keyboards/klor/readme.md
Normal file
40
keyboards/klor/readme.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
```text
|
||||
█ █ █ ▄▄▄▀▀▀▀▀▀▄▄▄ █▀▀▀▀▀▀▀▀▀▀█
|
||||
█ █ █ ▄▀ ▀▄ █ █
|
||||
█ █ █ ▄▀ ▀▄ █ █
|
||||
█ █ █ █ █ █ █
|
||||
█ █ █ █ █ █ █
|
||||
█ █ █ █ █ █▄▄▄▄▄▄▄▄▄▄█
|
||||
█ █ █ █ █ █ █ █
|
||||
█ █ █ █ █ █ █ █
|
||||
█ █ █ █ ▀▄ ▄▀ █ █
|
||||
██ █ █ ▀▄ ▄▀ █ █
|
||||
█ █ █▄▄▄▄▄▄▄▄ ▀▀▀▄▄▄▄▄▄▀▀▀ █ █
|
||||
```
|
||||
|
||||
# KLOR split keyboard
|
||||
|
||||
KLOR is 42 keys column-staggered split keyboard made by @geigeigeist. It supports a per key RGB matrix, encoders, OLED displays, haptic feedback, audio, a Pixart Paw3204 trackball and four different layouts, through brake off parts.
|
||||
It's schematics are based on the Sofle, while the layout is based on the Yacc46.
|
||||
|
||||
You can use this command to compile the firmware
|
||||
`qmk compile -kb klor -km default`
|
||||
|
||||
and this command if you want to compile the firmware for a RP2040 based MCU
|
||||
`qmk compile -kb klor/2040 -km default`
|
||||
|
||||
## t4corun modernization
|
||||
|
||||
this is my attempt at modernizing @geigeigeist's repo. It has not been updated in a few years and firmware cannot be built as-is as QMK has introduced breaking changes. @geigeigeist's repo can be found [here](https://github.com/GEIGEIGEIST/qmk-config-klor). Should work for all KLOR variations, but I tested against Saegwerk as that is the one I have
|
||||
|
||||
Features
|
||||
|
||||
- Can choose layout based on keymap rules.mk configuration. Before keyboard configuration would need to be changed
|
||||
- Converted as much as possible to data driven configuration: `info.json`
|
||||
- the build will automatically turn off audio, haptics, and rgb matrix for AVR MCU. A user can configure all rules in the keymap rules.mk for RP2040 and not have to edit code just for AVR firmware
|
||||
|
||||
What I did not test
|
||||
|
||||
- RGBLight
|
||||
- Other variations (e.g.Polydactyl)
|
||||
- Swap Hands
|
4
keyboards/klor/rules.mk
Normal file
4
keyboards/klor/rules.mk
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Features are now defined in info.json when possible
|
||||
|
||||
# HAPTIC FEEDBACK
|
||||
HAPTIC_DRIVER = drv2605l
|
7
qmk.json
7
qmk.json
|
@ -1,11 +1,14 @@
|
|||
{
|
||||
"userspace_version": "1.0",
|
||||
"build_targets": [
|
||||
["ploopyco/trackball_nano", "lkbm"],
|
||||
|
||||
["crkbd/rev1", "t4corun"],
|
||||
["bastardkb/charybdis/3x5/v2/splinky_3", "t4corun"],
|
||||
["planck/rev6", "t4corun"],
|
||||
["bluebell/swoop", "t4corun"],
|
||||
["barbellboards/rollow", "t4corun"]
|
||||
["barbellboards/rollow", "t4corun"],
|
||||
["klor/2040", "t4corun"],
|
||||
["klor/2040", "saegewerk"]
|
||||
|
||||
]
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"clone_targets": [
|
||||
{
|
||||
"repository": "https://github.com/app-gitKaiwho/qmk-config-klor/",
|
||||
"tree": "main"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"nontree_targets": [
|
||||
"barbellboards"
|
||||
"barbellboards",
|
||||
"klor"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -16,15 +16,13 @@
|
|||
#undef LOCKING_SUPPORT_ENABLE
|
||||
#undef LOCKING_RESYNC_ENABLE
|
||||
|
||||
|
||||
|
||||
//Clear variables we plan to use that might be set elsewhere
|
||||
#undef USB_POLLING_INTERVAL_MS
|
||||
#undef LAYER_STATE_8BIT
|
||||
|
||||
//Set common configuration for all keyboards
|
||||
#define USB_POLLING_INTERVAL_MS 1
|
||||
|
||||
|
||||
#define LAYER_STATE_8BIT
|
||||
|
||||
|
||||
|
||||
|
@ -52,4 +50,12 @@
|
|||
|
||||
#if defined(OLED_ENABLE)
|
||||
# include "config/oled_config.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
# include "config/haptic_config.h"
|
||||
#endif
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
# include "config/audio_config.h"
|
||||
#endif
|
30
users/t4corun/config/audio_config.h
Normal file
30
users/t4corun/config/audio_config.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
/* Audio
|
||||
*
|
||||
* https://docs.qmk.fm/#/feature_audio
|
||||
* https://docs.qmk.fm/#/squeezing_avr?id=audio-settings
|
||||
*
|
||||
*/
|
||||
|
||||
//Clear variables we plan to use that might be set elsewhere
|
||||
#undef NO_MUSIC_MODE
|
||||
#undef AUDIO_CLICKY
|
||||
#undef STARTUP_SONG
|
||||
#undef GOODBYE_SONG
|
||||
#undef DEFAULT_LAYER_SONGS
|
||||
#undef KLOR_SOUND
|
||||
|
||||
//Set common configuration for all keyboards
|
||||
#define KLOR_SOUND W__NOTE(_DS0), W__NOTE(_DS1), H__NOTE(_DS2), H__NOTE(_DS3), Q__NOTE(_DS4), Q__NOTE(_DS5), E__NOTE(_DS6), E__NOTE(_DS7), S__NOTE(_DS8), Q__NOTE(_GS0)
|
||||
#define BYE_SOUND H__NOTE(_DS4), H__NOTE(_DS3), W__NOTE(_DS1)
|
||||
|
||||
#define NO_MUSIC_MODE
|
||||
#define AUDIO_CLICKY
|
||||
#define STARTUP_SONG SONG(KLOR_SOUND)
|
||||
#define GOODBYE_SONG SONG(BYE_SOUND)
|
||||
#define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND) \
|
||||
,SONG(COLEMAK_SOUND) \
|
||||
,SONG(GUITAR_SOUND) \
|
||||
}
|
17
users/t4corun/config/haptic_config.h
Normal file
17
users/t4corun/config/haptic_config.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
/* Haptic Feedback
|
||||
*
|
||||
* https://docs.qmk.fm/#/feature_haptic_feedback
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(HAPTIC_DRV2605L)
|
||||
//Clear variables we plan to use that might be set elsewhere
|
||||
# undef DRV2605L_GREETING
|
||||
# undef DRV2605L_DEFAULT_MODE
|
||||
|
||||
//Set common configuration for all keyboards
|
||||
# define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
|
||||
# define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_STRONG_CLICK_1_100
|
||||
#endif //HAPTIC_DRV2605L
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
//Clear variables we plan to use that might be set elsewhere
|
||||
#undef OLED_TIMEOUT
|
||||
|
||||
#undef OLED_FONT_H
|
||||
|
||||
//Set common configuration for all keyboards
|
||||
#define OLED_TIMEOUT 60000 //1 min
|
||||
#define OLED_TIMEOUT 60000 //1 min
|
||||
#define OLED_FONT_H "./lib/font.c"
|
|
@ -139,7 +139,10 @@
|
|||
#define RGB_MATRIX_DEFAULT_SPD 32
|
||||
|
||||
//Set per keyboard configuration
|
||||
#if defined(KEYBOARD_bastardkb_charybdis_3x5) || defined(KEYBOARD_dztech_dz60rgb_v2_1) || defined(KEYBOARD_bluebell_swoop)
|
||||
#if defined(KEYBOARD_bastardkb_charybdis_3x5) \
|
||||
|| defined(KEYBOARD_dztech_dz60rgb_v2_1) \
|
||||
|| defined(KEYBOARD_bluebell_swoop) \
|
||||
|| defined(KEYBOARD_klor_2040)
|
||||
|
||||
# define ENABLE_RGB_MATRIX_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
|
@ -165,7 +168,7 @@
|
|||
# define ENABLE_RGB_MATRIX_BREATHING
|
||||
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_BREATHING
|
||||
#endif //defined(KEYBOARD_bastardkb_charybdis_3x5) || defined(KEYBOARD_dztech_dz60rgb_v2_1)
|
||||
#endif //KEYBOARD_bastardkb_charybdis_3x5...
|
||||
|
||||
//heatmap specific settings
|
||||
#if defined(ENABLE_RGB_MATRIX_TYPING_HEATMAP)
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
*
|
||||
* https://docs.qmk.fm/#/feature_split_keyboard
|
||||
*
|
||||
*
|
||||
* needed for for the rgb matrix indicators to work
|
||||
* - SPLIT_LAYER_STATE_ENABLE
|
||||
* - SPLIT_LED_STATE_ENABLE
|
||||
* - SPLIT_MODS_ENABLE
|
||||
*
|
||||
*/
|
||||
|
||||
//Clear variables we plan to use that might be set elsewhere
|
||||
|
@ -20,10 +14,15 @@
|
|||
#undef SPLIT_OLED_ENABLE
|
||||
#undef SPLIT_ACTIVITY_ENABLE
|
||||
#undef SPLIT_USB_DETECT
|
||||
#undef SPLIT_WPM_ENABLE
|
||||
|
||||
//Set common configuration for all keyboards
|
||||
#define SPLIT_TRANSPORT_MIRROR
|
||||
#define SPLIT_LAYER_STATE_ENABLE
|
||||
#define SPLIT_LED_STATE_ENABLE
|
||||
#define SPLIT_MODS_ENABLE
|
||||
#define SPLIT_OLED_ENABLE
|
||||
#define SPLIT_ACTIVITY_ENABLE
|
||||
#define SPLIT_WPM_ENABLE
|
||||
|
||||
#define MASTER_RIGHT
|
|
@ -13,7 +13,6 @@
|
|||
#undef TAP_HOLD_CAPS_DELAY
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#undef TAPPING_TERM_PER_KEY
|
||||
|
||||
#undef QUICK_TAP_TERM
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
#include "combo.h"
|
||||
|
||||
|
||||
bool get_combo_must_tap(uint16_t index, combo_t *combo) {
|
||||
|
||||
switch (index) {
|
||||
|
||||
#if defined(MOUSEKEY_ENABLE)
|
||||
case MOUSE_BUTTON3:
|
||||
case MOUSE_BUTTON4:
|
||||
case MOUSE_BUTTON5:
|
||||
case MOUSE_DRGTOG:
|
||||
#endif //MOUSEKEY_ENABLEdf
|
||||
// case MOUSE_BUTTON3:
|
||||
// case MOUSE_BUTTON4:
|
||||
// case MOUSE_BUTTON5:
|
||||
// case MOUSE_DRGTOG:
|
||||
|
||||
case KEY_ENT:
|
||||
case KEY_TAB:
|
||||
|
@ -29,11 +28,13 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
|
|||
|
||||
switch (combo_index) {
|
||||
|
||||
case MOUSE_BUTTON1:
|
||||
case MOUSE_BUTTON2:
|
||||
case MOUSE_BUTTON3:
|
||||
case MOUSE_BUTTON4:
|
||||
case MOUSE_BUTTON5:
|
||||
|
||||
// case MOUSE_BUTTON1:
|
||||
// case MOUSE_BUTTON2:
|
||||
// case MOUSE_BUTTON3:
|
||||
// case MOUSE_BUTTON4:
|
||||
// case MOUSE_BUTTON5:
|
||||
|
||||
case MOUSE_DRGTOG:
|
||||
if ( get_highest_layer(layer_state | default_layer_state) > _DEFAULT_LAYER_1 ) return false;
|
||||
|
||||
|
|
|
@ -2,39 +2,30 @@
|
|||
#include "t4corun.h"
|
||||
|
||||
|
||||
|
||||
#if defined(MOUSEKEY_ENABLE)
|
||||
const uint16_t PROGMEM mou_btn1_combo[] = { KC_D, KC_F, COMBO_END };
|
||||
const uint16_t PROGMEM mou_btn2_combo[] = { KC_S, KC_D, COMBO_END };
|
||||
const uint16_t PROGMEM mou_btn3_combo[] = { KC_F, KC_G, COMBO_END };
|
||||
const uint16_t PROGMEM mou_btn4_combo[] = { KC_F, KC_R, COMBO_END };
|
||||
const uint16_t PROGMEM mou_btn5_combo[] = { KC_T, KC_G, COMBO_END };
|
||||
//const uint16_t PROGMEM mou_btn1_combo[] = { KC_D, KC_F, COMBO_END };
|
||||
//const uint16_t PROGMEM mou_btn2_combo[] = { KC_S, KC_D, COMBO_END };
|
||||
//const uint16_t PROGMEM mou_btn3_combo[] = { KC_F, KC_G, COMBO_END };
|
||||
//const uint16_t PROGMEM mou_btn4_combo[] = { KC_F, KC_R, COMBO_END };
|
||||
//const uint16_t PROGMEM mou_btn5_combo[] = { KC_T, KC_G, COMBO_END };
|
||||
const uint16_t PROGMEM mou_drg_combo[] = { KC_X, KC_C, COMBO_END };
|
||||
#endif //MOUSEKEY_ENABLE
|
||||
|
||||
|
||||
const uint16_t PROGMEM key_ent_combo[] = { KC_C, KC_V, COMBO_END };
|
||||
const uint16_t PROGMEM key_tab_combo[] = { KC_U, KC_I, COMBO_END };
|
||||
const uint16_t PROGMEM key_bspc_combo[] = { KC_M, TR_COMM, COMBO_END };
|
||||
|
||||
const uint16_t PROGMEM key_tab_combo[] = { TR_COMM, TR_DOT, COMBO_END };
|
||||
|
||||
|
||||
enum combos {
|
||||
|
||||
#if defined(MOUSEKEY_ENABLE)
|
||||
MOUSE_BUTTON1,
|
||||
MOUSE_BUTTON2,
|
||||
MOUSE_BUTTON3,
|
||||
MOUSE_BUTTON4,
|
||||
MOUSE_BUTTON5,
|
||||
// MOUSE_BUTTON1,
|
||||
// MOUSE_BUTTON2,
|
||||
// MOUSE_BUTTON3,
|
||||
// MOUSE_BUTTON4,
|
||||
// MOUSE_BUTTON5,
|
||||
MOUSE_DRGTOG,
|
||||
#endif //MOUSEKEY_ENABLE
|
||||
|
||||
KEY_ENT,
|
||||
KEY_TAB,
|
||||
KEY_BSPC,
|
||||
|
||||
KEY_TAB,
|
||||
COMBO_LENGTH
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -43,18 +34,13 @@ uint16_t COMBO_LEN = COMBO_LENGTH;
|
|||
|
||||
|
||||
combo_t key_combos[COMBO_LENGTH] = {
|
||||
|
||||
#if defined(MOUSEKEY_ENABLE)
|
||||
[MOUSE_BUTTON1] = COMBO(mou_btn1_combo, KC_BTN1),
|
||||
[MOUSE_BUTTON2] = COMBO(mou_btn2_combo, KC_BTN2),
|
||||
[MOUSE_BUTTON3] = COMBO(mou_btn3_combo, KC_BTN3),
|
||||
[MOUSE_BUTTON4] = COMBO(mou_btn4_combo, KC_BTN4),
|
||||
[MOUSE_BUTTON5] = COMBO(mou_btn5_combo, KC_BTN5),
|
||||
// [MOUSE_BUTTON1] = COMBO(mou_btn1_combo, KC_BTN1),
|
||||
// [MOUSE_BUTTON2] = COMBO(mou_btn2_combo, KC_BTN2),
|
||||
// [MOUSE_BUTTON3] = COMBO(mou_btn3_combo, KC_BTN3),
|
||||
// [MOUSE_BUTTON4] = COMBO(mou_btn4_combo, KC_BTN4),
|
||||
// [MOUSE_BUTTON5] = COMBO(mou_btn5_combo, KC_BTN5),
|
||||
[MOUSE_DRGTOG] = COMBO(mou_drg_combo, TR_DRGS),
|
||||
#endif //MOUSEKEY_ENABLE
|
||||
|
||||
[KEY_ENT] = COMBO(key_ent_combo, KC_ENT),
|
||||
[KEY_TAB] = COMBO(key_tab_combo, KC_TAB),
|
||||
[KEY_BSPC] = COMBO(key_bspc_combo, KC_BSPC)
|
||||
|
||||
[KEY_BSPC] = COMBO(key_bspc_combo, KC_BSPC),
|
||||
[KEY_TAB] = COMBO(key_tab_combo, KC_TAB)
|
||||
};
|
|
@ -29,10 +29,17 @@ const key_override_t f10_override = ko_make_with_layers(MOD_MASK_CSA, K
|
|||
const key_override_t f11_override = ko_make_with_layers(MOD_MASK_CSA, KC_DOT, KC_F11, 1<<_NUMBER);
|
||||
const key_override_t f12_override = ko_make_with_layers(MOD_MASK_CSA, KC_MINS, KC_F12, 1<<_NUMBER);
|
||||
|
||||
const key_override_t mb1_override = ko_make_with_layers(MOD_MASK_CTRL, KC_BTN1, KC_PSCR, 1<<_NUMBER);
|
||||
const key_override_t mb2_override = ko_make_with_layers(MOD_MASK_ALT, KC_BTN2, SC_FILE, 1<<_NUMBER);
|
||||
const key_override_t mb2_override = ko_make_with_layers(MOD_MASK_CTRL, KC_BTN2, KC_BTN4, 1<<_NUMBER);
|
||||
const key_override_t mb3_override = ko_make_with_layers(MOD_MASK_ALT, KC_BTN3, KC_BTN5, 1<<_NUMBER);
|
||||
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
const key_override_t hfnext_override = ko_make_with_layers(MOD_MASK_SHIFT, TR_HNXT, HF_PREV, 1<<_CONFIG);
|
||||
const key_override_t hfconu_override = ko_make_with_layers(MOD_MASK_SHIFT, TR_HCNU, HF_COND, 1<<_CONFIG);
|
||||
#endif //HAPTIC_ENABLE
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
const key_override_t ckup_override = ko_make_with_layers(MOD_MASK_SHIFT, CK_UP, CK_DOWN, 1<<_CONFIG);
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
const key_override_t **key_overrides = (const key_override_t *[]) {
|
||||
|
||||
|
@ -50,8 +57,18 @@ const key_override_t **key_overrides = (const key_override_t *[]) {
|
|||
&f10_override,
|
||||
&f11_override,
|
||||
&f12_override,
|
||||
&mb1_override,
|
||||
&mb2_override,
|
||||
&mb3_override,
|
||||
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
&hfnext_override,
|
||||
&hfconu_override,
|
||||
#endif //HAPTIC_ENABLE
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
&ckup_override,
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
NULL // Null terminate the array of overrides!
|
||||
|
||||
};
|
|
@ -1,2 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#include "t4corun.h"
|
71
users/t4corun/features/luna.c
Normal file
71
users/t4corun/features/luna.c
Normal file
|
@ -0,0 +1,71 @@
|
|||
#include "luna.h"
|
||||
|
||||
static uint32_t luna_anim_timer = 0;
|
||||
static uint8_t luna_current_frame = 0;
|
||||
|
||||
void render_luna(void) {
|
||||
|
||||
#if OLED_TIMEOUT > 0
|
||||
// the animation prevents the normal timeout from occuring
|
||||
if (last_input_activity_elapsed() > OLED_TIMEOUT && last_led_activity_elapsed() > OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
return;
|
||||
} else {
|
||||
oled_on();
|
||||
}
|
||||
#endif //OLED_TIMEOUT
|
||||
|
||||
if (timer_elapsed32(luna_anim_timer) > OLED_LUNA_ANIM_FRAME_DURATION) {
|
||||
luna_anim_timer = timer_read32();
|
||||
animate_luna(OLED_LUNA_X, OLED_LUNA_Y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void animate_luna(int LUNA_X, int LUNA_Y) {
|
||||
|
||||
uint8_t current_mod = get_mods();
|
||||
uint8_t current_osm = get_oneshot_mods();
|
||||
|
||||
// Make Luna Jump when spacebar is pressed
|
||||
// Only works when Luna is rendered on Master Slide
|
||||
if (isLunaJumping() || !isJumpShown()) {
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y + 2);
|
||||
oled_write(" ", false);
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
|
||||
setLunaJumped();
|
||||
} else {
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
oled_write(" ", false);
|
||||
oled_set_cursor(LUNA_X, LUNA_Y);
|
||||
}
|
||||
|
||||
luna_current_frame = (luna_current_frame + 1) % 2;
|
||||
|
||||
// Animate based on status
|
||||
if (host_keyboard_led_state().caps_lock || is_caps_word_on()) {
|
||||
|
||||
oled_write_raw_P(bark[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||
|
||||
} else if ((current_mod | current_osm) & MOD_MASK_CTRL) {
|
||||
|
||||
oled_write_raw_P(sneak[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||
|
||||
} else if (get_current_wpm() <= OLED_LUNA_MIN_WALK_SPEED) {
|
||||
|
||||
oled_write_raw_P(sit[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||
|
||||
} else if (get_current_wpm() <= OLED_LUNA_MIN_RUN_SPEED) {
|
||||
|
||||
oled_write_raw_P(walk[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||
|
||||
} else {
|
||||
|
||||
oled_write_raw_P(run[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||
|
||||
}
|
||||
|
||||
}
|
52
users/t4corun/features/luna.h
Normal file
52
users/t4corun/features/luna.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
#pragma once
|
||||
|
||||
#include "t4corun.h"
|
||||
|
||||
// LUNA PET Variables
|
||||
void render_luna(void);
|
||||
void animate_luna(int LUNA_X, int LUNA_Y);
|
||||
|
||||
// Luna Sit
|
||||
static const char PROGMEM sit[2][OLED_LUNA_ANIM_SIZE] = {
|
||||
/* 'sit1', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,},
|
||||
|
||||
/* 'sit2', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
};
|
||||
|
||||
// Luna Walk
|
||||
static const char PROGMEM walk[2][OLED_LUNA_ANIM_SIZE] = {
|
||||
/* 'walk1', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,},
|
||||
|
||||
/* 'walk2', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
|
||||
};
|
||||
|
||||
// Luna Run
|
||||
static const char PROGMEM run[2][OLED_LUNA_ANIM_SIZE] = {
|
||||
/* 'run1', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,},
|
||||
|
||||
/* 'run2', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
|
||||
};
|
||||
|
||||
// Luna Bark
|
||||
static const char PROGMEM bark[2][OLED_LUNA_ANIM_SIZE] = {
|
||||
/* 'bark1', 32x22px */
|
||||
{0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,},
|
||||
|
||||
/* 'bark2', 32x22px */
|
||||
{0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
|
||||
};
|
||||
|
||||
// Luna Sneak
|
||||
static const char PROGMEM sneak[2][OLED_LUNA_ANIM_SIZE] = {
|
||||
/* 'sneak1', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,},
|
||||
|
||||
/* 'sneak2', 32x22px */
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,}
|
||||
};
|
|
@ -1,134 +1,232 @@
|
|||
#include "oled.h"
|
||||
|
||||
void render_crkbd_logo(void) {
|
||||
#if defined(WPM_ENABLE)
|
||||
#include "luna.c"
|
||||
#endif
|
||||
|
||||
oled_write_P(crkbd_logo, false);
|
||||
|
||||
}
|
||||
// Shows the currently enabled Layer name
|
||||
void render_layer_state(void) {
|
||||
|
||||
void render_rollow_logo(void) {
|
||||
|
||||
oled_write_raw_P(rollow_logo, sizeof(rollow_logo));
|
||||
|
||||
}
|
||||
|
||||
void render_qmk_logo(void) {
|
||||
|
||||
oled_write_raw_P(qmk_logo, sizeof(qmk_logo));
|
||||
|
||||
}
|
||||
|
||||
void render_default_layer_state(void) {
|
||||
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false);
|
||||
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _NAVIGATION:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_2), false);
|
||||
break;
|
||||
|
||||
case _COLEMAK_DH:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK_DH), false);
|
||||
case _NUMBER:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_3), false);
|
||||
break;
|
||||
|
||||
case _GAME:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYOUT_GAME), false);
|
||||
case _SYMBOL:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_4), false);
|
||||
break;
|
||||
case _CONFIG:
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_5), false);
|
||||
break;
|
||||
default:
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
case _DEFAULT_LAYER_2:
|
||||
oled_write_P(PSTR(OLED_RENDER_DEFAULT_LAYER2), false);
|
||||
break;
|
||||
case _DEFAULT_LAYER_3:
|
||||
oled_write_P(PSTR(OLED_RENDER_DEFAULT_LAYER3), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR(OLED_RENDER_DEFAULT_LAYER1), false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Graphic to show which layer on the stack is enabled
|
||||
void render_layer_state_graphic(void) {
|
||||
|
||||
void render_layer_state(void) {
|
||||
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_NAME), false);
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_BASE), get_highest_layer(layer_state) == FIRST_DEFAULT_LAYER);
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_NAVIGATION), get_highest_layer(layer_state) == _NAVIGATION);
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_NUMBER), get_highest_layer(layer_state) == _NUMBER);
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_SYMBOL), get_highest_layer(layer_state) == _SYMBOL);
|
||||
oled_write_P(PSTR(OLED_RENDER_LAYER_CONFIG), get_highest_layer(layer_state) == _CONFIG);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _NAVIGATION:
|
||||
oled_write_P(lyr_nav, false );
|
||||
break;
|
||||
case _NUMBER:
|
||||
oled_write_P(lyr_num, false );
|
||||
break;
|
||||
case _SYMBOL:
|
||||
oled_write_P(lyr_sym, false );
|
||||
break;
|
||||
case _CONFIG:
|
||||
oled_write_P(lyr_cfg, false );
|
||||
break;
|
||||
default:
|
||||
oled_write_P(lyr_def, false );
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Shows the Host LED State (Num lock, caps lock , scroll lock)
|
||||
void render_keylock_status(bool vertical) {
|
||||
|
||||
void render_keylock_status(void) {
|
||||
if (vertical) {
|
||||
oled_write_ln_P(PSTR(OLED_RENDER_KEYLOCK_NAME), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
oled_write_P(PSTR(OLED_RENDER_KEYLOCK_NAME), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("N"), host_keyboard_led_state().num_lock);
|
||||
oled_write_P(PSTR("C"), host_keyboard_led_state().caps_lock || is_caps_word_on() );
|
||||
oled_write_ln_P(PSTR("S"), host_keyboard_led_state().scroll_lock );
|
||||
host_keyboard_led_state().num_lock ? oled_write_P(num_on, false ) : oled_write_P(num_off, false );
|
||||
host_keyboard_led_state().caps_lock || is_caps_word_on() ? oled_write_P(caps_on, false ) : oled_write_P(caps_off, false );
|
||||
host_keyboard_led_state().scroll_lock ? oled_write_P(scroll_on, false ) : oled_write_P(scroll_off, false );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void render_mod_status(void) {
|
||||
// Indicates which modifies are enabled
|
||||
void render_mod_status(bool vertical) {
|
||||
|
||||
uint8_t current_mod = get_mods();
|
||||
uint8_t current_osm = get_oneshot_mods();
|
||||
|
||||
oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
if (vertical) {
|
||||
oled_write_ln_P(PSTR(OLED_RENDER_MODS_NAME), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
bool isShift = (current_mod | current_osm) & MOD_MASK_SHIFT;
|
||||
bool isCtrl = (current_mod | current_osm) & MOD_MASK_CTRL;
|
||||
bool isAlt = (current_mod | current_osm) & MOD_MASK_ALT;
|
||||
bool isGUI = (current_mod | current_osm) & MOD_MASK_GUI;
|
||||
(current_mod | current_osm) & MOD_MASK_SHIFT ? oled_write_P(shift_on, false) : oled_write_P(shift_off, false );
|
||||
(current_mod | current_osm) & MOD_MASK_CTRL ? oled_write_P(ctrl_on, false ) : oled_write_P(ctrl_off, false );
|
||||
|
||||
oled_write_P(PSTR("S"), isShift );
|
||||
oled_write_P(PSTR("C"), isCtrl );
|
||||
oled_write_P(PSTR("A"), isAlt );
|
||||
oled_write_P(PSTR("G"), isGUI );
|
||||
if (vertical) {
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
(current_mod | current_osm) & MOD_MASK_ALT ? oled_write_P(alt_on, false ): oled_write_P(alt_off, false );
|
||||
(current_mod | current_osm) & MOD_MASK_GUI ? oled_write_P(gui_on, false ): oled_write_P(gui_off, false );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void render_oled_main(void) {
|
||||
// Indicates which features are turned on or off
|
||||
void render_feature_status(bool vertical) {
|
||||
|
||||
render_default_layer_state();
|
||||
render_keylock_status();
|
||||
render_mod_status();
|
||||
render_layer_state();
|
||||
if (vertical) {
|
||||
oled_write_ln_P(PSTR(OLED_RENDER_FEATURE_NAME), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
rgb_matrix_is_enabled() ? oled_write_P(rgb_on, false) : oled_write_P(rgb_off, false);
|
||||
#else
|
||||
oled_write_P(rgb_off, false);
|
||||
#endif //RGB_MATRIX_ENABLED
|
||||
|
||||
// only works on master side
|
||||
drag_scroll_is_enabled() ? oled_write_P(dragscr_on, false) : oled_write_P(dragscr_off, false);
|
||||
|
||||
if (vertical) {
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
is_audio_on() ? oled_write_P(sound_on, false) : oled_write_P(sound_off, false);
|
||||
#else
|
||||
oled_write_P(sound_off, false);
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
haptic_get_enable() ? oled_write_P(haptic_on, false) : oled_write_P(haptic_off, false);
|
||||
#else
|
||||
oled_write_P(haptic_off, false);
|
||||
#endif //HAPTIC_ENABLE
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Coordinate the OLED rendering
|
||||
bool oled_task_user(void) {
|
||||
|
||||
#if defined(OLED_DISPLAY_128X64)
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
|
||||
render_oled_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
oled_set_cursor(0,0);
|
||||
render_layer_state();
|
||||
|
||||
oled_set_cursor(0,1);
|
||||
oled_write_P(sep_v, false);
|
||||
|
||||
oled_set_cursor(0,4);
|
||||
render_mod_status(false);
|
||||
|
||||
oled_set_cursor(0,5);
|
||||
oled_write_P(sep_v, false);
|
||||
|
||||
oled_set_cursor(0,7);
|
||||
render_keylock_status(false);
|
||||
|
||||
oled_set_cursor(13,7);
|
||||
render_feature_status(false);
|
||||
|
||||
oled_set_cursor(15,3);
|
||||
oled_write_P(klor_small_face_1, false);
|
||||
|
||||
oled_set_cursor(15,4);
|
||||
oled_write_P(klor_small_face_2, false);
|
||||
} else {
|
||||
|
||||
oled_set_cursor(0,0);
|
||||
oled_write_raw_P(klor_face, sizeof(klor_face));
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
//process_record_user is only processed on master side
|
||||
//split side OLED does not respond to key presses custom behaviors
|
||||
if (is_keyboard_master()) {
|
||||
|
||||
oled_set_cursor(0,0);
|
||||
render_keylock_status(true);
|
||||
|
||||
oled_set_cursor(0,3);
|
||||
render_feature_status(true);
|
||||
|
||||
#if defined(WPM_ENABLE)
|
||||
|
||||
oled_set_cursor(0,7);
|
||||
oled_write_P(PSTR(OLED_RENDER_WPM_NAME), false);
|
||||
|
||||
oled_set_cursor(1,8);
|
||||
oled_write_P(get_u8_str(get_current_wpm(), ' '), false);
|
||||
|
||||
render_luna();
|
||||
|
||||
#endif //WPM_ENABLE
|
||||
|
||||
} else {
|
||||
|
||||
#if defined(KEYBOARD_barbellboards_rollow)
|
||||
render_rollow_logo();
|
||||
#elif defined(KEYBOARD_crkbd)
|
||||
render_crkbd_logo();
|
||||
#else
|
||||
render_qmk_logo();
|
||||
#endif
|
||||
oled_set_cursor(0,0);
|
||||
render_layer_state();
|
||||
|
||||
oled_set_cursor(0,2);
|
||||
render_layer_state_graphic();
|
||||
|
||||
oled_set_cursor(0,7);
|
||||
render_mod_status(true);
|
||||
|
||||
oled_set_cursor(0,13);
|
||||
oled_write_P(qmk_logo_small, false);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
|
||||
//OLED_ROTATION_270 for Rollow/Corne/Swoop
|
||||
//OLED_ROTATION_180 for KLOR
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
#if defined(OLED_DISPLAY_128X64)
|
||||
return OLED_ROTATION_180;
|
||||
#else
|
||||
return OLED_ROTATION_270;
|
||||
#endif
|
||||
|
||||
return OLED_ROTATION_270;
|
||||
|
||||
} else {
|
||||
|
||||
return OLED_ROTATION_0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,99 +2,163 @@
|
|||
|
||||
#include "t4corun.h"
|
||||
|
||||
#define OLED_RENDER_KEYLOCK_NAME "Lock:"
|
||||
#define OLED_RENDER_MODS_NAME "Mods:"
|
||||
#define OLED_RENDER_KEYLOCK_NAME "Lock"
|
||||
#define OLED_RENDER_MODS_NAME "Mods"
|
||||
#define OLED_RENDER_FEATURE_NAME "Feat"
|
||||
#define OLED_RENDER_WPM_NAME "Wpm"
|
||||
|
||||
#define OLED_RENDER_LAYOUT_NAME "Lyout"
|
||||
#define OLED_RENDER_LAYOUT_QWERTY " qrty"
|
||||
#define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH"
|
||||
#define OLED_RENDER_LAYOUT_GAME " Game"
|
||||
#if defined(OLED_DISPLAY_128X64)
|
||||
# define OLED_RENDER_DEFAULT_LAYER1 "QWERTY "
|
||||
# define OLED_RENDER_DEFAULT_LAYER2 "COLEMAK DH"
|
||||
# define OLED_RENDER_DEFAULT_LAYER3 "GAME "
|
||||
|
||||
#define OLED_RENDER_LAYER_NAME "Layer"
|
||||
#define OLED_RENDER_LAYER_BASE " Def "
|
||||
#define OLED_RENDER_LAYER_NAVIGATION " Nav "
|
||||
#define OLED_RENDER_LAYER_NUMBER " Num "
|
||||
#define OLED_RENDER_LAYER_SYMBOL " Sym "
|
||||
#define OLED_RENDER_LAYER_CONFIG " Cfg "
|
||||
# define OLED_RENDER_LAYER_2 "Navigation"
|
||||
# define OLED_RENDER_LAYER_3 "Number "
|
||||
# define OLED_RENDER_LAYER_4 "Symbol "
|
||||
# define OLED_RENDER_LAYER_5 "Config "
|
||||
#else
|
||||
//128x32 are ? x 5 char wide
|
||||
# define OLED_RENDER_DEFAULT_LAYER1 "Qwrty"
|
||||
# define OLED_RENDER_DEFAULT_LAYER2 "Clmak"
|
||||
# define OLED_RENDER_DEFAULT_LAYER3 "Game "
|
||||
|
||||
void render_crkbd_logo(void);
|
||||
void render_rollow_logo(void);
|
||||
void render_qmk_logo(void);
|
||||
void render_default_layer_state(void);
|
||||
void render_layer_state(void);
|
||||
void render_keylock_status(void);
|
||||
void render_mod_status(void);
|
||||
void render_oled_main(void);
|
||||
bool oled_task_user(void);
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation);
|
||||
# define OLED_RENDER_LAYER_2 " Nav "
|
||||
# define OLED_RENDER_LAYER_3 " Num "
|
||||
# define OLED_RENDER_LAYER_4 " Sym "
|
||||
# define OLED_RENDER_LAYER_5 " Cfg "
|
||||
#endif
|
||||
|
||||
static const char PROGMEM crkbd_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0
|
||||
// LUNA PET Variables
|
||||
#if defined(WPM_ENABLE)
|
||||
# define OLED_LUNA_X 0
|
||||
# define OLED_LUNA_Y 13
|
||||
# define OLED_LUNA_MIN_WALK_SPEED 10
|
||||
# define OLED_LUNA_MIN_RUN_SPEED 40
|
||||
# define OLED_LUNA_ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||
# define OLED_LUNA_ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
|
||||
#endif //WPM_ENABLE
|
||||
|
||||
void render_layer_state(void);
|
||||
void render_layer_state_graphic(void);
|
||||
void render_keylock_status(bool vertical);
|
||||
void render_mod_status(bool vertical);
|
||||
void render_feature_status(bool vertical);
|
||||
|
||||
|
||||
static const char PROGMEM scroll_off[] = {0x8D, 0};
|
||||
static const char PROGMEM scroll_on[] = {0x8E, 0};
|
||||
|
||||
static const char PROGMEM num_off[] = {0xAD, 0};
|
||||
static const char PROGMEM num_on[] = {0xAE, 0};
|
||||
|
||||
static const char PROGMEM caps_off[] = {0xCD, 0};
|
||||
static const char PROGMEM caps_on[] = {0xCE, 0};
|
||||
|
||||
static const char PROGMEM shift_off[] = {0x85, 0x86, 0};
|
||||
static const char PROGMEM shift_on[] = {0x87, 0x88, 0};
|
||||
|
||||
static const char PROGMEM ctrl_off[] = {0xA9, 0xAA, 0};
|
||||
static const char PROGMEM ctrl_on[] = {0xAB, 0xAC, 0};
|
||||
|
||||
static const char PROGMEM alt_off[] = {0xA5, 0xA6, 0};
|
||||
static const char PROGMEM alt_on[] = {0xA7, 0xA8, 0};
|
||||
|
||||
static const char PROGMEM gui_off[] = {0x89, 0x8A, 0};
|
||||
static const char PROGMEM gui_on[] = {0x8B, 0x8C, 0};
|
||||
|
||||
static const char PROGMEM rgb_off[] = {0xC5, 0xC6, 0};
|
||||
static const char PROGMEM rgb_on[] = {0xC7, 0xC8, 0};
|
||||
|
||||
static const char PROGMEM dragscr_off[] = {0xC9, 0xCA, 0};
|
||||
static const char PROGMEM dragscr_on[] = {0xCB, 0xCC, 0};
|
||||
|
||||
static const char PROGMEM sound_off[] = {0x8F, 0x90, 0};
|
||||
static const char PROGMEM sound_on[] = {0xAF, 0xB0, 0};
|
||||
|
||||
static const char PROGMEM haptic_off[] = {0x91, 0x92, 0};
|
||||
static const char PROGMEM haptic_on[] = {0xB1, 0xB2, 0};
|
||||
|
||||
static const char PROGMEM lyr_cfg[] = {
|
||||
0xE1, 0xD1, 0xD2, 0xD3, 0xE1,
|
||||
0xE1, 0xBA, 0xBB, 0xBC, 0xE1,
|
||||
0xE1, 0xB7, 0xB8, 0xB9, 0xE1,
|
||||
0xE1, 0xD7, 0xD8, 0xD9, 0xE1, 0x00
|
||||
};
|
||||
|
||||
// copied from Drashna
|
||||
static const char PROGMEM qmk_logo[] = { // 128x24
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8,
|
||||
0xF8, 0x3F, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00,
|
||||
0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xDF, 0xBF,
|
||||
0xBF, 0x00, 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1F, 0x3F, 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E,
|
||||
0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7F, 0x7F, 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x7F, 0x7E,
|
||||
0x03, 0x03, 0x7E, 0x7E, 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70,
|
||||
0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x1E,
|
||||
0x3F, 0x69, 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F,
|
||||
0x0F, 0x7E, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
static const char PROGMEM lyr_sym[] = {
|
||||
0xE1, 0x97, 0x98, 0x99, 0xE1,
|
||||
0xE1, 0xDA, 0xDB, 0xDC, 0xE1,
|
||||
0xE1, 0xB7, 0xB8, 0xB9, 0xE1,
|
||||
0xE1, 0xD7, 0xD8, 0xD9, 0xE1, 0x00
|
||||
};
|
||||
|
||||
|
||||
static const char PROGMEM rollow_logo[] = { // 128x32
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
|
||||
0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00,
|
||||
0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xff,
|
||||
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xe0, 0xe0, 0x80, 0x80, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0xf0, 0xf8, 0xf8,
|
||||
0xf8, 0x3c, 0xfc, 0xf8, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xf0, 0xf8, 0xf8, 0xfc, 0x3c, 0xf8, 0xf8, 0xf8, 0xf0,
|
||||
0xc0, 0x08, 0xf8, 0xf8, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0xf8, 0xf8, 0xe0, 0xe0, 0xf8, 0xf8, 0xf8,
|
||||
0xf8, 0x00, 0x00, 0x80, 0x80, 0xe0, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00,
|
||||
0x00, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff,
|
||||
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x07, 0x07, 0x01, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||
0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff,
|
||||
0x7f, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x07, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00,
|
||||
0x00, 0xff, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
|
||||
0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01,
|
||||
0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x07, 0x00, 0x00, 0x0f, 0x0f, 0x00,
|
||||
0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
static const char PROGMEM lyr_num[] = {
|
||||
0xE1, 0x97, 0x98, 0x99, 0xE1,
|
||||
0xE1, 0x9A, 0x9B, 0x9C, 0xE1,
|
||||
0xE1, 0xBA, 0xBB, 0xBC, 0xE1,
|
||||
0xE1, 0xD7, 0xD8, 0xD9, 0xE1, 0x00
|
||||
};
|
||||
|
||||
static const char PROGMEM lyr_nav[] = {
|
||||
0xE1, 0x97, 0x98, 0x99, 0xE1,
|
||||
0xE1, 0xB7, 0xB8, 0xB9, 0xE1,
|
||||
0xE1, 0xDA, 0xDB, 0xDC, 0xE1,
|
||||
0xE1, 0xD7, 0xD8, 0xD9, 0xE1, 0x00
|
||||
};
|
||||
|
||||
static const char PROGMEM lyr_def[] = {
|
||||
0xE1, 0x97, 0x98, 0x99, 0xE1,
|
||||
0xE1, 0xB7, 0xB8, 0xB9, 0xE1,
|
||||
0xE1, 0x9A, 0x9B, 0x9C, 0xE1,
|
||||
0xE1, 0xD4, 0xD5, 0xD6, 0xE1, 0x00
|
||||
};
|
||||
|
||||
static const char PROGMEM qmk_logo_small[] = {
|
||||
0xE1, 0x9D, 0x9E, 0x9F, 0xE1,
|
||||
0xE1, 0xBD, 0xBE, 0xBF, 0xE1,
|
||||
0xE1, 0xDD, 0xDE, 0xDF, 0xE1, 0x00
|
||||
};
|
||||
|
||||
#if defined(OLED_DISPLAY_128X64)
|
||||
|
||||
static const char PROGMEM sep_v[] = {0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0};
|
||||
|
||||
static const char PROGMEM klor_small_face_1[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xE1, 0};
|
||||
static const char PROGMEM klor_small_face_2[] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xE1, 0};
|
||||
|
||||
static const char PROGMEM klor_face[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
|
||||
0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#endif // OLED_DISPLAY_128X64
|
233
users/t4corun/lib/font.c
Normal file
233
users/t4corun/lib/font.c
Normal file
|
@ -0,0 +1,233 @@
|
|||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
static const unsigned char PROGMEM font[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xB6, 0xFF, 0xB6, 0x94, 0x00,
|
||||
0x08, 0x0C, 0x7E, 0x0C, 0x08, 0x00,
|
||||
0x10, 0x30, 0x7E, 0x30, 0x10, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00,
|
||||
0x2E, 0x2A, 0x7F, 0x2A, 0x3A, 0x00,
|
||||
0x20, 0x12, 0x08, 0x24, 0x02, 0x00,
|
||||
0x37, 0x49, 0x49, 0x37, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x7F, 0x51, 0x49, 0x45, 0x7F, 0x00,
|
||||
0x08, 0x04, 0x02, 0x7F, 0x00, 0x00,
|
||||
0x71, 0x49, 0x49, 0x49, 0x4F, 0x00,
|
||||
0x41, 0x41, 0x49, 0x49, 0x77, 0x00,
|
||||
0x0F, 0x10, 0x10, 0x10, 0x7F, 0x00,
|
||||
0x4F, 0x49, 0x49, 0x49, 0x71, 0x00,
|
||||
0x7E, 0x49, 0x49, 0x49, 0x70, 0x00,
|
||||
0x01, 0x01, 0x71, 0x09, 0x07, 0x00,
|
||||
0x77, 0x49, 0x49, 0x49, 0x77, 0x00,
|
||||
0x07, 0x49, 0x49, 0x49, 0x3F, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x01, 0x01, 0x59, 0x09, 0x0F, 0x00,
|
||||
0x7F, 0x41, 0x5D, 0x59, 0x4F, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x7F, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x76, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x41, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x49, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x09, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x49, 0x7B, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x00, 0x7F, 0x00, 0x00, 0x00,
|
||||
0x70, 0x40, 0x40, 0x40, 0x7F, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x77, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x01, 0x1F, 0x01, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x0F, 0x00,
|
||||
0x7F, 0x41, 0x71, 0x41, 0x7F, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x19, 0x6F, 0x00,
|
||||
0x47, 0x49, 0x49, 0x49, 0x79, 0x00,
|
||||
0x01, 0x01, 0x7F, 0x01, 0x01, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x7F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x7F, 0x40, 0x7F, 0x40, 0x7F, 0x00,
|
||||
0x77, 0x08, 0x08, 0x08, 0x77, 0x00,
|
||||
0x4F, 0x48, 0x48, 0x48, 0x7F, 0x00,
|
||||
0x61, 0x51, 0x49, 0x45, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x00, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x7F, 0x00, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x00, 0x07, 0x08, 0x00, 0x00,
|
||||
0x60, 0x54, 0x54, 0x54, 0x7C, 0x00,
|
||||
0x7F, 0x44, 0x44, 0x44, 0x78, 0x00,
|
||||
0x7C, 0x44, 0x44, 0x44, 0x44, 0x00,
|
||||
0x78, 0x44, 0x44, 0x44, 0x7F, 0x00,
|
||||
0x7C, 0x54, 0x54, 0x54, 0x5C, 0x00,
|
||||
0x08, 0x7F, 0x09, 0x09, 0x09, 0x00,
|
||||
0x38, 0xA4, 0xA4, 0xA4, 0xFC, 0x00,
|
||||
0x7F, 0x04, 0x04, 0x04, 0x78, 0x00,
|
||||
0x00, 0x00, 0x7D, 0x00, 0x00, 0x00,
|
||||
0x70, 0x40, 0x40, 0x7D, 0x00, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x76, 0x00,
|
||||
0x00, 0x00, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x7C, 0x04, 0x7C, 0x04, 0x7C, 0x00,
|
||||
0x7C, 0x04, 0x04, 0x04, 0x78, 0x00,
|
||||
0x7C, 0x44, 0x44, 0x44, 0x7C, 0x00,
|
||||
0xFC, 0x24, 0x24, 0x24, 0x38, 0x00,
|
||||
0x38, 0x24, 0x24, 0x24, 0xFC, 0x00,
|
||||
0x7C, 0x04, 0x04, 0x04, 0x04, 0x00,
|
||||
0x5C, 0x54, 0x54, 0x54, 0x74, 0x00,
|
||||
0x04, 0x04, 0x7F, 0x04, 0x04, 0x00,
|
||||
0x7C, 0x40, 0x40, 0x40, 0x7C, 0x00,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||
0x7C, 0x40, 0x7C, 0x40, 0x7C, 0x00,
|
||||
0x6C, 0x10, 0x10, 0x10, 0x6C, 0x00,
|
||||
0xBC, 0xA0, 0xA0, 0xA0, 0xFC, 0x00,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0,
|
||||
0xF0, 0xFE, 0xFF, 0x9F, 0x0F, 0x0F,
|
||||
0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||
0x0F, 0x0F, 0x9F, 0xFF, 0xFE, 0xF0,
|
||||
0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x08, 0x0C, 0x7E, 0x7F,
|
||||
0x7E, 0x0C, 0x08, 0x00, 0x00, 0x00,
|
||||
0x7F, 0x7F, 0x77, 0x73, 0x01, 0x00,
|
||||
0x01, 0x73, 0x77, 0x7F, 0x7F, 0x00,
|
||||
0x00, 0x00, 0x77, 0x77, 0x77, 0x00,
|
||||
0x77, 0x77, 0x77, 0x00, 0x00, 0x00,
|
||||
0x7F, 0x7F, 0x08, 0x08, 0x08, 0x7F,
|
||||
0x08, 0x08, 0x08, 0x7F, 0x7F, 0x00,
|
||||
0x00, 0x2E, 0x2A, 0x2A, 0x3A, 0x00,
|
||||
0x7F, 0x51, 0x55, 0x55, 0x45, 0x7F,
|
||||
0x00, 0x38, 0x00, 0x3E, 0x00, 0x38,
|
||||
0x00, 0x3C, 0x00, 0x30, 0x00, 0x00,
|
||||
0x00, 0x24, 0x24, 0x12, 0x12, 0x24,
|
||||
0x24, 0x12, 0x12, 0x24, 0x00, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00,
|
||||
0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00,
|
||||
0xC0, 0xE0, 0xF0, 0xF0, 0xF0, 0xE0,
|
||||
0xE6, 0xF7, 0xF3, 0xF0, 0x60, 0x00,
|
||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20,
|
||||
0x10, 0x10, 0x08, 0x08, 0x10, 0x10,
|
||||
0x20, 0x20, 0x40, 0x40, 0x80, 0x80,
|
||||
0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2,
|
||||
0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4,
|
||||
0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x00, 0x80, 0x00, 0x80, 0x00, 0x80,
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F,
|
||||
0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||
0x87, 0xE1, 0xF9, 0xF9, 0xE1, 0x87,
|
||||
0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00,
|
||||
0x00, 0x06, 0x06, 0x06, 0x0C, 0x18,
|
||||
0x30, 0x66, 0x66, 0x66, 0x00, 0x00,
|
||||
0x7F, 0x79, 0x79, 0x79, 0x73, 0x67,
|
||||
0x4F, 0x19, 0x19, 0x19, 0x7F, 0x00,
|
||||
0x00, 0x60, 0x70, 0x38, 0x1C, 0x0E,
|
||||
0x1C, 0x38, 0x70, 0x60, 0x00, 0x00,
|
||||
0x7F, 0x1F, 0x0F, 0x47, 0x63, 0x71,
|
||||
0x63, 0x47, 0x0F, 0x1F, 0x7F, 0x00,
|
||||
0x00, 0x3E, 0x04, 0x08, 0x3E, 0x00,
|
||||
0x7F, 0x41, 0x7B, 0x77, 0x41, 0x7F,
|
||||
0x7F, 0x43, 0x7F, 0x41, 0x7F, 0x47,
|
||||
0x7F, 0x43, 0x7F, 0x4F, 0x7F, 0x00,
|
||||
0x7F, 0x5B, 0x5B, 0x6D, 0x6D, 0x5B,
|
||||
0x5B, 0x6D, 0x6D, 0x5B, 0x7F, 0x00,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00,
|
||||
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x3F,
|
||||
0x3F, 0x7F, 0x7F, 0x38, 0x10, 0x00,
|
||||
0x88, 0x88, 0x55, 0x55, 0x22, 0x22,
|
||||
0x44, 0x44, 0x88, 0x88, 0x44, 0x44,
|
||||
0x22, 0x22, 0x55, 0x55, 0x88, 0x88,
|
||||
0x88, 0x88, 0x55, 0x55, 0x23, 0x23,
|
||||
0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47,
|
||||
0x23, 0x23, 0x55, 0x55, 0x88, 0x88,
|
||||
0x00, 0xA8, 0xA8, 0xFC, 0xFE, 0x07,
|
||||
0xFE, 0xFF, 0xFE, 0x07, 0xFE, 0xFF,
|
||||
0xFE, 0x07, 0xFE, 0xFC, 0xA8, 0xA8,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1C, 0x3E, 0x3E, 0x3E, 0x1C, 0x00,
|
||||
0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x00,
|
||||
0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1C, 0x62, 0x0A,
|
||||
0x62, 0x1C, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7F, 0x57, 0x7D, 0x67, 0x02, 0x1B,
|
||||
0x02, 0x67, 0x7D, 0x57, 0x7F, 0x00,
|
||||
0x7F, 0x01, 0x01, 0x01, 0x01, 0x3F,
|
||||
0x01, 0x01, 0x01, 0x01, 0x7F, 0x00,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x03, 0x3B,
|
||||
0x03, 0x7F, 0x7F, 0x7F, 0x7F, 0x00,
|
||||
0x00, 0x3E, 0x22, 0x22, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x5D, 0x5D, 0x5D, 0x7F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0,
|
||||
0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0,
|
||||
0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80,
|
||||
0x00, 0x00, 0x01, 0x01, 0x03, 0x03,
|
||||
0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07,
|
||||
0x03, 0x03, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||
0x04, 0x04, 0x08, 0x08, 0x04, 0x04,
|
||||
0x02, 0x02, 0x01, 0x01, 0x00, 0x00,
|
||||
0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E,
|
||||
0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C,
|
||||
0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88,
|
||||
0x00, 0x0A, 0x0A, 0x1F, 0x3F, 0xFE,
|
||||
0x3D, 0xFB, 0x3B, 0xE0, 0x3B, 0xFB,
|
||||
0x3D, 0xFE, 0x3F, 0x1F, 0x0A, 0x0A,
|
||||
};
|
|
@ -10,8 +10,9 @@
|
|||
# ?= means set the value if its not defined elsewhere
|
||||
|
||||
|
||||
|
||||
LTO_ENABLE ?= yes
|
||||
# optional features
|
||||
# use these values if not defined at the keyboard level
|
||||
LTO_ENABLE ?= no
|
||||
MAGIC_ENABLE ?= no
|
||||
CONSOLE_ENABLE ?= no
|
||||
UNICODE_ENABLE ?= no
|
||||
|
@ -25,15 +26,18 @@ POINTING_DEVICE_ENABLE ?= no
|
|||
OLED_ENABLE ?= no
|
||||
ENCODER_ENABLE ?= no
|
||||
ENCODER_MAP_ENABLE ?= no
|
||||
HAPTIC_ENABLE ?= no
|
||||
AUDIO_ENABLE ?= no
|
||||
WPM_ENABLE ?= yes
|
||||
|
||||
# qmk features we will force
|
||||
# qmk features we will force as these are critical for my workflow
|
||||
EXTRAKEY_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
||||
CAPS_WORD_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
||||
KEY_OVERRIDE_ENABLE = yes
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# include my code that will be common across all my keyboards
|
||||
|
||||
|
@ -46,8 +50,12 @@ SRC += \
|
|||
INTROSPECTION_KEYMAP_C += features/combo.c
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# include my code for enabled features for each keyboard
|
||||
# include optional code for enabled features for each keyboard
|
||||
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
SRC += features/oled.c
|
||||
SRC += features/oled.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
MUSIC_MODE = no
|
||||
endif
|
|
@ -1,18 +1,47 @@
|
|||
#include "t4corun.h"
|
||||
|
||||
static uint8_t current_base_layer = _DEFAULT_LAYER_1;
|
||||
// Keeps track of base layer so we can make one key to cycle through them
|
||||
// instead of making a key for each one */
|
||||
static uint8_t current_base_layer = _DEFAULT_LAYER_1;
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
// Should keep track of the Ploopy Nano drag scroll mode
|
||||
// There is a possibility of this being out of sync
|
||||
static bool drag_scroll_enabled = false;
|
||||
|
||||
state = update_tri_layer_state(state, _NAVIGATION, _NUMBER, _SYMBOL);
|
||||
return state;
|
||||
// Luna Pet Variables
|
||||
static bool isJumping = false;
|
||||
static bool showedJump = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Allows the OLED code to get the drag scroll mode
|
||||
bool drag_scroll_is_enabled(void) { return drag_scroll_enabled; }
|
||||
|
||||
// Allows the OLED code to see when space bar is pressed
|
||||
bool isLunaJumping(void) { return isJumping; }
|
||||
bool isJumpShown(void) { return showedJump; }
|
||||
|
||||
// Allows the OLED code to clear the space bar status when render is complete
|
||||
void setLunaJumped(void) { showedJump = true;}
|
||||
|
||||
// Hold Navigation and Number to get Symbol
|
||||
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NAVIGATION, _NUMBER, _SYMBOL); }
|
||||
|
||||
// Customize behavior for existing keycodes or create new ones
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
switch (keycode) {
|
||||
|
||||
case KC_SPC:
|
||||
if (record->event.pressed) {
|
||||
isJumping = true;
|
||||
showedJump = false;
|
||||
}
|
||||
else {
|
||||
isJumping = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case BASELYR:
|
||||
if (record->event.pressed) {
|
||||
|
||||
|
@ -22,7 +51,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return false;
|
||||
|
||||
|
||||
case RBSELYR:
|
||||
if (record->event.pressed) {
|
||||
|
||||
|
@ -32,7 +60,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return false;
|
||||
|
||||
|
||||
case PN_DRGS:
|
||||
if (record->event.pressed) {
|
||||
|
||||
|
@ -40,10 +67,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
// double_tap(KC_NUM, KC_NUM, WAIT_DELAY);
|
||||
double_tap(KC_NUM, WAIT_DELAY);
|
||||
|
||||
//I realize this may not work for the Charybdis nano
|
||||
drag_scroll_enabled = !drag_scroll_enabled;
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
case PN_PDPI:
|
||||
if (record->event.pressed) {
|
||||
|
||||
|
@ -101,5 +130,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
}
|
||||
|
||||
// let QMK process the normal behavior if not handled above
|
||||
return true;
|
||||
}
|
|
@ -2,6 +2,10 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include "features/taphold.h"
|
||||
|
||||
bool drag_scroll_is_enabled(void);
|
||||
bool isLunaJumping(void);
|
||||
bool isJumpShown(void);
|
||||
void setLunaJumped(void);
|
||||
|
||||
enum layers {
|
||||
_QWERTY = 0,
|
||||
|
@ -152,6 +156,36 @@ enum keycodes {
|
|||
#endif //RGB_MATRIX_ENABLE || RGBLIGHT_ENABLE
|
||||
|
||||
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
# define TR_HTOG HF_TOGG
|
||||
# define TR_HFBK HF_FDBK
|
||||
# define TR_HNXT HF_NEXT
|
||||
# define TR_HCNU HF_CONU
|
||||
# define TR_HRST HF_RST
|
||||
#else
|
||||
# define TR_HTOG ___x___
|
||||
# define TR_HFBK ___x___
|
||||
# define TR_HNXT ___x___
|
||||
# define TR_HCNU ___x___
|
||||
# define TR_HRST ___x___
|
||||
#endif //HAPTIC_ENABLe
|
||||
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
# define TR_ATOG AU_TOGG
|
||||
# define TR_CTOG CK_TOGG
|
||||
# define TR_CKUP CK_UP
|
||||
# define TR_CRST CK_RST
|
||||
#else
|
||||
# define TR_ATOG ___x___
|
||||
# define TR_CTOG ___x___
|
||||
# define TR_CKUP ___x___
|
||||
# define TR_CRST ___x___
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
|
||||
|
||||
|
||||
#define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER
|
||||
#define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1)
|
||||
#define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2)
|
||||
|
@ -192,7 +226,7 @@ enum keycodes {
|
|||
|
||||
|
||||
#define LAYER_NAVIGATION \
|
||||
KC_ESC, KC_HOME, KC_UP, KC_END, KC_PGUP, ___x___, ___x___, ___x___, ___x___, CONFIG, \
|
||||
KC_ESC, KC_HOME, KC_UP, KC_END, KC_PGUP, ___x___, ___x___, SC_FILE, SC_SNIP, CONFIG, \
|
||||
___x___, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ___x___, _SCAG_MODS________________________, \
|
||||
_UCCPR_L___________________________________, ___x___, KC_APP, TR_SNIP, TR_SDPI, TR_PDPI, \
|
||||
ZOOMRST, NUM, KC_ENT, _LAYER_TRANS_____________
|
||||
|
@ -213,8 +247,7 @@ enum keycodes {
|
|||
|
||||
|
||||
#define LAYER_CONFIG \
|
||||
_NONE_5____________________________________, ___x___, ___x___, EE_CLR, QK_BOOT, _______, \
|
||||
_NONE_5____________________________________, ___x___, TR_LSFT, ___x___, ___x___, TR_RMOD, \
|
||||
TR_HRST, TR_HCNU, TR_HNXT, TR_HFBK, TR_HTOG, ___x___, ___x___, EE_CLR, QK_BOOT, _______, \
|
||||
TR_CRST, TR_CKUP, TR_CTOG, ___x___, TR_ATOG, ___x___, TR_LSFT, ___x___, ___x___, TR_RMOD, \
|
||||
KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, TR_RTOG, TR_RHUI, TR_RSAI, TR_RVAI, TR_RSPI, \
|
||||
BASELYR, TR_DMR1, TR_DMP1, ___x___, ___x___, TR_RTOG
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue