mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 20:32:58 +00:00
Compare commits
40 Commits
998be3a992
...
a01416c4d6
Author | SHA1 | Date | |
---|---|---|---|
|
a01416c4d6 | ||
|
d189de24a0 | ||
|
e4e015c0c8 | ||
|
4a5bae51cd | ||
|
9e9b4acbde | ||
|
57be487161 | ||
|
968a611476 | ||
|
65a8a5ff69 | ||
|
c7a04bd930 | ||
|
36b5559b99 | ||
|
39161b9ee7 | ||
|
074bbbfb21 | ||
|
638b22d057 | ||
|
9bea332a21 | ||
|
8cbcdcac62 | ||
|
88afd53b1f | ||
|
9c86583981 | ||
|
e66fce38b2 | ||
|
c843ad1268 | ||
|
0853a8ea35 | ||
|
0988523851 | ||
|
7936a791ed | ||
|
3a6df60ba5 | ||
|
5ab408aef7 | ||
|
da34d652d4 | ||
|
310c4847d5 | ||
|
f4e58eeff4 | ||
|
79a661fe61 | ||
|
46236ce3de | ||
|
0bda0f4775 | ||
|
f8b4e24d37 | ||
|
a8a47c4011 | ||
|
d04789e9ea | ||
|
4757ef281f | ||
|
4e77ab66e2 | ||
|
3d4da6de29 | ||
|
be7b479c4a | ||
|
9cd7896760 | ||
|
a5fd4fd83e | ||
|
af1f965c82 |
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.8
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.9
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
|
36
Makefile
36
Makefile
@ -110,8 +110,27 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER
|
||||
endif
|
||||
endef
|
||||
|
||||
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB
|
||||
# Split on ":", padding with empty strings to avoid indexing issues
|
||||
TOKEN1:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[0])" $$(RULE))
|
||||
TOKENr:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[1])" $$(RULE))
|
||||
|
||||
TOKEN1:=$$(shell $(QMK_BIN) resolve-alias $$(TOKEN1))
|
||||
|
||||
FOUNDx:=$$(shell echo $1 | tr " " "\n" | grep -Fx $$(TOKEN1))
|
||||
ifneq ($$(FOUNDx),)
|
||||
RULE := $$(TOKENr)
|
||||
RULE_FOUND := true
|
||||
MATCHED_ITEM := $$(TOKEN1)
|
||||
else
|
||||
RULE_FOUND := false
|
||||
MATCHED_ITEM :=
|
||||
endif
|
||||
endef
|
||||
|
||||
# Make it easier to call TRY_TO_MATCH_RULE_FROM_LIST
|
||||
TRY_TO_MATCH_RULE_FROM_LIST = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER,$1))$(RULE_FOUND)
|
||||
TRY_TO_MATCH_RULE_FROM_LIST_KB = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB,$1))$(RULE_FOUND)
|
||||
|
||||
define ALL_IN_LIST_LOOP
|
||||
OLD_RULE$1 := $$(RULE)
|
||||
@ -138,7 +157,7 @@ define PARSE_RULE
|
||||
$$(eval $$(call PARSE_TEST))
|
||||
# If the rule starts with the name of a known keyboard, then continue
|
||||
# the parsing from PARSE_KEYBOARD
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell $(QMK_BIN) list-keyboards --no-resolve-defaults)),true)
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST_KB,$$(shell $(QMK_BIN) list-keyboards)),true)
|
||||
KEYBOARD_RULE=$$(MATCHED_ITEM)
|
||||
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
|
||||
else
|
||||
@ -172,15 +191,6 @@ define PARSE_KEYBOARD
|
||||
|
||||
# KEYBOARD_FOLDERS := $$(subst /, , $(CURRENT_KB))
|
||||
|
||||
DEFAULT_FOLDER := $$(CURRENT_KB)
|
||||
|
||||
# We assume that every rules.mk will contain the full default value
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/rules.mk)
|
||||
ifneq ($$(DEFAULT_FOLDER),$$(CURRENT_KB))
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(DEFAULT_FOLDER)/rules.mk)
|
||||
endif
|
||||
CURRENT_KB := $$(DEFAULT_FOLDER)
|
||||
|
||||
# 5/4/3/2/1
|
||||
KEYBOARD_FOLDER_PATH_1 := $$(CURRENT_KB)
|
||||
KEYBOARD_FOLDER_PATH_2 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_1)))
|
||||
@ -242,7 +252,7 @@ endef
|
||||
# if we are going to compile all keyboards, match the rest of the rule
|
||||
# for each of them
|
||||
define PARSE_ALL_KEYBOARDS
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell $(QMK_BIN) list-keyboards --no-resolve-defaults)))
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell $(QMK_BIN) list-keyboards)))
|
||||
endef
|
||||
|
||||
# Prints a list of all known keymaps for the given keyboard
|
||||
@ -434,7 +444,7 @@ git-submodules: git-submodule
|
||||
|
||||
.PHONY: list-keyboards
|
||||
list-keyboards:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '
|
||||
$(QMK_BIN) list-keyboards | tr '\n' ' '
|
||||
|
||||
.PHONY: list-tests
|
||||
list-tests:
|
||||
@ -442,7 +452,7 @@ list-tests:
|
||||
|
||||
.PHONY: generate-keyboards-file
|
||||
generate-keyboards-file:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults
|
||||
$(QMK_BIN) list-keyboards
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
@ -28,6 +28,7 @@ QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/sync_timer.c \
|
||||
$(QUANTUM_DIR)/logging/debug.c \
|
||||
$(QUANTUM_DIR)/logging/sendchar.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_default_layer.c \
|
||||
|
||||
VPATH += $(QUANTUM_DIR)/logging
|
||||
# Fall back to lib/printf if there is no platform provided print
|
||||
@ -215,7 +216,7 @@ else
|
||||
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
|
||||
COMMON_VPATH += $(DRIVER_PATH)/flash
|
||||
SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c
|
||||
else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),)
|
||||
else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx AT32F415 GD32VF103),)
|
||||
# Wear-leveling EEPROM implementation, backed by MCU flash
|
||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING
|
||||
SRC += eeprom_driver.c eeprom_wear_leveling.c
|
||||
@ -456,6 +457,10 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgb_matrix/post_config.h
|
||||
|
||||
# TODO: Remove this
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_underglow.c
|
||||
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
|
||||
|
@ -39,6 +39,11 @@ export default defineConfig(({ mode }) => {
|
||||
provider: "local",
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/qmk/qmk_firmware/edit/master/docs/:path'
|
||||
},
|
||||
lastUpdated: true,
|
||||
|
||||
sidebar: sidebar,
|
||||
|
||||
externalLinkIcon: true,
|
||||
|
@ -36,6 +36,7 @@ GENERIC_FEATURES = \
|
||||
HAPTIC \
|
||||
KEY_LOCK \
|
||||
KEY_OVERRIDE \
|
||||
LAYER_LOCK \
|
||||
LEADER \
|
||||
MAGIC \
|
||||
MOUSEKEY \
|
||||
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ranges": {
|
||||
"0x52E0/0x001F": {
|
||||
"define": "QK_PERSISTENT_DEF_LAYER"
|
||||
}
|
||||
}
|
||||
}
|
@ -7,41 +7,47 @@
|
||||
"keycodes": {
|
||||
"0x7780": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_NEXT",
|
||||
"key": "QK_OUTPUT_AUTO",
|
||||
"aliases": [
|
||||
"OU_NEXT",
|
||||
"OU_AUTO"
|
||||
]
|
||||
},
|
||||
"0x7781": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_NEXT",
|
||||
"aliases": [
|
||||
"OU_NEXT"
|
||||
]
|
||||
},
|
||||
"0x7782": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_PREV",
|
||||
"aliases": [
|
||||
"OU_PREV"
|
||||
]
|
||||
},
|
||||
"0x7782": {
|
||||
"0x7783": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_NONE",
|
||||
"aliases": [
|
||||
"OU_NONE"
|
||||
]
|
||||
},
|
||||
"0x7783": {
|
||||
"0x7784": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_USB",
|
||||
"aliases": [
|
||||
"OU_USB"
|
||||
]
|
||||
},
|
||||
"0x7784": {
|
||||
"0x7785": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_2P4GHZ",
|
||||
"aliases": [
|
||||
"OU_2P4G"
|
||||
]
|
||||
},
|
||||
"0x7785": {
|
||||
"0x7786": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_BLUETOOTH",
|
||||
"aliases": [
|
||||
|
@ -3,5 +3,12 @@
|
||||
"0x7C20": "!delete!", // old QK_OUTPUT_AUTO
|
||||
"0x7C21": "!delete!", // old QK_OUTPUT_USB
|
||||
"0x7C22": "!delete!", // old QK_OUTPUT_BLUETOOTH
|
||||
"0x7C7B": {
|
||||
"group": "quantum",
|
||||
"key": "QK_LAYER_LOCK",
|
||||
"aliases": [
|
||||
"QK_LLCK"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,9 @@
|
||||
"WEAR_LEVELING_BACKING_SIZE": {"info_key": "eeprom.wear_leveling.backing_size", "value_type": "int", "to_json": false},
|
||||
"WEAR_LEVELING_LOGICAL_SIZE": {"info_key": "eeprom.wear_leveling.logical_size", "value_type": "int", "to_json": false},
|
||||
|
||||
// Layer locking
|
||||
"LAYER_LOCK_IDLE_TIMEOUT": {"info_key": "layer_lock.timeout", "value_type": "int"},
|
||||
|
||||
// Indicators
|
||||
"LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"},
|
||||
"LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"},
|
||||
|
@ -55,5 +55,6 @@
|
||||
// Items we want flagged in lint
|
||||
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||
"CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||
"DEFAULT_FOLDER": {"info_key": "_deprecated.default_folder", "deprecated": true}
|
||||
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}
|
||||
}
|
||||
|
@ -92,6 +92,7 @@
|
||||
"GD32VF103",
|
||||
"WB32F3G71",
|
||||
"WB32FQ95",
|
||||
"AT32F415",
|
||||
"atmega16u2",
|
||||
"atmega32u2",
|
||||
"atmega16u4",
|
||||
@ -216,6 +217,7 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"apm32-dfu",
|
||||
"at32-dfu",
|
||||
"atmel-dfu",
|
||||
"bootloadhid",
|
||||
"caterina",
|
||||
@ -373,6 +375,12 @@
|
||||
}
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"layer_lock": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"layout_aliases": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
|
||||
|
@ -16,6 +16,8 @@
|
||||
"/tutorial": "/newbs",
|
||||
"/unicode": "/feature_unicode",
|
||||
|
||||
"/features/bluetooth": "/features/wireless",
|
||||
|
||||
"/adc_driver": "/drivers/adc",
|
||||
"/apa102_driver": "/drivers/apa102",
|
||||
"/audio_driver": "/drivers/audio",
|
||||
@ -24,7 +26,7 @@
|
||||
"/feature_auto_shift": "/features/auto_shift",
|
||||
"/feature_autocorrect": "/features/autocorrect",
|
||||
"/feature_backlight": "/features/backlight",
|
||||
"/feature_bluetooth": "/features/bluetooth",
|
||||
"/feature_bluetooth": "/features/wireless",
|
||||
"/feature_bootmagic": "/features/bootmagic",
|
||||
"/feature_caps_word": "/features/caps_word",
|
||||
"/feature_combo": "/features/combo",
|
||||
|
@ -123,6 +123,7 @@
|
||||
{ "text": "Key Lock", "link": "/features/key_lock" },
|
||||
{ "text": "Key Overrides", "link": "/features/key_overrides" },
|
||||
{ "text": "Layers", "link": "/feature_layers" },
|
||||
{ "text": "Layer Lock", "link": "/features/layer_lock" },
|
||||
{ "text": "One Shot Keys", "link": "/one_shot_keys" },
|
||||
{ "text": "OS Detection", "link": "/features/os_detection" },
|
||||
{ "text": "Raw HID", "link": "/features/rawhid" },
|
||||
@ -166,7 +167,6 @@
|
||||
]
|
||||
},
|
||||
{ "text": "Audio", "link": "/features/audio" },
|
||||
{ "text": "Bluetooth", "link": "/features/bluetooth" },
|
||||
{ "text": "Bootmagic", "link": "/features/bootmagic" },
|
||||
{ "text": "Converters", "link": "/feature_converters" },
|
||||
{ "text": "Custom Matrix", "link": "/custom_matrix" },
|
||||
@ -179,7 +179,8 @@
|
||||
{ "text": "Pointing Device", "link": "/features/pointing_device" },
|
||||
{ "text": "PS/2 Mouse", "link": "/features/ps2_mouse" },
|
||||
{ "text": "Split Keyboard", "link": "/features/split_keyboard" },
|
||||
{ "text": "Stenography", "link": "/features/stenography" }
|
||||
{ "text": "Stenography", "link": "/features/stenography" },
|
||||
{ "text": "Wireless", "link": "/features/wireless" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ This page attempts to introduce developers to the QMK Compiler. It does not go i
|
||||
|
||||
# Overview
|
||||
|
||||
The QMK Compile API consists of a few movings parts:
|
||||
The QMK Compile API consists of a few moving parts:
|
||||
|
||||
![Architecture Diagram](https://raw.githubusercontent.com/qmk/qmk_api/master/docs/architecture.svg)
|
||||
|
||||
|
@ -153,20 +153,26 @@ qmk cd
|
||||
|
||||
This command allows for searching through keyboard/keymap targets, filtering by specific criteria. `info.json` and `rules.mk` files contribute to the search data, as well as keymap configurations, and the results can be filtered using "dotty" syntax matching the overall `info.json` file format.
|
||||
|
||||
For example, one could search for all keyboards using STM32F411:
|
||||
For example, one could search for all keyboards powered by the STM32F411 microcontroller:
|
||||
|
||||
```
|
||||
qmk find -f 'processor=STM32F411'
|
||||
qmk find -f 'processor==STM32F411'
|
||||
```
|
||||
|
||||
...and one can further constrain the list to keyboards using STM32F411 as well as rgb_matrix support:
|
||||
The list can be further constrained by passing additional filter expressions:
|
||||
|
||||
```
|
||||
qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true'
|
||||
qmk find -f 'processor==STM32F411' -f 'features.rgb_matrix==true'
|
||||
```
|
||||
|
||||
The following filter expressions are also supported:
|
||||
The following filter expressions are supported:
|
||||
|
||||
- `key == value`: Match targets where `key` is equal to `value`. May include wildcards such as `*` and `?`.
|
||||
- `key != value`: Match targets where `key` is not `value`. May include wildcards such as `*` and `?`.
|
||||
- `key < value`: Match targets where `key` is a number less than `value`.
|
||||
- `key > value`: Match targets where `key` is a number greater than `value`.
|
||||
- `key <= value`: Match targets where `key` is a number less than or equal to `value`.
|
||||
- `key >= value`: Match targets where `key` is a number greater than or equal to `value`.
|
||||
- `exists(key)`: Match targets where `key` is present.
|
||||
- `absent(key)`: Match targets where `key` is not present.
|
||||
- `contains(key, value)`: Match targets where `key` contains `value`. Can be used for strings, arrays and object keys.
|
||||
@ -175,7 +181,7 @@ The following filter expressions are also supported:
|
||||
You can also list arbitrary values for each matched target with `--print`:
|
||||
|
||||
```
|
||||
qmk find -f 'processor=STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix'
|
||||
qmk find -f 'processor==STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix'
|
||||
```
|
||||
|
||||
**Usage**:
|
||||
|
@ -57,6 +57,10 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
|
||||
* [WB32F3G71xx](http://www.westberrytech.com)
|
||||
* [WB32FQ95xx](http://www.westberrytech.com)
|
||||
|
||||
### Artery (AT32)
|
||||
|
||||
* [AT32F415](https://www.arterychip.com/en/product/AT32F415.jsp)
|
||||
|
||||
### NXP (Kinetis)
|
||||
|
||||
* [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
|
||||
|
@ -98,6 +98,7 @@ The device name here is the name that appears in Zadig, and may not be what the
|
||||
|`bootloadhid` |HIDBoot |`16C0:05DF` |HidUsb |
|
||||
|`usbasploader`|USBasp |`16C0:05DC` |libusbK|
|
||||
|`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB |
|
||||
|`at32-dfu` |AT32 Bootloader DFU |`2E3C:DF11` |WinUSB |
|
||||
|`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB |
|
||||
|`gd32v-dfu` |GD32V BOOTLOADER |`28E9:0189` |WinUSB |
|
||||
|`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB |
|
||||
|
@ -57,27 +57,32 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion;
|
||||
|
||||
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8:
|
||||
|
||||
```c
|
||||
//halconf.h:
|
||||
#define HAL_USE_DAC TRUE
|
||||
#define HAL_USE_GPT TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_DAC TRUE // [!code focus]
|
||||
#define HAL_USE_GPT TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
```c
|
||||
// mcuconf.h:
|
||||
#include_next <mcuconf.h>
|
||||
#undef STM32_DAC_USE_DAC1_CH1
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#undef STM32_DAC_USE_DAC1_CH2
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#undef STM32_GPT_USE_TIM6
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
#undef STM32_GPT_USE_TIM7
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#undef STM32_GPT_USE_TIM8
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
|
||||
#undef STM32_DAC_USE_DAC1_CH1 // [!code focus]
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE // [!code focus]
|
||||
#undef STM32_DAC_USE_DAC1_CH2 // [!code focus]
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE // [!code focus]
|
||||
#undef STM32_GPT_USE_TIM6 // [!code focus]
|
||||
#define STM32_GPT_USE_TIM6 TRUE // [!code focus]
|
||||
#undef STM32_GPT_USE_TIM7 // [!code focus]
|
||||
#define STM32_GPT_USE_TIM7 TRUE // [!code focus]
|
||||
#undef STM32_GPT_USE_TIM8 // [!code focus]
|
||||
#define STM32_GPT_USE_TIM8 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
::: tip
|
||||
Note: DAC1 (A4) uses TIM6, DAC2 (A5) uses TIM7, and the audio state timer uses TIM8 (configurable).
|
||||
@ -95,23 +100,28 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t
|
||||
|
||||
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6:
|
||||
|
||||
```c
|
||||
//halconf.h:
|
||||
#define HAL_USE_DAC TRUE
|
||||
#define HAL_USE_GPT TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_DAC TRUE // [!code focus]
|
||||
#define HAL_USE_GPT TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
```c
|
||||
// mcuconf.h:
|
||||
#include_next <mcuconf.h>
|
||||
#undef STM32_DAC_USE_DAC1_CH1
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#undef STM32_DAC_USE_DAC1_CH2
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#undef STM32_GPT_USE_TIM6
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
|
||||
#undef STM32_DAC_USE_DAC1_CH1 // [!code focus]
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE // [!code focus]
|
||||
#undef STM32_DAC_USE_DAC1_CH2 // [!code focus]
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE // [!code focus]
|
||||
#undef STM32_GPT_USE_TIM6 // [!code focus]
|
||||
#define STM32_GPT_USE_TIM6 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
### DAC Config
|
||||
|
||||
@ -170,19 +180,25 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out
|
||||
The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function.
|
||||
|
||||
A configuration example for the STM32F103C8 would be:
|
||||
```c
|
||||
//halconf.h:
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_PAL TRUE
|
||||
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_PWM TRUE // [!code focus]
|
||||
#define HAL_USE_PAL TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
```c
|
||||
// mcuconf.h:
|
||||
#include_next <mcuconf.h>
|
||||
#undef STM32_PWM_USE_TIM1
|
||||
#define STM32_PWM_USE_TIM1 TRUE
|
||||
|
||||
#undef STM32_PWM_USE_TIM1 // [!code focus]
|
||||
#define STM32_PWM_USE_TIM1 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
If we now target pin A8, looking through the data-sheet of the STM32F103C8, for the timers and alternate functions
|
||||
- TIM1_CH1 = PA8 <- alternate0
|
||||
|
@ -54,18 +54,25 @@ The ATmega16/32U2 does not possess I2C functionality, and so cannot use this dri
|
||||
|
||||
You'll need to determine which pins can be used for I2C -- a an example, STM32 parts generally have multiple I2C peripherals, labeled I2C1, I2C2, I2C3 etc.
|
||||
|
||||
To enable I2C, modify your board's `halconf.h` to enable I2C:
|
||||
To enable I2C, modify your board's `halconf.h` to enable I2C, then modify your board's `mcuconf.h` to enable the peripheral you've chosen:
|
||||
|
||||
```c
|
||||
#define HAL_USE_I2C TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
```c
|
||||
#undef STM32_I2C_USE_I2C2
|
||||
#define STM32_I2C_USE_I2C2 TRUE
|
||||
#undef STM32_I2C_USE_I2C2 // [!code focus]
|
||||
#define STM32_I2C_USE_I2C2 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
|`mcuconf.h` Setting |Description |Default|
|
||||
|----------------------------|----------------------------------------------------------------------------------|-------|
|
||||
|
@ -12,8 +12,6 @@ The Serial driver powers the [Split Keyboard](../features/split_keyboard) featur
|
||||
Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards.
|
||||
:::
|
||||
|
||||
<hr>
|
||||
|
||||
## Bitbang
|
||||
|
||||
This is the Default driver, absence of configuration assumes this driver. It works by [bit banging](https://en.wikipedia.org/wiki/Bit_banging) a GPIO pin using the CPU. It is therefore not as efficient as a dedicated hardware peripheral, which the Half-duplex and Full-duplex drivers use.
|
||||
@ -53,11 +51,15 @@ SERIAL_DRIVER = bitbang
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
```
|
||||
|
||||
3. On ARM platforms you must turn on ChibiOS `PAL_USE_CALLBACKS` feature:
|
||||
3. On ARM platforms you must turn on ChibiOS PAL callbacks:
|
||||
|
||||
* In `halconf.h` add the line `#define PAL_USE_CALLBACKS TRUE`.
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
<hr>
|
||||
#define PAL_USE_CALLBACKS TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
## USART Half-duplex
|
||||
|
||||
@ -117,8 +119,6 @@ For STM32 MCUs several GPIO configuration options can be changed as well. See th
|
||||
|
||||
4. Decide either for `SERIAL`, `SIO`, or `PIO` subsystem. See section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
|
||||
|
||||
<hr>
|
||||
|
||||
## USART Full-duplex
|
||||
|
||||
Targeting ARM boards based on ChibiOS where communication is offloaded to an USART hardware device. The advantages over bitbanging are fast, accurate timings and reduced CPU usage; therefore it is advised to choose this driver over all others where possible. Due to its internal design Full-duplex is slightly more efficient than the Half-duplex driver, but Full-duplex should be primarily chosen if Half-duplex operation is not supported by the controller's USART peripheral.
|
||||
@ -179,38 +179,46 @@ For STM32 MCUs several GPIO configuration options, including the ability for `TX
|
||||
|
||||
4. Decide either for `SERIAL`, `SIO`, or `PIO` subsystem. See section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
|
||||
|
||||
<hr>
|
||||
|
||||
## Choosing a driver subsystem
|
||||
|
||||
### The `SERIAL` driver
|
||||
|
||||
The `SERIAL` Subsystem is supported for the majority of ChibiOS MCUs and should be used whenever supported. Follow these steps in order to activate it:
|
||||
|
||||
1. In your keyboards `halconf.h` add:
|
||||
1. Enable the SERIAL subsystem in the ChibiOS HAL.
|
||||
|
||||
```c
|
||||
#define HAL_USE_SERIAL TRUE
|
||||
```
|
||||
Add the following to your keyboard's `halconf.h`, creating it if necessary:
|
||||
|
||||
2. In your keyboards `mcuconf.h`: activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
|
||||
|
||||
Just below `#include_next <mcuconf.h>` add:
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
```c
|
||||
#include_next <mcuconf.h>
|
||||
#define HAL_USE_SERIAL TRUE // [!code focus]
|
||||
|
||||
#undef STM32_SERIAL_USE_USARTn
|
||||
#define STM32_SERIAL_USE_USARTn TRUE
|
||||
```
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
Where 'n' matches the peripheral number of your selected USART on the MCU.
|
||||
2. Activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
|
||||
|
||||
3. In you keyboards `config.h`: override the default USART `SERIAL` driver if you use a USART peripheral that does not belong to the default selected `SD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SD3`.
|
||||
Add the following to your keyboard's `mcuconf.h`, creating it if necessary:
|
||||
|
||||
```c
|
||||
#define SERIAL_USART_DRIVER SD3
|
||||
```
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_SERIAL_USE_USARTn // [!code focus]
|
||||
#define STM32_SERIAL_USE_USARTn TRUE // [!code focus]
|
||||
```
|
||||
|
||||
Where *n* matches the peripheral number of your selected USART on the MCU.
|
||||
|
||||
3. Override the default USART `SERIAL` driver if you use a USART peripheral that does not belong to the default selected `SD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SD3`.
|
||||
|
||||
Add the following to your keyboard's `config.h`:
|
||||
|
||||
```c
|
||||
#define SERIAL_USART_DRIVER SD3
|
||||
```
|
||||
|
||||
### The `SIO` driver
|
||||
|
||||
@ -218,31 +226,41 @@ The `SIO` Subsystem was added to ChibiOS with the 21.11 release and is only supp
|
||||
|
||||
Follow these steps in order to activate it:
|
||||
|
||||
1. In your keyboards `halconf.h` add:
|
||||
1. Enable the SIO subsystem in the ChibiOS HAL.
|
||||
|
||||
```c
|
||||
#define HAL_USE_SIO TRUE
|
||||
```
|
||||
Add the following to your keyboard's `halconf.h`, creating it if necessary:
|
||||
|
||||
2. In your keyboards `mcuconf.h:` activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
|
||||
|
||||
Just below `#include_next <mcuconf.h>` add:
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
```c
|
||||
#include_next <mcuconf.h>
|
||||
#define HAL_USE_SIO TRUE // [!code focus]
|
||||
|
||||
#undef STM32_SIO_USE_USARTn
|
||||
#define STM32_SIO_USE_USARTn TRUE
|
||||
```
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
Where 'n' matches the peripheral number of your selected USART on the MCU.
|
||||
2. Activate the USART peripheral that is used on your MCU. The shown example is for an STM32 MCU, so this will not work on MCUs by other manufacturers. You can find the correct names in the `mcuconf.h` files of your MCU that ship with ChibiOS.
|
||||
|
||||
3. In the keyboard's `config.h` file: override the default USART `SIO` driver if you use a USART peripheral that does not belong to the default selected `SIOD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SIOD3`.
|
||||
Add the following to your keyboard's `mcuconf.h`, creating it if necessary:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_SIO_USE_USARTn // [!code focus]
|
||||
#define STM32_SIO_USE_USARTn TRUE // [!code focus]
|
||||
```
|
||||
|
||||
Where *n* matches the peripheral number of your selected USART on the MCU.
|
||||
|
||||
3. Override the default USART `SIO` driver if you use a USART peripheral that does not belong to the default selected `SIOD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SIOD3`.
|
||||
|
||||
Add the following to your keyboard's `config.h`:
|
||||
|
||||
```c
|
||||
#define SERIAL_USART_DRIVER SIOD3
|
||||
```
|
||||
|
||||
```c
|
||||
#define SERIAL_USART_DRIVER SIOD3
|
||||
```
|
||||
|
||||
### The `PIO` driver
|
||||
|
||||
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using an integrated PIO peripheral and is therefore only available on this MCU. Because of the flexible nature of PIO peripherals, **any** GPIO pin can be used as a `TX` or `RX` pin. Half-duplex and Full-duplex operation modes are fully supported with this driver. Half-duplex uses the built-in pull-ups and GPIO manipulation of the RP2040 to drive the line high by default, thus an external pull-up resistor **is not required**.
|
||||
@ -254,8 +272,6 @@ Optionally, the PIO peripheral utilized for split communication can be changed w
|
||||
|
||||
The Serial PIO program uses 2 state machines, 13 instructions and the complete interrupt handler of the PIO peripheral it is running on.
|
||||
|
||||
<hr>
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
There are several advanced configuration options that can be defined in your keyboards `config.h` file:
|
||||
@ -265,9 +281,11 @@ There are several advanced configuration options that can be defined in your key
|
||||
If you're having issues or need a higher baudrate with serial communication, you can change the baudrate which in turn controls the communication speed for serial. You want to lower the baudrate if you experience failed transactions.
|
||||
|
||||
```c
|
||||
#define SELECT_SOFT_SERIAL_SPEED {#}
|
||||
#define SELECT_SOFT_SERIAL_SPEED n
|
||||
```
|
||||
|
||||
Where *n* is one of:
|
||||
|
||||
| Speed | Bitbang | Half-duplex and Full-duplex |
|
||||
| ----- | -------------------------- | --------------------------- |
|
||||
| `0` | 189000 baud (experimental) | 460800 baud |
|
||||
@ -287,8 +305,6 @@ This is the default time window in milliseconds in which a successful communicat
|
||||
#define SERIAL_USART_TIMEOUT 20 // USART driver timeout. default 20
|
||||
```
|
||||
|
||||
<hr>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you're having issues withe serial communication, you can enable debug messages that will give you insights which part of the communication failed. The enable these messages add to your keyboards `config.h` file:
|
||||
|
@ -32,20 +32,27 @@ You may use more than one slave select pin, not just the `SS` pin. This is usefu
|
||||
|
||||
You'll need to determine which pins can be used for SPI -- as an example, STM32 parts generally have multiple SPI peripherals, labeled SPI1, SPI2, SPI3 etc.
|
||||
|
||||
To enable SPI, modify your board's `halconf.h` to enable SPI:
|
||||
To enable SPI, modify your board's `halconf.h` to enable SPI, then modify your board's `mcuconf.h` to enable the peripheral you've chosen:
|
||||
|
||||
```c
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_SPI TRUE // [!code focus]
|
||||
#define SPI_USE_WAIT TRUE // [!code focus]
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
```c
|
||||
#undef STM32_SPI_USE_SPI2
|
||||
#define STM32_SPI_USE_SPI2 TRUE
|
||||
#undef STM32_SPI_USE_SPI2 // [!code focus]
|
||||
#define STM32_SPI_USE_SPI2 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
|
||||
|
||||
|
@ -35,8 +35,12 @@ You'll need to determine which pins can be used for UART -- as an example, STM32
|
||||
To enable UART, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
|
||||
|
||||
```c
|
||||
#undef STM32_SERIAL_USE_USART2
|
||||
#define STM32_SERIAL_USE_USART2 TRUE
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_SERIAL_USE_USART2 // [!code focus]
|
||||
#define STM32_SERIAL_USE_USART2 TRUE // [!code focus]
|
||||
```
|
||||
|
||||
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
|
||||
|
@ -160,15 +160,23 @@ To configure the DI pin for open drain configuration, add the following to your
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
|
||||
|
||||
`halconf.h`:
|
||||
```c
|
||||
#define HAL_USE_SPI TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_SPI TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
`mcuconf.h`:
|
||||
```c
|
||||
#undef STM32_SPI_USE_SPI1
|
||||
#define STM32_SPI_USE_SPI1 TRUE
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_SPI_USE_SPI1 // [!code focus]
|
||||
#define STM32_SPI_USE_SPI1 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
The following `define`s apply only to the `spi` driver:
|
||||
|
||||
@ -213,15 +221,23 @@ The following `#define`s apply only to the PIO driver:
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to enable PWM at the keyboard level. For STM32, this would look like:
|
||||
|
||||
`halconf.h`:
|
||||
```c
|
||||
#define HAL_USE_PWM TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_PWM TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
`mcuconf.h`:
|
||||
```c
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PWM_USE_TIM2 // [!code focus]
|
||||
#define STM32_PWM_USE_TIM2 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
The following `#define`s apply only to the `pwm` driver:
|
||||
|
||||
|
@ -11,7 +11,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||
|
@ -8,7 +8,8 @@ For a detailed explanation of how the layer stack works, checkout [Keymap Overvi
|
||||
|
||||
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
|
||||
|
||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions#programming-the-behavior-of-any-keycode).)
|
||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. Note that this is a temporary switch that only persists until the keyboard loses power.
|
||||
* `PDF(layer)` - sets a persistent default layer. This switch, which will last through a power loss, might be used to switch from QWERTY to Dvorak layout and only switch again when you want to.
|
||||
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
||||
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15. The modifiers this keycode accept are prefixed with `MOD_`, not `KC_`. These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
|
||||
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
||||
@ -17,6 +18,9 @@ These functions allow you to activate layers in various ways. Note that layers a
|
||||
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
|
||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
|
||||
|
||||
See also the [Layer Lock key](features/layer_lock), which locks the highest
|
||||
active layer until pressed again.
|
||||
|
||||
### Caveats {#caveats}
|
||||
|
||||
Currently, the `layer` argument of `LT()` is limited to layers 0-15, and the `kc` argument to the [Basic Keycode set](keycodes_basic), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. This is because QMK uses 16-bit keycodes, of which 4 bits are used for the function identifier and 4 bits for the layer, leaving only 8 bits for the keycode.
|
||||
|
@ -42,38 +42,7 @@ You can define up to 32 macros in a `keymap.json` file, as used by [Configurator
|
||||
|
||||
### Selecting Your Host Keyboard Layout
|
||||
|
||||
If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros - you may need to type different keys to get the same letters! To address this you can add the `host_language` key to your `keymap.json`, like so:
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "handwired/my_macropad",
|
||||
"keymap": "my_keymap",
|
||||
"host_language": "dvorak",
|
||||
"macros": [
|
||||
["Hello, World!"]
|
||||
],
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["QK_MACRO_0"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The current list of available languages is:
|
||||
|
||||
| belgian | bepo | br_abnt2 | canadian_multilingual |
|
||||
|:-------:|:----:|:--------:|:---------------------:|
|
||||
| **colemak** | **croatian** | **czech** | **danish** |
|
||||
| **dvorak_fr** | **dvorak** | **dvp** | **estonian** |
|
||||
| **finnish** | **fr_ch** | **french_afnor** | **french** |
|
||||
| **french_osx** | **german_ch** | **german** | **german_osx** |
|
||||
| **hungarian** | **icelandic** | **italian** | **italian_osx_ansi** |
|
||||
| **italian_osx_iso** | **jis** | **latvian** | **lithuanian_azerty** |
|
||||
| **lithuanian_qwerty** | **norman** | **norwegian** | **portuguese** |
|
||||
| **portuguese_osx_iso** | **romanian** | **serbian_latin** | **slovak** |
|
||||
| **slovenian** | **spanish_dvorak** | **spanish_latin_america** | **spanish** |
|
||||
| **swedish** | **turkish_f** | **turkish_q** | **uk** |
|
||||
| **us_international** | **workman** | **workman_zxcvm** |
|
||||
If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros — you may need to type different keys to get the same letters! To address this you can use [language-specific keycodes](reference_keymap_extras).
|
||||
|
||||
### Macro Basics
|
||||
|
||||
|
@ -161,15 +161,23 @@ Note that the choice of timer may conflict with the [Audio](audio) feature.
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to enable PWM at the keyboard level. For STM32, this would look like:
|
||||
|
||||
`halconf.h`:
|
||||
```c
|
||||
#define HAL_USE_PWM TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_PWM TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
`mcuconf.h`:
|
||||
```c
|
||||
#undef STM32_PWM_USE_TIM4
|
||||
#define STM32_PWM_USE_TIM4 TRUE
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PWM_USE_TIM4 // [!code focus]
|
||||
#define STM32_PWM_USE_TIM4 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
The following `#define`s apply only to the `pwm` driver:
|
||||
|
||||
@ -187,15 +195,23 @@ Refer to the ST datasheet for your particular MCU to determine these values. For
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to enable general-purpose timers at the keyboard level. For STM32, this would look like:
|
||||
|
||||
`halconf.h`:
|
||||
```c
|
||||
#define HAL_USE_GPT TRUE
|
||||
::: code-group
|
||||
```c [halconf.h]
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_GPT TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
`mcuconf.h`:
|
||||
```c
|
||||
#undef STM32_GPT_USE_TIM15
|
||||
#define STM32_GPT_USE_TIM15 TRUE
|
||||
```c [mcuconf.h]
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_GPT_USE_TIM15 // [!code focus]
|
||||
#define STM32_GPT_USE_TIM15 TRUE // [!code focus]
|
||||
```
|
||||
:::
|
||||
|
||||
The following `#define`s apply only to the `timer` driver:
|
||||
|
||||
|
139
docs/features/layer_lock.md
Normal file
139
docs/features/layer_lock.md
Normal file
@ -0,0 +1,139 @@
|
||||
# Layer Lock
|
||||
|
||||
Some [layer switches](../feature_layers#switching-and-toggling-layers) access
|
||||
the layer by holding the key, including momentary layer `MO(layer)` and layer
|
||||
tap `LT(layer, key)` keys. You may sometimes need to stay on the layer for a
|
||||
long period of time. Layer Lock "locks" the current layer to stay on, supposing
|
||||
it was accessed by one of:
|
||||
|
||||
* `MO(layer)` momentary layer switch
|
||||
* `LT(layer, key)` layer tap
|
||||
* `OSL(layer)` one-shot layer
|
||||
* `TT(layer)` layer tap toggle
|
||||
* `LM(layer, mod)` layer-mod key (the layer is locked, but not the mods)
|
||||
|
||||
Press the Layer Lock key again to unlock the layer. Additionally, when a layer
|
||||
is locked, layer switch keys that turn off the layer such as `TO(other_layer)`
|
||||
will unlock it.
|
||||
|
||||
|
||||
## How do I enable Layer Lock
|
||||
|
||||
In your rules.mk, add:
|
||||
|
||||
```make
|
||||
LAYER_LOCK_ENABLE = yes
|
||||
```
|
||||
|
||||
Pick a key in your keymap on a layer you intend to lock, and assign it the
|
||||
keycode `QK_LAYER_LOCK` (short alias `QK_LLCK`). Note that locking the base
|
||||
layer has no effect, so typically, this key is used on layers above the base
|
||||
layer.
|
||||
|
||||
|
||||
## Example use
|
||||
|
||||
Consider a keymap with the following base layer.
|
||||
|
||||
![Base layer with a MO(NAV) key.](https://i.imgur.com/DkEhj9x.png)
|
||||
|
||||
The highlighted key is a momentary layer switch `MO(NAV)`. Holding it accesses a
|
||||
navigation layer.
|
||||
|
||||
![Nav layer with a Layer Lock key.](https://i.imgur.com/2wUZNWk.png)
|
||||
|
||||
|
||||
Holding the NAV key is fine for brief use, but awkward to continue holding when
|
||||
using navigation functions continuously. The Layer Lock key comes to the rescue:
|
||||
|
||||
1. Hold the NAV key, activating the navigation layer.
|
||||
2. Tap Layer Lock.
|
||||
3. Release NAV. The navigation layer stays on.
|
||||
4. Make use of the arrow keys, etc.
|
||||
5. Tap Layer Lock or NAV again to turn the navigation layer back off.
|
||||
|
||||
A variation that would also work is to put the Layer Lock key on the base layer
|
||||
and make other layers transparent (`KC_TRNS`) in that position. Pressing the
|
||||
Layer Lock key locks (or unlocks) the highest active layer, regardless of which
|
||||
layer the Layer Lock key is on.
|
||||
|
||||
|
||||
## Idle timeout
|
||||
|
||||
Optionally, Layer Lock may be configured to unlock if the keyboard is idle
|
||||
for some time. In config.h, define `LAYER_LOCK_IDLE_TIMEOUT` in units of
|
||||
milliseconds:
|
||||
|
||||
```c
|
||||
#define LAYER_LOCK_IDLE_TIMEOUT 60000 // Turn off after 60 seconds.
|
||||
```
|
||||
|
||||
|
||||
## Functions
|
||||
|
||||
Use the following functions to query and manipulate the layer lock state.
|
||||
|
||||
| Function | Description |
|
||||
|----------------------------|------------------------------------|
|
||||
| `is_layer_locked(layer)` | Checks whether `layer` is locked. |
|
||||
| `layer_lock_on(layer)` | Locks and turns on `layer`. |
|
||||
| `layer_lock_off(layer)` | Unlocks and turns off `layer`. |
|
||||
| `layer_lock_invert(layer)` | Toggles whether `layer` is locked. |
|
||||
|
||||
|
||||
## Representing the current Layer Lock state
|
||||
|
||||
There is an optional callback `layer_lock_set_user()` that gets called when a
|
||||
layer is locked or unlocked. This is useful to represent the current lock state
|
||||
for instance by setting an LED. In keymap.c, define
|
||||
|
||||
```c
|
||||
bool layer_lock_set_user(layer_state_t locked_layers) {
|
||||
// Do something like `set_led(is_layer_locked(NAV));`
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
The argument `locked_layers` is a bitfield in which the kth bit is on if the kth
|
||||
layer is locked. Alternatively, you can use `is_layer_locked(layer)` to check if
|
||||
a given layer is locked.
|
||||
|
||||
|
||||
## Combine Layer Lock with a mod-tap
|
||||
|
||||
It is possible to create a [mod-tap MT key](../mod_tap) that acts as a modifier
|
||||
on hold and Layer Lock on tap. Since Layer Lock is not a [basic
|
||||
keycode](../keycodes_basic), attempting `MT(mod, QK_LLCK)` is invalid does not
|
||||
work directly, yet this effect can be achieved through [changing the tap
|
||||
function](../mod_tap#changing-tap-function). For example, the following
|
||||
implements a `SFTLLCK` key that acts as Shift on hold and Layer Lock on tap:
|
||||
|
||||
```c
|
||||
#define SFTLLCK LSFT_T(KC_0)
|
||||
|
||||
// Use SFTLLCK in your keymap...
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SFTLLCK:
|
||||
if (record->tap.count) {
|
||||
if (record->event.pressed) {
|
||||
// Toggle the lock on the highest layer.
|
||||
layer_lock_invert(get_highest_layer(layer_state));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
// Other macros...
|
||||
}
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
In the above, `KC_0` is an arbitrary placeholder for the tapping keycode. This
|
||||
keycode will never be sent, so any basic keycode will do. In
|
||||
`process_record_user()`, the tap press event is changed to toggle the lock on
|
||||
the highest layer. Layer Lock can be combined with a [layer-tap LT
|
||||
key](../feature_layers#switching-and-toggling-layers) similarly.
|
||||
|
@ -90,18 +90,22 @@ PS2_ENABLE = yes
|
||||
PS2_DRIVER = interrupt
|
||||
```
|
||||
|
||||
In your keyboard config.h:
|
||||
In your keyboard `config.h`:
|
||||
|
||||
```c
|
||||
#define PS2_CLOCK_PIN A8
|
||||
#define PS2_DATA_PIN A9
|
||||
```
|
||||
|
||||
And in the chibios specifig halconf.h:
|
||||
```c
|
||||
#define PAL_USE_CALLBACKS TRUE
|
||||
```
|
||||
And in the ChibiOS specific `halconf.h`:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#define PAL_USE_CALLBACKS TRUE // [!code focus]
|
||||
|
||||
#include_next <halconf.h>
|
||||
```
|
||||
|
||||
### USART Version {#usart-version}
|
||||
|
||||
|
@ -59,6 +59,10 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||
## Keycodes
|
||||
|
||||
::: warning
|
||||
These keycodes also simultaneously control [RGB Matrix](rgb_matrix), if enabled. This behaviour is in the process of being deprecated, so during this time it is recommended to additionally include the dedicated RGB Matrix keycodes to your keymap, and add `#define RGB_MATRIX_DISABLE_SHARED_KEYCODES` to `config.h`.
|
||||
:::
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------------------|----------|---------------------------------------------------------------------|
|
||||
|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off |
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Bluetooth
|
||||
# Wireless / Bluetooth
|
||||
|
||||
## Bluetooth Known Supported Hardware
|
||||
|
||||
@ -39,8 +39,20 @@ BLUETOOTH_DRIVER = bluefruit_le # or rn42
|
||||
|
||||
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
|
||||
|
||||
| Key | Aliases | Description |
|
||||
|-----------------------|----------------------|------------------------------------------------|
|
||||
| `QK_OUTPUT_NEXT` | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
|
||||
| `QK_OUTPUT_USB` | `OU_USB` | USB only |
|
||||
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Bluetooth only |
|
||||
| Key | Aliases | Description |
|
||||
|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
|
||||
| `QK_OUTPUT_AUTO` | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless |
|
||||
| `QK_OUTPUT_NEXT` | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
|
||||
| `QK_OUTPUT_PREV` | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
|
||||
| `QK_OUTPUT_NONE` | `OU_NONE` | Disable all output **(not yet implemented)** |
|
||||
| `QK_OUTPUT_USB` | `OU_USB` | Output to USB only |
|
||||
| `QK_OUTPUT_2P4GHZ` | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)** |
|
||||
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Output to Bluetooth only |
|
||||
| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_UNPAIR` | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE1` | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE2` | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE3` | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE4` | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE5` | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)** |
|
@ -345,6 +345,39 @@ Flashing sequence:
|
||||
3. Flash a .bin file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
## AT32 DFU
|
||||
|
||||
All AT32 MCUs come preloaded with a factory bootloader that cannot be modified nor deleted.
|
||||
|
||||
To ensure compatibility with the AT32-DFU bootloader, make sure this block is present in your `rules.mk`:
|
||||
|
||||
```make
|
||||
# Bootloader selection
|
||||
BOOTLOADER = at32-dfu
|
||||
```
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [dfu-util](https://dfu-util.sourceforge.net/) / `:dfu-util` target in QMK (recommended command line)
|
||||
```
|
||||
dfu-util -a 0 -d 2E3C:DF11 -s 0x8000000:leave -D <filename>
|
||||
```
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Enter the bootloader using any of the following methods:
|
||||
* Tap the `QK_BOOT` keycode
|
||||
* If a reset circuit is present, tap the `RESET` button on the PCB; some boards may also have a toggle switch that must be flipped
|
||||
* Otherwise, you need to bridge `BOOT0` to VCC (via `BOOT0` button or jumper), short `RESET` to GND (via `RESET` button or jumper), and then let go of the `BOOT0` bridge
|
||||
2. Wait for the OS to detect the device
|
||||
3. Flash a .bin file
|
||||
4. Reset the device into application mode (may be done automatically)
|
||||
|
||||
### `make` Targets
|
||||
|
||||
* `:dfu-util`: Waits until an AT32 bootloader device is available, and then flashes the firmware.
|
||||
* `:dfu-util-split-left` and `:dfu-util-split-right`: Flashes the firmware as with `:dfu-util`, but also sets the handedness setting in EEPROM.
|
||||
|
||||
## tinyuf2
|
||||
|
||||
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on F303/F401/F411.
|
||||
|
@ -290,15 +290,27 @@ See also: [Backlighting](features/backlight)
|
||||
| `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
|
||||
| `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |
|
||||
|
||||
## Bluetooth {#bluetooth}
|
||||
## Wireless/Bluetooth {#bluetooth}
|
||||
|
||||
See also: [Bluetooth](features/bluetooth)
|
||||
See also: [Wireless](features/wireless)
|
||||
|
||||
| Key | Aliases | Description |
|
||||
|-----------------------|----------------------|------------------------------------------------|
|
||||
| `QK_OUTPUT_NEXT` | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
|
||||
| `QK_OUTPUT_USB` | `OU_USB` | USB only |
|
||||
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Bluetooth only |
|
||||
| Key | Aliases | Description |
|
||||
|-----------------------------|-----------|-----------------------------------------------------------------------------------------------|
|
||||
| `QK_OUTPUT_AUTO` | `OU_AUTO` | Automatically switch to USB when plugged in, otherwise use wireless |
|
||||
| `QK_OUTPUT_NEXT` | `OU_NEXT` | Cycle forwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
|
||||
| `QK_OUTPUT_PREV` | `OU_PREV` | Cycle backwards through USB, Bluetooth, and 2.4GHz (when available) **(not yet implemented)** |
|
||||
| `QK_OUTPUT_NONE` | `OU_NONE` | Disable all output **(not yet implemented)** |
|
||||
| `QK_OUTPUT_USB` | `OU_USB` | Output to USB only |
|
||||
| `QK_OUTPUT_2P4GHZ` | `OU_2P4G` | Output to 2.4GHz only **(not yet implemented)** |
|
||||
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Output to Bluetooth only |
|
||||
| `QK_BLUETOOTH_PROFILE_NEXT` | `BT_NEXT` | Move to the next Bluetooth profile **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE_PREV` | `BT_PREV` | Move to the previous Bluetooth profile **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_UNPAIR` | `BT_UNPR` | Un-pair the current Bluetooth profile **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE1` | `BT_PRF1` | Swap to Bluetooth profile #1 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE2` | `BT_PRF2` | Swap to Bluetooth profile #2 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE3` | `BT_PRF3` | Swap to Bluetooth profile #3 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE4` | `BT_PRF4` | Swap to Bluetooth profile #4 **(not yet implemented)** |
|
||||
| `QK_BLUETOOTH_PROFILE5` | `BT_PRF5` | Swap to Bluetooth profile #5 **(not yet implemented)** |
|
||||
|
||||
## Caps Word {#caps-word}
|
||||
|
||||
@ -375,13 +387,22 @@ See also: [Key Lock](features/key_lock)
|
||||
|---------|--------------------------------------------------------------|
|
||||
|`QK_LOCK`|Hold down the next key pressed, until the key is pressed again|
|
||||
|
||||
## Layer Lock {#layer-lock}
|
||||
|
||||
See also: [Layer Lock](features/layer_lock)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|---------------|---------|----------------------------------|
|
||||
|`QK_LAYER_LOCK`|`QK_LLCK`|Locks or unlocks the highest layer|
|
||||
|
||||
## Layer Switching {#layer-switching}
|
||||
|
||||
See also: [Layer Switching](feature_layers#switching-and-toggling-layers)
|
||||
|
||||
|Key |Description |
|
||||
|----------------|----------------------------------------------------------------------------------|
|
||||
|`DF(layer)` |Set the base (default) layer |
|
||||
|`DF(layer)` |Set the base (default) layer until the keyboard loses power |
|
||||
|`PDF(layer)` |Set the base (default) layer in EEPROM |
|
||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
||||
|`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](one_shot_keys) for details. |
|
||||
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`|
|
||||
|
@ -4,52 +4,51 @@ This page describes the support for [Compatible Microcontrollers](compatible_mic
|
||||
|
||||
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines) to get a sense of how keyboards fit into QMK.
|
||||
|
||||
|
||||
QMK has a number of features to simplify working with keyboards. For most, you don't have to write a single line of code. To get started, run `qmk new-keyboard`:
|
||||
|
||||
```
|
||||
$ qmk new-keyboard
|
||||
Ψ Generating a new QMK keyboard directory
|
||||
|
||||
Name Your Keyboard Project
|
||||
For more infomation, see:
|
||||
https://docs.qmk.fm/hardware_keyboard_guidelines#naming-your-keyboardproject
|
||||
Ψ Name Your Keyboard Project
|
||||
Ψ For more information, see:
|
||||
https://docs.qmk.fm/hardware_keyboard_guidelines#naming-your-keyboard-project
|
||||
Keyboard Name? mycoolkeeb
|
||||
Ψ Attribution
|
||||
Ψ Used for maintainer, copyright, etc.
|
||||
Your GitHub Username? [jsmith]
|
||||
Ψ More Attribution
|
||||
Ψ Used for maintainer, copyright, etc.
|
||||
Your Real Name? [John Smith]
|
||||
Ψ Pick Base Layout
|
||||
Ψ As a starting point, one of the common layouts can be used to
|
||||
bootstrap the process
|
||||
Default Layout?
|
||||
1. 60_abnt2
|
||||
...
|
||||
65. none of the above
|
||||
Please enter your choice: [65]
|
||||
Ψ What Powers Your Project
|
||||
Ψ Is your board using a separate development board, such as a Pro Micro,
|
||||
or is the microcontroller integrated onto the PCB?
|
||||
|
||||
keyboard Name? mycoolkeeb
|
||||
|
||||
Attribution
|
||||
Used for maintainer, copyright, etc
|
||||
|
||||
Your GitHub Username? [jsmith]
|
||||
|
||||
More Attribution
|
||||
Used for maintainer, copyright, etc
|
||||
|
||||
Your Real Name? [John Smith]
|
||||
|
||||
Pick Base Layout
|
||||
As a starting point, one of the common layouts can be used to bootstrap the process
|
||||
|
||||
Default Layout?
|
||||
1. 60_ansi
|
||||
...
|
||||
50. tkl_iso
|
||||
51. none of the above
|
||||
Please enter your choice: [51]
|
||||
|
||||
What Powers Your Project
|
||||
For more infomation, see:
|
||||
https://docs.qmk.fm/#/compatible_microcontrollers
|
||||
|
||||
MCU?
|
||||
1. atmega32u4
|
||||
...
|
||||
22. STM32F303
|
||||
Please enter your choice: [12]
|
||||
For more information, see:
|
||||
https://docs.qmk.fm/compatible_microcontrollers
|
||||
Using a Development Board? [y/n] y
|
||||
Ψ Select Development Board
|
||||
Ψ For more information, see:
|
||||
https://docs.qmk.fm/compatible_microcontrollers
|
||||
Development Board?
|
||||
1. bit_c_pro
|
||||
...
|
||||
14. promicro
|
||||
...
|
||||
18. svlinky
|
||||
Please enter your choice: [14]
|
||||
Ψ Created a new keyboard called mycoolkeeb.
|
||||
Ψ To start working on things, `cd` into keyboards/mycoolkeeb,
|
||||
Ψ or open the directory in your preferred text editor.
|
||||
Ψ And build with qmk compile -kb mycoolkeeb -km default.
|
||||
Ψ Build Command: qmk compile -kb mycoolkeeb -km default.
|
||||
Ψ Project Location: /Users/jsmith/qmk_firmware/keyboards/mycoolkeeb.
|
||||
Ψ Now update the config files to match the hardware!
|
||||
```
|
||||
|
||||
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
|
||||
@ -58,13 +57,13 @@ This will create all the files needed to support your new keyboard, and populate
|
||||
|
||||
This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](https://imgur.com) to host the images.
|
||||
|
||||
## `info.json`
|
||||
## `keyboard.json`
|
||||
|
||||
The `info.json` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list here. For a complete overview of available options see the [Data Driven Configuration Options](reference_info_json) page.
|
||||
The `keyboard.json` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list here. For a complete overview of available options see the [Data Driven Configuration Options](reference_info_json) page.
|
||||
|
||||
### Hardware Configuration
|
||||
|
||||
At the top of the `info.json` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `usb.vid` as `0xFEED`. For the `usb.pid` you should pick a number that is not yet in use.
|
||||
At the top of the `keyboard.json` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `usb.vid` as `0xFEED`. For the `usb.pid` you should pick a number that is not yet in use.
|
||||
|
||||
Do change the `manufacturer` and `keyboard_name` lines to accurately reflect your keyboard.
|
||||
|
||||
@ -82,10 +81,11 @@ Do change the `manufacturer` and `keyboard_name` lines to accurately reflect you
|
||||
Windows and macOS will display the `manufacturer` and `keyboard_name` in the list of USB devices. `lsusb` on Linux instead prefers the values in the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html). By default, it will only use `manufacturer` and `keyboard_name` if the list does not contain that `usb.vid` / `usb.pid`. `sudo lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in.
|
||||
:::
|
||||
|
||||
|
||||
### Matrix Configuration
|
||||
|
||||
The next section of the `info` file deals with your keyboard's matrix. The first thing you should define is which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
|
||||
The next section of the `keyboard.json` deals with your keyboard's matrix. The first thing you should define is which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
|
||||
|
||||
#### Diode Matrix
|
||||
|
||||
```json
|
||||
"matrix_pins": {
|
||||
@ -94,7 +94,7 @@ The next section of the `info` file deals with your keyboard's matrix. The first
|
||||
},
|
||||
```
|
||||
|
||||
The size of the `matrix_pins.cols` and `matrix_pins.rows` arrays infer the size of the matrix (previously `MATRIX_ROWS` and `MATRIX_COLS`).
|
||||
The matrix dimensions are inferred from the length of the `matrix_pins.cols` and `matrix_pins.rows` arrays (previously specified explicitly in `config.h` with `MATRIX_ROWS` and `MATRIX_COLS`).
|
||||
|
||||
Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`.
|
||||
|
||||
@ -103,54 +103,56 @@ Finally, you can specify the direction your diodes point. This can be `COL2ROW`
|
||||
```
|
||||
|
||||
#### Direct Pin Matrix
|
||||
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `matrix_pins.direct`. The mapping defines the pins of each switch in rows and columns, from left to right. The size of the `matrix_pins.direct` array infers the size of the matrix. Use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `diode_direction`, `matrix_pins.cols` and `matrix_pins.rows`.
|
||||
|
||||
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `matrix_pins.direct`. This overrides the behaviour of `diode_direction`, `matrix_pins.cols` and `matrix_pins.rows`, and they should not be specified together.
|
||||
|
||||
```json
|
||||
"matrix_pins": {
|
||||
"direct": [
|
||||
["F1", "E6", "B0", "B2", "B3" ],
|
||||
["F5", "F0", "B1", "B7", "D2" ],
|
||||
["F6", "F7", "C7", "D5", "D3" ],
|
||||
["B5", "C6", "B6", "NO_PIN", "NO_PIN"]
|
||||
["F1", "E6", "B0", "B2", "B3"],
|
||||
["F5", "F0", "B1", "B7", "D2"],
|
||||
["F6", "F7", "C7", "D5", "D3"],
|
||||
["B5", "C6", "B6", null, null]
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
### Layout macros
|
||||
Here, the matrix dimensions are inferred directly from the dimensions of the `matrix_pins.direct` array. Since there are no row or column pins to prescribe the matrix dimensions, you can arrange it however you like. Each "row" must contain the same number of "column"s; use `null` to fill in blank spaces, but try to minimize them.
|
||||
|
||||
Next is configuring Layout Macro(s). These define the physical arrangement of keys, and its position within the matrix that a switch are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
|
||||
### Layout Macros
|
||||
|
||||
Next is configuring layout macro(s). These define the physical arrangement of keys, and their position within the matrix that switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
|
||||
|
||||
```json
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_4x4": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 0], "x": 0, "y": 0 },
|
||||
{ "matrix": [0, 1], "x": 1, "y": 0 },
|
||||
{ "matrix": [0, 2], "x": 2, "y": 0 },
|
||||
{ "matrix": [0, 3], "x": 3, "y": 0 },
|
||||
{ "matrix": [1, 0], "x": 0, "y": 1 },
|
||||
{ "matrix": [1, 1], "x": 1, "y": 1 },
|
||||
{ "matrix": [1, 2], "x": 2, "y": 1 },
|
||||
{ "matrix": [1, 3], "x": 3, "y": 1 },
|
||||
{ "matrix": [2, 0], "x": 0, "y": 2 },
|
||||
{ "matrix": [2, 1], "x": 1, "y": 2 },
|
||||
{ "matrix": [2, 2], "x": 2, "y": 2 },
|
||||
{ "matrix": [2, 3], "x": 3, "y": 2 },
|
||||
{ "matrix": [3, 0], "x": 0, "y": 3 },
|
||||
{ "matrix": [3, 1], "x": 1, "y": 3 },
|
||||
{ "matrix": [3, 2], "x": 2, "y": 3 },
|
||||
{ "matrix": [3, 3], "x": 3, "y": 3 }
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
In the above example,
|
||||
In the above example,
|
||||
|
||||
* `LAYOUT_ortho_4x4` defines the name of the layout macro
|
||||
* It must conform to the [layout guidelines](hardware_keyboard_guidelines#keyboard-name-h)
|
||||
* `"matrix": [0, 0]` defines the electrical position
|
||||
* `"matrix": [0, 0]` defines the matrix row and column that the key is associated with
|
||||
|
||||
::: tip
|
||||
See also: [Split Keyboard Layout Macro](features/split_keyboard#layout-macro) and [Matrix to Physical Layout](understanding_qmk#matrix-to-physical-layout-map).
|
||||
@ -158,9 +160,10 @@ See also: [Split Keyboard Layout Macro](features/split_keyboard#layout-macro) an
|
||||
|
||||
## Additional Configuration
|
||||
|
||||
There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config). The following sections cover the process for when an `info.json` option is unavailable.
|
||||
There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config). The following sections cover the process for when a data-driven option is unavailable.
|
||||
|
||||
### Configuration Options
|
||||
|
||||
For available options for `config.h`, you should see the [Config Options](config_options#the-configh-file) page for more details.
|
||||
|
||||
### Build Options
|
||||
|
@ -156,25 +156,25 @@ For more on the `info.json` files, see [`info.json` Format](reference_info_json)
|
||||
|
||||
The Configurator's API uses the layout macro and the JSON file we've given it to create a visual representation of the keyboard that has each visual object tied to a specific key, in sequence:
|
||||
|
||||
key in layout macro | JSON object used
|
||||
:---: | :----
|
||||
k00 | {"label":"Num Lock", "x":0, "y":0}
|
||||
k01 | {"label":"/", "x":1, "y":0}
|
||||
k02 | {"label":"*", "x":2, "y":0}
|
||||
k03 | {"label":"-", "x":3, "y":0}
|
||||
k10 | {"label":"7", "x":0, "y":1}
|
||||
k11 | {"label":"8", "x":1, "y":1}
|
||||
k12 | {"label":"9", "x":2, "y":1}
|
||||
k13 | {"label":"+", "x":3, "y":1, "h":2}
|
||||
k20 | {"label":"4", "x":0, "y":2}
|
||||
k21 | {"label":"5", "x":1, "y":2}
|
||||
k22 | {"label":"6", "x":2, "y":2}
|
||||
k30 | {"label":"1", "x":0, "y":3}
|
||||
k31 | {"label":"2", "x":1, "y":3}
|
||||
k32 | {"label":"3", "x":2, "y":3}
|
||||
k33 | {"label":"Enter", "x":3, "y":3, "h":2}
|
||||
k40 | {"label":"0", "x":0, "y":4, "w":2}
|
||||
k42 | {"label":".", "x":2, "y":4}
|
||||
| Key in layout macro | JSON object used |
|
||||
| ------------------- | ---------------------------------------- |
|
||||
| k00 | `{"label":"Num Lock", "x":0, "y":0}` |
|
||||
| k01 | `{"label":"/", "x":1, "y":0}` |
|
||||
| k02 | `{"label":"*", "x":2, "y":0}` |
|
||||
| k03 | `{"label":"-", "x":3, "y":0}` |
|
||||
| k10 | `{"label":"7", "x":0, "y":1}` |
|
||||
| k11 | `{"label":"8", "x":1, "y":1}` |
|
||||
| k12 | `{"label":"9", "x":2, "y":1}` |
|
||||
| k13 | `{"label":"+", "x":3, "y":1, "h":2}` |
|
||||
| k20 | `{"label":"4", "x":0, "y":2}` |
|
||||
| k21 | `{"label":"5", "x":1, "y":2}` |
|
||||
| k22 | `{"label":"6", "x":2, "y":2}` |
|
||||
| k30 | `{"label":"1", "x":0, "y":3}` |
|
||||
| k31 | `{"label":"2", "x":1, "y":3}` |
|
||||
| k32 | `{"label":"3", "x":2, "y":3}` |
|
||||
| k33 | `{"label":"Enter", "x":3, "y":3, "h":2}` |
|
||||
| k40 | `{"label":"0", "x":0, "y":4, "w":2}` |
|
||||
| k42 | `{"label":".", "x":2, "y":4}` |
|
||||
|
||||
When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NUM` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file.
|
||||
|
||||
|
@ -177,9 +177,9 @@ Configures the [Backlight](features/backlight) feature.
|
||||
* `pins` <Badge type="info">Array: Pin</Badge>
|
||||
* A list of GPIO pins connected to the backlight LEDs (`software` and `timer` drivers only).
|
||||
|
||||
## Bluetooth {#bluetooth}
|
||||
## Wireless/Bluetooth {#bluetooth}
|
||||
|
||||
Configures the [Bluetooth](features/bluetooth) feature.
|
||||
Configures the [Wireless](features/wireless) feature.
|
||||
|
||||
* `bluetooth`
|
||||
* `driver` <Badge type="info">String</Badge>
|
||||
|
@ -2,9 +2,31 @@
|
||||
|
||||
Keyboards are able to support a wide range of languages. However, this support is not actually achieved within the keyboard itself - instead, it sends numerical codes, which the operating system maps to the appropriate characters depending on the user's configured keyboard layout. By default (and per the HID spec), this is the US ANSI layout. For example, when a Swedish person presses the key with the `å` character printed on it, the keyboard is *actually* sending the keycode for `[`.
|
||||
|
||||
Obviously, this can get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap.
|
||||
Obviously, this can get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These are used in place of the `KC_` prefixed ones. They won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap. The language-specific keycode aliases are defined in the files listed in the [Keycodes Header](#header-files) column below.
|
||||
|
||||
Simply `#include` one of the keycode headers below at the top of your `keymap.c`, and assign the keycodes defined in the header in place of the `KC_` prefixed ones.
|
||||
## Selecting Your Host Keyboard Layout
|
||||
|
||||
To select a host keyboard layout, simply `#include` one of the [keycode headers](#header-files) below at the top of your `keymap.c`. Example:
|
||||
|
||||
```c
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "keymap_japanese.h" // [!code focus]
|
||||
```
|
||||
|
||||
Alternatively, if using `keymap.json`, add the `host_language` key as shown in the following example. The available languages are those with a _Sendstring LUT Header_ entry in one of the [Header Files](#header-files) tables.
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "handwired/my_macropad",
|
||||
"keymap": "my_keymap",
|
||||
"host_language": "swedish", // [!code focus]
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["SE_ARNG"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Sendstring Support
|
||||
|
||||
|
@ -23,10 +23,7 @@ enum layer_number {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
BACKLIT,
|
||||
@ -35,12 +32,9 @@ enum custom_keycodes {
|
||||
RGBRST
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
@ -169,25 +163,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
|
@ -13,16 +13,14 @@ enum layer_names {
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
@ -138,24 +136,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -23,9 +23,7 @@ enum sofle_layers {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_QWERTY = SAFE_RANGE,
|
||||
KC_COLEMAK,
|
||||
KC_LOWER,
|
||||
KC_LOWER = SAFE_RANGE,
|
||||
KC_RAISE,
|
||||
KC_ADJUST,
|
||||
KC_PRVWD,
|
||||
@ -35,6 +33,9 @@ enum custom_keycodes {
|
||||
KC_DLINE
|
||||
};
|
||||
|
||||
#define KC_QWERTY PDF(_QWERTY)
|
||||
#define KC_COLEMAK PDF(_COLEMAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT(
|
||||
@ -148,16 +149,6 @@ bool oled_task_user(void) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case KC_COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case KC_LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -12,12 +12,9 @@ enum layers {
|
||||
|
||||
#define FN1_CAPS LT(_FN1, KC_CAPS)
|
||||
|
||||
//custom keycode enums
|
||||
enum custom_keycodes {
|
||||
BASE_QWER = QK_USER,
|
||||
BASE_COLE,
|
||||
BASE_DVOR
|
||||
};
|
||||
#define BASE_QWER PDF(_QWER)
|
||||
#define BASE_COLE PDF(_COLE)
|
||||
#define BASE_DVOR PDF(_DVOR)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWER] = LAYOUT(
|
||||
@ -67,37 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
// macros to allow the user to set whatever default layer they want, even after reboot
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE_QWER:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_QWER is pressed
|
||||
set_single_persistent_default_layer(_QWER);
|
||||
} else {
|
||||
// when keycode BASE_QWER is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_COLE:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_COLE is pressed
|
||||
set_single_persistent_default_layer(_COLE);
|
||||
} else {
|
||||
// when keycode BASE_COLE is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_DVOR:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_DVOR is pressed
|
||||
set_single_persistent_default_layer(_DVOR);
|
||||
} else {
|
||||
// when keycode BASE_DVOR is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -12,12 +12,9 @@ enum layers {
|
||||
|
||||
#define FN1_CAPS LT(_FN1, KC_CAPS)
|
||||
|
||||
//custom keycode enums
|
||||
enum custom_keycodes {
|
||||
BASE_QWER = QK_USER,
|
||||
BASE_COLE,
|
||||
BASE_DVOR
|
||||
};
|
||||
#define BASE_QWER PDF(_QWER)
|
||||
#define BASE_COLE PDF(_COLE)
|
||||
#define BASE_DVOR PDF(_DVOR)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWER] = LAYOUT_83_ansi(
|
||||
@ -67,37 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
// macros to allow the user to set whatever default layer they want, even after reboot
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE_QWER:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_QWER is pressed
|
||||
set_single_persistent_default_layer(_QWER);
|
||||
} else {
|
||||
// when keycode BASE_QWER is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_COLE:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_COLE is pressed
|
||||
set_single_persistent_default_layer(_COLE);
|
||||
} else {
|
||||
// when keycode BASE_COLE is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_DVOR:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_DVOR is pressed
|
||||
set_single_persistent_default_layer(_DVOR);
|
||||
} else {
|
||||
// when keycode BASE_DVOR is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -12,12 +12,9 @@ enum layers {
|
||||
|
||||
#define FN1_CAPS LT(_FN1, KC_CAPS)
|
||||
|
||||
//custom keycode enums
|
||||
enum custom_keycodes {
|
||||
BASE_QWER = QK_USER,
|
||||
BASE_COLE,
|
||||
BASE_DVOR
|
||||
};
|
||||
#define BASE_QWER PDF(_QWER)
|
||||
#define BASE_COLE PDF(_COLE)
|
||||
#define BASE_DVOR PDF(_DVOR)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWER] = LAYOUT_84_iso(
|
||||
@ -67,37 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
//macros to allow the user to set whatever default layer they want, even after reboot
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE_QWER:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_QWER is pressed
|
||||
set_single_persistent_default_layer(_QWER);
|
||||
} else {
|
||||
// when keycode BASE_QWER is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_COLE:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_COLE is pressed
|
||||
set_single_persistent_default_layer(_COLE);
|
||||
} else {
|
||||
// when keycode BASE_COLE is released
|
||||
}
|
||||
break;
|
||||
|
||||
case BASE_DVOR:
|
||||
if (record->event.pressed) {
|
||||
// when keycode BASE_DVOR is pressed
|
||||
set_single_persistent_default_layer(_DVOR);
|
||||
} else {
|
||||
// when keycode BASE_DVOR is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -12,12 +12,9 @@ enum layers {
|
||||
|
||||
#define FN1_CAPS LT(_FN1, KC_CAPS)
|
||||
|
||||
//custom keycode enums
|
||||
enum custom_keycodes {
|
||||
BASE_QWER = QK_USER,
|
||||
BASE_COLE,
|
||||
BASE_DVOR
|
||||
};
|
||||
#define BASE_QWER PDF(_QWER)
|
||||
#define BASE_COLE PDF(_COLE)
|
||||
#define BASE_DVOR PDF(_DVOR)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWER] = LAYOUT_83_ansi(
|
||||
@ -67,26 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
// Macros to allow the user to set whatever default layer they want, even after reboot
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE_QWER:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWER);
|
||||
}
|
||||
break;
|
||||
case BASE_COLE:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLE);
|
||||
}
|
||||
break;
|
||||
case BASE_DVOR:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVOR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -12,12 +12,9 @@ enum layers {
|
||||
|
||||
#define FN1_CAPS LT(_FN1, KC_CAPS)
|
||||
|
||||
//custom keycode enums
|
||||
enum custom_keycodes {
|
||||
BASE_QWER = QK_USER,
|
||||
BASE_COLE,
|
||||
BASE_DVOR
|
||||
};
|
||||
#define BASE_QWER PDF(_QWER)
|
||||
#define BASE_COLE PDF(_COLE)
|
||||
#define BASE_DVOR PDF(_DVOR)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWER] = LAYOUT_84_iso(
|
||||
@ -67,26 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
// Macros to allow the user to set whatever default layer they want, even after reboot
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BASE_QWER:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWER);
|
||||
}
|
||||
break;
|
||||
case BASE_COLE:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLE);
|
||||
}
|
||||
break;
|
||||
case BASE_DVOR:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVOR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -24,11 +24,9 @@ enum layers {
|
||||
_L3,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
DVORAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
COLEMAK
|
||||
};
|
||||
#define QWERTY PDF(_QW)
|
||||
#define DVORAK PDF(_DV)
|
||||
#define COLEMAK PDF(_CM)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = LAYOUT( /* Qwerty */
|
||||
@ -68,26 +66,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DV);
|
||||
}
|
||||
return false;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QW);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_CM);
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -60,6 +60,14 @@
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2},
|
||||
{"pin_a": "B12", "pin_b": "B11", "resolution": 2}
|
||||
]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_default": {
|
||||
"layout": [
|
||||
|
@ -44,3 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) },
|
||||
[1] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU), ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
|
||||
};
|
||||
#endif
|
||||
|
@ -0,0 +1,2 @@
|
||||
ENCODER_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
40
keyboards/cannonkeys/sagittarius/sagittarius.c
Normal file
40
keyboards/cannonkeys/sagittarius/sagittarius.c
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright 2024 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#if defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE)
|
||||
|
||||
# if !defined(ENCODER_SETTLE_PIN_STATE_DELAY_US)
|
||||
# define ENCODER_SETTLE_PIN_STATE_DELAY_US 2
|
||||
# endif
|
||||
|
||||
static pin_t matrix_row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
|
||||
void encoder_driver_task(void) {
|
||||
// Set all relevant rows to output, which is different to the matrix expectations
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
gpio_set_pin_output(matrix_row_pins[i]);
|
||||
}
|
||||
|
||||
// Read each encoder
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
// Set the row pin low for the corresponding encoder...
|
||||
for (uint8_t j = 0; j < 4; j++) {
|
||||
gpio_write_pin(matrix_row_pins[j], (i == j) ? 0 : 1);
|
||||
}
|
||||
// ...and let them settle.
|
||||
wait_us(ENCODER_SETTLE_PIN_STATE_DELAY_US);
|
||||
|
||||
// Run the normal encoder handling
|
||||
extern void encoder_quadrature_handle_read(uint8_t index, uint8_t pin_a_state, uint8_t pin_b_state);
|
||||
extern uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b);
|
||||
encoder_quadrature_handle_read(i, encoder_quadrature_read_pin(i, false), encoder_quadrature_read_pin(i, true));
|
||||
}
|
||||
|
||||
// Set all rows back to input-high as per matrix expectations
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
gpio_set_pin_input_high(matrix_row_pins[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE)
|
@ -28,16 +28,17 @@ enum planck_layers {
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
PLOVER = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -177,25 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -18,16 +18,13 @@
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
enum layer_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
};
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* BASE
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
@ -163,25 +160,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
return state;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -28,10 +28,7 @@ enum plaid_layers {
|
||||
};
|
||||
|
||||
enum plaid_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
PLOVER = SAFE_RANGE,
|
||||
EXT_PLV,
|
||||
LED_1,
|
||||
LED_2,
|
||||
@ -48,6 +45,10 @@ enum plaid_keycodes {
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
// array of keys considered modifiers for led purposes
|
||||
const uint16_t modifiers[] = {
|
||||
KC_LCTL,
|
||||
@ -301,25 +302,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record);
|
||||
}
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_RAISE);
|
||||
|
131
keyboards/druah/majestouch_redux/keyboard.json
Normal file
131
keyboards/druah/majestouch_redux/keyboard.json
Normal file
@ -0,0 +1,131 @@
|
||||
{
|
||||
"manufacturer": "FILCO",
|
||||
"keyboard_name": "Majestouch Redux",
|
||||
"maintainer": "Druah",
|
||||
"bootloader": "atmel-dfu",
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "C1",
|
||||
"scroll_lock": "C0"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["A0", "A1", "A2", "F6", "F7", "E6", "F0", "F1", "F2", "B3", "B2", "B1", "F3", "F4", "C5", "C6", "C3"],
|
||||
"rows": ["C2", "B4", "B5", "F5", "C7", "C4"]
|
||||
},
|
||||
"processor": "at90usb646",
|
||||
"qmk": {
|
||||
"locking": {
|
||||
"enabled": true,
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"url": "https://druah.moe",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0003",
|
||||
"vid": "0x444E"
|
||||
},
|
||||
"community_layouts": ["tkl_ansi"],
|
||||
"layouts": {
|
||||
"LAYOUT_tkl_ansi": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
{"matrix": [0, 6], "x": 6.5, "y": 0},
|
||||
{"matrix": [0, 7], "x": 7.5, "y": 0},
|
||||
{"matrix": [0, 8], "x": 8.5, "y": 0},
|
||||
{"matrix": [0, 9], "x": 9.5, "y": 0},
|
||||
{"matrix": [0, 10], "x": 11, "y": 0},
|
||||
{"matrix": [0, 11], "x": 12, "y": 0},
|
||||
{"matrix": [0, 12], "x": 13, "y": 0},
|
||||
{"matrix": [0, 13], "x": 14, "y": 0},
|
||||
{"matrix": [0, 14], "x": 15.25, "y": 0},
|
||||
{"matrix": [0, 15], "x": 16.25, "y": 0},
|
||||
{"matrix": [0, 16], "x": 17.25, "y": 0},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1.5},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1.5},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1.5},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1.5},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1.5},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1.5},
|
||||
{"matrix": [1, 6], "x": 6, "y": 1.5},
|
||||
{"matrix": [1, 7], "x": 7, "y": 1.5},
|
||||
{"matrix": [1, 8], "x": 8, "y": 1.5},
|
||||
{"matrix": [1, 9], "x": 9, "y": 1.5},
|
||||
{"matrix": [1, 10], "x": 10, "y": 1.5},
|
||||
{"matrix": [1, 11], "x": 11, "y": 1.5},
|
||||
{"matrix": [1, 12], "x": 12, "y": 1.5},
|
||||
{"matrix": [1, 13], "x": 13, "y": 1.5, "w": 2},
|
||||
{"matrix": [1, 14], "x": 15.25, "y": 1.5},
|
||||
{"matrix": [1, 15], "x": 16.25, "y": 1.5},
|
||||
{"matrix": [1, 16], "x": 17.25, "y": 1.5},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5},
|
||||
{"matrix": [2, 1], "x": 1.5, "y": 2.5},
|
||||
{"matrix": [2, 2], "x": 2.5, "y": 2.5},
|
||||
{"matrix": [2, 3], "x": 3.5, "y": 2.5},
|
||||
{"matrix": [2, 4], "x": 4.5, "y": 2.5},
|
||||
{"matrix": [2, 5], "x": 5.5, "y": 2.5},
|
||||
{"matrix": [2, 6], "x": 6.5, "y": 2.5},
|
||||
{"matrix": [2, 7], "x": 7.5, "y": 2.5},
|
||||
{"matrix": [2, 8], "x": 8.5, "y": 2.5},
|
||||
{"matrix": [2, 9], "x": 9.5, "y": 2.5},
|
||||
{"matrix": [2, 10], "x": 10.5, "y": 2.5},
|
||||
{"matrix": [2, 11], "x": 11.5, "y": 2.5},
|
||||
{"matrix": [2, 12], "x": 12.5, "y": 2.5},
|
||||
{"matrix": [2, 13], "x": 13.5, "y": 2.5, "w": 1.5},
|
||||
{"matrix": [2, 14], "x": 15.25, "y": 2.5},
|
||||
{"matrix": [2, 15], "x": 16.25, "y": 2.5},
|
||||
{"matrix": [2, 16], "x": 17.25, "y": 2.5},
|
||||
{"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75},
|
||||
{"matrix": [3, 1], "x": 1.75, "y": 3.5},
|
||||
{"matrix": [3, 2], "x": 2.75, "y": 3.5},
|
||||
{"matrix": [3, 3], "x": 3.75, "y": 3.5},
|
||||
{"matrix": [3, 4], "x": 4.75, "y": 3.5},
|
||||
{"matrix": [3, 5], "x": 5.75, "y": 3.5},
|
||||
{"matrix": [3, 6], "x": 6.75, "y": 3.5},
|
||||
{"matrix": [3, 7], "x": 7.75, "y": 3.5},
|
||||
{"matrix": [3, 8], "x": 8.75, "y": 3.5},
|
||||
{"matrix": [3, 9], "x": 9.75, "y": 3.5},
|
||||
{"matrix": [3, 10], "x": 10.75, "y": 3.5},
|
||||
{"matrix": [3, 11], "x": 11.75, "y": 3.5},
|
||||
{"matrix": [3, 13], "x": 12.75, "y": 3.5, "w": 2.25},
|
||||
{"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25},
|
||||
{"matrix": [4, 2], "x": 2.25, "y": 4.5},
|
||||
{"matrix": [4, 3], "x": 3.25, "y": 4.5},
|
||||
{"matrix": [4, 4], "x": 4.25, "y": 4.5},
|
||||
{"matrix": [4, 5], "x": 5.25, "y": 4.5},
|
||||
{"matrix": [4, 6], "x": 6.25, "y": 4.5},
|
||||
{"matrix": [4, 7], "x": 7.25, "y": 4.5},
|
||||
{"matrix": [4, 8], "x": 8.25, "y": 4.5},
|
||||
{"matrix": [4, 9], "x": 9.25, "y": 4.5},
|
||||
{"matrix": [4, 10], "x": 10.25, "y": 4.5},
|
||||
{"matrix": [4, 11], "x": 11.25, "y": 4.5},
|
||||
{"matrix": [4, 13], "x": 12.25, "y": 4.5, "w": 2.75},
|
||||
{"matrix": [4, 15], "x": 16.25, "y": 4.5},
|
||||
{"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 1], "x": 1.25, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 7], "x": 3.75, "y": 5.5, "w": 6.25},
|
||||
{"matrix": [5, 10], "x": 10, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 11], "x": 11.25, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 12], "x": 12.5, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 13], "x": 13.75, "y": 5.5, "w": 1.25},
|
||||
{"matrix": [5, 14], "x": 15.25, "y": 5.5},
|
||||
{"matrix": [5, 15], "x": 16.25, "y": 5.5},
|
||||
{"matrix": [5, 16], "x": 17.25, "y": 5.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
32
keyboards/druah/majestouch_redux/keymaps/default/keymap.c
Normal file
32
keyboards/druah/majestouch_redux/keymaps/default/keymap.c
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright 2024 Druah (@Druah)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐
|
||||
* │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PSc│Scr│Pse│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp││Ins│Hom│PgU│
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││Del│End│PgD│
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐
|
||||
* │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐
|
||||
* │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl││ ← │ ↓ │ → │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘
|
||||
*/
|
||||
[0] = LAYOUT_tkl_ansi(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
|
||||
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
)
|
||||
};
|
27
keyboards/druah/majestouch_redux/readme.md
Normal file
27
keyboards/druah/majestouch_redux/readme.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Majestouch Redux
|
||||
|
||||
![PCB](https://i.imgur.com/LjoywMI.png)
|
||||
|
||||
A replacement PCB for the FILCO Majestouch TKL line of keyboards (and other keyboards) compatible with [Phantom TKL](https://deskthority.net/wiki/Phantom) PCB spacing
|
||||
|
||||
* Keyboard Maintainer: [Druah](https://github.com/Druah)
|
||||
* Hardware Supported: Majestouch Redux
|
||||
* Hardware Availability: Private buy
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make druah/majestouch_redux:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make druah/majestouch_redux: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 (the Escape/top left key) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB labelled with "RESET"
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
@ -9,8 +9,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
@ -58,23 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -14,18 +14,13 @@ enum my_layers {
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -160,24 +155,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -28,14 +28,15 @@ enum preonic_layers {
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -169,24 +170,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -16,10 +16,7 @@ extern rgblight_config_t rgblight_config;
|
||||
#define _ADJUST 6
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
RGBLED_TOGGLE,
|
||||
@ -42,6 +39,9 @@ enum preonic_keycodes {
|
||||
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
||||
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@ -213,18 +213,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
|
@ -16,10 +16,7 @@ extern rgblight_config_t rgblight_config;
|
||||
#define _ADJUST 6
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
RGBLED_TOGGLE,
|
||||
@ -181,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||
* | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | | | |
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | BL + |BL ST |BLSTEP| BL TG| | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@ -191,7 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_ADJUST] = LAYOUT(
|
||||
QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
|
||||
_______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, KC_DEL, _______, _______, _______,
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DOWN, BL_UP, BL_STEP, BL_TOGG, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
@ -218,12 +215,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
|
@ -13,10 +13,7 @@
|
||||
#define _ADJUST 6
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
RGBLED_TOGGLE,
|
||||
@ -39,6 +36,10 @@ enum preonic_keycodes {
|
||||
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
||||
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -200,18 +201,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||
|
10
keyboards/handwired/onekey/at_start_f415/board.h
Normal file
10
keyboards/handwired/onekey/at_start_f415/board.h
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <board.h>
|
||||
|
||||
#undef AT32F415KB
|
||||
#define AT32F415RC
|
10
keyboards/handwired/onekey/at_start_f415/config.h
Normal file
10
keyboards/handwired/onekey/at_start_f415/config.h
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
13
keyboards/handwired/onekey/at_start_f415/halconf.h
Normal file
13
keyboards/handwired/onekey/at_start_f415/halconf.h
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_ADC TRUE
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
20
keyboards/handwired/onekey/at_start_f415/keyboard.json
Normal file
20
keyboards/handwired/onekey/at_start_f415/keyboard.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"keyboard_name": "Onekey AT-START-F415",
|
||||
"processor": "AT32F415",
|
||||
"bootloader": "at32-dfu",
|
||||
"usb": {
|
||||
"shared_endpoint": {
|
||||
"keyboard": true
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["B3"],
|
||||
"rows": ["B4"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B0"
|
||||
}
|
||||
}
|
16
keyboards/handwired/onekey/at_start_f415/mcuconf.h
Normal file
16
keyboards/handwired/onekey/at_start_f415/mcuconf.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef AT32_ADC_USE_ADC1
|
||||
#define AT32_ADC_USE_ADC1 TRUE
|
||||
|
||||
#undef AT32_I2C_USE_I2C1
|
||||
#define AT32_I2C_USE_I2C1 TRUE
|
||||
|
||||
#undef AT32_PWM_USE_TMR5
|
||||
#define AT32_PWM_USE_TMR5 TRUE
|
3
keyboards/handwired/onekey/at_start_f415/readme.md
Normal file
3
keyboards/handwired/onekey/at_start_f415/readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Artery AT-START-F415 Board Onekey
|
||||
|
||||
To trigger keypress, short together pins *B3* and *B4*.
|
@ -48,15 +48,14 @@ enum custom_layer {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
ALT,
|
||||
CTRL,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
MOUSE,
|
||||
ADJUST
|
||||
};
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define MOUSE PDF(_MOUSE)
|
||||
|
||||
// TAP DANCE ***********************************************************
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
@ -569,12 +568,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
@ -584,7 +577,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
@ -594,13 +586,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOUSE:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_MOUSE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -30,10 +30,7 @@ enum custom_layer {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
@ -189,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* | | | | | |Audoff|Aud on|AGnorm|AGswap| | | | | |
|
||||
* |------+------+------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | |Voice-|Voice+|Musoff|Mus on| | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@ -199,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_ADJUST] = LAYOUT(
|
||||
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, _______, _______, _______, _______, _______, _______, _______,_______,_______, _______, _______
|
||||
)
|
||||
@ -209,15 +206,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -47,15 +47,14 @@ enum custom_layer {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
ALT,
|
||||
CTRL,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
MOUSE,
|
||||
ADJUST
|
||||
};
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define MOUSE PDF(_MOUSE)
|
||||
|
||||
// TAP DANCE ***********************************************************
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
@ -499,12 +498,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
@ -514,7 +507,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
@ -524,13 +516,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOUSE:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_MOUSE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -27,16 +27,17 @@ enum ortho_brass_layers {
|
||||
};
|
||||
|
||||
enum ortho_brass_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
PLOVER = SAFE_RANGE,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -172,24 +173,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_laye
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_RAISE);
|
||||
|
@ -27,15 +27,16 @@ enum preonic_layers {
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
BACKLIT
|
||||
BACKLIT = SAFE_RANGE,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -172,24 +173,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(keycode_config(KC_LGUI));
|
||||
@ -200,7 +183,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
unregister_code(keycode_config(KC_LGUI));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -27,15 +27,16 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
BACKLIT
|
||||
BACKLIT = SAFE_RANGE,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -172,24 +173,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(keycode_config(KC_LGUI));
|
||||
@ -200,7 +183,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
unregister_code(keycode_config(KC_LGUI));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -26,13 +26,14 @@ enum layers {
|
||||
};
|
||||
|
||||
enum keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -164,24 +165,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -29,13 +29,14 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
PLOVER = SAFE_RANGE,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
#define ST_BOLT QK_STENO_BOLT
|
||||
#define ST_GEM QK_STENO_GEMINI
|
||||
|
||||
@ -195,21 +196,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
case PLOVER:
|
||||
if (!record->event.pressed) {
|
||||
layer_on(_PLOVER);
|
||||
|
@ -33,10 +33,7 @@ enum terminus_mini_layers {
|
||||
};
|
||||
|
||||
enum terminus_mini_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
FUNCTION,
|
||||
MOUSE,
|
||||
@ -48,6 +45,10 @@ enum terminus_mini_keycodes {
|
||||
#define SPC_LW LT(_LOWER, KC_SPC)
|
||||
#define ENT_RS LT(_RAISE, KC_ENT)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Colemak -
|
||||
* ,----------------------------------------------------------------------------------.
|
||||
@ -204,24 +205,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Cases to switch default layer to QWERTY, COLEMAK or DVORAK and to access ADJUST layer
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -8,14 +8,12 @@ enum layer_names {
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
@ -65,19 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -20,3 +20,5 @@
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -20,3 +20,5 @@
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -11,16 +11,14 @@ enum jian_layers {
|
||||
_BCKLT_ADJ
|
||||
};
|
||||
|
||||
enum jian_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
DVORAK,
|
||||
COLEMAK,
|
||||
WORKMAN
|
||||
};
|
||||
|
||||
#define RAISE_T(kc) LT(_RAISE, kc)
|
||||
#define LOWER_T(kc) LT(_LOWER, kc)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
#define WORKMAN PDF(_WORKMAN)
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
#define SW_TG SH_TOGG
|
||||
#else
|
||||
@ -92,29 +90,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -63,12 +63,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
MAC = SAFE_RANGE,
|
||||
WIN,
|
||||
};
|
||||
|
||||
// Key Macro
|
||||
#define ESC_NUM TD(TD_ESC_NUM)
|
||||
#define S_CAP TD(TD_LSFT_CAPS)
|
||||
@ -82,7 +76,8 @@ enum custom_keycodes {
|
||||
#define ALT_GRV LALT(KC_GRV)
|
||||
#define LOWER MO(_LOWER)
|
||||
#define NUM TG(_NUM)
|
||||
|
||||
#define MAC PDF(_MAC)
|
||||
#define WIN PDF(_WIN)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAC] = LAYOUT_jp(
|
||||
@ -146,26 +141,6 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_jp(
|
||||
);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MAC: // Change default ayer --> Write to EEPROM
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_MAC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case WIN: // Change default ayer --> Write to EEPROM
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WIN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// RGB Light settings
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
|
@ -62,12 +62,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
MAC = SAFE_RANGE,
|
||||
WIN,
|
||||
};
|
||||
|
||||
// Key Macro
|
||||
#define ESC_NUM TD(TD_ESC_NUM)
|
||||
#define S_CAP TD(TD_LSFT_CAPS)
|
||||
@ -80,7 +74,8 @@ enum custom_keycodes {
|
||||
#define ALT_GRV LALT(KC_GRV)
|
||||
#define LOWER MO(_LOWER)
|
||||
#define NUM TG(_NUM)
|
||||
|
||||
#define MAC PDF(_MAC)
|
||||
#define WIN PDF(_WIN)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAC] = LAYOUT_ansi(
|
||||
@ -134,26 +129,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MAC: // Change default ayer --> Write to EEPROM
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_MAC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case WIN: // Change default ayer --> Write to EEPROM
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WIN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// RGB Light settings
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
|
@ -63,12 +63,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
MAC = SAFE_RANGE,
|
||||
WIN,
|
||||
};
|
||||
|
||||
// Key Macro
|
||||
#define ESC_NUM TD(TD_ESC_NUM)
|
||||
#define S_CAP TD(TD_LSFT_CAPS)
|
||||
@ -82,7 +76,8 @@ enum custom_keycodes {
|
||||
#define ALT_GRV LALT(KC_GRV)
|
||||
#define LOWER MO(_LOWER)
|
||||
#define NUM TG(_NUM)
|
||||
|
||||
#define MAC PDF(_MAC)
|
||||
#define WIN PDF(_WIN)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAC] = LAYOUT_jp(
|
||||
@ -136,26 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MAC: // Change default ayer --> Write to EEPROM
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_MAC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case WIN: // Change default ayer --> Write to EEPROM
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WIN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// RGB Light settings
|
||||
#ifdef RGBLIGHT_LAYERS
|
||||
|
@ -19,13 +19,14 @@
|
||||
|
||||
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK };
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
@ -141,27 +142,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock);
|
||||
board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock);
|
||||
|
@ -19,13 +19,14 @@
|
||||
|
||||
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK };
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
@ -141,27 +142,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock);
|
||||
board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock);
|
||||
|
@ -13,8 +13,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
@ -88,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_ADJUST] = LAYOUT_ortho_5x14(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, _______, QK_BOOT, UG_TOGG, UG_NEXT, UG_HUED, UG_HUEU, UG_SATD, UG_SATU, UG_VALD, UG_VALU, _______, KC_DEL, _______,
|
||||
_______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
@ -98,12 +97,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -5,11 +5,6 @@ enum layer_names {
|
||||
_LOWER
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
@ -29,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
@ -53,21 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
UG_TOGG, QK_BOOT, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -8,8 +8,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE
|
||||
};
|
||||
|
||||
@ -83,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | |
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap| | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@ -93,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_ADJUST] = LAYOUT_ortho_5x12(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
@ -101,11 +100,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
|
@ -26,10 +26,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_QWRTY = SAFE_RANGE,
|
||||
KC_COLMK,
|
||||
KC_HRM,
|
||||
KC_PRVWD,
|
||||
KC_PRVWD = SAFE_RANGE,
|
||||
KC_NXTWD
|
||||
};
|
||||
|
||||
@ -46,6 +43,10 @@ enum custom_keycodes {
|
||||
#define HRM_RC MT(MOD_RCTL, KC_K)
|
||||
#define HRM_RS MT(MOD_RSFT, KC_J)
|
||||
|
||||
#define KC_QWRTY PDF(_QWERTY)
|
||||
#define KC_COLMK PDF(_COLEMAK)
|
||||
#define KC_HRM PDF(_HRM)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* QWERTY
|
||||
@ -188,21 +189,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWRTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case KC_COLMK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case KC_HRM:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_HRM);
|
||||
}
|
||||
return false;
|
||||
case KC_PRVWD:
|
||||
if (record->event.pressed) {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
|
@ -26,10 +26,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_QWRTY = SAFE_RANGE,
|
||||
KC_COLMK,
|
||||
KC_HRM,
|
||||
KC_PRVWD,
|
||||
KC_PRVWD = SAFE_RANGE,
|
||||
KC_NXTWD
|
||||
};
|
||||
|
||||
@ -46,6 +43,10 @@ enum custom_keycodes {
|
||||
#define HRM_RC MT(MOD_RCTL, KC_K)
|
||||
#define HRM_RS MT(MOD_RSFT, KC_J)
|
||||
|
||||
#define KC_QWRTY PDF(_QWERTY)
|
||||
#define KC_COLMK PDF(_COLEMAK)
|
||||
#define KC_HRM PDF(_HRM)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* QWERTY
|
||||
@ -188,21 +189,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWRTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case KC_COLMK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case KC_HRM:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_HRM);
|
||||
}
|
||||
return false;
|
||||
case KC_PRVWD:
|
||||
if (record->event.pressed) {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
|
@ -26,10 +26,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_QWRTY = SAFE_RANGE,
|
||||
KC_COLMK,
|
||||
KC_HRM,
|
||||
KC_PRVWD,
|
||||
KC_PRVWD = SAFE_RANGE,
|
||||
KC_NXTWD
|
||||
};
|
||||
|
||||
@ -46,6 +43,10 @@ enum custom_keycodes {
|
||||
#define HRM_RC MT(MOD_RCTL, KC_K)
|
||||
#define HRM_RS MT(MOD_RSFT, KC_J)
|
||||
|
||||
#define KC_QWRTY PDF(_QWERTY)
|
||||
#define KC_COLMK PDF(_COLEMAK)
|
||||
#define KC_HRM PDF(_HRM)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* QWERTY
|
||||
@ -188,21 +189,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWRTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case KC_COLMK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case KC_HRM:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_HRM);
|
||||
}
|
||||
return false;
|
||||
case KC_PRVWD:
|
||||
if (record->event.pressed) {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
|
@ -26,10 +26,7 @@ enum layer_names {
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_QWRTY = SAFE_RANGE,
|
||||
KC_COLMK,
|
||||
KC_HRM,
|
||||
KC_PRVWD,
|
||||
KC_PRVWD = SAFE_RANGE,
|
||||
KC_NXTWD
|
||||
};
|
||||
|
||||
@ -46,6 +43,10 @@ enum custom_keycodes {
|
||||
#define HRM_RC MT(MOD_RCTL, KC_K)
|
||||
#define HRM_RS MT(MOD_RSFT, KC_J)
|
||||
|
||||
#define KC_QWRTY PDF(_QWERTY)
|
||||
#define KC_COLMK PDF(_COLEMAK)
|
||||
#define KC_HRM PDF(_HRM)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* QWERTY
|
||||
@ -188,21 +189,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWRTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case KC_COLMK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case KC_HRM:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_HRM);
|
||||
}
|
||||
return false;
|
||||
case KC_PRVWD:
|
||||
if (record->event.pressed) {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
|
@ -26,15 +26,13 @@ enum layer_names {
|
||||
_CMD,
|
||||
};
|
||||
|
||||
enum corgi_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define CMD MO(_CMD)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
@ -136,21 +134,3 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(clockwise ? KC_VOLU : KC_VOLD);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -16,3 +16,5 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -17,3 +17,5 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -1 +0,0 @@
|
||||
DEFAULT_FOLDER = kprepublic/jj40/rev1
|
@ -28,17 +28,15 @@ enum layers {
|
||||
_FN
|
||||
};
|
||||
|
||||
enum keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
WORKMAN,
|
||||
COLEMAK,
|
||||
DVORAK
|
||||
};
|
||||
|
||||
#define FN MO(_FN)
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define WORKMAN PDF(_WORKMAN)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -213,29 +211,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
@ -13,16 +13,14 @@ enum layer_names {
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
|
||||
#define QWERTY PDF(_QWERTY)
|
||||
#define COLEMAK PDF(_COLEMAK)
|
||||
#define DVORAK PDF(_DVORAK)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
@ -138,24 +136,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
14
keyboards/lily58/lite_rev3/config.h
Normal file
14
keyboards/lily58/lite_rev3/config.h
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2023 yuchi
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
||||
|
||||
#define SERIAL_USART_FULL_DUPLEX
|
||||
#define SERIAL_USART_TX_PIN GP0
|
||||
#define SERIAL_USART_RX_PIN GP1
|
||||
|
||||
#define I2C_DRIVER I2CD1
|
||||
#define I2C1_SDA_PIN GP14
|
||||
#define I2C1_SCL_PIN GP15
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user