mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-11 04:10:58 +00:00
Compare commits
24 Commits
9feef896f7
...
7f016d8a47
Author | SHA1 | Date | |
---|---|---|---|
|
7f016d8a47 | ||
|
9b09e7c6d7 | ||
|
308d863dfb | ||
|
f1894e4bac | ||
|
adf5617271 | ||
|
791ab00ff3 | ||
|
53727062db | ||
|
98d0da7f8a | ||
|
c9b206ffc8 | ||
|
3fbde98ae7 | ||
|
d35cdcc933 | ||
|
7a518e509e | ||
|
b85a9abc96 | ||
|
2e762d12a9 | ||
|
0472399f67 | ||
|
ee90ad28e6 | ||
|
94e0770a5c | ||
|
209e652ff4 | ||
|
e14254335d | ||
|
bc2c5e7726 | ||
|
fc05929124 | ||
|
184c1e5187 | ||
|
0596720f7f | ||
|
051401175d |
4
.github/workflows/cli.yml
vendored
4
.github/workflows/cli.yml
vendored
@ -21,9 +21,13 @@ jobs:
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements-dev.txt
|
||||
- name: Run tests
|
||||
|
5
.github/workflows/format.yml
vendored
5
.github/workflows/format.yml
vendored
@ -22,6 +22,9 @@ jobs:
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@ -32,7 +35,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v34
|
||||
uses: tj-actions/changed-files@v35
|
||||
|
||||
- name: Run qmk formatters
|
||||
shell: 'bash {0}'
|
||||
|
3
.github/workflows/format_push.yml
vendored
3
.github/workflows/format_push.yml
vendored
@ -16,6 +16,9 @@ jobs:
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
5
.github/workflows/lint.yml
vendored
5
.github/workflows/lint.yml
vendored
@ -15,6 +15,9 @@ jobs:
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@ -24,7 +27,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v34
|
||||
uses: tj-actions/changed-files@v35
|
||||
|
||||
- name: Print info
|
||||
run: |
|
||||
|
3
.github/workflows/regen.yml
vendored
3
.github/workflows/regen.yml
vendored
@ -16,6 +16,9 @@ jobs:
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install python reqs
|
||||
|
3
.github/workflows/regen_push.yml
vendored
3
.github/workflows/regen_push.yml
vendored
@ -16,6 +16,9 @@ jobs:
|
||||
container: qmkfm/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
|
@ -7,7 +7,12 @@ endif
|
||||
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
|
||||
# Remove whitespace from any rule.mk provided vars
|
||||
# - env cannot be overwritten but cannot have whitespace anyway
|
||||
CONVERT_TO:=$(strip $(CONVERT_TO))
|
||||
ifneq ($(CONVERT_TO),)
|
||||
|
||||
# stash so we can overwrite env provided vars if needed
|
||||
ACTIVE_CONVERTER=$(CONVERT_TO)
|
||||
|
||||
@ -23,13 +28,13 @@ ifneq ($(CONVERT_TO),)
|
||||
TARGET := $(TARGET)_$(CONVERT_TO)
|
||||
|
||||
# Configure any defaults
|
||||
OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]'))
|
||||
OPT_DEFS += -DCONVERTER_TARGET=\"$(strip $(CONVERT_TO))\"
|
||||
OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')
|
||||
OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\"
|
||||
OPT_DEFS += -DCONVERTER_ENABLED
|
||||
VPATH += $(CONVERTER)
|
||||
|
||||
# Configure for "alias" - worst case it produces an idential define
|
||||
OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]'))
|
||||
OPT_DEFS += -DCONVERT_TO_$(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
# Finally run any converter specific logic
|
||||
include $(CONVERTER)/converter.mk
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright 2021 Jasper Chan
|
||||
* 2023 Huckies <https://github.com/Huckies>
|
||||
*
|
||||
* 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
|
||||
@ -15,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "aw20216.h"
|
||||
#include "wait.h"
|
||||
#include "spi_master.h"
|
||||
|
||||
/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite
|
||||
@ -34,6 +36,8 @@
|
||||
|
||||
#define AW_REG_CONFIGURATION 0x00 // PG0
|
||||
#define AW_REG_GLOBALCURRENT 0x01 // PG0
|
||||
#define AW_REG_RESET 0x2F // PG0
|
||||
#define AW_REG_MIXFUNCTION 0x46 // PG0
|
||||
|
||||
// Default value of AW_REG_CONFIGURATION
|
||||
// D7:D4 = 1011, SWSEL (SW1~SW12 active)
|
||||
@ -41,7 +45,10 @@
|
||||
// D2:D1 = 00, OSDE (open/short detection enable)
|
||||
// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
|
||||
#define AW_CONFIG_DEFAULT 0b10110000
|
||||
#define AW_MIXCR_DEFAULT 0b00000000
|
||||
#define AW_RESET_CMD 0xAE
|
||||
#define AW_CHIPEN 1
|
||||
#define AW_LPEN (0x01 << 1)
|
||||
|
||||
#define AW_PWM_REGISTER_COUNT 216
|
||||
|
||||
@ -94,6 +101,10 @@ static inline bool AW20216_write_register(pin_t cs_pin, uint8_t page, uint8_t re
|
||||
return AW20216_write(cs_pin, page, reg, &value, 1);
|
||||
}
|
||||
|
||||
void AW20216_soft_reset(pin_t cs_pin) {
|
||||
AW20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_RESET, AW_RESET_CMD);
|
||||
}
|
||||
|
||||
static void AW20216_init_scaling(pin_t cs_pin) {
|
||||
// Set constant current to the max, control brightness with PWM
|
||||
for (uint8_t i = 0; i < AW_PWM_REGISTER_COUNT; i++) {
|
||||
@ -111,15 +122,23 @@ static inline void AW20216_soft_enable(pin_t cs_pin) {
|
||||
AW20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
|
||||
}
|
||||
|
||||
static inline void AW20216_auto_lowpower(pin_t cs_pin) {
|
||||
AW20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_MIXFUNCTION, AW_MIXCR_DEFAULT | AW_LPEN);
|
||||
}
|
||||
|
||||
void AW20216_init(pin_t cs_pin, pin_t en_pin) {
|
||||
setPinOutput(en_pin);
|
||||
writePinHigh(en_pin);
|
||||
|
||||
AW20216_soft_reset(cs_pin);
|
||||
wait_ms(2);
|
||||
|
||||
// Drivers should start with all scaling and PWM registers as off
|
||||
AW20216_init_current_limit(cs_pin);
|
||||
AW20216_init_scaling(cs_pin);
|
||||
|
||||
AW20216_soft_enable(cs_pin);
|
||||
AW20216_auto_lowpower(cs_pin);
|
||||
}
|
||||
|
||||
void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
|
@ -37,6 +37,9 @@
|
||||
# undef POINTING_DEVICE_CS_PIN
|
||||
# define POINTING_DEVICE_CS_PIN A15 // b14
|
||||
# define PMW33XX_LIFTOFF_DISTANCE 0b1111
|
||||
|
||||
# define RGB_MATRIX_LED_FLUSH_LIMIT 33
|
||||
# define RGB_MATRIX_LED_PROCESS_LIMIT 29
|
||||
#endif
|
||||
|
||||
#undef ROTATIONAL_TRANSFORM_ANGLE
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
#include "drashna.h"
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_charybdis_4x6_wrapper(...) LAYOUT_charybdis_4x6(__VA_ARGS__)
|
||||
#define LAYOUT_charybdis_4x6_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
@ -26,14 +27,13 @@
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_CLUE, \
|
||||
SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
OS_LSFT,CTL_T(K21), K22, K23, K24, K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
|
||||
OS_LSFT,CTL_T(K21),ALT_T(K22),GUI_T(K23),K24,K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
|
||||
SFT_T(KC_GRV), OS_LALT, OS_LGUI, TT(_MOUSE), KC_ENT, \
|
||||
KC_SPC, BK_LWER, DL_RAIS \
|
||||
)
|
||||
|
||||
#define LAYOUT_base_wrapper(...) LAYOUT_charybdis_4x6_base(__VA_ARGS__)
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_DEFAULT_LAYER_1] = LAYOUT_base_wrapper(
|
||||
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||
@ -120,13 +120,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
void keyboard_post_init_keymap(void) {
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] =
|
||||
g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] =
|
||||
g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] =
|
||||
LED_FLAG_MODIFIER;
|
||||
g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] = g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] = g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] = LED_FLAG_MODIFIER;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -171,8 +167,8 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{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}},
|
||||
{{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}},
|
||||
};
|
||||
{{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}}
|
||||
};
|
||||
|
||||
# ifdef ENCODER_MAP_ENABLE
|
||||
const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
|
||||
|
@ -37,8 +37,7 @@ ifeq ($(strip $(OVERLOAD_FEATURES)), yes)
|
||||
NKRO_ENABLE = yes # Enable N-Key Rollover
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
|
||||
KEYBOARD_SHARED_EP = yes
|
||||
MOUSE_SHARED_EP = yes
|
||||
MOUSE_SHARED_EP = no
|
||||
|
||||
AUTOCORRECT_ENABLE = yes
|
||||
CAPS_WORD_ENABLE = yes
|
||||
|
@ -133,14 +133,24 @@ bool oled_task_keymap(void) {
|
||||
|
||||
// render_rgb_hsv(1, 13);
|
||||
oled_set_cursor(1, 13);
|
||||
// oled_write_P(PSTR("Timer:"), false);
|
||||
// oled_write(get_u8_str((uint8_t)(timer_elapsed32(oled_timer) / 1000), ' '), false);
|
||||
oled_write_P(PSTR("Status: "), false);
|
||||
if (is_oled_enabled) {
|
||||
oled_write_P(PSTR("on "), false);
|
||||
} else {
|
||||
oled_write_P(PSTR("off"), false);
|
||||
}
|
||||
oled_write_P(PSTR("OS: "), false);
|
||||
extern os_variant_t os_type;
|
||||
switch (os_type) {
|
||||
case OS_LINUX:
|
||||
oled_write_ln_P(PSTR("Linux"), false);
|
||||
break;
|
||||
case OS_WINDOWS:
|
||||
oled_write_ln_P(PSTR("Windows"), false);
|
||||
break;
|
||||
case OS_MACOS:
|
||||
oled_write_ln_P(PSTR("MacOS"), false);
|
||||
break;
|
||||
case OS_IOS:
|
||||
oled_write_ln_P(PSTR("iOS"), false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
render_keylogger_status(1, 14);
|
||||
|
||||
|
65
keyboards/gkeyboard/gpad8_2r/config.h
Normal file
65
keyboards/gkeyboard/gpad8_2r/config.h
Normal file
@ -0,0 +1,65 @@
|
||||
// Copyright 2023 gkeyboard (@gkeyboard)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
|
||||
|
||||
#define RGB_DI_PIN GP19
|
||||
#define RGB_MATRIX_LED_COUNT 16
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#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_MULTIWIDE
|
||||
#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
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
80
keyboards/gkeyboard/gpad8_2r/info.json
Normal file
80
keyboards/gkeyboard/gpad8_2r/info.json
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"manufacturer": "gkeyboard",
|
||||
"keyboard_name": "GPAD8-2R",
|
||||
"url": "https://github.com/gkeyboard/GPAD8-2R",
|
||||
"maintainer": "gkeyboard",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040",
|
||||
"board": "GENERIC_RP_RP2040",
|
||||
"usb": {
|
||||
"vid": "0x474B",
|
||||
"pid": "0x4202",
|
||||
"device_version": "1.0.0"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"rgb_matrix": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["GP12", "GP11", "GP10", "GP9"],
|
||||
"rows": ["GP4", "GP5", "GP6"]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"encoder": {
|
||||
"enabled": true,
|
||||
"rotary": [
|
||||
{
|
||||
"pin_a": "GP29",
|
||||
"pin_b": "GP28",
|
||||
"resolution": 4
|
||||
},
|
||||
{
|
||||
"pin_a": "GP2",
|
||||
"pin_b": "GP3",
|
||||
"resolution": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "WS2812",
|
||||
"layout": [
|
||||
{ "flags": 4, "matrix": [1, 0], "x": 28, "y": 12 },
|
||||
{ "flags": 4, "matrix": [1, 1], "x": 84, "y": 12 },
|
||||
{ "flags": 4, "matrix": [1, 2], "x": 140, "y": 12 },
|
||||
{ "flags": 4, "matrix": [1, 3], "x": 196, "y": 12 },
|
||||
{ "flags": 4, "matrix": [2, 0], "x": 28, "y": 28 },
|
||||
{ "flags": 4, "matrix": [2, 1], "x": 84, "y": 28 },
|
||||
{ "flags": 4, "matrix": [2, 2], "x": 140, "y": 28 },
|
||||
{ "flags": 4, "matrix": [2, 3], "x": 196, "y": 28 },
|
||||
{ "flags": 2, "x": 28, "y": 44 },
|
||||
{ "flags": 2, "x": 84, "y": 44 },
|
||||
{ "flags": 2, "x": 140, "y": 44 },
|
||||
{ "flags": 2, "x": 196, "y": 44 },
|
||||
{ "flags": 2, "x": 28, "y": 60 },
|
||||
{ "flags": 2, "x": 84, "y": 60 },
|
||||
{ "flags": 2, "x": 140, "y": 60 },
|
||||
{ "flags": 2, "x": 196, "y": 60 }
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 0], "x": 0.0, "y": 0.0 },
|
||||
{ "matrix": [0, 3], "x": 3.0, "y": 0.0 },
|
||||
{ "matrix": [1, 0], "x": 0.0, "y": 1.25 },
|
||||
{ "matrix": [1, 1], "x": 1.0, "y": 1.25 },
|
||||
{ "matrix": [1, 2], "x": 2.0, "y": 1.25 },
|
||||
{ "matrix": [1, 3], "x": 3.0, "y": 1.25 },
|
||||
{ "matrix": [2, 0], "x": 0.0, "y": 2.25 },
|
||||
{ "matrix": [2, 1], "x": 1.0, "y": 2.25 },
|
||||
{ "matrix": [2, 2], "x": 2.0, "y": 2.25 },
|
||||
{ "matrix": [2, 3], "x": 3.0, "y": 2.25 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
49
keyboards/gkeyboard/gpad8_2r/keymaps/default/keymap.c
Normal file
49
keyboards/gkeyboard/gpad8_2r/keymaps/default/keymap.c
Normal file
@ -0,0 +1,49 @@
|
||||
/* Copyright 2023 gkeyboard
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT(
|
||||
KC_MUTE, RGB_TOG,
|
||||
KC_A, KC_B, KC_C, KC_D,
|
||||
KC_E, KC_F, KC_G, KC_H
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) },
|
||||
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
|
||||
};
|
||||
#endif
|
1
keyboards/gkeyboard/gpad8_2r/keymaps/default/rules.mk
Normal file
1
keyboards/gkeyboard/gpad8_2r/keymaps/default/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
ENCODER_MAP_ENABLE = yes
|
73
keyboards/gkeyboard/gpad8_2r/keymaps/via/keymap.c
Normal file
73
keyboards/gkeyboard/gpad8_2r/keymaps/via/keymap.c
Normal file
@ -0,0 +1,73 @@
|
||||
/* Copyright 2023 gkeyboard
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT(
|
||||
KC_MUTE, RGB_TOG,
|
||||
KC_A, KC_B, KC_C, KC_D,
|
||||
KC_E, KC_F, KC_G, KC_H
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[4] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[5] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[6] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[7] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) },
|
||||
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[4] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[5] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[6] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||
[7] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
|
||||
};
|
||||
#endif
|
2
keyboards/gkeyboard/gpad8_2r/keymaps/via/rules.mk
Normal file
2
keyboards/gkeyboard/gpad8_2r/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
VIA_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
27
keyboards/gkeyboard/gpad8_2r/readme.md
Normal file
27
keyboards/gkeyboard/gpad8_2r/readme.md
Normal file
@ -0,0 +1,27 @@
|
||||
# GPAD8-2R
|
||||
|
||||
![GPAD8-2R](https://i.imgur.com/jAaO7gYh.png)
|
||||
|
||||
8 Keys Custom Macro Pad, 2 Encoders, with USB Type-C, RGB underglow, RGB Per Key Lighting.
|
||||
|
||||
* Keyboard Maintainer: [gkeyboard](https://github.com/gkeyboard)
|
||||
* Hardware Supported: GPAD8-2R PCB
|
||||
* Hardware Availability: http://www.mltelectronic.com
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make gkeyboard/gpad8_2r:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make gkeyboard/gpad8_2r:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
1
keyboards/gkeyboard/gpad8_2r/rules.mk
Normal file
1
keyboards/gkeyboard/gpad8_2r/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
WS2812_DRIVER = vendor
|
@ -130,25 +130,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, KC_NUKE, _______
|
||||
),
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
# ifdef ENCODER_MAP_ENABLE
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
|
||||
[_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
|
||||
[_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
|
||||
[_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
|
||||
[_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
|
||||
[_DIABLO] = { { _______, _______ }, { _______, _______ } },
|
||||
[_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
|
||||
[_MEDIA] = { { _______, _______ }, { _______, _______ } },
|
||||
[_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
|
||||
[_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
|
||||
[_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
|
||||
[_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
|
||||
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_DEFAULT_LAYER_3] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_DEFAULT_LAYER_4] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
|
||||
[_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
|
||||
[_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
|
||||
[_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
};
|
||||
// clang-format on
|
||||
#else
|
||||
# else
|
||||
|
||||
deferred_token encoder_token = INVALID_DEFERRED_TOKEN;
|
||||
static int8_t last_direction = -1;
|
||||
@ -160,11 +161,11 @@ static uint32_t encoder_callback(uint32_t trigger_time, void *cb_arg) {
|
||||
}
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
# ifdef SWAP_HANDS_ENABLE
|
||||
# ifdef SWAP_HANDS_ENABLE
|
||||
if (swap_hands) {
|
||||
index ^= 1;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
if (index == 0) {
|
||||
tap_code_delay(clockwise ? KC_VOLD : KC_VOLU, 5);
|
||||
} else if (index == 1) {
|
||||
@ -185,7 +186,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
@ -214,4 +215,8 @@ void oled_render_large_display(bool side) {
|
||||
render_unicode_mode(1, 14);
|
||||
}
|
||||
}
|
||||
|
||||
void render_oled_title(bool side) {
|
||||
oled_write_P(side ? PSTR(" Tractyl ") : PSTR(" Manuform "), true);
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define TT_MDIA TT(_MEDIA)
|
||||
|
||||
// enum more_custom_keycodes {
|
||||
// KC_P00 = NEW_SAFE_RANGE
|
||||
// KC_P00 = USER_SAFE_RANGE
|
||||
//};
|
||||
|
||||
// clang-format off
|
||||
|
@ -16,7 +16,9 @@
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
|
||||
enum more_custom_keycodes {
|
||||
KC_SWAP_NUM = USER_SAFE_RANGE,
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_moonlander_wrapper(...) LAYOUT_moonlander(__VA_ARGS__)
|
||||
|
@ -17,6 +17,8 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// safe range starts at `USER_SAFE_RANGE` instead.
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
@ -26,6 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[0] = { ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
|
||||
[1] = { ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
void eeconkfig_init_user(void) {
|
||||
rgblight_enable();
|
||||
|
@ -29,20 +29,17 @@ The PCB should indicate which revision this is.
|
||||
|
||||
While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse sensor.
|
||||
|
||||
The default behavior for this is:
|
||||
|
||||
```c
|
||||
void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) {
|
||||
mouse_report->h = h;
|
||||
mouse_report->v = v;
|
||||
}
|
||||
|
||||
void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
|
||||
mouse_report->x = x;
|
||||
mouse_report->y = y;
|
||||
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report){
|
||||
// executed each time the sensor is updated
|
||||
// mouse_report.<attribute> - can be used to access indivdual mouse attributes
|
||||
return mouse_report;
|
||||
}
|
||||
```
|
||||
|
||||
More information on `report_mouse_t` may be found [here](https://docs.qmk.fm/#/feature_pointing_device?id=manipulating-mouse-reports).
|
||||
|
||||
This should allow you to more heavily customize the behavior.
|
||||
|
||||
Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality.
|
||||
|
@ -1,14 +1,8 @@
|
||||
// Copyright 2022 Michal S. (@ihatethefrench)
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// Copyright 2023 Michal S. (@not-my-segfault)
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#pragma once
|
||||
|
||||
// Enables features such as octave changer, suspend, etc.
|
||||
#define MIDI_ADVANCED
|
||||
|
||||
// This autoshift delay feels most natural for me I think
|
||||
#define AUTO_SHIFT_TIMEOUT 165
|
||||
|
||||
// I don't use too many layers, so this is more than enough
|
||||
#define LAYER_STATE_8BIT
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Copyright 2022 Michal S. (@ihatethefrench)
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// Copyright 2023 Michal S. (@not-my-segfault)
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
@ -7,20 +7,18 @@
|
||||
enum sofle_layers {
|
||||
_WORKMAN,
|
||||
_QWERTY,
|
||||
_MIDI,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
// This specifies any custom keycodes I might have set
|
||||
enum custom_keycodes {
|
||||
KC_WORKMAN = SAFE_RANGE,
|
||||
KC_QWERTY,
|
||||
KC_MIDI,
|
||||
KC_LOWER,
|
||||
KC_RAISE,
|
||||
KC_ADJUST
|
||||
KC_ADJUST,
|
||||
KC_TOGGLE,
|
||||
};
|
||||
|
||||
// Here the keymaps are defined in matrix form using KC_XYZ form keycodes
|
||||
@ -71,28 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LGUI, KC_LALT, KC_LCTL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTL, KC_RALT, KC_RGUI
|
||||
),
|
||||
|
||||
/* MIDI
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Pnic | OCT0 | OCT1 | OCT2 | OCT3 | OCT4 | | OCT5 | OCT6 | OCT7 | | | MTOG |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | |G#/Ab |Bb/A# | |C#/Db |D#/Eb | | |F#/Gb |G#/Ab |Bb/A# | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | A | B | C | D | E |-------. ,-------| F | G | A | B | C | Wkmn |
|
||||
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
|
||||
* | | | | | TNSD | TNSU |-------| |-------| BNDD | BNDU | | | | |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* | | | | Susd | /OCTDN / \OCTUP \ | | | | |
|
||||
* | | | | |/ / \ \ | | | | |
|
||||
* `----------------------------------' '------''---------------------------'
|
||||
*/
|
||||
[_MIDI] = LAYOUT(
|
||||
MI_AOFF, MI_OC0, MI_OC1, MI_OC2, MI_OC3, MI_OC4, MI_OC5, MI_OC6, MI_OC7, _______, _______, MI_TOGG,
|
||||
_______, MI_Gs, MI_As, _______, MI_Cs1, MI_Ds1, _______, MI_Fs1, MI_Gs1, MI_As1, _______, _______,
|
||||
_______, MI_A, MI_B, MI_C1, MI_D1, MI_E1, MI_F1, MI_G1, MI_A1, MI_B1, MI_C2, KC_WORKMAN,
|
||||
_______, _______, _______, _______, MI_TRSD, MI_TRSU, _______, _______, MI_BNDD, MI_BNDU, _______, _______, _______, _______,
|
||||
_______, _______, _______, MI_SUST, MI_OCTD, MI_OCTU, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* LOWER
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
@ -100,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | | | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | |-------. ,-------| | | | | | | |
|
||||
* |------+------+------+------+------+------| | | Run |------+------+------+------+------+------|
|
||||
* |------+------+------+------+------+------| | | Togg. |------+------+------+------+------+------|
|
||||
* | | = | - | + | { | } |-------| |-------| [ | ] | | | \ | |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* | | | |LOWER | / / \ \ | | | | |
|
||||
@ -111,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE,
|
||||
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, LALT(KC_F2), KC_LBRC, KC_RBRC, _______, _______, KC_BSLS, _______,
|
||||
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, KC_TOGGLE, KC_LBRC, KC_RBRC, _______, _______, KC_BSLS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
@ -121,9 +97,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | | | Up | | | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | |-------. ,-------| | Left | Down | Rght | | Wkmn |
|
||||
* | | | | | | |-------. ,-------| | Left | Down | Rght | | |
|
||||
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
|
||||
* | | | | Midi | | |-------| |-------| | | Home | End | | Qwrt |
|
||||
* | | | | | | |-------| |-------| | | Home | End | | |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* | | | | | / / \ \ |RAISE | | | |
|
||||
* | | | | |/ / \ \ | | | | |
|
||||
@ -132,27 +108,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_RAISE] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, AS_TOGG,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_WORKMAN,
|
||||
_______, _______, _______, KC_MIDI, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, KC_QWERTY,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)};
|
||||
|
||||
// This section only compiles if OLED_ENABLE is set to `yes` in rules.mk
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
// Defining my custom text to draw to the screen :)
|
||||
static void oled_screen(void) {
|
||||
oled_write_ln_P(PSTR(""), false);
|
||||
oled_write_ln_P(PSTR(">nix "), false);
|
||||
oled_write_ln_P(PSTR(">rust"), false);
|
||||
oled_write_ln_P(PSTR(">hs &"), false);
|
||||
oled_write_ln_P(PSTR(">rum"), false);
|
||||
oled_write_ln_P(PSTR(""), false);
|
||||
oled_write_ln_P(PSTR(" . ."), false);
|
||||
oled_write_ln_P(PSTR(" u "), false);
|
||||
oled_write_ln_P(PSTR(" d"), false);
|
||||
oled_write_ln_P(PSTR(""), false);
|
||||
oled_write_ln_P(PSTR("mchal"), false);
|
||||
oled_set_cursor(0, 0); // Write nothing
|
||||
}
|
||||
|
||||
// Set correct rotation so the text doesn't end up sideways
|
||||
@ -174,7 +138,6 @@ bool oled_task_user(void) {
|
||||
|
||||
#endif
|
||||
|
||||
// This section defines custom keycodes, which I use to manage layers
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWERTY:
|
||||
@ -187,9 +150,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
set_single_persistent_default_layer(_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
case KC_MIDI:
|
||||
case KC_TOGGLE: // Toggle between QWERTY and WORKMAN
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_MIDI);
|
||||
layer_invert(_QWERTY);
|
||||
layer_invert(_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
case KC_LOWER:
|
||||
@ -214,7 +178,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// This section only compiles if ENCODER_ENABLE is set to `yes` in rules.mk
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
// This section is like the keymap matrix, but for rotary encoders
|
||||
@ -224,7 +187,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_QWERTY] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(KC_VOLD, KC_VOLU )},
|
||||
[_LOWER] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN)},
|
||||
[_RAISE] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______ )},
|
||||
[_ADJUST] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______ )},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -11,11 +11,9 @@ MAGIC_ENABLE = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
# I actually use these features
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
MIDI_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
|
||||
# More space-saving
|
||||
|
@ -41,14 +41,21 @@
|
||||
#define QMK_ESC_INPUT D4
|
||||
#define QMK_ESC_OUTPUT B2
|
||||
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 7
|
||||
#define BOOTMAGIC_LITE_ROW_RIGHT 4
|
||||
#define BOOTMAGIC_LITE_COLUMN_RIGHT 7
|
||||
#ifndef KEYBOARD_splitkb_kyria_rev3
|
||||
# define BOOTMAGIC_LITE_ROW 0
|
||||
# define BOOTMAGIC_LITE_COLUMN 7
|
||||
# define BOOTMAGIC_LITE_ROW_RIGHT 4
|
||||
# define BOOTMAGIC_LITE_COLUMN_RIGHT 7
|
||||
|
||||
#define BOOTMAGIC_LITE_EEPROM_ROW 1
|
||||
#define BOOTMAGIC_LITE_EEPROM_COLUMN 7
|
||||
#define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
|
||||
#define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
|
||||
# define BOOTMAGIC_LITE_EEPROM_ROW 1
|
||||
# define BOOTMAGIC_LITE_EEPROM_COLUMN 7
|
||||
# define BOOTMAGIC_LITE_EEPROM_ROW_RIGHT 5
|
||||
# define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 7
|
||||
#endif
|
||||
|
||||
#define SERIAL_USART_SPEED 921600
|
||||
|
||||
#if defined(KEYBOARD_splitkb_kyria_rev1_proton_c)
|
||||
# define WEAR_LEVELING_BACKING_SIZE 16384
|
||||
# define WEAR_LEVELING_LOGICAL_SIZE 8192
|
||||
#endif
|
||||
|
@ -105,34 +105,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_DEFAULT_LAYER_1] = { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } },
|
||||
[_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } },
|
||||
[_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } },
|
||||
[_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } },
|
||||
[_GAMEPAD] = { { _______, _______ }, { _______, _______ } },
|
||||
[_DIABLO] = { { _______, _______ }, { _______, _______ } },
|
||||
[_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } },
|
||||
[_MEDIA] = { { _______, _______ }, { _______, _______ } },
|
||||
[_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } },
|
||||
[_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } },
|
||||
[_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } },
|
||||
[_DEFAULT_LAYER_1] = { ENCODER_CCW_CW( KC_VOLD, KC_VOLU ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
|
||||
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_DEFAULT_LAYER_2] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_GAMEPAD] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_DIABLO] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_MOUSE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_WH_D, KC_WH_U ) },
|
||||
[_MEDIA] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
[_RAISE] = { ENCODER_CCW_CW( _______, _______ ), ENCODER_CCW_CW( KC_PGDN, KC_PGUP ) },
|
||||
[_LOWER] = { ENCODER_CCW_CW( RGB_MOD, RGB_RMOD), ENCODER_CCW_CW( RGB_HUD, RGB_HUI ) },
|
||||
[_ADJUST] = { ENCODER_CCW_CW( CK_DOWN, CK_UP ), ENCODER_CCW_CW( _______, _______ ) },
|
||||
};
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void render_oled_title(bool side) {
|
||||
oled_write_P(side ? PSTR(" Splitkb ") : PSTR(" Kyria "), true);
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
|
||||
#ifdef OLED_DRIVER_SH1107
|
||||
# ifdef OLED_DRIVER_SH1107
|
||||
return OLED_ROTATION_0;
|
||||
#else
|
||||
# else
|
||||
return OLED_ROTATION_180;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
void oled_render_large_display(bool side) {
|
||||
if (side) {
|
||||
render_wpm_graph(56, 64);
|
||||
} else {
|
||||
// clang-format off
|
||||
static const char PROGMEM kyria_logo[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@ -144,7 +149,7 @@ void oled_render_large_display(bool side) {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
// clang-format on
|
||||
oled_set_cursor(0,7);
|
||||
oled_set_cursor(0, 7);
|
||||
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
|
||||
}
|
||||
}
|
||||
@ -171,7 +176,6 @@ void housekeeping_task_keymap(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c
|
||||
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
|
||||
for (int32_t i = 0; i < 40; i++) {
|
||||
|
26
keyboards/studiokestra/frl84/config.h
Normal file
26
keyboards/studiokestra/frl84/config.h
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright 2023 Studio Kestra
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define RGB_DI_PIN B0
|
||||
#define RGBLED_NUM 18
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */
|
||||
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
118
keyboards/studiokestra/frl84/info.json
Normal file
118
keyboards/studiokestra/frl84/info.json
Normal file
@ -0,0 +1,118 @@
|
||||
{
|
||||
"manufacturer": "Studio Kestra",
|
||||
"keyboard_name": "FRL84",
|
||||
"maintainer": "studiokestra",
|
||||
"bootloader": "atmel-dfu",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"rgblight": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["D3", "D5", "D0", "F0", "F1", "F4", "F5", "F6", "F7"],
|
||||
"rows": ["D6", "D4", "B4", "D7", "B6", "B5", "C7", "C6", "D2", "D1"]
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0F84",
|
||||
"vid": "0x7C10"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Esc", "matrix": [0, 0], "x":0, "y":0},
|
||||
{"label":"1", "matrix": [1, 0], "x":1, "y":0},
|
||||
{"label":"2", "matrix": [0, 1], "x":2, "y":0},
|
||||
{"label":"3", "matrix": [1, 1], "x":3, "y":0},
|
||||
{"label":"4", "matrix": [0, 2], "x":4, "y":0},
|
||||
{"label":"5", "matrix": [1, 2], "x":5, "y":0},
|
||||
{"label":"6", "matrix": [0, 3], "x":6, "y":0},
|
||||
{"label":"7", "matrix": [1, 3], "x":7, "y":0},
|
||||
{"label":"8", "matrix": [0, 4], "x":8, "y":0},
|
||||
{"label":"9", "matrix": [1, 4], "x":9, "y":0},
|
||||
{"label":"0", "matrix": [0, 5], "x":10, "y":0},
|
||||
{"label":"_", "matrix": [1, 5], "x":11, "y":0},
|
||||
{"label":"+", "matrix": [0, 6], "x":12, "y":0},
|
||||
{"label":"|", "matrix": [1, 6], "x":13, "y":0},
|
||||
{"label":"~", "matrix": [0, 7], "x":14, "y":0},
|
||||
{"label":"Num Lock", "matrix": [1, 7], "x":15, "y":0},
|
||||
{"label":"/", "matrix": [0, 8], "x":16, "y":0},
|
||||
{"label":"*", "matrix": [1, 8], "x":17, "y":0},
|
||||
{"label":"-", "matrix": [3, 8], "x":18, "y":0},
|
||||
|
||||
{"label":"Tab", "matrix": [2, 0], "x":0, "y":1, "w":1.5},
|
||||
{"label":"Q", "matrix": [3, 0], "x":1.5, "y":1},
|
||||
{"label":"W", "matrix": [2, 1], "x":2.5, "y":1},
|
||||
{"label":"E", "matrix": [3, 1], "x":3.5, "y":1},
|
||||
{"label":"R", "matrix": [2, 2], "x":4.5, "y":1},
|
||||
{"label":"T", "matrix": [3, 2], "x":5.5, "y":1},
|
||||
{"label":"Y", "matrix": [2, 3], "x":6.5, "y":1},
|
||||
{"label":"U", "matrix": [3, 3], "x":7.5, "y":1},
|
||||
{"label":"I", "matrix": [2, 4], "x":8.5, "y":1},
|
||||
{"label":"O", "matrix": [3, 4], "x":9.5, "y":1},
|
||||
{"label":"P", "matrix": [2, 5], "x":10.5, "y":1},
|
||||
{"label":"{", "matrix": [3, 5], "x":11.5, "y":1},
|
||||
{"label":"}", "matrix": [2, 6], "x":12.5, "y":1},
|
||||
{"label":"Backspace", "matrix": [3, 6], "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"7", "matrix": [2, 7], "x":15, "y":1},
|
||||
{"label":"8", "matrix": [3, 7], "x":16, "y":1},
|
||||
{"label":"9", "matrix": [2, 8], "x":17, "y":1},
|
||||
{"label":"+", "matrix": [5, 8], "x":18, "y":1, "h":2},
|
||||
|
||||
{"label":"Caps Lock", "matrix": [4, 0], "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "matrix": [5, 0], "x":1.75, "y":2},
|
||||
{"label":"S", "matrix": [4, 1], "x":2.75, "y":2},
|
||||
{"label":"D", "matrix": [5, 1], "x":3.75, "y":2},
|
||||
{"label":"F", "matrix": [4, 2], "x":4.75, "y":2},
|
||||
{"label":"G", "matrix": [5, 2], "x":5.75, "y":2},
|
||||
{"label":"H", "matrix": [4, 3], "x":6.75, "y":2},
|
||||
{"label":"J", "matrix": [5, 3], "x":7.75, "y":2},
|
||||
{"label":"K", "matrix": [4, 4], "x":8.75, "y":2},
|
||||
{"label":"L", "matrix": [5, 4], "x":9.75, "y":2},
|
||||
{"label":":", "matrix": [4, 5], "x":10.75, "y":2},
|
||||
{"label":"\"", "matrix": [5, 5], "x":11.75, "y":2},
|
||||
{"label":"Enter", "matrix": [4, 6], "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"4", "matrix": [4, 7], "x":15, "y":2},
|
||||
{"label":"5", "matrix": [5, 7], "x":16, "y":2},
|
||||
{"label":"6", "matrix": [4, 8], "x":17, "y":2},
|
||||
|
||||
{"label":"Shift", "matrix": [6, 0], "x":0, "y":3, "w":2.25},
|
||||
{"label":"Z", "matrix": [7, 0], "x":2.25, "y":3},
|
||||
{"label":"X", "matrix": [6, 1], "x":3.25, "y":3},
|
||||
{"label":"C", "matrix": [7, 1], "x":4.25, "y":3},
|
||||
{"label":"V", "matrix": [6, 2], "x":5.25, "y":3},
|
||||
{"label":"B", "matrix": [7, 2], "x":6.25, "y":3},
|
||||
{"label":"N", "matrix": [6, 3], "x":7.25, "y":3},
|
||||
{"label":"M", "matrix": [7, 3], "x":8.25, "y":3},
|
||||
{"label":"<", "matrix": [6, 4], "x":9.25, "y":3},
|
||||
{"label":">", "matrix": [7, 4], "x":10.25, "y":3},
|
||||
{"label":"?", "matrix": [6, 5], "x":11.25, "y":3},
|
||||
{"label":"Shift", "matrix": [7, 5], "x":12.25, "y":3, "w":1.75},
|
||||
{"label":"\u2191", "matrix": [6, 6], "x":14, "y":3},
|
||||
{"label":"1", "matrix": [6, 7], "x":15, "y":3},
|
||||
{"label":"2", "matrix": [7, 7], "x":16, "y":3},
|
||||
{"label":"3", "matrix": [6, 8], "x":17, "y":3},
|
||||
{"label":"Enter", "matrix": [7, 8], "x":18, "y":3, "h":2},
|
||||
|
||||
{"label":"Ctrl", "matrix": [8, 0], "x":0, "y":4, "w":1.25},
|
||||
{"label":"Win", "matrix": [9, 0], "x":1.25, "y":4, "w":1.25},
|
||||
{"label":"Alt", "matrix": [8, 1], "x":2.5, "y":4, "w":1.25},
|
||||
{"label":"Space", "matrix": [8, 3], "x":3.75, "y":4, "w":6.25},
|
||||
{"label":"Alt", "matrix": [8, 4], "x":10, "y":4, "w":1.25},
|
||||
{"label":"Ctrl", "matrix": [8, 5], "x":11.25, "y":4, "w":1.25},
|
||||
{"label":"\u2190", "matrix": [8, 6], "x":13, "y":4},
|
||||
{"label":"\u2193", "matrix": [9, 6], "x":14, "y":4},
|
||||
{"label":"\u2192", "matrix": [8, 7], "x":15, "y":4},
|
||||
{"label":"0", "matrix": [9, 7], "x":16, "y":4},
|
||||
{"label":".", "matrix": [8, 8], "x":17, "y":4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
34
keyboards/studiokestra/frl84/keymaps/default/keymap.c
Normal file
34
keyboards/studiokestra/frl84/keymaps/default/keymap.c
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright 2023 Studio Kestra
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐───┬───┬───┬───┐
|
||||
* │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ~ │Num│ / │ * │ - │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤───┼───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ Bksp│ 7 │ 8 │ 9 │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤───┼───┼───┤ + │
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤───┼───┼───┼───┤
|
||||
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │ 1 │ 2 │ 3 │ │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┤───┼───┼───┤Ent│
|
||||
* │Ctrl│GUI │Alt │ │ Alt│Ctrl│ │ ← │ ↓ │ → │ 0 │ . │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┴───┴───┴───┘
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRAVE,KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_TRNS, KC_F1, KC_F2 , KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_PGDN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_DEL
|
||||
)
|
||||
};
|
41
keyboards/studiokestra/frl84/keymaps/via/keymap.c
Normal file
41
keyboards/studiokestra/frl84/keymaps/via/keymap.c
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright 2023 Studio Kestra
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐───┬───┬───┬───┐
|
||||
* │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ~ │Num│ / │ * │ - │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤───┼───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ Bksp│ 7 │ 8 │ 9 │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤───┼───┼───┤ + │
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ 4 │ 5 │ 6 │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤───┼───┼───┼───┤
|
||||
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │ 1 │ 2 │ 3 │ │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┤───┼───┼───┤Ent│
|
||||
* │Ctrl│GUI │Alt │ │ Alt│Ctrl│ │ ← │ ↓ │ → │ 0 │ . │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┴───┴───┴───┘
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRAVE,KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_TRNS, KC_F1, KC_F2 , KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_PGDN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_DEL
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
1
keyboards/studiokestra/frl84/keymaps/via/rules.mk
Normal file
1
keyboards/studiokestra/frl84/keymaps/via/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
27
keyboards/studiokestra/frl84/readme.md
Normal file
27
keyboards/studiokestra/frl84/readme.md
Normal file
@ -0,0 +1,27 @@
|
||||
# studiokestra/frl84
|
||||
|
||||
![studiokestra/frl84](https://i.imgur.com/XzO7Ly0h.png)
|
||||
|
||||
FRL84 is a hotswap, via-compatible 65+Numpad layout.
|
||||
|
||||
* Keyboard Maintainer: [studiokestra](https://github.com/studiokestra)
|
||||
* Hardware Supported: FRL84 Invisibolt Case
|
||||
* Hardware Availability: [FRL84 Invisibolt Case and PCB Group Buy](https://p3dstore.com/products/frl84-invisibolt-case-and-pcb-group-buy)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make studiokestra/frl84:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make studiokestra/frl84:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
1
keyboards/studiokestra/frl84/rules.mk
Normal file
1
keyboards/studiokestra/frl84/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
# This file intentionally left blank
|
@ -17,7 +17,7 @@
|
||||
#include "drashna.h"
|
||||
|
||||
enum more_custom_keycodes {
|
||||
KC_SWAP_NUM = NEW_SAFE_RANGE,
|
||||
KC_SWAP_NUM = USER_SAFE_RANGE,
|
||||
PM_SCROLL,
|
||||
PM_PRECISION,
|
||||
};
|
||||
|
@ -16,19 +16,11 @@
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#define BACKLIT OSM(MOD_LSFT)
|
||||
enum planck_keycodes {
|
||||
BACKLIT = NEW_SAFE_RANGE,
|
||||
TH_LVL,
|
||||
TH_LVL = USER_SAFE_RANGE,
|
||||
};
|
||||
|
||||
#else
|
||||
# define BACKLIT OSM(MOD_LSFT)
|
||||
enum planck_keycodes {
|
||||
TH_LVL = NEW_SAFE_RANGE,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef KEYBOARD_planck_ez
|
||||
# define PLNK_1 BK_LWER
|
||||
# define PLNK_2 SP_LWER
|
||||
@ -56,10 +48,10 @@ enum planck_keycodes {
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_ortho_4x12_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, PRINT_SETUPS, \
|
||||
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
|
||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
STORE_SETUPS, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
)
|
||||
#define LAYOUT_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
|
||||
|
||||
@ -130,18 +122,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
# ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
# endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef KEYBOARD_planck_ez
|
||||
case TH_LVL:
|
||||
if (record->event.pressed) {
|
||||
|
@ -16,7 +16,9 @@
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
|
||||
enum crkbd_keycodes {
|
||||
RGBRST = USER_SAFE_RANGE,
|
||||
};
|
||||
|
||||
/*
|
||||
* The `LAYOUT_crkbd_base` macro is a template to allow the use of identical
|
||||
@ -96,33 +98,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// clang-format on
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
|
||||
# ifdef CONVERT_TO_PROTON_C
|
||||
// WPM-responsive animation stuff here
|
||||
# define SLEEP_FRAMES 2
|
||||
# define SLEEP_SPEED 10 // below this wpm value your animation will idle
|
||||
# define SLEEP_SPEED 10 // below this wpm value your animation will idle
|
||||
|
||||
# define WAKE_FRAMES 2 // uncomment if >1
|
||||
# define WAKE_FRAMES 2 // uncomment if >1
|
||||
|
||||
# define KAKI_FRAMES 3
|
||||
# define KAKI_SPEED 40 // above this wpm value typing animation to triggere
|
||||
# define KAKI_FRAMES 3
|
||||
# define KAKI_SPEED 40 // above this wpm value typing animation to triggere
|
||||
|
||||
# define RTOGI_FRAMES 2
|
||||
//#define LTOGI_FRAMES 2
|
||||
// #define LTOGI_FRAMES 2
|
||||
|
||||
//#define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms
|
||||
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
|
||||
# define ANIM_SIZE 512 // number of bytes in array, minimize for adequate firmware size, max is 1024
|
||||
// #define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms
|
||||
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
|
||||
# define ANIM_SIZE 512 // number of bytes in array, minimize for adequate firmware size, max is 1024
|
||||
|
||||
uint32_t anim_timer = 0;
|
||||
uint32_t anim_frame_duration = 500;
|
||||
uint8_t current_sleep_frame = 0;
|
||||
uint8_t current_wake_frame = 0; // uncomment if WAKE_FRAMES >1
|
||||
uint8_t current_wake_frame = 0; // uncomment if WAKE_FRAMES >1
|
||||
uint8_t current_kaki_frame = 0;
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
uint8_t current_rtogi_frame = 0;
|
||||
#endif
|
||||
# ifdef SWAP_HANDS_ENABLE
|
||||
uint8_t current_rtogi_frame = 0;
|
||||
# endif
|
||||
// uint8_t current_ltogi_frame = 0;
|
||||
// clang-format off
|
||||
void render_small_kitty(void) {
|
||||
|
@ -211,10 +211,13 @@ def _coerce_led_token(_type, value):
|
||||
return value_map[value]
|
||||
|
||||
|
||||
def _validate_led_config(matrix, matrix_rows, matrix_indexes, position, position_raw, flags):
|
||||
def _validate_led_config(matrix, matrix_rows, matrix_cols, matrix_indexes, position, position_raw, flags):
|
||||
# TODO: Improve crude parsing/validation
|
||||
if len(matrix) != matrix_rows and len(matrix) != (matrix_rows / 2):
|
||||
raise ValueError("Unable to parse g_led_config matrix data")
|
||||
for index, row in enumerate(matrix):
|
||||
if len(row) != matrix_cols:
|
||||
raise ValueError(f"Number of columns in row {index} ({len(row)}) does not match matrix ({matrix_cols})")
|
||||
if len(position) != len(flags):
|
||||
raise ValueError(f"Number of g_led_config physical positions ({len(position)}) does not match number of flags ({len(flags)})")
|
||||
if len(matrix_indexes) and (max(matrix_indexes) >= len(flags)):
|
||||
@ -228,13 +231,16 @@ def _validate_led_config(matrix, matrix_rows, matrix_indexes, position, position
|
||||
def _parse_led_config(file, matrix_cols, matrix_rows):
|
||||
"""Return any 'raw' led/rgb matrix config
|
||||
"""
|
||||
matrix_raw = []
|
||||
matrix = []
|
||||
position_raw = []
|
||||
flags = []
|
||||
|
||||
found_led_config = False
|
||||
bracket_count = 0
|
||||
section = 0
|
||||
current_row_index = 0
|
||||
current_row = []
|
||||
|
||||
for _type, value in lex(_preprocess_c_file(file), CLexer()):
|
||||
# Assume g_led_config..stuff..;
|
||||
if value == 'g_led_config':
|
||||
@ -248,12 +254,16 @@ def _parse_led_config(file, matrix_cols, matrix_rows):
|
||||
if bracket_count == 2:
|
||||
section += 1
|
||||
elif value == '}':
|
||||
if section == 1 and bracket_count == 3:
|
||||
matrix.append(current_row)
|
||||
current_row = []
|
||||
current_row_index += 1
|
||||
bracket_count -= 1
|
||||
else:
|
||||
# Assume any non whitespace value here is important enough to stash
|
||||
if _type in [Token.Literal.Number.Integer, Token.Literal.Number.Float, Token.Literal.Number.Hex, Token.Name]:
|
||||
if section == 1 and bracket_count == 3:
|
||||
matrix_raw.append(_coerce_led_token(_type, value))
|
||||
current_row.append(_coerce_led_token(_type, value))
|
||||
if section == 2 and bracket_count == 3:
|
||||
position_raw.append(_coerce_led_token(_type, value))
|
||||
if section == 3 and bracket_count == 2:
|
||||
@ -263,16 +273,15 @@ def _parse_led_config(file, matrix_cols, matrix_rows):
|
||||
return None
|
||||
|
||||
# Slightly better intrim format
|
||||
matrix = list(_get_chunks(matrix_raw, matrix_cols))
|
||||
position = list(_get_chunks(position_raw, 2))
|
||||
matrix_indexes = list(filter(lambda x: x is not None, matrix_raw))
|
||||
matrix_indexes = list(filter(lambda x: x is not None, sum(matrix, [])))
|
||||
|
||||
# If we have not found anything - bail with no error
|
||||
if not section:
|
||||
return None
|
||||
|
||||
# Throw any validation errors
|
||||
_validate_led_config(matrix, matrix_rows, matrix_indexes, position, position_raw, flags)
|
||||
_validate_led_config(matrix, matrix_rows, matrix_cols, matrix_indexes, position, position_raw, flags)
|
||||
|
||||
return (matrix, position, flags)
|
||||
|
||||
|
33
users/drashna/audio_config.h
Normal file
33
users/drashna/audio_config.h
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define AUDIO_CLICKY
|
||||
#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
|
||||
|
||||
#if __has_include("user_song_list.h")
|
||||
# include "user_song_list.h"
|
||||
#endif
|
||||
|
||||
#ifdef USER_SONG_LIST
|
||||
# define STARTUP_SONG SONG(RICK_ROLL)
|
||||
# define GOODBYE_SONG SONG(SONIC_RING)
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
|
||||
# define UNICODE_SONG_MAC SONG(MARIO_THEME)
|
||||
# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
|
||||
# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
|
||||
# define UNICODE_SONG_BSD SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_WINC SONG(RICK_ROLL)
|
||||
#else
|
||||
# define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) }
|
||||
# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
|
||||
# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
|
||||
# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
|
||||
# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
|
||||
# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
|
||||
#endif
|
@ -3,9 +3,8 @@
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
|
||||
#ifdef I2C_SCANNER_ENABLE
|
||||
void matrix_scan_i2c(void);
|
||||
void housekeeping_task_i2c_scanner(void);
|
||||
void keyboard_post_init_i2c(void);
|
||||
#endif
|
||||
|
||||
@ -21,6 +20,64 @@ void keyboard_pre_init_user(void) {
|
||||
// Call user matrix init, set default RGB colors and then
|
||||
// call the keymap's init function
|
||||
|
||||
#ifdef CUSTOM_QUANTUM_PAINTER_ENABLE
|
||||
void keyboard_post_init_qp(void);
|
||||
#endif
|
||||
|
||||
#ifdef OS_DETECTION_ENABLE
|
||||
os_variant_t os_type;
|
||||
|
||||
uint32_t startup_exec(uint32_t trigger_time, void *cb_arg) {
|
||||
/* do something */
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
os_type = detected_host_os();
|
||||
if (os_type) {
|
||||
bool is_mac = (os_type == OS_MACOS) || (os_type == OS_IOS);
|
||||
keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = is_mac;
|
||||
# ifdef UNICODE_COMMON_ENABLE
|
||||
uint8_t mode = is_mac ? UNICODE_MODE_MACOS : UNICODE_MODE_WINCOMPOSE;
|
||||
if (mode != get_unicode_input_mode()) {
|
||||
set_unicode_input_mode(mode);
|
||||
}
|
||||
# endif
|
||||
switch (os_type) {
|
||||
case OS_UNSURE:
|
||||
xprintf("unknown OS Detected\n");
|
||||
break;
|
||||
case OS_LINUX:
|
||||
xprintf("Linux Detected\n");
|
||||
break;
|
||||
case OS_WINDOWS:
|
||||
xprintf("Windows Detected\n");
|
||||
break;
|
||||
# if 0
|
||||
case OS_WINDOWS_UNSURE:
|
||||
xprintf("Windows? Detected\n");
|
||||
break;
|
||||
# endif
|
||||
case OS_MACOS:
|
||||
xprintf("MacOS Detected\n");
|
||||
break;
|
||||
case OS_IOS:
|
||||
xprintf("iOS Detected\n");
|
||||
break;
|
||||
# if 0
|
||||
case OS_PS5:
|
||||
xprintf("PlayStation 5 Detected\n");
|
||||
break;
|
||||
case OS_HANDHELD:
|
||||
xprintf("Nintend Switch/Quest 2 Detected\n");
|
||||
break;
|
||||
# endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return os_type ? 0 : 500;
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void keyboard_post_init_keymap(void) {}
|
||||
void keyboard_post_init_user(void) {
|
||||
#if defined(CUSTOM_RGBLIGHT)
|
||||
@ -47,6 +104,10 @@ void keyboard_post_init_user(void) {
|
||||
PORTB &= ~(1 << 0);
|
||||
#endif
|
||||
|
||||
#ifdef OS_DETECTION_ENABLE
|
||||
defer_exec(100, startup_exec, NULL);
|
||||
#endif
|
||||
|
||||
keyboard_post_init_keymap();
|
||||
}
|
||||
|
||||
@ -102,25 +163,6 @@ void suspend_wakeup_init_user(void) {
|
||||
// scan function
|
||||
__attribute__((weak)) void matrix_scan_keymap(void) {}
|
||||
void matrix_scan_user(void) {
|
||||
static bool has_ran_yet;
|
||||
if (!has_ran_yet) {
|
||||
has_ran_yet = true;
|
||||
startup_user();
|
||||
}
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
#if defined(CUSTOM_RGB_MATRIX)
|
||||
matrix_scan_rgb_matrix();
|
||||
#endif
|
||||
#ifdef I2C_SCANNER_ENABLE
|
||||
matrix_scan_i2c();
|
||||
#endif
|
||||
#ifdef CUSTOM_OLED_DRIVER
|
||||
matrix_scan_oled();
|
||||
#endif
|
||||
|
||||
matrix_scan_keymap();
|
||||
}
|
||||
|
||||
@ -134,10 +176,6 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state)
|
||||
return state;
|
||||
}
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
if (!is_keyboard_master()) {
|
||||
return state;
|
||||
}
|
||||
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
#if defined(CUSTOM_POINTING_DEVICE)
|
||||
state = layer_state_set_pointing(state);
|
||||
@ -145,18 +183,33 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
#if defined(CUSTOM_RGBLIGHT)
|
||||
state = layer_state_set_rgb_light(state);
|
||||
#endif // CUSTOM_RGBLIGHT
|
||||
#if defined(AUDIO_ENABLE) && !defined(__arm__)
|
||||
#if defined(AUDIO_ENABLE)
|
||||
static bool is_gamepad_on = false;
|
||||
if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) {
|
||||
is_gamepad_on = layer_state_cmp(state, _GAMEPAD);
|
||||
static bool is_click_on = false;
|
||||
is_gamepad_on = layer_state_cmp(state, _GAMEPAD);
|
||||
if (is_gamepad_on) {
|
||||
is_click_on = is_clicky_on();
|
||||
if (is_click_on) {
|
||||
clicky_off();
|
||||
}
|
||||
PLAY_LOOP(doom_song);
|
||||
} else {
|
||||
if (is_click_on) {
|
||||
clicky_on();
|
||||
}
|
||||
stop_all_notes();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
state = layer_state_set_keymap(state);
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
char layer_buffer[16 + 5];
|
||||
format_layer_bitmap_string(layer_buffer, state, default_layer_state);
|
||||
dprintf("layer state: %s\n", layer_buffer);
|
||||
#endif
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@ -227,9 +280,27 @@ void matrix_slave_scan_user(void) {
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void housekeeping_task_keymap(void) {}
|
||||
void housekeeping_task_user(void) {
|
||||
void housekeeping_task_user(void) {
|
||||
static bool has_ran_yet;
|
||||
if (!has_ran_yet) {
|
||||
has_ran_yet = true;
|
||||
startup_user();
|
||||
}
|
||||
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
#if defined(CUSTOM_RGB_MATRIX)
|
||||
housekeeping_task_rgb_matrix();
|
||||
#endif
|
||||
#ifdef I2C_SCANNER_ENABLE
|
||||
housekeeping_task_i2c_scanner();
|
||||
#endif
|
||||
#ifdef CUSTOM_OLED_DRIVER
|
||||
housekeeping_task_oled();
|
||||
#endif
|
||||
#if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER)
|
||||
housekeeping_task_transport_sync();
|
||||
#endif
|
||||
|
||||
housekeeping_task_keymap();
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
#endif
|
||||
#define IS_COMMAND() (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) == MOD_MASK_SHIFT)
|
||||
|
||||
|
||||
#if defined(SPLIT_KEYBOARD)
|
||||
# include "split/split_config.h"
|
||||
#endif
|
||||
@ -27,51 +26,26 @@
|
||||
# include "oled/oled_config.h"
|
||||
#endif
|
||||
|
||||
#ifdef POINTING_DEVICE_ENABLE
|
||||
# include "pointing/pointing_config.h"
|
||||
#endif // POINTING_DEVICE_ENABLE
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# include "audio_config.h"
|
||||
#endif // AUDIO_ENABLE
|
||||
|
||||
#if defined(WPM_ENABLE)
|
||||
// # define WPM_LAUNCH_CONTROL
|
||||
// # define WPM_ALLOW_COUNT_REGRESSOIN
|
||||
// # define WPM_UNFILTERED
|
||||
# define WPM_ALLOW_COUNT_REGRESSION
|
||||
# define WPM_SAMPLE_SECONDS 10
|
||||
# define WPM_SAMPLE_PERIODS 50
|
||||
# define WPM_ESTIMATED_WORD_SIZE 5
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define AUDIO_CLICKY
|
||||
# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
|
||||
|
||||
# ifdef USER_SONG_LIST
|
||||
# define STARTUP_SONG SONG(RICK_ROLL)
|
||||
# define GOODBYE_SONG SONG(SONIC_RING)
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
|
||||
# define UNICODE_SONG_MAC SONG(MARIO_THEME)
|
||||
# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
|
||||
# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
|
||||
# define UNICODE_SONG_BSD SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_WINC SONG(RICK_ROLL)
|
||||
# else
|
||||
# define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) }
|
||||
# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
|
||||
# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
|
||||
# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
|
||||
# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
|
||||
# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
|
||||
# endif
|
||||
#endif // !AUDIO_ENABLE
|
||||
|
||||
#define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_MACOS
|
||||
|
||||
// #define WPM_ESTIMATED_WORD_SIZE 5
|
||||
#define WPM_ALLOW_COUNT_REGRESSION
|
||||
// #define WPM_UNFILTERED
|
||||
// #define WPM_SAMPLE_SECONDS 5
|
||||
// #define WPM_SAMPLE_PERIODS 50
|
||||
// #define WPM_LAUNCH_CONTROL
|
||||
|
||||
#ifndef ONESHOT_TAP_TOGGLE
|
||||
# define ONESHOT_TAP_TOGGLE 2
|
||||
#endif // !ONESHOT_TAP_TOGGLE
|
||||
|
@ -117,7 +117,7 @@ void do_scan(void) {
|
||||
|
||||
uint16_t scan_timer = 0;
|
||||
|
||||
void matrix_scan_i2c(void) {
|
||||
void housekeeping_task_i2c_scanner(void) {
|
||||
if (timer_elapsed(scan_timer) > 5000) {
|
||||
do_scan();
|
||||
scan_timer = timer_read();
|
||||
@ -139,7 +139,7 @@ float autocorrect_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
bool apply_autocorrect(uint8_t backspaces, const char *str) {
|
||||
bool apply_autocorrect(uint8_t backspaces, const char* str) {
|
||||
if (layer_state_is(_GAMEPAD)) {
|
||||
return false;
|
||||
}
|
||||
@ -153,7 +153,31 @@ bool apply_autocorrect(uint8_t backspaces, const char *str) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CAPS_WORD_ENABLE) && !defined(NO_ACTION_ONESHOT)
|
||||
#if defined(CAPS_WORD_ENABLE)
|
||||
bool caps_word_press_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
// Keycodes that continue Caps Word, with shift applied.
|
||||
case KC_MINS:
|
||||
if (!keymap_config.swap_lctl_lgui) {
|
||||
return true;
|
||||
}
|
||||
case KC_A ... KC_Z:
|
||||
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
|
||||
return true;
|
||||
|
||||
// Keycodes that continue Caps Word, without shifting.
|
||||
case KC_1 ... KC_0:
|
||||
case KC_BSPC:
|
||||
case KC_DEL:
|
||||
case KC_UNDS:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false; // Deactivate Caps Word.
|
||||
}
|
||||
}
|
||||
|
||||
# if !defined(NO_ACTION_ONESHOT)
|
||||
void oneshot_locked_mods_changed_user(uint8_t mods) {
|
||||
if (mods & MOD_MASK_SHIFT) {
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
@ -161,4 +185,25 @@ void oneshot_locked_mods_changed_user(uint8_t mods) {
|
||||
caps_word_on();
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void format_layer_bitmap_string(char* buffer, layer_state_t state, layer_state_t default_state) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (i == 0 || i == 4 || i == 8 || i == 12) {
|
||||
*buffer = ' ';
|
||||
++buffer;
|
||||
}
|
||||
|
||||
uint8_t layer = i;
|
||||
if ((default_state & ((layer_state_t)1 << layer)) != 0) {
|
||||
*buffer = 'D';
|
||||
} else if ((state & ((layer_state_t)1 << layer)) != 0) {
|
||||
*buffer = '1';
|
||||
} else {
|
||||
*buffer = '_';
|
||||
}
|
||||
++buffer;
|
||||
}
|
||||
*buffer = 0;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
# include "keyrecords/tap_dances.h"
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
# include "rgb/rgb_stuff.h"
|
||||
#endif
|
||||
@ -27,6 +27,9 @@
|
||||
#ifdef POINTING_DEVICE_ENABLE
|
||||
# include "pointing/pointing.h"
|
||||
#endif
|
||||
#ifdef OS_DETECTION_ENABLE
|
||||
# include "os_detection.h"
|
||||
#endif
|
||||
|
||||
/* Define layer names */
|
||||
enum userspace_layers {
|
||||
@ -79,6 +82,7 @@ bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
|
||||
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
|
||||
bool hasAllBitsInMask(uint8_t value, uint8_t mask);
|
||||
void tap_code16_nomods(uint16_t kc);
|
||||
void format_layer_bitmap_string(char* buffer, layer_state_t state, layer_state_t default_state);
|
||||
|
||||
// clang-format off
|
||||
typedef union {
|
||||
|
@ -1,36 +0,0 @@
|
||||
# Cap Words
|
||||
|
||||
This is taken from [Pascal Getreuer's implemenation](https://getreuer.info/posts/keyboards/caps-word/index.html), with a number of modifications.
|
||||
|
||||
To enable Caps Word, add `CAPS_WORD_ENABLE = yes` to your `rules.mk`.
|
||||
|
||||
This is mostly a reproduction of Pascal's docs:
|
||||
|
||||
## Overview
|
||||
|
||||
All-caps identifiers like “MOD_MASK_ALT” are awkward to type.
|
||||
|
||||
Caps Lock would be the standard solution to this problem, but it is awkward: it needs a dedicated key to toggle it (an imposition on smaller keyboards), and we need to remember to toggle it off after typing the word. Or with normal shifting, we either perform finger gymnastics or need to stop typing in the middle of the word to release shift with one hand to switch to holding shift with the other hand. In my experience, this is a nuisance especially if your shift keys are mod-taps, as in home row mods.
|
||||
|
||||
Caps Word, implemented here, is a modern alternative to Caps Lock:
|
||||
|
||||
* Caps Word is activated by pressing the left and right shift keys at the same time. This way you don’t need a dedicated key for using Caps Word.
|
||||
* Caps Word automatically disables itself at the end of the word.
|
||||
|
||||
**Compatibility**: I’ve tested that this implementation works with one-shot mods and Space Cadet Shift, and it predictably handles key repeating.
|
||||
|
||||
Unlike some other QMK Caps Word implementations, this library does not use the Caps Lock (KC_CAPS) keycode. It works even if the OS remaps Caps Lock to Ctrl or something else, as Emacs and Vim users often do.
|
||||
|
||||
## Using Caps Word
|
||||
With the above flashed to your keyboard:
|
||||
|
||||
1. **Activating**: Press and release both left and right shift keys at the same time. If your shift keys are mod-taps, activate Caps Word by holding both shift mod-tap keys until the tapping term, then release them.
|
||||
2. Then begin typing to get capitalized letters.
|
||||
3. **Disabling**: Caps Word disables itself when the next word breaking key is typed.
|
||||
|
||||
If you want to explicitly stop Caps Word, press and release Ctrl or another non-shift modifier or layer key. This also disables Caps Word.
|
||||
|
||||
## Explanation
|
||||
The code checks the mod bits on each key event, enabling Caps Word when both left and right shifts are active.
|
||||
|
||||
While enabled, Caps Word automatically presses and releases left shift (KC_LSFT) as needed so that letters are shifted and other keys are not. The word continues while typing a–z, 0–9, -, _, and backspace. Any other key is considered “word breaking” and disables Caps Word. You can edit the switch statement at the end of the process_caps_word() function to adjust which keys count as word breaking.
|
@ -3,6 +3,9 @@
|
||||
|
||||
#include "drashna.h"
|
||||
#include "version.h"
|
||||
#ifdef OS_DETECTION_ENABLE
|
||||
# include "os_detection.h"
|
||||
#endif
|
||||
|
||||
uint16_t copy_paste_timer;
|
||||
bool host_driver_disabled = false;
|
||||
@ -32,15 +35,6 @@ __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t
|
||||
* @return false Stop process keycode and do not send to host
|
||||
*/
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef ENCODER_ENABLE // some debouncing for weird issues
|
||||
if (IS_ENCODEREVENT(record->event)) {
|
||||
static bool ignore_first = true;
|
||||
if (ignore_first) {
|
||||
ignore_first = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||
#ifdef KEYLOGGER_ENABLE
|
||||
uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %1d, time: %5u, int: %1d, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
|
||||
@ -195,6 +189,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OLED_LOCK: {
|
||||
#if defined(OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER)
|
||||
extern bool is_oled_locked;
|
||||
if (record->event.pressed) {
|
||||
is_oled_locked = !is_oled_locked;
|
||||
if (is_oled_locked) {
|
||||
oled_on();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
#if defined(OS_DETECTION_ENABLE) && defined(OS_DETECTION_DEBUG_ENABLE)
|
||||
case STORE_SETUPS:
|
||||
if (record->event.pressed) {
|
||||
store_setups_in_eeprom();
|
||||
}
|
||||
return false;
|
||||
case PRINT_SETUPS:
|
||||
if (record->event.pressed) {
|
||||
print_stored_setups();
|
||||
}
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "drashna.h"
|
||||
|
||||
enum userspace_custom_keycodes {
|
||||
VRSN = SAFE_RANGE, // Prints QMK Firmware and board info
|
||||
VRSN = QK_USER, // Prints QMK Firmware and board info
|
||||
KC_QWERTY, // Sets default layer to QWERTY
|
||||
FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY
|
||||
KC_COLEMAK_DH, // Sets default layer to COLEMAK
|
||||
@ -39,7 +39,12 @@ enum userspace_custom_keycodes {
|
||||
KC_SUPER,
|
||||
KC_COMIC,
|
||||
KC_ACCEL,
|
||||
NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
|
||||
OLED_LOCK,
|
||||
|
||||
STORE_SETUPS,
|
||||
PRINT_SETUPS,
|
||||
|
||||
USER_SAFE_RANGE, // use "NEWPLACEHOLDER for keymap specific codes
|
||||
};
|
||||
|
||||
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
|
||||
|
@ -1,7 +1,5 @@
|
||||
# Keycode handling and interception
|
||||
|
||||
* [Autocorrection](autocorrection/readme.md)
|
||||
* [Cap Words](capwords.md)
|
||||
* [Diablo Tap Dancing](tap_dance.md)
|
||||
* [Keymap Wrappers](wrappers.md)
|
||||
* [Secret Macros](secrets.md)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
bool is_oled_enabled = true;
|
||||
bool is_oled_enabled = true, is_oled_locked = false;
|
||||
|
||||
extern bool host_driver_disabled;
|
||||
|
||||
@ -75,9 +75,9 @@ void add_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
keycode = QK_MODS_GET_BASIC_KEYCODE(keycode);
|
||||
}
|
||||
|
||||
|
||||
if ((keycode == KC_BSPC) && mod_config(get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) {
|
||||
memset(keylog_str, ' ', OLED_KEYLOGGER_LENGTH);
|
||||
keylog_str[OLED_KEYLOGGER_LENGTH-1] = 0x00;
|
||||
return;
|
||||
}
|
||||
if (record->tap.count) {
|
||||
@ -86,10 +86,10 @@ void add_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
return;
|
||||
}
|
||||
|
||||
memmove(keylog_str, keylog_str + 1, OLED_KEYLOGGER_LENGTH - 1);
|
||||
memmove(keylog_str, keylog_str + 1, OLED_KEYLOGGER_LENGTH - 2);
|
||||
|
||||
if (keycode < ARRAY_SIZE(code_to_name)) {
|
||||
keylog_str[(OLED_KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]);
|
||||
keylog_str[(OLED_KEYLOGGER_LENGTH - 2)] = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
log_timer = timer_read();
|
||||
@ -638,10 +638,10 @@ void render_pointing_dpi_status(uint16_t cpi, uint8_t padding, uint8_t col, uint
|
||||
#define OLED_KAKI_SPEED 40 // above this wpm value typing animation to triggere
|
||||
|
||||
#define OLED_RTOGI_FRAMES 2
|
||||
//#define OLED_LTOGI_FRAMES 2
|
||||
// #define OLED_LTOGI_FRAMES 2
|
||||
|
||||
//#define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms
|
||||
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
|
||||
// #define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms
|
||||
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
|
||||
#define OLED_ANIM_SIZE 36
|
||||
#define OLED_ANIM_ROWS 4
|
||||
#define OLED_ANIM_MAX_FRAMES 3
|
||||
@ -735,7 +735,7 @@ void render_kitty(uint8_t col, uint8_t line) {
|
||||
}
|
||||
|
||||
void render_unicode_mode(uint8_t col, uint8_t line) {
|
||||
#ifdef CUSTOM_UNICODE_ENABLE
|
||||
#if defined(CUSTOM_UNICODE_ENABLE) && defined(UNICODE_COMMON_ENABLE)
|
||||
oled_set_cursor(col, line);
|
||||
oled_write_P(PSTR("Unicode:"), false);
|
||||
oled_write_P(unicode_mode_str[unicode_typing_mode], false);
|
||||
@ -802,19 +802,6 @@ void render_mouse_mode(uint8_t col, uint8_t line) {
|
||||
}
|
||||
|
||||
void render_status_right(void) {
|
||||
#if defined(KEYBOARD_handwired_tractyl_manuform)
|
||||
oled_set_cursor(7, 0);
|
||||
oled_write_P(PSTR("Manuform"), true);
|
||||
#elif defined(KEYBOARD_bastardkb_charybdis)
|
||||
oled_set_cursor(6, 0);
|
||||
oled_write_P(PSTR("Charybdis"), true);
|
||||
#elif defined(KEYBOARD_splitkb_kyria)
|
||||
oled_set_cursor(8, 0);
|
||||
oled_write_P(PSTR("Kyria"), true);
|
||||
#else
|
||||
oled_set_cursor(8, 0);
|
||||
oled_write_P(PSTR("Right"), true);
|
||||
#endif
|
||||
#if defined(OLED_DISPLAY_VERBOSE)
|
||||
render_default_layer_state(1, 1);
|
||||
#else
|
||||
@ -834,23 +821,6 @@ void render_status_left(void) {
|
||||
#if defined(OLED_DISPLAY_VERBOSE)
|
||||
render_kitty(0, 1);
|
||||
|
||||
# if defined(KEYBOARD_handwired_tractyl_manuform)
|
||||
oled_set_cursor(7, 0);
|
||||
oled_write_P(PSTR("Tractyl"), true);
|
||||
# elif defined(KEYBOARD_bastardkb_charybdis)
|
||||
oled_set_cursor(6, 0);
|
||||
oled_write_P(PSTR("Charybdis"), true);
|
||||
# elif defined(KEYBOARD_splitkb_kyria)
|
||||
oled_set_cursor(7, 0);
|
||||
oled_write_P(PSTR("SplitKB"), true);
|
||||
# elif defined(KEYBOARD_handwired_fingerpunch_rockon)
|
||||
oled_set_cursor(7, 0);
|
||||
oled_write_P(PSTR("Rock On"), true);
|
||||
# else
|
||||
oled_set_cursor(8, 0);
|
||||
oled_write_P(PSTR("Left"), true);
|
||||
# endif
|
||||
|
||||
# if defined(WPM_ENABLE)
|
||||
render_wpm(1, 7, 1);
|
||||
# elif defined(DEBUG_MATRIX_SCAN_RATE)
|
||||
@ -883,6 +853,11 @@ __attribute__((weak)) void oled_render_large_display(bool side) {
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void render_oled_title(bool side) {
|
||||
oled_write_P(side ? PSTR(" Left ") : PSTR(" Right "), true);
|
||||
// oled_write_P(PSTR( "1234567890123" "1234567890123"), true);
|
||||
}
|
||||
|
||||
__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) {
|
||||
return rotation;
|
||||
}
|
||||
@ -924,6 +899,9 @@ bool oled_task_user(void) {
|
||||
// 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0
|
||||
};
|
||||
oled_write_raw_P(header_image, sizeof(header_image));
|
||||
|
||||
oled_set_cursor(4, 0);
|
||||
render_oled_title(is_keyboard_left());
|
||||
#endif
|
||||
|
||||
#ifndef OLED_DISPLAY_TEST
|
||||
@ -966,6 +944,6 @@ bool oled_task_user(void) {
|
||||
|
||||
extern bool oled_initialized;
|
||||
|
||||
__attribute__((weak)) void matrix_scan_oled(void) {
|
||||
is_oled_enabled = !(timer_elapsed32(oled_timer) > 60000);
|
||||
__attribute__((weak)) void housekeeping_task_oled(void) {
|
||||
is_oled_enabled = is_oled_locked ? true : !(timer_elapsed32(oled_timer) > 60000);
|
||||
}
|
||||
|
@ -45,7 +45,8 @@ void render_kitty(uint8_t col, uint8_t line);
|
||||
void render_unicode_mode(uint8_t col, uint8_t line);
|
||||
void render_rgb_hsv(uint8_t col, uint8_t line);
|
||||
void render_mouse_mode(uint8_t col, uint8_t line);
|
||||
void matrix_scan_oled(void);
|
||||
void housekeeping_task_oled(void);
|
||||
void render_oled_title(bool side);
|
||||
|
||||
void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_start, uint16_t x_end);
|
||||
|
||||
@ -54,7 +55,7 @@ void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_st
|
||||
|
||||
# define OLED_RENDER_KEYLOGGER "Keylogger: "
|
||||
# ifndef OLED_KEYLOGGER_LENGTH
|
||||
# define OLED_KEYLOGGER_LENGTH 9
|
||||
# define OLED_KEYLOGGER_LENGTH 10
|
||||
# endif
|
||||
# define OLED_RENDER_LAYOUT_NAME "Layout: "
|
||||
# define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
|
||||
@ -101,7 +102,7 @@ void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_st
|
||||
#else
|
||||
# define OLED_RENDER_KEYLOGGER "KLogr"
|
||||
# ifndef OLED_KEYLOGGER_LENGTH
|
||||
# define OLED_KEYLOGGER_LENGTH 5
|
||||
# define OLED_KEYLOGGER_LENGTH 6
|
||||
# endif
|
||||
|
||||
# define OLED_RENDER_LAYOUT_NAME "Lyout"
|
||||
@ -148,7 +149,7 @@ void oled_pan_section(bool left, uint16_t y_start, uint16_t y_end, uint16_t x_st
|
||||
# define OLED_RENDER_WPM_COUNTER "WPM: "
|
||||
#endif
|
||||
|
||||
extern char keylog_str[OLED_KEYLOGGER_LENGTH];
|
||||
extern char keylog_str[];
|
||||
|
||||
#ifndef OLED_WPM_GRAPH_MAX_WPM
|
||||
# define OLED_WPM_GRAPH_MAX_WPM 120
|
||||
|
@ -324,78 +324,77 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
||||
}
|
||||
|
||||
void oled_render(void) {
|
||||
if (!oled_initialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do we have work to do?
|
||||
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||
if (!oled_dirty || oled_scrolling) {
|
||||
if (!oled_dirty || !oled_initialized || oled_scrolling) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find first dirty block
|
||||
uint8_t update_start = 0;
|
||||
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
|
||||
++update_start;
|
||||
}
|
||||
|
||||
// Set column & page position
|
||||
static uint8_t display_start[] = {I2C_CMD, PAM_PAGE_ADDR, PAM_SETCOLUMN_LSB, PAM_SETCOLUMN_MSB};
|
||||
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
|
||||
calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
|
||||
} else {
|
||||
calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
|
||||
}
|
||||
|
||||
// Send column & page position
|
||||
if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render offset command failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
|
||||
// Send render data chunk as is
|
||||
if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render data failed\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// Rotate the render chunks
|
||||
const static uint8_t source_map[] = OLED_SOURCE_MAP;
|
||||
const static uint8_t target_map[] = OLED_TARGET_MAP;
|
||||
|
||||
static uint8_t temp_buffer[OLED_BLOCK_SIZE];
|
||||
memset(temp_buffer, 0, sizeof(temp_buffer));
|
||||
for (uint8_t i = 0; i < sizeof(source_map); ++i) {
|
||||
rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]);
|
||||
}
|
||||
|
||||
// For SH1106 or SH1107 the data chunk must be split into separate pieces for each page
|
||||
const uint8_t columns_in_block = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8;
|
||||
const uint8_t num_pages = OLED_BLOCK_SIZE / columns_in_block;
|
||||
for (uint8_t i = 0; i < num_pages; ++i) {
|
||||
// Send column & page position for all pages except the first one
|
||||
if (i > 0) {
|
||||
display_start[1]++;
|
||||
if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render offset command failed\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Send data for the page
|
||||
if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[columns_in_block * i], columns_in_block) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render90 data failed\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Turn on display if it is off
|
||||
oled_on();
|
||||
|
||||
// Clear dirty flag
|
||||
oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start);
|
||||
uint8_t update_start = 0;
|
||||
uint8_t num_processed = 0;
|
||||
while (oled_dirty && num_processed++ < OLED_UPDATE_PROCESS_LIMIT) { // render all dirty blocks (up to the configured limit)
|
||||
// Find next dirty block
|
||||
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
|
||||
++update_start;
|
||||
}
|
||||
|
||||
// Set column & page position
|
||||
static uint8_t display_start[] = {I2C_CMD, PAM_PAGE_ADDR, PAM_SETCOLUMN_LSB, PAM_SETCOLUMN_MSB};
|
||||
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
|
||||
calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
|
||||
} else {
|
||||
calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
|
||||
}
|
||||
|
||||
// Send column & page position
|
||||
if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render offset command failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
|
||||
// Send render data chunk as is
|
||||
if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render data failed\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// Rotate the render chunks
|
||||
const static uint8_t source_map[] = OLED_SOURCE_MAP;
|
||||
const static uint8_t target_map[] = OLED_TARGET_MAP;
|
||||
|
||||
static uint8_t temp_buffer[OLED_BLOCK_SIZE];
|
||||
memset(temp_buffer, 0, sizeof(temp_buffer));
|
||||
for (uint8_t i = 0; i < sizeof(source_map); ++i) {
|
||||
rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]);
|
||||
}
|
||||
|
||||
// For SH1106 or SH1107 the data chunk must be split into separate pieces for each page
|
||||
const uint8_t columns_in_block = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8;
|
||||
const uint8_t num_pages = OLED_BLOCK_SIZE / columns_in_block;
|
||||
for (uint8_t i = 0; i < num_pages; ++i) {
|
||||
// Send column & page position for all pages except the first one
|
||||
if (i > 0) {
|
||||
display_start[1]++;
|
||||
if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render offset command failed\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Send data for the page
|
||||
if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[columns_in_block * i], columns_in_block) != I2C_STATUS_SUCCESS) {
|
||||
print("oled_render90 data failed\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clear dirty flag
|
||||
oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start);
|
||||
}
|
||||
}
|
||||
|
||||
void oled_set_cursor(uint8_t col, uint8_t line) {
|
||||
|
@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "pointing.h"
|
||||
#include "math.h"
|
||||
|
||||
static uint16_t mouse_debounce_timer = 0;
|
||||
bool enable_acceleration = false;
|
||||
@ -38,8 +39,10 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
|
||||
oled_timer_reset();
|
||||
#endif
|
||||
if (enable_acceleration) {
|
||||
x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
|
||||
y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
|
||||
x = (mouse_xy_report_t)(x > 0 ? pow(4, x) / 2 + x : -pow(4, abs(x)) / 2 + x);
|
||||
y = (mouse_xy_report_t)(y > 0 ? pow(5, y) / 2 + y : -pow(5, abs(y)) / 2 + y);
|
||||
// x = (mouse_xy_report_t)(x > 0 ? x * x / 16 + x : -x * x / 16 + x);
|
||||
// y = (mouse_xy_report_t)(y > 0 ? y * y / 16 + y : -y * y / 16 + y);
|
||||
}
|
||||
mouse_report.x = x;
|
||||
mouse_report.y = y;
|
||||
@ -81,9 +84,7 @@ bool is_mouse_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
switch (keycode) {
|
||||
# if defined(KEYBOARD_ploopy)
|
||||
case DPI_CONFIG:
|
||||
# elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES)
|
||||
case QK_KB ... QK_KB_MAX:
|
||||
# elif (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES))
|
||||
# elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES) || (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES))
|
||||
case QK_KB ... QK_KB_MAX:
|
||||
# endif
|
||||
case KC_ACCEL:
|
||||
|
6
users/drashna/pointing/pointing_config.h
Normal file
6
users/drashna/pointing/pointing_config.h
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define POINTING_DEVICE_MODES_ENABLE
|
@ -137,7 +137,7 @@
|
||||
# define USB_SUSPEND_WAKEUP_DELAY 200
|
||||
#endif
|
||||
|
||||
#ifdef XAP_ENABLE
|
||||
#if defined(XAP_ENABLE) && !defined(__AVR__)
|
||||
# undef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
# define DYNAMIC_KEYMAP_LAYER_COUNT 12
|
||||
#endif
|
||||
|
@ -40,15 +40,12 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void rgb_matrix_indicator_keymap(void) {}
|
||||
|
||||
void matrix_scan_rgb_matrix(void) {
|
||||
void housekeeping_task_rgb_matrix(void) {
|
||||
#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && sync_timer_elapsed32(hypno_timer) > 15000) {
|
||||
rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
|
||||
}
|
||||
#endif
|
||||
rgb_matrix_indicator_keymap();
|
||||
}
|
||||
|
||||
void keyboard_post_init_rgb_matrix(void) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record);
|
||||
void keyboard_post_init_rgb_matrix(void);
|
||||
void matrix_scan_rgb_matrix(void);
|
||||
void housekeeping_task_rgb_matrix(void);
|
||||
|
||||
void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max);
|
||||
|
@ -138,3 +138,8 @@ ifeq ($(strip $(CUSTOM_BOOTMAGIC_ENABLE)), yes)
|
||||
SRC += bootmagic_better.c
|
||||
endif
|
||||
endif
|
||||
|
||||
OS_DETECTION_ENABLE ?= yes
|
||||
ifeq ($(strip $(OS_DETECTION_ENABLE)), yes)
|
||||
DEFERRED_EXEC_ENABLE = yes
|
||||
endif
|
||||
|
@ -3,17 +3,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// # define SPLIT_TRANSPORT_MIRROR
|
||||
#define SPLIT_TRANSPORT_MIRROR
|
||||
#define SPLIT_LAYER_STATE_ENABLE
|
||||
#define SPLIT_LED_STATE_ENABLE
|
||||
#define SPLIT_MODS_ENABLE
|
||||
#ifndef POINTING_DEVICE_ENABLE
|
||||
# define SPLIT_WATCHDOG_ENABLE
|
||||
#endif
|
||||
#ifdef WPM_ENABLE
|
||||
# define SPLIT_WPM_ENABLE
|
||||
#endif
|
||||
#ifdef OLED_ENABLE
|
||||
#define SPLIT_WATCHDOG_ENABLE
|
||||
#define SPLIT_WPM_ENABLE
|
||||
#ifdef SPLIT_OLED_ENABLE
|
||||
# undef SPLIT_OLED_ENABLE
|
||||
#endif
|
||||
#if defined(__AVR__) && !defined(SELECT_SOFT_SERIAL_SPEED)
|
||||
|
@ -52,7 +52,7 @@ void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiato
|
||||
#ifdef CUSTOM_OLED_DRIVER
|
||||
# include "oled/oled_stuff.h"
|
||||
void keylogger_string_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) {
|
||||
if (initiator2target_buffer_size == OLED_KEYLOGGER_LENGTH) {
|
||||
if (initiator2target_buffer_size == (OLED_KEYLOGGER_LENGTH)) {
|
||||
memcpy(&keylog_str, initiator2target_buffer, initiator2target_buffer_size);
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "drashna.h"
|
||||
#ifdef OLED_ENABLE
|
||||
# include "oled/oled_stuff.h"
|
||||
extern char keylog_str[OLED_KEYLOGGER_LENGTH];
|
||||
extern char keylog_str[];
|
||||
#endif
|
||||
|
||||
typedef union {
|
||||
|
Loading…
Reference in New Issue
Block a user