mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 13:12:08 +00:00
Merge remote-tracking branch 'upstream/develop' into fixup-kb38
This commit is contained in:
commit
cbadb5a215
35
.clangd
35
.clangd
@ -1,4 +1,33 @@
|
|||||||
CompileFlags:
|
CompileFlags:
|
||||||
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
|
Add:
|
||||||
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues, -D__has_include*]
|
[
|
||||||
Compiler: clang
|
-Wno-unknown-attributes,
|
||||||
|
-Wno-maybe-uninitialized,
|
||||||
|
-Wno-unknown-warning-option,
|
||||||
|
-Wno-pointer-to-int-cast,
|
||||||
|
-Wno-int-to-void-pointer-cast,
|
||||||
|
-DPROGMEM=,
|
||||||
|
]
|
||||||
|
Remove:
|
||||||
|
[
|
||||||
|
-W*,
|
||||||
|
-mmcu=*,
|
||||||
|
-mcpu=*,
|
||||||
|
-mfpu=*,
|
||||||
|
-mfloat-abi=*,
|
||||||
|
-mno-unaligned-access,
|
||||||
|
-mno-thumb-interwork,
|
||||||
|
-mcall-prologues,
|
||||||
|
-D__has_include*,
|
||||||
|
-mlra,
|
||||||
|
]
|
||||||
|
Compiler: clang
|
||||||
|
Diagnostics:
|
||||||
|
UnusedIncludes: None
|
||||||
|
Suppress:
|
||||||
|
[
|
||||||
|
asm_invalid_output_constraint,
|
||||||
|
asm_invalid_input_constraint,
|
||||||
|
invalid_asm_value_for_constraint,
|
||||||
|
anyx86_interrupt_attribute,
|
||||||
|
]
|
||||||
|
8
Makefile
8
Makefile
@ -115,7 +115,7 @@ endef
|
|||||||
TRY_TO_MATCH_RULE_FROM_LIST = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER,$1))$(RULE_FOUND)
|
TRY_TO_MATCH_RULE_FROM_LIST = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER,$1))$(RULE_FOUND)
|
||||||
|
|
||||||
# As TRY_TO_MATCH_RULE_FROM_LIST_HELPER, but with additional
|
# As TRY_TO_MATCH_RULE_FROM_LIST_HELPER, but with additional
|
||||||
# resolution of DEFAULT_FOLDER and keyboard_aliases.hjson for provided rule
|
# resolution of keyboard_aliases.hjson for provided rule
|
||||||
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB
|
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB
|
||||||
# Split on ":", padding with empty strings to avoid indexing issues
|
# Split on ":", padding with empty strings to avoid indexing issues
|
||||||
TOKEN1:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[0])" $$(RULE))
|
TOKEN1:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[0])" $$(RULE))
|
||||||
@ -255,7 +255,7 @@ endef
|
|||||||
# if we are going to compile all keyboards, match the rest of the rule
|
# if we are going to compile all keyboards, match the rest of the rule
|
||||||
# for each of them
|
# for each of them
|
||||||
define PARSE_ALL_KEYBOARDS
|
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
|
endef
|
||||||
|
|
||||||
# Prints a list of all known keymaps for the given keyboard
|
# Prints a list of all known keymaps for the given keyboard
|
||||||
@ -447,7 +447,7 @@ git-submodules: git-submodule
|
|||||||
|
|
||||||
.PHONY: list-keyboards
|
.PHONY: list-keyboards
|
||||||
list-keyboards:
|
list-keyboards:
|
||||||
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '
|
$(QMK_BIN) list-keyboards | tr '\n' ' '
|
||||||
|
|
||||||
.PHONY: list-tests
|
.PHONY: list-tests
|
||||||
list-tests:
|
list-tests:
|
||||||
@ -455,7 +455,7 @@ list-tests:
|
|||||||
|
|
||||||
.PHONY: generate-keyboards-file
|
.PHONY: generate-keyboards-file
|
||||||
generate-keyboards-file:
|
generate-keyboards-file:
|
||||||
$(QMK_BIN) list-keyboards --no-resolve-defaults
|
$(QMK_BIN) list-keyboards
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
@ -29,6 +29,8 @@ QUANTUM_SRC += \
|
|||||||
$(QUANTUM_DIR)/logging/debug.c \
|
$(QUANTUM_DIR)/logging/debug.c \
|
||||||
$(QUANTUM_DIR)/logging/sendchar.c \
|
$(QUANTUM_DIR)/logging/sendchar.c \
|
||||||
$(QUANTUM_DIR)/process_keycode/process_default_layer.c \
|
$(QUANTUM_DIR)/process_keycode/process_default_layer.c \
|
||||||
|
$(QUANTUM_DIR)/process_keycode/process_oneshot.c \
|
||||||
|
$(QUANTUM_DIR)/process_keycode/process_quantum.c \
|
||||||
|
|
||||||
include $(QUANTUM_DIR)/nvm/rules.mk
|
include $(QUANTUM_DIR)/nvm/rules.mk
|
||||||
|
|
||||||
@ -633,6 +635,9 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
|
|||||||
RAW_ENABLE := yes
|
RAW_ENABLE := yes
|
||||||
BOOTMAGIC_ENABLE := yes
|
BOOTMAGIC_ENABLE := yes
|
||||||
TRI_LAYER_ENABLE := yes
|
TRI_LAYER_ENABLE := yes
|
||||||
|
ifeq ($(strip $(VIA_INSECURE)), yes)
|
||||||
|
OPT_DEFS += -DVIA_INSECURE
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RAW_ENABLE)), yes)
|
ifeq ($(strip $(RAW_ENABLE)), yes)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vite": "^5.4.18",
|
"vite": "^5.4.19",
|
||||||
"vitepress": "^1.1.0",
|
"vitepress": "^1.1.0",
|
||||||
"vitepress-plugin-tabs": "^0.5.0",
|
"vitepress-plugin-tabs": "^0.5.0",
|
||||||
"vue": "^3.4.24"
|
"vue": "^3.4.24"
|
||||||
|
@ -766,10 +766,10 @@ tabbable@^6.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"
|
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"
|
||||||
integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==
|
integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==
|
||||||
|
|
||||||
vite@^5.2.9, vite@^5.4.18:
|
vite@^5.2.9, vite@^5.4.19:
|
||||||
version "5.4.18"
|
version "5.4.19"
|
||||||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.18.tgz#b5af357f9d5ebb2e0c085779b7a37a77f09168a4"
|
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.19.tgz#20efd060410044b3ed555049418a5e7d1998f959"
|
||||||
integrity sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==
|
integrity sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild "^0.21.3"
|
esbuild "^0.21.3"
|
||||||
postcss "^8.4.43"
|
postcss "^8.4.43"
|
||||||
|
@ -120,6 +120,7 @@
|
|||||||
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "flag"},
|
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "flag"},
|
||||||
"MATRIX_INPUT_PRESSED_STATE": {"info_key": "matrix_pins.input_pressed_state", "value_type": "int"},
|
"MATRIX_INPUT_PRESSED_STATE": {"info_key": "matrix_pins.input_pressed_state", "value_type": "int"},
|
||||||
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
|
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
|
||||||
|
"MATRIX_MASKED": {"info_key": "matrix_pins.masked", "value_type": "flag"},
|
||||||
|
|
||||||
// Mouse Keys
|
// Mouse Keys
|
||||||
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
|
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
"WS2812_DRIVER": {"info_key": "ws2812.driver"},
|
"WS2812_DRIVER": {"info_key": "ws2812.driver"},
|
||||||
|
|
||||||
// Items we want flagged in lint
|
// Items we want flagged in lint
|
||||||
"DEFAULT_FOLDER": {"info_key": "_deprecated.default_folder", "deprecated": true},
|
|
||||||
"CTPC": {"info_key": "_invalid.ctpc", "invalid": true, "replace_with": "CONVERT_TO=proton_c"},
|
"CTPC": {"info_key": "_invalid.ctpc", "invalid": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||||
"CONVERT_TO_PROTON_C": {"info_key": "_invalid.ctpc", "invalid": true, "replace_with": "CONVERT_TO=proton_c"},
|
"CONVERT_TO_PROTON_C": {"info_key": "_invalid.ctpc", "invalid": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||||
|
"DEFAULT_FOLDER": {"info_key": "_invalid.default_folder", "invalid": true},
|
||||||
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}
|
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,45 @@
|
|||||||
"bakeneko80": {
|
"bakeneko80": {
|
||||||
"target": "kkatano/bakeneko80"
|
"target": "kkatano/bakeneko80"
|
||||||
},
|
},
|
||||||
|
"bastardkb/dilemma/3x5_2/splinky": {
|
||||||
|
"target": "bastardkb/dilemma/3x5_2/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/scylla/v2/elitec": {
|
||||||
|
"target": "bastardkb/scylla/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/scylla/v2/splinky_2": {
|
||||||
|
"target": "bastardkb/scylla/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/scylla/v2/splinky_3": {
|
||||||
|
"target": "bastardkb/scylla/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/scylla/v2/stemcell": {
|
||||||
|
"target": "bastardkb/scylla/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/skeletyl/v2/elitec": {
|
||||||
|
"target": "bastardkb/skeletyl/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/skeletyl/v2/splinky_2": {
|
||||||
|
"target": "bastardkb/skeletyl/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/skeletyl/v2/splinky_3": {
|
||||||
|
"target": "bastardkb/skeletyl/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/skeletyl/v2/stemcell": {
|
||||||
|
"target": "bastardkb/skeletyl/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/tbkmini/v2/elitec": {
|
||||||
|
"target": "bastardkb/tbkmini/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/tbkmini/v2/splinky_2": {
|
||||||
|
"target": "bastardkb/tbkmini/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/tbkmini/v2/splinky_3": {
|
||||||
|
"target": "bastardkb/tbkmini/promicro"
|
||||||
|
},
|
||||||
|
"bastardkb/tbkmini/v2/stemcell": {
|
||||||
|
"target": "bastardkb/tbkmini/promicro"
|
||||||
|
},
|
||||||
"bear_face": {
|
"bear_face": {
|
||||||
"target": "bear_face/v1"
|
"target": "bear_face/v1"
|
||||||
},
|
},
|
||||||
@ -257,44 +296,11 @@
|
|||||||
"handwired/jscotto/scottostarter": {
|
"handwired/jscotto/scottostarter": {
|
||||||
"target": "handwired/scottokeebs/scottostarter"
|
"target": "handwired/scottokeebs/scottostarter"
|
||||||
},
|
},
|
||||||
"helix/pico/sc/back": {
|
"helix": {
|
||||||
"target": "helix/pico/sc"
|
"target": "helix/beta"
|
||||||
},
|
},
|
||||||
"helix/pico/sc/under": {
|
"helix/rev2": {
|
||||||
"target": "helix/pico/sc"
|
"target": "helix/beta"
|
||||||
},
|
|
||||||
"helix/rev2/back/oled": {
|
|
||||||
"target": "helix/rev2/back"
|
|
||||||
},
|
|
||||||
"helix/rev2/oled": {
|
|
||||||
"target": "helix/rev2"
|
|
||||||
},
|
|
||||||
"helix/rev2/oled/back": {
|
|
||||||
"target": "helix/rev2/back"
|
|
||||||
},
|
|
||||||
"helix/rev2/oled/under": {
|
|
||||||
"target": "helix/rev2/under"
|
|
||||||
},
|
|
||||||
"helix/rev2/sc/back": {
|
|
||||||
"target": "helix/rev2/sc"
|
|
||||||
},
|
|
||||||
"helix/rev2/sc/oled": {
|
|
||||||
"target": "helix/rev2/sc"
|
|
||||||
},
|
|
||||||
"helix/rev2/sc/oledback": {
|
|
||||||
"target": "helix/rev2/sc"
|
|
||||||
},
|
|
||||||
"helix/rev2/sc/oledunder": {
|
|
||||||
"target": "helix/rev2/sc"
|
|
||||||
},
|
|
||||||
"helix/rev2/sc/under": {
|
|
||||||
"target": "helix/rev2/sc"
|
|
||||||
},
|
|
||||||
"helix/rev2/under": {
|
|
||||||
"target": "helix/rev2/sc"
|
|
||||||
},
|
|
||||||
"helix/rev2/under/oled": {
|
|
||||||
"target": "helix/rev2/under"
|
|
||||||
},
|
},
|
||||||
"honeycomb": {
|
"honeycomb": {
|
||||||
"target": "keyhive/honeycomb"
|
"target": "keyhive/honeycomb"
|
||||||
@ -1881,6 +1887,12 @@
|
|||||||
"kin80": {
|
"kin80": {
|
||||||
"target": "kin80/blackpill401"
|
"target": "kin80/blackpill401"
|
||||||
},
|
},
|
||||||
|
"kprepublic/cstc40/daughterboard": {
|
||||||
|
"target": "kprepublic/cstc40/rev1"
|
||||||
|
},
|
||||||
|
"kprepublic/cstc40/single_pcb": {
|
||||||
|
"target": "kprepublic/cstc40/rev2"
|
||||||
|
},
|
||||||
"kumaokobo/kudox_full": {
|
"kumaokobo/kudox_full": {
|
||||||
"target": "kumaokobo/kudox_full/rev1"
|
"target": "kumaokobo/kudox_full/rev1"
|
||||||
},
|
},
|
||||||
@ -2258,5 +2270,48 @@
|
|||||||
},
|
},
|
||||||
"zsa/planck_ez": {
|
"zsa/planck_ez": {
|
||||||
"target": "zsa/planck_ez/base"
|
"target": "zsa/planck_ez/base"
|
||||||
|
},
|
||||||
|
// DEFAULT_FOLDER removed during 2025 Q3 cycle
|
||||||
|
"cannonkeys/satisfaction75": {
|
||||||
|
"target": "cannonkeys/satisfaction75/rev1"
|
||||||
|
},
|
||||||
|
"converter/adb_usb": {
|
||||||
|
"target": "converter/adb_usb/rev1"
|
||||||
|
},
|
||||||
|
"converter/sun_usb": {
|
||||||
|
"target": "converter/sun_usb/type5"
|
||||||
|
},
|
||||||
|
"converter/usb_usb": {
|
||||||
|
"target": "converter/usb_usb/hasu"
|
||||||
|
},
|
||||||
|
"durgod/dgk6x": {
|
||||||
|
"target": "durgod/dgk6x/hades_ansi"
|
||||||
|
},
|
||||||
|
"ergodox_ez": {
|
||||||
|
"target": "ergodox_ez/base"
|
||||||
|
},
|
||||||
|
"ferris/0_2": {
|
||||||
|
"target": "ferris/0_2/base"
|
||||||
|
},
|
||||||
|
"handwired/dygma/raise": {
|
||||||
|
"target": "handwired/dygma/raise/ansi"
|
||||||
|
},
|
||||||
|
"ibm/model_m/mschwingen": {
|
||||||
|
"target": "ibm/model_m/mschwingen/led_wired"
|
||||||
|
},
|
||||||
|
"mechwild/sugarglider": {
|
||||||
|
"target": "mechwild/sugarglider/wide_oled/f401"
|
||||||
|
},
|
||||||
|
"mechwild/sugarglider/wide_oled": {
|
||||||
|
"target": "mechwild/sugarglider/wide_oled/f401"
|
||||||
|
},
|
||||||
|
"novelkeys/nk65": {
|
||||||
|
"target": "novelkeys/nk65/v1"
|
||||||
|
},
|
||||||
|
"novelkeys/nk65/base": {
|
||||||
|
"target": "novelkeys/nk65/v1"
|
||||||
|
},
|
||||||
|
"sirius/uni660/rev2": {
|
||||||
|
"target": "sirius/uni660/rev2/ansi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,6 +473,7 @@
|
|||||||
"ghost": {"type": "boolean"},
|
"ghost": {"type": "boolean"},
|
||||||
"input_pressed_state": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
"input_pressed_state": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||||
"io_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
"io_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||||
|
"masked": {"type": "boolean"},
|
||||||
"direct": {
|
"direct": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
"items": {"$ref": "./definitions.jsonschema#/mcu_pin_array"}
|
||||||
|
5
docs/ChangeLog/20250831/PR25414.md
Normal file
5
docs/ChangeLog/20250831/PR25414.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Mitigate VIA keylogger security issues [#25414](https://github.com/qmk/qmk_firmware/pull/25414)
|
||||||
|
|
||||||
|
VIA's keyboard matrix testing functionality, which allows users to identify active key presses, has been identified as a potential security concern by community members and security researchers. This feature has been demonstrated to enable unauthorized keystroke capture, with documented examples showing how malicious scripts could exploit this capability to create keyloggers. A recent security assessment revealed that user credentials could be compromised by exploiting the matrix testing function combined with VIA's keycode assignment queries. In this attack scenario, a script could remain active during a locked session and capture password input when users authenticate upon return.
|
||||||
|
|
||||||
|
The QMK team notified the VIA team of this security vulnerability on May 17, 2022, and made multiple subsequent attempts to coordinate a mitigation strategy. Despite repeated outreach, the VIA team has provided no acknowledgment or response to these security concerns. Given the severity of the potential security implications and the lack of engagement from the VIA team, the QMK team has unilaterally implemented a security enhancement that modifies the keyboard matrix testing functionality to prevent the reporting of key press events. This change prioritizes user security and data protection over potential feature compatibility concerns within VIA.
|
@ -364,8 +364,6 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
|||||||
|
|
||||||
## Build Options
|
## Build Options
|
||||||
|
|
||||||
* `DEFAULT_FOLDER`
|
|
||||||
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
|
||||||
* `FIRMWARE_FORMAT`
|
* `FIRMWARE_FORMAT`
|
||||||
* Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building.
|
* Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building.
|
||||||
* `SRC`
|
* `SRC`
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs.
|
SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs.
|
||||||
|
|
||||||
[AW20216S Datasheet](https://doc.awinic.com/doc/20230609wm/b6a9c70b-e1bd-495b-925f-bcbed3fc2620.pdf)
|
[AW20216S Datasheet](https://doc.awinic.com/doc/202412/a055779b-49c0-4d09-8f04-73029f44b72b.pdf)
|
||||||
|
|
||||||
## Usage {#usage}
|
## Usage {#usage}
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ The following `#define`s apply only to the `adc` driver:
|
|||||||
|-----------------------------|--------------|--------------------------------------------------------------|
|
|-----------------------------|--------------|--------------------------------------------------------------|
|
||||||
|`BATTERY_PIN` |*Not defined* |The GPIO pin connected to the voltage divider. |
|
|`BATTERY_PIN` |*Not defined* |The GPIO pin connected to the voltage divider. |
|
||||||
|`BATTERY_REF_VOLTAGE_MV` |`3300` |The ADC reverence voltage, in millivolts. |
|
|`BATTERY_REF_VOLTAGE_MV` |`3300` |The ADC reverence voltage, in millivolts. |
|
||||||
|`BATTERY_VOLTAGE_DIVIDER_R1` |`100000` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
|`BATTERY_VOLTAGE_DIVIDER_R1` |`100` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
||||||
|`BATTERY_VOLTAGE_DIVIDER_R1` |`100000` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
|`BATTERY_VOLTAGE_DIVIDER_R2` |`100` |The voltage divider resistance, in kOhm. Set to 0 to disable. |
|
||||||
|`BATTERY_ADC_RESOLUTION` |`10` |The ADC resolution configured for the ADC Driver. |
|
|`BATTERY_ADC_RESOLUTION` |`10` |The ADC resolution configured for the ADC Driver. |
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
@ -144,18 +144,30 @@ The following defines apply only to ARM devices:
|
|||||||
|`WS2812_T1L`|`(WS2812_TIMING - WS2812_T1H)`|The length of a "1" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
|
|`WS2812_T1L`|`(WS2812_TIMING - WS2812_T1H)`|The length of a "1" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
|
||||||
|`WS2812_T0L`|`(WS2812_TIMING - WS2812_T0H)`|The length of a "0" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
|
|`WS2812_T0L`|`(WS2812_TIMING - WS2812_T0H)`|The length of a "0" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
|
||||||
|
|
||||||
### Push-Pull and Open Drain {#push-pull-open-drain}
|
### Logic Levels {#logic-levels}
|
||||||
|
|
||||||
By default, the GPIO used for data transmission is configured as a *push-pull* output, meaning the pin is effectively always driven either to VCC or to ground.
|
WS2812 LEDs usually operate at 5V, but some microcontrollers, particularly ARM-based ones, run on 3.3V. This can pose an issue when driving the LED chain as the logic level voltage is lower than the power supply voltage, leading to unreliable data transmission. There are two main workarounds:
|
||||||
|
|
||||||
For situations where the logic level voltage is lower than the power supply voltage, however, this can pose an issue. The solution is to configure the pin for *open drain* mode instead, and use a pullup resistor between the DI pin and VCC. In this mode, the MCU can only pull the GPIO *low*, or leave it floating. The pullup resistor is then responsible for pulling the line high, when the MCU is not driving the GPIO.
|
#### 1. Open Drain Circuit {#open-drain-circuit}
|
||||||
|
|
||||||
To configure the DI pin for open drain configuration, add the following to your `config.h`:
|
By default, `WS2812_DI_PIN` is configured as a *push-pull* output, meaning the pin is effectively always driven either to VCC or to ground; however, it can be configured in *open drain* mode instead.
|
||||||
|
|
||||||
|
In this mode, the MCU will only pull the GPIO *low*, and leaves it floating otherwise. A pullup resistor (typically around 10kΩ) between DI and 5V is then responsible for pulling the line high when the MCU is not driving the GPIO.
|
||||||
|
|
||||||
|
To use the DI pin in open drain configuration, add the following to your `config.h`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define WS2812_EXTERNAL_PULLUP
|
#define WS2812_EXTERNAL_PULLUP
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::: warning
|
||||||
|
Because the GPIO is being pulled to 5V in this situation rather than VCC (3.3V), **it must be a 5V tolerant pin**. Consult your MCU's datasheet first – if there are no eligible pins, you must use a level shifter instead.
|
||||||
|
:::
|
||||||
|
|
||||||
|
#### 2. Level Shifter {#level-shifter}
|
||||||
|
|
||||||
|
A level shifter IC, such as the SN74LV1T34, can be placed between the GPIO and the first LED's DI pin to convert the 3.3V logic to 5V. This requires no additional configuration in the firmware, nor a 5V tolerant GPIO, but may be more expensive and is generally less handwire-friendly.
|
||||||
|
|
||||||
### SPI Driver {#arm-spi-driver}
|
### SPI Driver {#arm-spi-driver}
|
||||||
|
|
||||||
Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
|
Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
|
||||||
|
@ -2,29 +2,40 @@
|
|||||||
|
|
||||||
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------|----------------------------------|------------------------------------------------------|
|
|----------|-------------------------------|-------------------------------------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
|`LCG(kc)` | |Hold Left Control and Left GUI and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||||
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
|`LSG(kc)` | |Hold Left Shift and Left GUI and press `kc` |
|
||||||
|`LAG(kc)` | |Hold Left Alt and Left 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` |
|
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||||
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`RCA(kc)` | |Hold Right Control and Right Alt and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||||
|
|`RCG(kc)` | |Hold Right Control and Right GUI and press `kc` |
|
||||||
|
|`RSA(kc)` | |Hold Right Shift and Right Alt and press `kc` |
|
||||||
|
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||||
|
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
||||||
|
|`RCSG(kc)`| |Hold Right Control, Right Shift and Right GUI and press `kc` |
|
||||||
|
|`RCAG(kc)`| |Hold Right Control, Right Alt and Right GUI and press `kc` |
|
||||||
|
|`RSAG(kc)`| |Hold Right Shift, Right Alt and Right GUI and press `kc` |
|
||||||
|
|`MEH(kc)` | |Hold Left Control, Left Shift and Left Alt and press `kc` |
|
||||||
|
|`HYPR(kc)`| |Hold Left Control, Left Shift, Left Alt and Left GUI and press `kc`<sup>1</sup>|
|
||||||
|
|
||||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
<sup>1. More information on the Hyper key can be found on [this blog post by Brett Terpstra](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/).</sup>
|
||||||
|
|
||||||
|
You can also chain them, for example `LCTL(LALT(KC_DEL))`, `C(A(KC_DEL))`, or `LCA(KC_DEL)` all make a key that sends Control+Alt+Delete with a single keypress.
|
||||||
|
|
||||||
# Checking Modifier State {#checking-modifier-state}
|
# Checking Modifier State {#checking-modifier-state}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ This is ideal for when you want ensure everything compiles successfully when pre
|
|||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example).
|
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example).
|
||||||
For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace.
|
For more complicated examples, checkout the [`awesome-qmk` colletion](https://github.com/qmk/awesome-qmk).
|
||||||
|
|
||||||
|
|
||||||
### Customized Functions
|
### Customized Functions
|
||||||
|
@ -135,11 +135,11 @@ bool momentary_layer(bool key_down, void *layer) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
|
const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RALT), //
|
||||||
.layers = ~(1 << LAYER_FN), //
|
.layers = ~(1 << LAYER_FN), //
|
||||||
.suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), //
|
.suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RALT), //
|
||||||
.options = ko_option_no_unregister_on_other_key_down, //
|
.options = ko_option_no_unregister_on_other_key_down, //
|
||||||
.negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL)), //
|
.negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RALT)), //
|
||||||
.custom_action = momentary_layer, //
|
.custom_action = momentary_layer, //
|
||||||
.context = (void *)LAYER_FN, //
|
.context = (void *)LAYER_FN, //
|
||||||
.trigger = KC_NO, //
|
.trigger = KC_NO, //
|
||||||
|
@ -214,9 +214,30 @@ led_matrix_mode(LED_MATRIX_CUSTOM_my_cool_effect);
|
|||||||
For inspiration and examples, check out the built-in effects under `quantum/led_matrix/animations/`.
|
For inspiration and examples, check out the built-in effects under `quantum/led_matrix/animations/`.
|
||||||
|
|
||||||
|
|
||||||
|
## Naming
|
||||||
|
|
||||||
|
If you wish to be able to use the name of an effect in your code -- say for a display indicator -- then you can enable the function `led_matrix_get_mode_name` in the following manner:
|
||||||
|
|
||||||
|
In your keymap's `config.h`:
|
||||||
|
```c
|
||||||
|
#define LED_MATRIX_MODE_NAME_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
In your `keymap.c`
|
||||||
|
```c
|
||||||
|
const char* effect_name = led_matrix_get_mode_name(led_matrix_get_mode());
|
||||||
|
// do something with `effect_name`, like `oled_write_ln(effect_name, false);`
|
||||||
|
```
|
||||||
|
|
||||||
|
::: info
|
||||||
|
`led_matrix_get_mode_name()` is not enabled by default as it increases the amount of flash memory used by the firmware based on the number of effects enabled.
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
## Additional `config.h` Options {#additional-configh-options}
|
## Additional `config.h` Options {#additional-configh-options}
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
#define LED_MATRIX_MODE_NAME_ENABLE // enables led_matrix_get_mode_name()
|
||||||
#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
#define LED_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
||||||
#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
|
#define LED_MATRIX_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
|
||||||
#define LED_MATRIX_SLEEP // turn off effects when suspended
|
#define LED_MATRIX_SLEEP // turn off effects when suspended
|
||||||
|
@ -379,7 +379,7 @@ POINTING_DEVICE_DRIVER = custom
|
|||||||
Using the custom driver will require implementing the following functions:
|
Using the custom driver will require implementing the following functions:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void pointing_device_driver_init(void) {}
|
bool pointing_device_driver_init(void) { return true; }
|
||||||
report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { return mouse_report; }
|
report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { return mouse_report; }
|
||||||
uint16_t pointing_device_driver_get_cpi(void) { return 0; }
|
uint16_t pointing_device_driver_get_cpi(void) { return 0; }
|
||||||
void pointing_device_driver_set_cpi(uint16_t cpi) {}
|
void pointing_device_driver_set_cpi(uint16_t cpi) {}
|
||||||
@ -467,20 +467,22 @@ If there is a `_RIGHT` configuration option or callback, the [common configurati
|
|||||||
|
|
||||||
## Callbacks and Functions
|
## Callbacks and Functions
|
||||||
|
|
||||||
| Function | Description |
|
| Function | Description |
|
||||||
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||||
| `pointing_device_init_kb(void)` | Callback to allow for keyboard level initialization. Useful for additional hardware sensors. |
|
| `pointing_device_init_kb(void)` | Callback to allow for keyboard level initialization. Useful for additional hardware sensors. |
|
||||||
| `pointing_device_init_user(void)` | Callback to allow for user level initialization. Useful for additional hardware sensors. |
|
| `pointing_device_init_user(void)` | Callback to allow for user level initialization. Useful for additional hardware sensors. |
|
||||||
| `pointing_device_task_kb(mouse_report)` | Callback that sends sensor data, so keyboard code can intercept and modify the data. Returns a mouse report. |
|
| `pointing_device_task_kb(mouse_report)` | Callback that sends sensor data, so keyboard code can intercept and modify the data. Returns a mouse report. |
|
||||||
| `pointing_device_task_user(mouse_report)` | Callback that sends sensor data, so user code can intercept and modify the data. Returns a mouse report. |
|
| `pointing_device_task_user(mouse_report)` | Callback that sends sensor data, so user code can intercept and modify the data. Returns a mouse report. |
|
||||||
| `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. |
|
| `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. |
|
||||||
| `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. |
|
| `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. |
|
||||||
| `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. |
|
| `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. |
|
||||||
| `pointing_device_get_report(void)` | Returns the current mouse report (as a `report_mouse_t` data structure). |
|
| `pointing_device_get_report(void)` | Returns the current mouse report (as a `report_mouse_t` data structure). |
|
||||||
| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `report_mouse_t` data structured passed to the function. |
|
| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `report_mouse_t` data structured passed to the function. |
|
||||||
| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. |
|
| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. |
|
||||||
| `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `report_mouse_t` data and returns true only if it has changed. |
|
| `has_mouse_report_changed(new_report, old_report)` | Compares the old and new `report_mouse_t` data and returns true only if it has changed. |
|
||||||
| `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. |
|
| `pointing_device_adjust_by_defines(mouse_report)` | Applies rotations and invert configurations to a raw mouse report. |
|
||||||
|
| `pointing_device_get_status(void)` | Returns device status as `pointing_device_status_t` a good return is `POINTING_DEVICE_STATUS_SUCCESS`. |
|
||||||
|
| `pointing_device_set_status(pointing_device_status_t status)` | Sets device status, anything other than `POINTING_DEVICE_STATUS_SUCCESS` will disable reports from the device.|
|
||||||
|
|
||||||
|
|
||||||
## Split Keyboard Callbacks and Functions
|
## Split Keyboard Callbacks and Functions
|
||||||
|
@ -23,8 +23,11 @@ MODULE 5+ --------+--+--------- PWR CONTROLLER
|
|||||||
CLK ------+------------ PIN
|
CLK ------+------------ PIN
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Driver Configuration {#driver-configuration}
|
||||||
|
|
||||||
## Busywait Version {#busywait-version}
|
Driver selection can be configured in `rules.mk` as `PS2_DRIVER`, or in `info.json` as `ps2.driver`. Valid values are `busywait` (default), `interrupt`, `usart`, or `vendor`. See below for information on individual drivers.
|
||||||
|
|
||||||
|
### Busywait Driver {#busywait-driver}
|
||||||
|
|
||||||
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
||||||
|
|
||||||
@ -45,7 +48,7 @@ In your keyboard config.h:
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### Interrupt Version (AVR/ATMega32u4) {#interrupt-version-avr}
|
### Interrupt Driver (AVR/ATMega32u4) {#interrupt-driver-avr}
|
||||||
|
|
||||||
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
|
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
|
||||||
|
|
||||||
@ -78,7 +81,7 @@ In your keyboard config.h:
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### Interrupt Version (ARM chibios) {#interrupt-version-chibios}
|
### Interrupt Driver (ARM chibios) {#interrupt-driver-chibios}
|
||||||
|
|
||||||
Pretty much any two pins can be used for the (software) interrupt variant on ARM cores. The example below uses A8 for clock, and A9 for data.
|
Pretty much any two pins can be used for the (software) interrupt variant on ARM cores. The example below uses A8 for clock, and A9 for data.
|
||||||
|
|
||||||
@ -107,7 +110,7 @@ And in the ChibiOS specific `halconf.h`:
|
|||||||
#include_next <halconf.h>
|
#include_next <halconf.h>
|
||||||
```
|
```
|
||||||
|
|
||||||
### USART Version {#usart-version}
|
### USART Driver {#usart-driver}
|
||||||
|
|
||||||
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
|
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
|
||||||
|
|
||||||
@ -159,7 +162,7 @@ In your keyboard config.h:
|
|||||||
#endif
|
#endif
|
||||||
```
|
```
|
||||||
|
|
||||||
### RP2040 PIO Version {#rp2040-pio-version}
|
### RP2040 PIO Driver {#rp2040-pio-driver}
|
||||||
|
|
||||||
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using the integrated PIO peripheral and is therefore only available on this MCU.
|
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using the integrated PIO peripheral and is therefore only available on this MCU.
|
||||||
|
|
||||||
|
@ -365,9 +365,30 @@ These are shorthands to popular colors. The `RGB` ones can be passed to the `set
|
|||||||
These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
|
These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
|
||||||
|
|
||||||
|
|
||||||
|
## Naming
|
||||||
|
|
||||||
|
If you wish to be able to use the name of an effect in your code -- say for a display indicator -- then you can enable the function `rgb_matrix_get_mode_name` in the following manner:
|
||||||
|
|
||||||
|
In your keymap's `config.h`:
|
||||||
|
```c
|
||||||
|
#define RGB_MATRIX_MODE_NAME_ENABLE
|
||||||
|
```
|
||||||
|
|
||||||
|
In your `keymap.c`
|
||||||
|
```c
|
||||||
|
const char* effect_name = rgb_matrix_get_mode_name(rgb_matrix_get_mode());
|
||||||
|
// do something with `effect_name`, like `oled_write_ln(effect_name, false);`
|
||||||
|
```
|
||||||
|
|
||||||
|
::: info
|
||||||
|
`rgb_matrix_get_mode_name()` is not enabled by default as it increases the amount of flash memory used by the firmware based on the number of effects enabled.
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
## Additional `config.h` Options {#additional-configh-options}
|
## Additional `config.h` Options {#additional-configh-options}
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
#define RGB_MATRIX_MODE_NAME_ENABLE // enables rgb_matrix_get_mode_name()
|
||||||
#define RGB_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
#define RGB_MATRIX_KEYRELEASES // reactive effects respond to keyreleases (instead of keypresses)
|
||||||
#define RGB_MATRIX_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
#define RGB_MATRIX_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
||||||
#define RGB_MATRIX_SLEEP // turn off effects when suspended
|
#define RGB_MATRIX_SLEEP // turn off effects when suspended
|
||||||
@ -486,7 +507,7 @@ This example sets the modifiers to be a specific color based on the layer state.
|
|||||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||||
hsv_t hsv = {0, 255, 255};
|
hsv_t hsv = {0, 255, 255};
|
||||||
|
|
||||||
if (layer_state_is(layer_state, 2)) {
|
if (get_highest_layer(layer_state|default_layer_state) == 2) {
|
||||||
hsv = (hsv_t){130, 255, 255};
|
hsv = (hsv_t){130, 255, 255};
|
||||||
} else {
|
} else {
|
||||||
hsv = (hsv_t){30, 255, 255};
|
hsv = (hsv_t){30, 255, 255};
|
||||||
|
@ -4,6 +4,14 @@
|
|||||||
|
|
||||||
The [Open Steno Project](https://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
|
The [Open Steno Project](https://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
|
||||||
|
|
||||||
|
## Steno Support in QMK
|
||||||
|
|
||||||
|
There are three ways that QMK keyboards can support steno, with varying degrees of configuration required:
|
||||||
|
|
||||||
|
1. Plover with [Arpeggiation](https://plover.wiki/index.php/Glossary#Arpeggiate) requires no changes to any keyboard and is supported by QMK as well as any other QWERTY keyboard.
|
||||||
|
2. Plover with [NKRO](https://plover.wiki/index.php/Using_a_standard_keyboard_with_Plover#NKRO). If your keyboard supports NKRO in hardware and you have NKRO enabled as a USB endpoint, you can chord with the keyboard. Many devices will arrive stock like this and will require no changes.
|
||||||
|
3. Steno Machine Protocols. This requires the most configuration, but this has the advantage of allowing you to use your keyboard keys normally (either on another layer or another piece of hardware) without enabling and disabling your steno software.
|
||||||
|
|
||||||
## Plover with QWERTY Keyboard {#plover-with-qwerty-keyboard}
|
## Plover with QWERTY Keyboard {#plover-with-qwerty-keyboard}
|
||||||
|
|
||||||
Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
|
Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
|
||||||
@ -14,14 +22,14 @@ You may also need to adjust your layout, either in QMK or in Plover, if you have
|
|||||||
|
|
||||||
## Plover with Steno Protocol {#plover-with-steno-protocol}
|
## Plover with Steno Protocol {#plover-with-steno-protocol}
|
||||||
|
|
||||||
Plover also understands the language of several steno machines. QMK can speak a couple of these languages: TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`.
|
Plover also understands the language of several steno machines. QMK can speak a couple of these languages: TX Bolt and GeminiPR. An example layout can be found in `splitography/keymaps/default`.
|
||||||
|
|
||||||
When QMK speaks to Plover over a steno protocol, Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactivate Plover.
|
When QMK speaks to Plover over a steno protocol, Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactivate Plover.
|
||||||
|
|
||||||
In this mode, Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard.
|
In this mode, Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard.
|
||||||
|
|
||||||
::: info
|
::: info
|
||||||
Note: Due to hardware limitations, you might not be able to run both a virtual serial port and mouse emulation at the same time.
|
Due to hardware limitations, you might not be able to run both a virtual serial port and other features (mouse keys, NKRO, or MIDI support) at the same time. You will likely encounter a compile time error if this is the case. Disable those other features as necessary.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: warning
|
::: warning
|
||||||
@ -156,7 +164,7 @@ At the end of this scenario given as an example, `chord` would have five bits se
|
|||||||
## Keycode Reference {#keycode-reference}
|
## Keycode Reference {#keycode-reference}
|
||||||
|
|
||||||
::: info
|
::: info
|
||||||
Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
|
TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|GeminiPR|TX Bolt|Steno Key|
|
|GeminiPR|TX Bolt|Steno Key|
|
||||||
|
@ -170,20 +170,6 @@ typedef struct {
|
|||||||
uint16_t held;
|
uint16_t held;
|
||||||
} tap_dance_tap_hold_t;
|
} tap_dance_tap_hold_t;
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
tap_dance_action_t *action;
|
|
||||||
|
|
||||||
switch (keycode) {
|
|
||||||
case TD(CT_CLN): // list all tap dance keycodes with tap-hold configurations
|
|
||||||
action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)];
|
|
||||||
if (!record->event.pressed && action->state.count && !action->state.finished) {
|
|
||||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
|
|
||||||
tap_code16(tap_hold->tap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void tap_dance_tap_hold_finished(tap_dance_state_t *state, void *user_data) {
|
void tap_dance_tap_hold_finished(tap_dance_state_t *state, void *user_data) {
|
||||||
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data;
|
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data;
|
||||||
|
|
||||||
@ -211,12 +197,29 @@ void tap_dance_tap_hold_reset(tap_dance_state_t *state, void *user_data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \
|
#define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \
|
||||||
{ .fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, .user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), }
|
{ \
|
||||||
|
.fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, \
|
||||||
|
.user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), \
|
||||||
|
}
|
||||||
|
|
||||||
tap_dance_action_t tap_dance_actions[] = {
|
tap_dance_action_t tap_dance_actions[] = {
|
||||||
[CT_CLN] = ACTION_TAP_DANCE_TAP_HOLD(KC_COLN, KC_SCLN),
|
[CT_CLN] = ACTION_TAP_DANCE_TAP_HOLD(KC_COLN, KC_SCLN),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
tap_dance_action_t *action;
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case TD(CT_CLN): // list all tap dance keycodes with tap-hold configurations
|
||||||
|
action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)];
|
||||||
|
if (!record->event.pressed && action->state.count && !action->state.finished) {
|
||||||
|
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
|
||||||
|
tap_code16(tap_hold->tap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Example 4: 'Quad Function Tap-Dance' {#example-4}
|
#### Example 4: 'Quad Function Tap-Dance' {#example-4}
|
||||||
|
@ -44,7 +44,11 @@ QMK uses sub-folders both for organization and to share code between revisions o
|
|||||||
qmk_firmware/keyboards/top_folder/sub_1/sub_2/sub_3/sub_4
|
qmk_firmware/keyboards/top_folder/sub_1/sub_2/sub_3/sub_4
|
||||||
```
|
```
|
||||||
|
|
||||||
If a sub-folder has a `rules.mk` file it will be considered a compilable keyboard. It will be available in QMK Configurator and tested with `make all`. If you are using a folder to organize several keyboards from the same maker you should not have a `rules.mk` file.
|
If a sub-folder has a `keyboard.json` file it will be considered a compilable keyboard. It will be available in QMK Configurator and tested with `make all`. If you are using a folder to organize several keyboards from the same maker you should not have a `keyboard.json` file.
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
When configuring a keyboard with multiple revisions (like the `clueboard/66` example below), an `info.json` file at the top keyboard level (eg. `clueboard/66`) should be used for configuration shared between revisions. Then `keyboard.json` in each revision directory containing revision-specific configuration, and indicating a buildable keyboard.
|
||||||
|
:::
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -52,19 +56,19 @@ Clueboard uses sub-folders for both purposes, organization and keyboard revision
|
|||||||
|
|
||||||
* [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master)
|
* [`qmk_firmware`](https://github.com/qmk/qmk_firmware/tree/master)
|
||||||
* [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards)
|
* [`keyboards`](https://github.com/qmk/qmk_firmware/tree/master/keyboards)
|
||||||
* [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization folder, there's no `rules.mk` file
|
* [`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization folder, there's no `keyboard.json` file
|
||||||
* [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard, it has a `rules.mk` file
|
* [`60`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/60) ← This is a compilable keyboard - it has a `keyboard.json` file
|
||||||
* [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is also compilable- it uses `DEFAULT_FOLDER` to specify `rev3` as the default revision
|
* [`66`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66) ← This is not a compilable keyboard - a revision must be specified
|
||||||
* [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1`
|
* [`rev1`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev1) ← compilable: `make clueboard/66/rev1`
|
||||||
* [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2`
|
* [`rev2`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev2) ← compilable: `make clueboard/66/rev2`
|
||||||
* [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← compilable: `make clueboard/66/rev3` or `make clueboard/66`
|
* [`rev3`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard/66/rev3) ← compilable: `make clueboard/66/rev3`
|
||||||
|
|
||||||
## Keyboard Folder Structure
|
## Keyboard Folder Structure
|
||||||
|
|
||||||
Your keyboard should be located in `qmk_firmware/keyboards/` and the folder name should be your keyboard's name as described in the previous section. Inside this folder should be several files:
|
Your keyboard should be located in `qmk_firmware/keyboards/` and the folder name should be your keyboard's name as described in the previous section. Inside this folder should be several files, some of which are optional:
|
||||||
|
|
||||||
* `readme.md`
|
* `readme.md`
|
||||||
* `info.json`
|
* `keyboard.json` (or `info.json`)
|
||||||
* `config.h`
|
* `config.h`
|
||||||
* `rules.mk`
|
* `rules.mk`
|
||||||
* `<keyboard_name>.c`
|
* `<keyboard_name>.c`
|
||||||
@ -74,13 +78,27 @@ Your keyboard should be located in `qmk_firmware/keyboards/` and the folder name
|
|||||||
|
|
||||||
All projects need to have a `readme.md` file that explains what the keyboard is, who made it and where it's available. If applicable, it should also contain links to more information, such as the maker's website. Please follow the [published template](documentation_templates#keyboard-readmemd-template).
|
All projects need to have a `readme.md` file that explains what the keyboard is, who made it and where it's available. If applicable, it should also contain links to more information, such as the maker's website. Please follow the [published template](documentation_templates#keyboard-readmemd-template).
|
||||||
|
|
||||||
### `info.json`
|
### `keyboard.json`/`info.json`
|
||||||
|
|
||||||
This file is used by the [QMK API](https://github.com/qmk/qmk_api). It contains the information [QMK Configurator](https://config.qmk.fm/) needs to display a representation of your keyboard. You can also set metadata here. For more information see the [reference page](reference_info_json).
|
The `keyboard.json` file is necessary for your keyboard (or keyboard revision) to be considered a buildable keyboard. The same content is valid in both `info.json` and `keyboard.json`. For the available configuration options of this file, see the [reference page](reference_info_json). This file is also used by the [QMK API](https://github.com/qmk/qmk_api), and by the [QMK Configurator](https://config.qmk.fm/) to display a representation of the available layouts of your keyboard.
|
||||||
|
|
||||||
|
Additionally, this is where layouts available on your keyboard are defined. If you only have a single layout, it should be named `LAYOUT`. When defining multiple layouts, you should have a base layout, named `LAYOUT_all`, that supports all possible switch positions in your matrix, even if that layout is impossible to build physically. This is the layout that should be used in the `default` keymap. You should then have additional keymaps named `default_<layout>` that configure keymaps for the other layouts. Layout macro names are entirely lowercase, except for the prefix of `LAYOUT`.
|
||||||
|
|
||||||
|
As an example, if you have a 60% PCB that supports ANSI and ISO, you might define the following layouts and keymaps:
|
||||||
|
|
||||||
|
| Layout Name | Keymap Name | Description |
|
||||||
|
|-------------|--------------|------------------------------------------|
|
||||||
|
| LAYOUT_all | default | A layout that supports both ISO and ANSI |
|
||||||
|
| LAYOUT_ansi | default_ansi | An ANSI layout |
|
||||||
|
| LAYOUT_iso | default_iso | An ISO layout |
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
Providing only `LAYOUT_all` is invalid, as is providing a `LAYOUT` when multiple layouts are present.
|
||||||
|
:::
|
||||||
|
|
||||||
### `config.h`
|
### `config.h`
|
||||||
|
|
||||||
All projects need to have a `config.h` file that sets things like the matrix size, product name, USB VID/PID, description and other settings. In general, use this file to set essential information and defaults for your keyboard that will always work.
|
Some projects will need to have a `config.h` that configures parameters that are not possible to be set in `keyboard.json`. This is not a required file.
|
||||||
|
|
||||||
The `config.h` files can also be placed in sub-folders, and the order in which they are read is as follows:
|
The `config.h` files can also be placed in sub-folders, and the order in which they are read is as follows:
|
||||||
|
|
||||||
@ -138,7 +156,7 @@ If you define options using `post_config.h` as in the above example, you should
|
|||||||
|
|
||||||
### `rules.mk`
|
### `rules.mk`
|
||||||
|
|
||||||
The presence of this file means that the folder is a keyboard target and can be used in `make` commands. This is where you setup the build environment for your keyboard and configure the default set of features.
|
This file is typically used to configure hardware drivers (eg. pointing device), or to include additional C files in compilation. This is not a required file.
|
||||||
|
|
||||||
The `rules.mk` file can also be placed in a sub-folder, and its reading order is as follows:
|
The `rules.mk` file can also be placed in a sub-folder, and its reading order is as follows:
|
||||||
|
|
||||||
@ -187,7 +205,7 @@ See `build_keyboard.mk` and `common_features.mk` for more details.
|
|||||||
|
|
||||||
### `<keyboard_name.c>`
|
### `<keyboard_name.c>`
|
||||||
|
|
||||||
This is where you will write custom code for your keyboard. Typically you will write code to initialize and interface with the hardware in your keyboard. If your keyboard consists of only a key matrix with no LEDs, speakers, or other auxiliary hardware this file can be blank.
|
This file should contain C code required for the functionality of your keyboard, for example hardware initialisation code, OLED display code, and so on. This file should only contain code necessary for the keyboard to work, and *not* things that should be left to the end user to configure in their keymap. This file is automatically included in compilation if it exists. This is not a required file.
|
||||||
|
|
||||||
The following functions are typically defined in this file:
|
The following functions are typically defined in this file:
|
||||||
|
|
||||||
@ -198,31 +216,11 @@ The following functions are typically defined in this file:
|
|||||||
|
|
||||||
### `<keyboard_name.h>`
|
### `<keyboard_name.h>`
|
||||||
|
|
||||||
This file is used to define the matrix for your keyboard. You should define at least one C macro which translates an array into a matrix representing the physical switch matrix for your keyboard. If it's possible to build your keyboard with multiple layouts you should define additional macros.
|
This file can contain function prototypes for custom functions and other header file code utilised by `<keyboard_name>.c`. The `<keyboard_name>.c` file should include this file. This is not a required file.
|
||||||
|
|
||||||
If you have only a single layout you should call this macro `LAYOUT`.
|
|
||||||
|
|
||||||
When defining multiple layouts you should have a base layout, named `LAYOUT_all`, that supports all possible switch positions on your matrix, even if that layout is impossible to build physically. This is the macro you should use in your `default` keymap. You should then have additional keymaps named `default_<layout>` that use your other layout macros. This will make it easier for people to use the layouts you define.
|
|
||||||
|
|
||||||
Layout macro names are entirely lowercase, except for the word `LAYOUT` at the front.
|
|
||||||
|
|
||||||
As an example, if you have a 60% PCB that supports ANSI and ISO you might define the following layouts and keymaps:
|
|
||||||
|
|
||||||
| Layout Name | Keymap Name | Description |
|
|
||||||
|-------------|-------------|-------------|
|
|
||||||
| LAYOUT_all | default | A layout that supports both ISO and ANSI |
|
|
||||||
| LAYOUT_ansi | default_ansi | An ANSI layout |
|
|
||||||
| LAYOUT_iso | default_iso | An ISO layout |
|
|
||||||
|
|
||||||
::: tip
|
|
||||||
Providing only `LAYOUT_all` is invalid - especially when implementing the additional layouts within 3rd party tooling.
|
|
||||||
:::
|
|
||||||
|
|
||||||
## Image/Hardware Files
|
## Image/Hardware Files
|
||||||
|
|
||||||
In an effort to keep the repo size down we're no longer accepting binary files of any format, with few exceptions. Hosting them elsewhere (such as <https://imgur.com>) and linking them in the `readme.md` is preferred.
|
In an effort to keep the repo size down we do not accept binary files of any format, with few exceptions. Hosting them elsewhere (such as <https://imgur.com>) and linking them in the `readme.md` is preferred. Hardware files such as plates, cases, and PCBs can be published in a personal repository or elsewhere, and linked to by your keyboard's `readme.md` file.
|
||||||
|
|
||||||
Hardware files (such as plates, cases, pcb) can be contributed to the [qmk.fm repo](https://github.com/qmk/qmk.fm) and they will be made available on [qmk.fm](https://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `https://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` folder for an example.
|
|
||||||
|
|
||||||
## Keyboard Defaults
|
## Keyboard Defaults
|
||||||
|
|
||||||
@ -232,8 +230,6 @@ Given the amount of functionality that QMK exposes it's very easy to confuse new
|
|||||||
|
|
||||||
[Magic Keycodes](keycodes_magic) and [Command](features/command) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board.
|
[Magic Keycodes](keycodes_magic) and [Command](features/command) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board.
|
||||||
|
|
||||||
By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in.
|
|
||||||
|
|
||||||
If your keyboard does not have 2 shift keys you should provide a working default for `IS_COMMAND`, even when you have set `COMMAND_ENABLE = no`. This will give your users a default to conform to if they do enable Command.
|
If your keyboard does not have 2 shift keys you should provide a working default for `IS_COMMAND`, even when you have set `COMMAND_ENABLE = no`. This will give your users a default to conform to if they do enable Command.
|
||||||
|
|
||||||
## Custom Keyboard Programming
|
## Custom Keyboard Programming
|
||||||
@ -242,7 +238,7 @@ As documented on [Customizing Functionality](custom_quantum_functions) you can d
|
|||||||
|
|
||||||
## Non-Production/Handwired Projects
|
## Non-Production/Handwired Projects
|
||||||
|
|
||||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
We're happy to accept any project that uses QMK, including handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||||
|
|
||||||
## Warnings as Errors
|
## Warnings as Errors
|
||||||
|
|
||||||
|
157
docs/keycodes.md
157
docs/keycodes.md
@ -176,11 +176,11 @@ See also: [Basic Keycodes](keycodes_basic)
|
|||||||
|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ |
|
|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ |
|
||||||
|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ |
|
|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ |
|
||||||
|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ |
|
|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ |
|
||||||
|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Super key) |✔ |✔ |✔ |
|
||||||
|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ |
|
|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ |
|
||||||
|`KC_RIGHT_SHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ |
|
|`KC_RIGHT_SHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ |
|
||||||
|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |✔ |✔ |✔ |
|
|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |✔ |✔ |✔ |
|
||||||
|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ |
|
|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Super key) |✔ |✔ |✔ |
|
||||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ |
|
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ |
|
||||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ |
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ |
|
||||||
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ |
|
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ |
|
||||||
@ -404,7 +404,6 @@ See also: [Layer Switching](feature_layers#switching-and-toggling-layers)
|
|||||||
|`DF(layer)` |Set the base (default) layer until the keyboard loses power |
|
|`DF(layer)` |Set the base (default) layer until the keyboard loses power |
|
||||||
|`PDF(layer)` |Set the base (default) layer in EEPROM |
|
|`PDF(layer)` |Set the base (default) layer in EEPROM |
|
||||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
|`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)`|
|
|`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)`|
|
||||||
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|
||||||
|`TG(layer)` |Toggle `layer` on or off |
|
|`TG(layer)` |Toggle `layer` on or off |
|
||||||
@ -658,58 +657,74 @@ See also: [Mouse Keys](features/mouse_keys)
|
|||||||
|
|
||||||
See also: [Modifier Keys](feature_advanced_keycodes#modifier-keys)
|
See also: [Modifier Keys](feature_advanced_keycodes#modifier-keys)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------|----------------------------------|------------------------------------------------------|
|
|----------|-------------------------------|-------------------------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` |
|
|`LCG(kc)` | |Hold Left Control and Left GUI and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||||
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and Left GUI and press `kc` |
|
|`LSG(kc)` | |Hold Left Shift and Left GUI and press `kc` |
|
||||||
|`LAG(kc)` | |Hold Left Alt and Left 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` |
|
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||||
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|
|`RCA(kc)` | |Hold Right Control and Right Alt and press `kc` |
|
||||||
|`KC_MEH` | |Left Control, Shift and Alt |
|
|`RCG(kc)` | |Hold Right Control and Right GUI and press `kc` |
|
||||||
|`KC_HYPR` | |Left Control, Shift, Alt and GUI |
|
|`RSA(kc)` | |Hold Right Shift and Right Alt and press `kc` |
|
||||||
|
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|
||||||
|
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|
||||||
|
|`RCSG(kc)`| |Hold Right Control, Right Shift and Right GUI and press `kc` |
|
||||||
|
|`RCAG(kc)`| |Hold Right Control, Right Alt and Right GUI and press `kc` |
|
||||||
|
|`RSAG(kc)`| |Hold Right Shift, Right Alt and Right GUI and press `kc` |
|
||||||
|
|`MEH(kc)` | |Hold Left Control, Left Shift and Left Alt and press `kc` |
|
||||||
|
|`HYPR(kc)`| |Hold Left Control, Left Shift, Left Alt and Left GUI and press `kc`|
|
||||||
|
|`KC_MEH` | |Left Control, Left Shift and Left Alt |
|
||||||
|
|`KC_HYPR` | |Left Control, Left Shift, Left Alt and Left GUI |
|
||||||
|
|
||||||
## Mod-Tap Keys {#mod-tap-keys}
|
## Mod-Tap Keys {#mod-tap-keys}
|
||||||
|
|
||||||
See also: [Mod-Tap](mod_tap)
|
See also: [Mod-Tap](mod_tap)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|-------------|-----------------------------------------------------------------|--------------------------------------------------------------|
|
|-------------|-----------------------------------------------------------------|---------------------------------------------------------------------------|
|
||||||
|`MT(mod, kc)`| |`mod` when held, `kc` when tapped |
|
|`MT(mod, kc)`| |`mod` when held, `kc` when tapped |
|
||||||
|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)` |`ALT_T(kc)`, `LOPT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)` |`GUI_T(kc)`, `LCMD_T(kc)`, `LWIN_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped |
|
|`LCS_T(kc)` | |Left Control and Left Shift when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Left Alt when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped |
|
|`LCG_T(kc)` | |Left Control and Left GUI when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped |
|
||||||
|`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|`LSG_T(kc)` | |Left Shift and Left GUI when held, `kc` when tapped |
|
||||||
|`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped |
|
|`LAG_T(kc)` | |Left Alt and Left GUI when held, `kc` when tapped |
|
||||||
|`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped |
|
|`LCSG_T(kc)` | |Left Control, Left Shift and Left GUI when held, `kc` when tapped |
|
||||||
|`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped |
|
|`LCAG_T(kc)` | |Left Control, Left Alt and Left GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LSAG_T(kc)` | |Left Shift, Left Alt and Left GUI when held, `kc` when tapped |
|
||||||
|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped |
|
|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped |
|
||||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
||||||
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped |
|
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
||||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
|`RCA_T(kc)` | |Right Control and Right Alt when held, `kc` when tapped |
|
||||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped |
|
|`RCG_T(kc)` | |Right Control and Right GUI when held, `kc` when tapped |
|
||||||
|`HYPR_T(kc)` |`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
|`RSA_T(kc)` | |Right Shift and Right Alt when held, `kc` when tapped |
|
||||||
|
|`RSG_T(kc)` | |Right Shift and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RAG_T(kc)` | |Right Alt and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RCSG_T(kc)` | |Right Control, Right Shift and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RCAG_T(kc)` | |Right Control, Right Alt and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RSAG_T(kc)` | |Right Shift, Right Alt and Right GUI when held, `kc` when tapped |
|
||||||
|
|`MEH_T(kc)` | |Left Control, Left Shift and Left Alt when held, `kc` when tapped |
|
||||||
|
|`HYPR_T(kc)` | |Left Control, Left Shift, Left Alt and Left GUI when held, `kc` when tapped|
|
||||||
|
|
||||||
## Tapping Term Keys {#tapping-term-keys}
|
## Tapping Term Keys {#tapping-term-keys}
|
||||||
|
|
||||||
@ -801,13 +816,41 @@ See also: [US ANSI Shifted Symbols](keycodes_us_ansi_shifted)
|
|||||||
|
|
||||||
See also: [One Shot Keys](one_shot_keys)
|
See also: [One Shot Keys](one_shot_keys)
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|--------------------|---------|----------------------------------|
|
|--------------------|---------|---------------------------------------------------------------------|
|
||||||
|`OSM(mod)` | |Hold `mod` for one keypress |
|
|`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status |
|
||||||
|`OSL(layer)` | |Switch to `layer` for one keypress|
|
|`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on |
|
||||||
|`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status |
|
|`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off |
|
||||||
|`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on |
|
|`OSL(layer)` | |Switch to `layer` for one keypress |
|
||||||
|`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off |
|
|`OSM(mod)` | |Hold `mod` for one keypress |
|
||||||
|
|`OS_LCTL` | |Hold Left Control for one keypress |
|
||||||
|
|`OS_LSFT` | |Hold Left Shift for one keypress |
|
||||||
|
|`OS_LALT` | |Hold Left Alt for one keypress |
|
||||||
|
|`OS_LGUI` | |Hold Left GUI for one keypress |
|
||||||
|
|`OS_LCS` | |Hold Left Control and Left Shift for one keypress |
|
||||||
|
|`OS_LCA` | |Hold Left Control and left Alt for one keypress |
|
||||||
|
|`OS_LCG` | |Hold Left Control and Left GUI for one keypress |
|
||||||
|
|`OS_LSA` | |Hold Left Shift and Left Alt for one keypress |
|
||||||
|
|`OS_LSG` | |Hold Left Shift and Left GUI for one keypress |
|
||||||
|
|`OS_LAG` | |Hold Left Alt and Left GUI for one keypress |
|
||||||
|
|`OS_LCSG` | |Hold Left Control, Left Shift and Left GUI for one keypress |
|
||||||
|
|`OS_LCAG` | |Hold Left Control, Left Alt and Left GUI for one keypress |
|
||||||
|
|`OS_LSAG` | |Hold Left Shift, Left Alt and Left GUI for one keypress |
|
||||||
|
|`OS_RCTL` | |Hold Right Control for one keypress |
|
||||||
|
|`OS_RSFT` | |Hold Right Shift for one keypress |
|
||||||
|
|`OS_RALT` | |Hold Right Alt for one keypress |
|
||||||
|
|`OS_RGUI` | |Hold Right GUI for one keypress |
|
||||||
|
|`OS_RCS` | |Hold Right Control and Right Shift for one keypress |
|
||||||
|
|`OS_RCA` | |Hold Right Control and Right Alt for one keypress |
|
||||||
|
|`OS_RCG` | |Hold Right Control and Right GUI for one keypress |
|
||||||
|
|`OS_RSA` | |Hold Right Shift and Right Alt for one keypress |
|
||||||
|
|`OS_RSG` | |Hold Right Shift and Right GUI for one keypress |
|
||||||
|
|`OS_RAG` | |Hold Right Alt and Right GUI for one keypress |
|
||||||
|
|`OS_RCSG` | |Hold Right Control, Right Shift and Right GUI for one keypress |
|
||||||
|
|`OS_RCAG` | |Hold Right Control, Right Alt and Right GUI for one keypress |
|
||||||
|
|`OS_RSAG` | |Hold Right Shift, Right Alt and Right GUI for one keypress |
|
||||||
|
|`OS_MEH` | |Hold Left Control, Left Shift and Left Alt for one keypress |
|
||||||
|
|`OS_HYPR` | |Hold Left Control, Left Shift, Left Alt and Left GUI for one keypress|
|
||||||
|
|
||||||
## Programmable Button Support {#programmable-button}
|
## Programmable Button Support {#programmable-button}
|
||||||
|
|
||||||
|
@ -108,16 +108,16 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
|||||||
|
|
||||||
## Modifiers
|
## Modifiers
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------------|-------------------------------|------------------------------------|
|
|----------------|-------------------------------|-------------------------------------|
|
||||||
|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |
|
|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |
|
|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |
|
||||||
|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |
|
|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |
|
||||||
|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Super key) |
|
||||||
|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |
|
|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RIGHT_SHIFT`|`KC_RSFT` |Right Shift |
|
|`KC_RIGHT_SHIFT`|`KC_RSFT` |Right Shift |
|
||||||
|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |
|
|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |
|
||||||
|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Super key)|
|
||||||
|
|
||||||
## International
|
## International
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ If you own a board from one of the following vendors already, consider asking th
|
|||||||
| Chosfox | Selling L75 wired/wireless boards based on QMK without sources, just `via.json` provided. Raised on discord over multiple weeks without response. |
|
| Chosfox | Selling L75 wired/wireless boards based on QMK without sources, just `via.json` provided. Raised on discord over multiple weeks without response. |
|
||||||
| CIDOO | Selling wired boards based on QMK without sources, just `via.json` provided. |
|
| CIDOO | Selling wired boards based on QMK without sources, just `via.json` provided. |
|
||||||
| ColorReco | Selling tri-mode boards based on QMK without sources. |
|
| ColorReco | Selling tri-mode boards based on QMK without sources. |
|
||||||
|
| CrossDIY | Selling wired boards based on QMK without sources. |
|
||||||
| Darmoshark | Selling wired boards based on QMK without sources, just `via.json` provided. |
|
| Darmoshark | Selling wired boards based on QMK without sources, just `via.json` provided. |
|
||||||
| Epomaker | Lots of historical keyboards with `via.json` but no corresponding sources. Wireless code for a small handful provided, pending core cleanup for QMK upstreaming. Most other boards have source nowhere to be seen. |
|
| Epomaker | Lots of historical keyboards with `via.json` but no corresponding sources. Wireless code for a small handful provided, pending core cleanup for QMK upstreaming. Most other boards have source nowhere to be seen. |
|
||||||
| Ergokbd (IFKB) | At least their crkbd clone ships with QMK+Vial, seemingly refuses to disclose sources despite multiple customers requesting them. |
|
| Ergokbd (IFKB) | At least their crkbd clone ships with QMK+Vial, seemingly refuses to disclose sources despite multiple customers requesting them. |
|
||||||
@ -50,7 +51,7 @@ If you own a board from one of the following vendors already, consider asking th
|
|||||||
| Womier | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
|
| Womier | Selling tri-mode boards based on QMK without sources, attempted upstreaming crippled firmware without wireless. |
|
||||||
| Wuque Studio | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided. |
|
| Wuque Studio | Selling wired and tri-mode boards based on QMK without sources, just `via.json` provided. |
|
||||||
| XVX | Ambiguity on PRs -- marketing says wireless, PR author said wired-only. Seemingly intentionally deceptive. |
|
| XVX | Ambiguity on PRs -- marketing says wireless, PR author said wired-only. Seemingly intentionally deceptive. |
|
||||||
| Yunzii | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
|
| Yunzii | Selling tri-mode boards based on QMK without sources, just `via.json` provided. Refuses to release sources due to proprietary wireless driver, in direct violation of the GPL. |
|
||||||
| Zuoya | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
|
| Zuoya | Selling tri-mode boards based on QMK without sources, just `via.json` provided. |
|
||||||
|
|
||||||
::: danger Violations
|
::: danger Violations
|
||||||
|
@ -9,11 +9,11 @@ The modifiers (`mod`) argument to the `MT()` macro are prefixed with `MOD_`, not
|
|||||||
|`MOD_LCTL`|Left Control |
|
|`MOD_LCTL`|Left Control |
|
||||||
|`MOD_LSFT`|Left Shift |
|
|`MOD_LSFT`|Left Shift |
|
||||||
|`MOD_LALT`|Left Alt |
|
|`MOD_LALT`|Left Alt |
|
||||||
|`MOD_LGUI`|Left GUI (Windows/Command/Meta key) |
|
|`MOD_LGUI`|Left GUI (Windows/Command/Super key) |
|
||||||
|`MOD_RCTL`|Right Control |
|
|`MOD_RCTL`|Right Control |
|
||||||
|`MOD_RSFT`|Right Shift |
|
|`MOD_RSFT`|Right Shift |
|
||||||
|`MOD_RALT`|Right Alt (AltGr) |
|
|`MOD_RALT`|Right Alt (AltGr) |
|
||||||
|`MOD_RGUI`|Right GUI (Windows/Command/Meta key) |
|
|`MOD_RGUI`|Right GUI (Windows/Command/Super key) |
|
||||||
|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)|
|
|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)|
|
||||||
|`MOD_MEH` |Meh (Left Control, Shift, and Alt) |
|
|`MOD_MEH` |Meh (Left Control, Shift, and Alt) |
|
||||||
|
|
||||||
@ -27,29 +27,38 @@ This key would activate Left Control and Left Shift when held, and send Escape w
|
|||||||
|
|
||||||
For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:
|
For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|------------|-----------------------------------------------------------------|--------------------------------------------------------------|
|
|------------|-----------------------------------------------------------------|---------------------------------------------------------------------------------------|
|
||||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)`|`ALT_T(kc)`, `LOPT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)`|`GUI_T(kc)`, `LCMD_T(kc)`, `LWIN_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
|`LCS_T(kc)` | |Left Control and Left Shift when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Left Alt when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|`LCG_T(kc)` | |Left Control and Left GUI when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped |
|
||||||
|`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|`LSG_T(kc)` | |Left Shift and Left GUI when held, `kc` when tapped |
|
||||||
|`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped |
|
|`LAG_T(kc)` | |Left Alt and Left GUI when held, `kc` when tapped |
|
||||||
|`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped |
|
|`LCSG_T(kc)`| |Left Control, Left Shift and Left GUI when held, `kc` when tapped |
|
||||||
|`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped |
|
|`LCAG_T(kc)`| |Left Control, Left Alt and Left GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LSAG_T(kc)`| |Left Shift, Left Alt and Left GUI when held, `kc` when tapped |
|
||||||
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
||||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
|`RCA_T(kc)` | |Right Control and Right Alt when held, `kc` when tapped |
|
||||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped |
|
|`RCG_T(kc)` | |Right Control and Right GUI when held, `kc` when tapped |
|
||||||
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
|`RSA_T(kc)` | |Right Shift and Right Alt when held, `kc` when tapped |
|
||||||
|
|`RSG_T(kc)` | |Right Shift and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RAG_T(kc)` | |Right Alt and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RCSG_T(kc)`| |Right Control, Right Shift and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RCAG_T(kc)`| |Right Control, Right Alt and Right GUI when held, `kc` when tapped |
|
||||||
|
|`RSAG_T(kc)`| |Right Shift, Right Alt and Right GUI when held, `kc` when tapped |
|
||||||
|
|`MEH_T(kc)` | |Left Control, Left Shift and Left Alt when held, `kc` when tapped |
|
||||||
|
|`HYPR_T(kc)`| |Left Control, Left Shift, Left Alt and Left GUI when held, `kc` when tapped<sup>1</sup>|
|
||||||
|
|
||||||
|
<sup>1. More information on the Hyper key can be found on [this blog post by Brett Terpstra](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/).</sup>
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
|
@ -15,11 +15,49 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
|||||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||||
```
|
```
|
||||||
|
|
||||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap), not the `KC_*` codes.
|
## Keycodes {#keycodes}
|
||||||
* `OSL(layer)` - momentary switch to *layer*.
|
|
||||||
* `OS_ON` - Turns on One Shot keys.
|
|Key |Aliases |Description |
|
||||||
* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
|
|--------------------|---------|---------------------------------------------------------------------|
|
||||||
* `OS_TOGG` - Toggles the one shot key status.
|
|`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status |
|
||||||
|
|`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on |
|
||||||
|
|`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off |
|
||||||
|
|`OSL(layer)` | |Switch to `layer` for one keypress |
|
||||||
|
|`OSM(mod)` | |Hold `mod` for one keypress |
|
||||||
|
|`OS_LCTL` | |Hold Left Control for one keypress |
|
||||||
|
|`OS_LSFT` | |Hold Left Shift for one keypress |
|
||||||
|
|`OS_LALT` | |Hold Left Alt for one keypress |
|
||||||
|
|`OS_LGUI` | |Hold Left GUI for one keypress |
|
||||||
|
|`OS_LCS` | |Hold Left Control and Left Shift for one keypress |
|
||||||
|
|`OS_LCA` | |Hold Left Control and left Alt for one keypress |
|
||||||
|
|`OS_LCG` | |Hold Left Control and Left GUI for one keypress |
|
||||||
|
|`OS_LSA` | |Hold Left Shift and Left Alt for one keypress |
|
||||||
|
|`OS_LSG` | |Hold Left Shift and Left GUI for one keypress |
|
||||||
|
|`OS_LAG` | |Hold Left Alt and Left GUI for one keypress |
|
||||||
|
|`OS_LCSG` | |Hold Left Control, Left Shift and Left GUI for one keypress |
|
||||||
|
|`OS_LCAG` | |Hold Left Control, Left Alt and Left GUI for one keypress |
|
||||||
|
|`OS_LSAG` | |Hold Left Shift, Left Alt and Left GUI for one keypress |
|
||||||
|
|`OS_RCTL` | |Hold Right Control for one keypress |
|
||||||
|
|`OS_RSFT` | |Hold Right Shift for one keypress |
|
||||||
|
|`OS_RALT` | |Hold Right Alt for one keypress |
|
||||||
|
|`OS_RGUI` | |Hold Right GUI for one keypress |
|
||||||
|
|`OS_RCS` | |Hold Right Control and Right Shift for one keypress |
|
||||||
|
|`OS_RCA` | |Hold Right Control and Right Alt for one keypress |
|
||||||
|
|`OS_RCG` | |Hold Right Control and Right GUI for one keypress |
|
||||||
|
|`OS_RSA` | |Hold Right Shift and Right Alt for one keypress |
|
||||||
|
|`OS_RSG` | |Hold Right Shift and Right GUI for one keypress |
|
||||||
|
|`OS_RAG` | |Hold Right Alt and Right GUI for one keypress |
|
||||||
|
|`OS_RCSG` | |Hold Right Control, Right Shift and Right GUI for one keypress |
|
||||||
|
|`OS_RCAG` | |Hold Right Control, Right Alt and Right GUI for one keypress |
|
||||||
|
|`OS_RSAG` | |Hold Right Shift, Right Alt and Right GUI for one keypress |
|
||||||
|
|`OS_MEH` | |Hold Left Control, Left Shift and Left Alt for one keypress |
|
||||||
|
|`OS_HYPR` | |Hold Left Control, Left Shift, Left Alt and Left GUI for one keypress|
|
||||||
|
|
||||||
|
When One Shot keys are turned off, `OSM()` and `OSL()` will behave like normal modifier keys and `MO()`, respectively.
|
||||||
|
|
||||||
|
::: info
|
||||||
|
The `mod` parameter to the `OSM()` keycode must use the `MOD_*` prefix, rather than `KC_*`, eg. `OSM(MOD_LCTL | MOD_LSFT)`.
|
||||||
|
:::
|
||||||
|
|
||||||
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
||||||
|
|
||||||
|
@ -480,6 +480,9 @@ Configures the [LED Matrix](features/led_matrix) feature.
|
|||||||
* `io_delay` <Badge type="info">Number</Badge>
|
* `io_delay` <Badge type="info">Number</Badge>
|
||||||
* The amount of time to wait between row/col selection and col/row pin reading, in microseconds.
|
* The amount of time to wait between row/col selection and col/row pin reading, in microseconds.
|
||||||
* Default: `30` (30 µs)
|
* Default: `30` (30 µs)
|
||||||
|
* `masked` <Badge type="info">Boolean</Badge>
|
||||||
|
* Whether configured intersections should be ignored.
|
||||||
|
* Default: `false`
|
||||||
* `rows` <Badge type="info">Array: Pin</Badge>
|
* `rows` <Badge type="info">Array: Pin</Badge>
|
||||||
* A list of GPIO pins connected to the matrix rows.
|
* A list of GPIO pins connected to the matrix rows.
|
||||||
* Example: `["B0", "B1", "B2"]`
|
* Example: `["B0", "B1", "B2"]`
|
||||||
|
@ -602,7 +602,7 @@ either `"L"`, `"R"`, or `"*"`. Note that if `"layouts"` contains multiple
|
|||||||
layouts, only the first one is read. For example:
|
layouts, only the first one is read. For example:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{"matrix": [5, 6], "x": 0, "y": 5.5, "w": 1.25, "hand", "*"},
|
{"matrix": [5, 6], "x": 0, "y": 5.5, "w": 1.25, "hand": "*"},
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, handedness may be defined functionally with
|
Alternatively, handedness may be defined functionally with
|
||||||
|
@ -55,7 +55,7 @@ const pointing_device_driver_t adns5050_pointing_device_driver = {
|
|||||||
|
|
||||||
static bool powered_down = false;
|
static bool powered_down = false;
|
||||||
|
|
||||||
void adns5050_init(void) {
|
bool adns5050_init(void) {
|
||||||
// Initialize the ADNS serial pins.
|
// Initialize the ADNS serial pins.
|
||||||
gpio_set_pin_output(ADNS5050_SCLK_PIN);
|
gpio_set_pin_output(ADNS5050_SCLK_PIN);
|
||||||
gpio_set_pin_output(ADNS5050_SDIO_PIN);
|
gpio_set_pin_output(ADNS5050_SDIO_PIN);
|
||||||
@ -75,6 +75,8 @@ void adns5050_init(void) {
|
|||||||
// gets the adns ready for write commands
|
// gets the adns ready for write commands
|
||||||
// (for example, setting the dpi).
|
// (for example, setting the dpi).
|
||||||
adns5050_read_burst();
|
adns5050_read_burst();
|
||||||
|
|
||||||
|
return adns5050_check_signature();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform a synchronization with the ADNS.
|
// Perform a synchronization with the ADNS.
|
||||||
@ -220,7 +222,7 @@ uint16_t adns5050_get_cpi(void) {
|
|||||||
return (uint16_t)((cpival & 0b10000) * 125);
|
return (uint16_t)((cpival & 0b10000) * 125);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool adns5050_check_signature(void) {
|
bool __attribute__((weak)) adns5050_check_signature(void) {
|
||||||
uint8_t pid = adns5050_read_reg(REG_PRODUCT_ID);
|
uint8_t pid = adns5050_read_reg(REG_PRODUCT_ID);
|
||||||
uint8_t rid = adns5050_read_reg(REG_REVISION_ID);
|
uint8_t rid = adns5050_read_reg(REG_REVISION_ID);
|
||||||
uint8_t pid2 = adns5050_read_reg(REG_PRODUCT_ID2);
|
uint8_t pid2 = adns5050_read_reg(REG_PRODUCT_ID2);
|
||||||
|
@ -70,12 +70,12 @@ typedef struct {
|
|||||||
int8_t dy;
|
int8_t dy;
|
||||||
} report_adns5050_t;
|
} report_adns5050_t;
|
||||||
|
|
||||||
const pointing_device_driver_t adns5050_pointing_device_driver;
|
extern const pointing_device_driver_t adns5050_pointing_device_driver;
|
||||||
|
|
||||||
// A bunch of functions to implement the ADNS5050-specific serial protocol.
|
// A bunch of functions to implement the ADNS5050-specific serial protocol.
|
||||||
// Note that the "serial.h" driver is insufficient, because it does not
|
// Note that the "serial.h" driver is insufficient, because it does not
|
||||||
// manually manipulate a serial clock signal.
|
// manually manipulate a serial clock signal.
|
||||||
void adns5050_init(void);
|
bool adns5050_init(void);
|
||||||
void adns5050_sync(void);
|
void adns5050_sync(void);
|
||||||
uint8_t adns5050_serial_read(void);
|
uint8_t adns5050_serial_read(void);
|
||||||
void adns5050_serial_write(uint8_t data);
|
void adns5050_serial_write(uint8_t data);
|
||||||
|
@ -115,7 +115,14 @@ uint8_t adns9800_read(uint8_t reg_addr) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void adns9800_init(void) {
|
bool __attribute__((weak)) adns9800_check_signature(void) {
|
||||||
|
if (adns9800_read(REG_Product_ID) != 0x33) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool adns9800_init(void) {
|
||||||
gpio_set_pin_output(ADNS9800_CS_PIN);
|
gpio_set_pin_output(ADNS9800_CS_PIN);
|
||||||
|
|
||||||
spi_init();
|
spi_init();
|
||||||
@ -178,6 +185,8 @@ void adns9800_init(void) {
|
|||||||
adns9800_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0);
|
adns9800_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0);
|
||||||
|
|
||||||
adns9800_set_cpi(ADNS9800_CPI);
|
adns9800_set_cpi(ADNS9800_CPI);
|
||||||
|
|
||||||
|
return adns9800_check_signature();
|
||||||
}
|
}
|
||||||
|
|
||||||
config_adns9800_t adns9800_get_config(void) {
|
config_adns9800_t adns9800_get_config(void) {
|
||||||
|
@ -61,9 +61,9 @@ typedef struct {
|
|||||||
int16_t y;
|
int16_t y;
|
||||||
} report_adns9800_t;
|
} report_adns9800_t;
|
||||||
|
|
||||||
const pointing_device_driver_t adns9800_pointing_device_driver;
|
extern const pointing_device_driver_t adns9800_pointing_device_driver;
|
||||||
|
|
||||||
void adns9800_init(void);
|
bool adns9800_init(void);
|
||||||
config_adns9800_t adns9800_get_config(void);
|
config_adns9800_t adns9800_get_config(void);
|
||||||
void adns9800_set_config(config_adns9800_t);
|
void adns9800_set_config(config_adns9800_t);
|
||||||
uint16_t adns9800_get_cpi(void);
|
uint16_t adns9800_get_cpi(void);
|
||||||
|
@ -135,7 +135,7 @@ report_analog_joystick_t analog_joystick_read(void) {
|
|||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
|
||||||
void analog_joystick_init(void) {
|
bool analog_joystick_init(void) {
|
||||||
gpio_set_pin_input_high(ANALOG_JOYSTICK_X_AXIS_PIN);
|
gpio_set_pin_input_high(ANALOG_JOYSTICK_X_AXIS_PIN);
|
||||||
gpio_set_pin_input_high(ANALOG_JOYSTICK_Y_AXIS_PIN);
|
gpio_set_pin_input_high(ANALOG_JOYSTICK_Y_AXIS_PIN);
|
||||||
|
|
||||||
@ -152,6 +152,8 @@ void analog_joystick_init(void) {
|
|||||||
maxAxisValues[0] = xOrigin + 100;
|
maxAxisValues[0] = xOrigin + 100;
|
||||||
maxAxisValues[1] = yOrigin + 100;
|
maxAxisValues[1] = yOrigin + 100;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) {
|
report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) {
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
# define ANALOG_JOYSTICK_SPEED_MAX 2
|
# define ANALOG_JOYSTICK_SPEED_MAX 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const pointing_device_driver_t analog_joystick_pointing_device_driver;
|
extern const pointing_device_driver_t analog_joystick_pointing_device_driver;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int8_t x;
|
int8_t x;
|
||||||
@ -51,5 +51,5 @@ typedef struct {
|
|||||||
bool button;
|
bool button;
|
||||||
} report_analog_joystick_t;
|
} report_analog_joystick_t;
|
||||||
report_analog_joystick_t analog_joystick_read(void);
|
report_analog_joystick_t analog_joystick_read(void);
|
||||||
void analog_joystick_init(void);
|
bool analog_joystick_init(void);
|
||||||
report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report);
|
report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report);
|
||||||
|
@ -321,7 +321,7 @@ void azoteq_iqs5xx_setup_resolution(void) {
|
|||||||
|
|
||||||
static i2c_status_t azoteq_iqs5xx_init_status = 1;
|
static i2c_status_t azoteq_iqs5xx_init_status = 1;
|
||||||
|
|
||||||
void azoteq_iqs5xx_init(void) {
|
bool azoteq_iqs5xx_init(void) {
|
||||||
i2c_init();
|
i2c_init();
|
||||||
i2c_ping_address(AZOTEQ_IQS5XX_ADDRESS, 1); // wake
|
i2c_ping_address(AZOTEQ_IQS5XX_ADDRESS, 1); // wake
|
||||||
azoteq_iqs5xx_reset_suspend(true, false, true);
|
azoteq_iqs5xx_reset_suspend(true, false, true);
|
||||||
@ -349,67 +349,65 @@ void azoteq_iqs5xx_init(void) {
|
|||||||
azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_gesture_config(true);
|
azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_gesture_config(true);
|
||||||
wait_ms(AZOTEQ_IQS5XX_REPORT_RATE + 1);
|
wait_ms(AZOTEQ_IQS5XX_REPORT_RATE + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return azoteq_iqs5xx_init_status == I2C_STATUS_SUCCESS;
|
||||||
};
|
};
|
||||||
|
|
||||||
report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report) {
|
report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report) {
|
||||||
report_mouse_t temp_report = {0};
|
report_mouse_t temp_report = {0};
|
||||||
|
|
||||||
if (azoteq_iqs5xx_init_status == I2C_STATUS_SUCCESS) {
|
azoteq_iqs5xx_base_data_t base_data = {0};
|
||||||
azoteq_iqs5xx_base_data_t base_data = {0};
|
i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
|
||||||
i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
|
bool ignore_movement = false;
|
||||||
bool ignore_movement = false;
|
|
||||||
|
|
||||||
if (status == I2C_STATUS_SUCCESS) {
|
if (status == I2C_STATUS_SUCCESS) {
|
||||||
#ifdef POINTING_DEVICE_DEBUG
|
#ifdef POINTING_DEVICE_DEBUG
|
||||||
if (base_data.previous_cycle_time > AZOTEQ_IQS5XX_REPORT_RATE) {
|
if (base_data.previous_cycle_time > AZOTEQ_IQS5XX_REPORT_RATE) {
|
||||||
pd_dprintf("IQS5XX - previous cycle time missed, took: %dms\n", base_data.previous_cycle_time);
|
pd_dprintf("IQS5XX - previous cycle time missed, took: %dms\n", base_data.previous_cycle_time);
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (base_data.gesture_events_0.single_tap || base_data.gesture_events_0.press_and_hold) {
|
|
||||||
pd_dprintf("IQS5XX - Single tap/hold.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON1);
|
|
||||||
} else if (base_data.gesture_events_1.two_finger_tap) {
|
|
||||||
pd_dprintf("IQS5XX - Two finger tap.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON2);
|
|
||||||
} else if (base_data.gesture_events_0.swipe_x_neg) {
|
|
||||||
pd_dprintf("IQS5XX - X-.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON4);
|
|
||||||
ignore_movement = true;
|
|
||||||
} else if (base_data.gesture_events_0.swipe_x_pos) {
|
|
||||||
pd_dprintf("IQS5XX - X+.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON5);
|
|
||||||
ignore_movement = true;
|
|
||||||
} else if (base_data.gesture_events_0.swipe_y_neg) {
|
|
||||||
pd_dprintf("IQS5XX - Y-.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON6);
|
|
||||||
ignore_movement = true;
|
|
||||||
} else if (base_data.gesture_events_0.swipe_y_pos) {
|
|
||||||
pd_dprintf("IQS5XX - Y+.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON3);
|
|
||||||
ignore_movement = true;
|
|
||||||
} else if (base_data.gesture_events_1.zoom) {
|
|
||||||
if (AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l) < 0) {
|
|
||||||
pd_dprintf("IQS5XX - Zoom out.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON7);
|
|
||||||
} else if (AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l) > 0) {
|
|
||||||
pd_dprintf("IQS5XX - Zoom in.\n");
|
|
||||||
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON8);
|
|
||||||
}
|
|
||||||
} else if (base_data.gesture_events_1.scroll) {
|
|
||||||
pd_dprintf("IQS5XX - Scroll.\n");
|
|
||||||
temp_report.h = CONSTRAIN_HID(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l));
|
|
||||||
temp_report.v = CONSTRAIN_HID(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
|
|
||||||
}
|
|
||||||
if (base_data.number_of_fingers == 1 && !ignore_movement) {
|
|
||||||
temp_report.x = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l));
|
|
||||||
temp_report.y = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
pd_dprintf("IQS5XX - get report failed, i2c status: %d \n", status);
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
if (base_data.gesture_events_0.single_tap || base_data.gesture_events_0.press_and_hold) {
|
||||||
|
pd_dprintf("IQS5XX - Single tap/hold.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON1);
|
||||||
|
} else if (base_data.gesture_events_1.two_finger_tap) {
|
||||||
|
pd_dprintf("IQS5XX - Two finger tap.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON2);
|
||||||
|
} else if (base_data.gesture_events_0.swipe_x_neg) {
|
||||||
|
pd_dprintf("IQS5XX - X-.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON4);
|
||||||
|
ignore_movement = true;
|
||||||
|
} else if (base_data.gesture_events_0.swipe_x_pos) {
|
||||||
|
pd_dprintf("IQS5XX - X+.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON5);
|
||||||
|
ignore_movement = true;
|
||||||
|
} else if (base_data.gesture_events_0.swipe_y_neg) {
|
||||||
|
pd_dprintf("IQS5XX - Y-.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON6);
|
||||||
|
ignore_movement = true;
|
||||||
|
} else if (base_data.gesture_events_0.swipe_y_pos) {
|
||||||
|
pd_dprintf("IQS5XX - Y+.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON3);
|
||||||
|
ignore_movement = true;
|
||||||
|
} else if (base_data.gesture_events_1.zoom) {
|
||||||
|
if (AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l) < 0) {
|
||||||
|
pd_dprintf("IQS5XX - Zoom out.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON7);
|
||||||
|
} else if (AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l) > 0) {
|
||||||
|
pd_dprintf("IQS5XX - Zoom in.\n");
|
||||||
|
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON8);
|
||||||
|
}
|
||||||
|
} else if (base_data.gesture_events_1.scroll) {
|
||||||
|
pd_dprintf("IQS5XX - Scroll.\n");
|
||||||
|
temp_report.h = CONSTRAIN_HID(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l));
|
||||||
|
temp_report.v = CONSTRAIN_HID(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
|
||||||
|
}
|
||||||
|
if (base_data.number_of_fingers == 1 && !ignore_movement) {
|
||||||
|
temp_report.x = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.x.h, base_data.x.l));
|
||||||
|
temp_report.y = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pd_dprintf("IQS5XX - Init failed, i2c status: %d \n", azoteq_iqs5xx_init_status);
|
pd_dprintf("IQS5XX - get report failed, i2c status: %d \n", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
return temp_report;
|
return temp_report;
|
||||||
|
@ -178,9 +178,9 @@ typedef struct {
|
|||||||
# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE + 1
|
# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE + 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver;
|
extern const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver;
|
||||||
|
|
||||||
void azoteq_iqs5xx_init(void);
|
bool azoteq_iqs5xx_init(void);
|
||||||
i2c_status_t azoteq_iqs5xx_wake(void);
|
i2c_status_t azoteq_iqs5xx_wake(void);
|
||||||
report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report);
|
report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report);
|
||||||
i2c_status_t azoteq_iqs5xx_get_report_rate(azoteq_iqs5xx_report_rate_t *report_rate, azoteq_iqs5xx_charging_modes_t mode, bool end_session);
|
i2c_status_t azoteq_iqs5xx_get_report_rate(azoteq_iqs5xx_report_rate_t *report_rate, azoteq_iqs5xx_charging_modes_t mode, bool end_session);
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool touchpad_init;
|
|
||||||
uint16_t scale_data = CIRQUE_PINNACLE_DEFAULT_SCALE;
|
uint16_t scale_data = CIRQUE_PINNACLE_DEFAULT_SCALE;
|
||||||
|
|
||||||
void cirque_pinnacle_clear_flags(void);
|
void cirque_pinnacle_clear_flags(void);
|
||||||
@ -232,14 +231,14 @@ bool cirque_pinnacle_connected(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Pinnacle-based TM040040/TM035035/TM023023 Functions */
|
/* Pinnacle-based TM040040/TM035035/TM023023 Functions */
|
||||||
void cirque_pinnacle_init(void) {
|
bool cirque_pinnacle_init(void) {
|
||||||
#if defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
|
#if defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
|
||||||
spi_init();
|
spi_init();
|
||||||
#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c)
|
#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c)
|
||||||
i2c_init();
|
i2c_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
touchpad_init = true;
|
bool touchpad_init = true;
|
||||||
|
|
||||||
// send a RESET command now, in case QMK had a soft-reset without a power cycle
|
// send a RESET command now, in case QMK had a soft-reset without a power cycle
|
||||||
RAP_Write(HOSTREG__SYSCONFIG1, HOSTREG__SYSCONFIG1__RESET);
|
RAP_Write(HOSTREG__SYSCONFIG1, HOSTREG__SYSCONFIG1__RESET);
|
||||||
@ -293,6 +292,8 @@ void cirque_pinnacle_init(void) {
|
|||||||
#ifndef CIRQUE_PINNACLE_SKIP_SENSOR_CHECK
|
#ifndef CIRQUE_PINNACLE_SKIP_SENSOR_CHECK
|
||||||
touchpad_init = cirque_pinnacle_connected();
|
touchpad_init = cirque_pinnacle_connected();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return touchpad_init;
|
||||||
}
|
}
|
||||||
|
|
||||||
pinnacle_data_t cirque_pinnacle_read_data(void) {
|
pinnacle_data_t cirque_pinnacle_read_data(void) {
|
||||||
|
@ -112,9 +112,9 @@ typedef struct {
|
|||||||
|
|
||||||
#define cirque_pinnacle_i2c_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
#define cirque_pinnacle_i2c_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
||||||
#define cirque_pinnacle_spi_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
#define cirque_pinnacle_spi_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
||||||
const pointing_device_driver_t cirque_pinnacle_pointing_device_driver;
|
extern const pointing_device_driver_t cirque_pinnacle_pointing_device_driver;
|
||||||
|
|
||||||
void cirque_pinnacle_init(void);
|
bool cirque_pinnacle_init(void);
|
||||||
void cirque_pinnacle_calibrate(void);
|
void cirque_pinnacle_calibrate(void);
|
||||||
void cirque_pinnacle_cursor_smoothing(bool enable);
|
void cirque_pinnacle_cursor_smoothing(bool enable);
|
||||||
pinnacle_data_t cirque_pinnacle_read_data(void);
|
pinnacle_data_t cirque_pinnacle_read_data(void);
|
||||||
|
@ -7,29 +7,22 @@
|
|||||||
#define WRITE_MASK 0x80
|
#define WRITE_MASK 0x80
|
||||||
#define READ_MASK 0xA0
|
#define READ_MASK 0xA0
|
||||||
|
|
||||||
extern bool touchpad_init;
|
|
||||||
|
|
||||||
/* RAP Functions */
|
/* RAP Functions */
|
||||||
// Reads <count> Pinnacle registers starting at <address>
|
// Reads <count> Pinnacle registers starting at <address>
|
||||||
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
||||||
uint8_t cmdByte = READ_MASK | address; // Form the READ command byte
|
uint8_t cmdByte = READ_MASK | address; // Form the READ command byte
|
||||||
if (touchpad_init) {
|
i2c_write_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, NULL, 0, CIRQUE_PINNACLE_TIMEOUT);
|
||||||
i2c_write_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, NULL, 0, CIRQUE_PINNACLE_TIMEOUT);
|
if (i2c_read_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, data, count, CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||||
if (i2c_read_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, data, count, CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
pd_dprintf("error cirque_pinnacle i2c_read_register\n");
|
||||||
pd_dprintf("error cirque_pinnacle i2c_read_register\n");
|
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||||
touchpad_init = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Writes single-byte <data> to <address>
|
// Writes single-byte <data> to <address>
|
||||||
void RAP_Write(uint8_t address, uint8_t data) {
|
void RAP_Write(uint8_t address, uint8_t data) {
|
||||||
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
|
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
|
||||||
|
if (i2c_write_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||||
if (touchpad_init) {
|
pd_dprintf("error cirque_pinnacle i2c_write_register\n");
|
||||||
if (i2c_write_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||||
pd_dprintf("error cirque_pinnacle i2c_write_register\n");
|
|
||||||
touchpad_init = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,40 +7,35 @@
|
|||||||
#define READ_MASK 0xA0
|
#define READ_MASK 0xA0
|
||||||
#define FILLER_BYTE 0xFC
|
#define FILLER_BYTE 0xFC
|
||||||
|
|
||||||
extern bool touchpad_init;
|
|
||||||
|
|
||||||
/* RAP Functions */
|
/* RAP Functions */
|
||||||
// Reads <count> Pinnacle registers starting at <address>
|
// Reads <count> Pinnacle registers starting at <address>
|
||||||
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
||||||
uint8_t cmdByte = READ_MASK | address; // Form the READ command byte
|
uint8_t cmdByte = READ_MASK | address; // Form the READ command byte
|
||||||
if (touchpad_init) {
|
|
||||||
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
|
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
|
||||||
spi_write(cmdByte); // write command byte, receive filler
|
spi_write(cmdByte); // write command byte, receive filler
|
||||||
spi_write(FILLER_BYTE); // write & receive filler
|
spi_write(FILLER_BYTE); // write & receive filler
|
||||||
spi_write(FILLER_BYTE); // write & receive filler
|
spi_write(FILLER_BYTE); // write & receive filler
|
||||||
for (uint8_t i = 0; i < count; i++) {
|
for (uint8_t i = 0; i < count; i++) {
|
||||||
data[i] = spi_write(FILLER_BYTE); // write filler, receive data on the third filler send
|
data[i] = spi_write(FILLER_BYTE); // write filler, receive data on the third filler send
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pd_dprintf("error cirque_pinnacle spi_start read\n");
|
|
||||||
touchpad_init = false;
|
|
||||||
}
|
}
|
||||||
spi_stop();
|
} else {
|
||||||
|
pd_dprintf("error cirque_pinnacle spi_start read\n");
|
||||||
|
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||||
}
|
}
|
||||||
|
spi_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Writes single-byte <data> to <address>
|
// Writes single-byte <data> to <address>
|
||||||
void RAP_Write(uint8_t address, uint8_t data) {
|
void RAP_Write(uint8_t address, uint8_t data) {
|
||||||
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
|
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
|
||||||
|
|
||||||
if (touchpad_init) {
|
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
|
||||||
if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
|
spi_write(cmdByte);
|
||||||
spi_write(cmdByte);
|
spi_write(data);
|
||||||
spi_write(data);
|
} else {
|
||||||
} else {
|
pd_dprintf("error cirque_pinnacle spi_start write\n");
|
||||||
pd_dprintf("error cirque_pinnacle spi_start write\n");
|
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||||
touchpad_init = false;
|
|
||||||
}
|
|
||||||
spi_stop();
|
|
||||||
}
|
}
|
||||||
|
spi_stop();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,15 @@ const pointing_device_driver_t paw3204_pointing_device_driver = {
|
|||||||
.get_cpi = paw3204_get_cpi,
|
.get_cpi = paw3204_get_cpi,
|
||||||
};
|
};
|
||||||
|
|
||||||
void paw3204_init(void) {
|
uint8_t read_pid_paw3204(void) {
|
||||||
|
return paw3204_read_reg(REG_PID1);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool __attribute__((weak)) paw3204_check_signature(void) {
|
||||||
|
return (read_pid_paw3204() == 0x30);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool paw3204_init(void) {
|
||||||
gpio_set_pin_output(PAW3204_SCLK_PIN); // setclockpin to output
|
gpio_set_pin_output(PAW3204_SCLK_PIN); // setclockpin to output
|
||||||
gpio_set_pin_input_high(PAW3204_SDIO_PIN); // set datapin input high
|
gpio_set_pin_input_high(PAW3204_SDIO_PIN); // set datapin input high
|
||||||
|
|
||||||
@ -69,6 +77,8 @@ void paw3204_init(void) {
|
|||||||
paw3204_read_reg(0x01); // read id2
|
paw3204_read_reg(0x01); // read id2
|
||||||
// PAW3204_write_reg(REG_SETUP,0x06); // dont reset sensor and set cpi 1600
|
// PAW3204_write_reg(REG_SETUP,0x06); // dont reset sensor and set cpi 1600
|
||||||
paw3204_write_reg(REG_IMGTRASH, 0x32); // write image trashhold
|
paw3204_write_reg(REG_IMGTRASH, 0x32); // write image trashhold
|
||||||
|
|
||||||
|
return paw3204_check_signature();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t paw3204_serial_read(void) {
|
uint8_t paw3204_serial_read(void) {
|
||||||
@ -175,10 +185,6 @@ uint16_t paw3204_get_cpi(void) {
|
|||||||
return cpival;
|
return cpival;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t read_pid_paw3204(void) {
|
|
||||||
return paw3204_read_reg(REG_PID1);
|
|
||||||
}
|
|
||||||
|
|
||||||
report_mouse_t paw3204_get_report(report_mouse_t mouse_report) {
|
report_mouse_t paw3204_get_report(report_mouse_t mouse_report) {
|
||||||
report_paw3204_t data = paw3204_read();
|
report_paw3204_t data = paw3204_read();
|
||||||
if (data.isMotion) {
|
if (data.isMotion) {
|
||||||
|
@ -41,7 +41,7 @@ typedef struct {
|
|||||||
bool isMotion;
|
bool isMotion;
|
||||||
} report_paw3204_t;
|
} report_paw3204_t;
|
||||||
|
|
||||||
const pointing_device_driver_t paw3204_pointing_device_driver;
|
extern const pointing_device_driver_t paw3204_pointing_device_driver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the sensor so it is in a working state and ready to
|
* @brief Initializes the sensor so it is in a working state and ready to
|
||||||
@ -50,7 +50,7 @@ const pointing_device_driver_t paw3204_pointing_device_driver;
|
|||||||
* @return true Initialization was a success
|
* @return true Initialization was a success
|
||||||
* @return false Initialization failed, do not proceed operation
|
* @return false Initialization failed, do not proceed operation
|
||||||
*/
|
*/
|
||||||
void paw3204_init(void);
|
bool paw3204_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reads and clears the current delta, and motion register values on the
|
* @brief Reads and clears the current delta, and motion register values on the
|
||||||
|
@ -82,9 +82,12 @@ i2c_status_t read_pimoroni_trackball(pimoroni_data_t *data) {
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak)) void pimoroni_trackball_device_init(void) {
|
__attribute__((weak)) bool pimoroni_trackball_device_init(void) {
|
||||||
i2c_init();
|
i2c_init();
|
||||||
pimoroni_trackball_set_rgbw(0x00, 0x00, 0x00, 0x00);
|
uint8_t rgbw_data[4] = {0};
|
||||||
|
i2c_status_t status = i2c_write_register(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LED_RED, rgbw_data, sizeof(rgbw_data), PIMORONI_TRACKBALL_TIMEOUT);
|
||||||
|
|
||||||
|
return (status == I2C_STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale) {
|
int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale) {
|
||||||
|
@ -50,9 +50,9 @@ typedef struct {
|
|||||||
uint8_t click;
|
uint8_t click;
|
||||||
} pimoroni_data_t;
|
} pimoroni_data_t;
|
||||||
|
|
||||||
const pointing_device_driver_t pimoroni_trackball_pointing_device_driver;
|
extern const pointing_device_driver_t pimoroni_trackball_pointing_device_driver;
|
||||||
|
|
||||||
void pimoroni_trackball_device_init(void);
|
bool pimoroni_trackball_device_init(void);
|
||||||
void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
|
void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
|
||||||
int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale);
|
int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale);
|
||||||
uint16_t pimoroni_trackball_get_cpi(void);
|
uint16_t pimoroni_trackball_get_cpi(void);
|
||||||
|
@ -30,7 +30,7 @@ const pointing_device_driver_t pmw3320_pointing_device_drivera = {
|
|||||||
.get_cpi = pmw3320_get_cpi,
|
.get_cpi = pmw3320_get_cpi,
|
||||||
};
|
};
|
||||||
|
|
||||||
void pmw3320_init(void) {
|
bool pmw3320_init(void) {
|
||||||
// Initialize sensor serial pins.
|
// Initialize sensor serial pins.
|
||||||
gpio_set_pin_output(PMW3320_SCLK_PIN);
|
gpio_set_pin_output(PMW3320_SCLK_PIN);
|
||||||
gpio_set_pin_output(PMW3320_SDIO_PIN);
|
gpio_set_pin_output(PMW3320_SDIO_PIN);
|
||||||
@ -56,6 +56,8 @@ void pmw3320_init(void) {
|
|||||||
pmw3320_write_reg(REG_Led_Control, 0x4);
|
pmw3320_write_reg(REG_Led_Control, 0x4);
|
||||||
// Disable rest mode
|
// Disable rest mode
|
||||||
pmw3320_write_reg(REG_Performance, 0x80);
|
pmw3320_write_reg(REG_Performance, 0x80);
|
||||||
|
|
||||||
|
return pmw3320_check_signature();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform a synchronization with sensor.
|
// Perform a synchronization with sensor.
|
||||||
@ -192,7 +194,7 @@ void pmw3320_set_cpi(uint16_t cpi) {
|
|||||||
pmw3320_write_reg(REG_Resolution, 0x20 | cpival);
|
pmw3320_write_reg(REG_Resolution, 0x20 | cpival);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool pmw3320_check_signature(void) {
|
bool __attribute__((weak)) pmw3320_check_signature(void) {
|
||||||
uint8_t pid = pmw3320_read_reg(REG_Product_ID);
|
uint8_t pid = pmw3320_read_reg(REG_Product_ID);
|
||||||
uint8_t pid2 = pmw3320_read_reg(REG_Inverse_Product_ID);
|
uint8_t pid2 = pmw3320_read_reg(REG_Inverse_Product_ID);
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@ typedef struct {
|
|||||||
int8_t dy;
|
int8_t dy;
|
||||||
} report_pmw3320_t;
|
} report_pmw3320_t;
|
||||||
|
|
||||||
const pointing_device_driver_t pmw3320_pointing_device_driver;
|
extern const pointing_device_driver_t pmw3320_pointing_device_driver;
|
||||||
|
|
||||||
// A bunch of functions to implement the PMW3320-specific serial protocol.
|
// A bunch of functions to implement the PMW3320-specific serial protocol.
|
||||||
// Mostly taken from ADNS5050 driver.
|
// Mostly taken from ADNS5050 driver.
|
||||||
// Note that the "serial.h" driver is insufficient, because it does not
|
// Note that the "serial.h" driver is insufficient, because it does not
|
||||||
// manually manipulate a serial clock signal.
|
// manually manipulate a serial clock signal.
|
||||||
void pmw3320_init(void);
|
bool pmw3320_init(void);
|
||||||
void pmw3320_sync(void);
|
void pmw3320_sync(void);
|
||||||
uint8_t pmw3320_serial_read(void);
|
uint8_t pmw3320_serial_read(void);
|
||||||
void pmw3320_serial_write(uint8_t data);
|
void pmw3320_serial_write(uint8_t data);
|
||||||
|
@ -29,4 +29,4 @@ void pmw33xx_set_cpi(uint8_t sensor, uint16_t cpi) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PID, Inverse PID
|
// PID, Inverse PID
|
||||||
const uint8_t pmw33xx_firmware_signature[2] PROGMEM = {0x42, 0xBD};
|
const uint8_t pmw33xx_firmware_signature[2] PROGMEM = {0x47, 0xB8};
|
||||||
|
@ -102,7 +102,7 @@ uint8_t pmw33xx_read(uint8_t sensor, uint8_t reg_addr) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool pmw33xx_check_signature(uint8_t sensor) {
|
__attribute__((weak)) bool pmw33xx_check_signature(uint8_t sensor) {
|
||||||
uint8_t signature_dump[2] = {
|
uint8_t signature_dump[2] = {
|
||||||
pmw33xx_read(sensor, REG_Product_ID),
|
pmw33xx_read(sensor, REG_Product_ID),
|
||||||
pmw33xx_read(sensor, REG_Inverse_Product_ID),
|
pmw33xx_read(sensor, REG_Inverse_Product_ID),
|
||||||
@ -236,8 +236,8 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) {
|
|||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pmw33xx_init_wrapper(void) {
|
bool pmw33xx_init_wrapper(void) {
|
||||||
pmw33xx_init(0);
|
return pmw33xx_init(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pmw33xx_set_cpi_wrapper(uint16_t cpi) {
|
void pmw33xx_set_cpi_wrapper(uint16_t cpi) {
|
||||||
|
@ -106,7 +106,7 @@ STATIC_ASSERT(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.motio
|
|||||||
|
|
||||||
#define pmw3360_pointing_device_driver pmw33xx_pointing_device_driver;
|
#define pmw3360_pointing_device_driver pmw33xx_pointing_device_driver;
|
||||||
#define pmw3389_pointing_device_driver pmw33xx_pointing_device_driver;
|
#define pmw3389_pointing_device_driver pmw33xx_pointing_device_driver;
|
||||||
const pointing_device_driver_t pmw33xx_pointing_device_driver;
|
extern const pointing_device_driver_t pmw33xx_pointing_device_driver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the given sensor so it is in a working state and ready to
|
* @brief Initializes the given sensor so it is in a working state and ready to
|
||||||
@ -177,7 +177,7 @@ uint8_t pmw33xx_read(uint8_t sensor, uint8_t reg_addr);
|
|||||||
*/
|
*/
|
||||||
bool pmw33xx_write(uint8_t sensor, uint8_t reg_addr, uint8_t data);
|
bool pmw33xx_write(uint8_t sensor, uint8_t reg_addr, uint8_t data);
|
||||||
|
|
||||||
void pmw33xx_init_wrapper(void);
|
bool pmw33xx_init_wrapper(void);
|
||||||
void pmw33xx_set_cpi_wrapper(uint16_t cpi);
|
void pmw33xx_set_cpi_wrapper(uint16_t cpi);
|
||||||
uint16_t pmw33xx_get_cpi_wrapper(void);
|
uint16_t pmw33xx_get_cpi_wrapper(void);
|
||||||
report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report);
|
report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report);
|
||||||
|
@ -8,3 +8,4 @@
|
|||||||
#define I2C_DRIVER I2CD1
|
#define I2C_DRIVER I2CD1
|
||||||
#define OLED_BRIGHTNESS 128
|
#define OLED_BRIGHTNESS 128
|
||||||
#define OLED_FONT_H "keyboards/1upkeyboards/pi50/lib/glcdfont.c"
|
#define OLED_FONT_H "keyboards/1upkeyboards/pi50/lib/glcdfont.c"
|
||||||
|
#define RGB_MATRIX_MODE_NAME_ENABLE
|
||||||
|
@ -18,43 +18,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined(RGB_MATRIX_EFFECT)
|
|
||||||
# undef RGB_MATRIX_EFFECT
|
|
||||||
#endif // defined(RGB_MATRIX_EFFECT)
|
|
||||||
|
|
||||||
#define RGB_MATRIX_EFFECT(x) RGB_MATRIX_EFFECT_##x,
|
|
||||||
enum {
|
|
||||||
RGB_MATRIX_EFFECT_NONE,
|
|
||||||
#include "rgb_matrix_effects.inc"
|
|
||||||
#undef RGB_MATRIX_EFFECT
|
|
||||||
#ifdef RGB_MATRIX_CUSTOM_KB
|
|
||||||
# include "rgb_matrix_kb.inc"
|
|
||||||
#endif
|
|
||||||
#ifdef RGB_MATRIX_CUSTOM_USER
|
|
||||||
# include "rgb_matrix_user.inc"
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#define RGB_MATRIX_EFFECT(x) \
|
|
||||||
case RGB_MATRIX_EFFECT_##x: \
|
|
||||||
return #x;
|
|
||||||
const char* rgb_matrix_name(uint8_t effect) {
|
|
||||||
switch (effect) {
|
|
||||||
case RGB_MATRIX_EFFECT_NONE:
|
|
||||||
return "NONE";
|
|
||||||
#include "rgb_matrix_effects.inc"
|
|
||||||
#undef RGB_MATRIX_EFFECT
|
|
||||||
#ifdef RGB_MATRIX_CUSTOM_KB
|
|
||||||
# include "rgb_matrix_kb.inc"
|
|
||||||
#endif
|
|
||||||
#ifdef RGB_MATRIX_CUSTOM_USER
|
|
||||||
# include "rgb_matrix_user.inc"
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
return "UNKNOWN";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef OLED_ENABLE
|
#ifdef OLED_ENABLE
|
||||||
|
|
||||||
static uint32_t oled_logo_timer = 0;
|
static uint32_t oled_logo_timer = 0;
|
||||||
@ -148,7 +111,7 @@ void user_oled_magic(void) {
|
|||||||
oled_write_P(led_state.num_lock ? PSTR("Num(x) ") : PSTR("Num( ) "), false);
|
oled_write_P(led_state.num_lock ? PSTR("Num(x) ") : PSTR("Num( ) "), false);
|
||||||
oled_write_P(led_state.scroll_lock ? PSTR("Scrl(x)") : PSTR("Scrl( )"), false);
|
oled_write_P(led_state.scroll_lock ? PSTR("Scrl(x)") : PSTR("Scrl( )"), false);
|
||||||
|
|
||||||
char *mode_name = strdup(rgb_matrix_name(rgb_matrix_get_mode()));
|
char *mode_name = strdup(rgb_matrix_get_mode_name(rgb_matrix_get_mode()));
|
||||||
if (mode_name != NULL) {
|
if (mode_name != NULL) {
|
||||||
int len = strlen(mode_name);
|
int len = strlen(mode_name);
|
||||||
bool capitalize_next = true;
|
bool capitalize_next = true;
|
||||||
|
@ -89,9 +89,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
|||||||
if (IS_MOUSEKEY_BUTTON(keycode)) {
|
if (IS_MOUSEKEY_BUTTON(keycode)) {
|
||||||
report_mouse_t currentReport = pointing_device_get_report();
|
report_mouse_t currentReport = pointing_device_get_report();
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
|
currentReport.buttons |= 1 << (keycode - QK_MOUSE_BUTTON_1);
|
||||||
} else {
|
} else {
|
||||||
currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
|
currentReport.buttons &= ~(1 << (keycode - QK_MOUSE_BUTTON_1));
|
||||||
}
|
}
|
||||||
pointing_device_set_report(currentReport);
|
pointing_device_set_report(currentReport);
|
||||||
pointing_device_send();
|
pointing_device_send();
|
||||||
|
@ -101,7 +101,7 @@ LAYOUT( /* Tab */
|
|||||||
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R
|
_______, _______, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ LAYOUT( /* Tab */
|
|||||||
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, _______,
|
_______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R
|
_______, _______, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,8 +42,7 @@
|
|||||||
"qmk": {
|
"qmk": {
|
||||||
"tap_keycode_delay": 10
|
"tap_keycode_delay": 10
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_all": {
|
"LAYOUT_all": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -29,13 +29,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_MAIN] = LAYOUT(
|
[_MAIN] = LAYOUT(
|
||||||
//┌────────┬────────┬────────┐┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐┌────────┬────────┬────────┐
|
//┌────────┬────────┬────────┐┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐┌────────┬────────┬────────┐
|
||||||
_______, KC_WH_U, _______, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_MINS, KC_EQL, KC_GRV,
|
_______, MS_WHLU, _______, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_MINS, KC_EQL, KC_GRV,
|
||||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||||
KC_BTN1, KC_WH_D, KC_BTN2, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_LBRC, KC_RBRC, KC_BSLS,
|
MS_BTN1, MS_WHLD, MS_BTN2, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||||
KC_MS_U, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_UP,
|
MS_UP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_UP,
|
||||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||||
KC_MS_L, KC_MS_D, KC_MS_R, 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_LEFT, KC_DOWN, KC_RIGHT,
|
MS_LEFT, MS_DOWN, MS_RGHT, 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_LEFT, KC_DOWN, KC_RIGHT,
|
||||||
//└────────┴────────┴────────┘└────────┴────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┴────────┴────────┴────────┘└────────┴────────┴────────┘
|
//└────────┴────────┴────────┘└────────┴────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┴────────┴────────┴────────┘└────────┴────────┴────────┘
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, RAISE, LOWER, XXXXXXX
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, RAISE, LOWER, XXXXXXX
|
||||||
// └────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┘
|
// └────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┘
|
||||||
@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//┌────────┬────────┬────────┐┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐┌────────┬────────┬────────┐
|
//┌────────┬────────┬────────┐┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐┌────────┬────────┬────────┐
|
||||||
_______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU,
|
_______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||||
_______, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, MS_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"manufacturer": "Louis Dalibard",
|
"manufacturer": "Louis Dalibard",
|
||||||
"keyboard_name": "ai",
|
"keyboard_name": "ai",
|
||||||
"maintainer": "make42",
|
"maintainer": "make42",
|
||||||
"bootloader": "caterina",
|
"development_board": "promicro",
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"features": {
|
"features": {
|
||||||
"bootmagic": true,
|
"bootmagic": true,
|
||||||
@ -14,7 +14,6 @@
|
|||||||
"cols": ["F5", "F6", "F7", "B1"],
|
"cols": ["F5", "F6", "F7", "B1"],
|
||||||
"rows": ["D0", "D4", "C6", "D7", "D1"]
|
"rows": ["D0", "D4", "C6", "D7", "D1"]
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
|
||||||
"usb": {
|
"usb": {
|
||||||
"device_version": "1.0.0",
|
"device_version": "1.0.0",
|
||||||
"pid": "0x0000",
|
"pid": "0x0000",
|
||||||
|
@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
[2] = LAYOUT( /* Mousekeys and Numpad */
|
[2] = LAYOUT( /* Mousekeys and Numpad */
|
||||||
KC_NO, _______, _______, _______, _______, _______, _______, KC_NUM, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______,
|
KC_NO, _______, _______, _______, _______, _______, _______, KC_NUM, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______,
|
||||||
KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______,
|
KC_NO, _______, MS_BTN1, MS_UP, MS_BTN2, MS_WHLU, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______,
|
||||||
TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______,
|
TO(1), _______, MS_LEFT, MS_DOWN, MS_RGHT, MS_WHLD, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______,
|
||||||
TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL,
|
TO(1), _______, MS_ACL0, MS_ACL1, MS_ACL2, MS_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_ESC , QK_BOOT, _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
KC_ESC , QK_BOOT, _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
_______ , KC_F11 , KC_F12 , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , _______ ,
|
_______ , KC_F11 , KC_F12 , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , _______ ,
|
||||||
_______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______ ,
|
_______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______ ,
|
||||||
_______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MS_L , KC_MS_D , KC_MS_U , KC_MS_R , _______
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , MS_LEFT , MS_DOWN , MS_UP , MS_RGHT , _______
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,8 +7,12 @@
|
|||||||
"vid": "0xFFFE",
|
"vid": "0xFFFE",
|
||||||
"pid": "0x000C",
|
"pid": "0x000C",
|
||||||
"device_version": "1.0.4",
|
"device_version": "1.0.4",
|
||||||
"suspend_wakeup_delay": 400,
|
"suspend_wakeup_delay": 400
|
||||||
"force_nkro": true
|
},
|
||||||
|
"host": {
|
||||||
|
"default": {
|
||||||
|
"nkro": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"processor": "WB32FQ95",
|
"processor": "WB32FQ95",
|
||||||
"bootloader": "wb32-dfu",
|
"bootloader": "wb32-dfu",
|
||||||
|
@ -7,8 +7,12 @@
|
|||||||
"vid": "0xFFFE",
|
"vid": "0xFFFE",
|
||||||
"pid": "0x000D",
|
"pid": "0x000D",
|
||||||
"device_version": "1.0.3",
|
"device_version": "1.0.3",
|
||||||
"suspend_wakeup_delay": 400,
|
"suspend_wakeup_delay": 400
|
||||||
"force_nkro": true
|
},
|
||||||
|
"host": {
|
||||||
|
"default": {
|
||||||
|
"nkro": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"processor": "WB32FQ95",
|
"processor": "WB32FQ95",
|
||||||
"bootloader": "wb32-dfu",
|
"bootloader": "wb32-dfu",
|
||||||
|
@ -7,8 +7,12 @@
|
|||||||
"vid": "0xFFFE",
|
"vid": "0xFFFE",
|
||||||
"pid": "0x0010",
|
"pid": "0x0010",
|
||||||
"device_version": "1.0.1",
|
"device_version": "1.0.1",
|
||||||
"suspend_wakeup_delay": 400,
|
"suspend_wakeup_delay": 400
|
||||||
"force_nkro": true
|
},
|
||||||
|
"host": {
|
||||||
|
"default": {
|
||||||
|
"nkro": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"processor": "WB32FQ95",
|
"processor": "WB32FQ95",
|
||||||
"bootloader": "wb32-dfu",
|
"bootloader": "wb32-dfu",
|
||||||
|
@ -7,8 +7,12 @@
|
|||||||
"vid": "0xFFFE",
|
"vid": "0xFFFE",
|
||||||
"pid": "0x000E",
|
"pid": "0x000E",
|
||||||
"device_version": "1.0.2",
|
"device_version": "1.0.2",
|
||||||
"suspend_wakeup_delay": 400,
|
"suspend_wakeup_delay": 400
|
||||||
"force_nkro": true
|
},
|
||||||
|
"host": {
|
||||||
|
"default": {
|
||||||
|
"nkro": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"processor": "WB32FQ95",
|
"processor": "WB32FQ95",
|
||||||
"bootloader": "wb32-dfu",
|
"bootloader": "wb32-dfu",
|
||||||
|
@ -71,8 +71,7 @@
|
|||||||
"pin": "D3"
|
"pin": "D3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -45,8 +45,7 @@
|
|||||||
"rows": ["D4", "B4", "B5"]
|
"rows": ["D4", "B4", "B5"]
|
||||||
},
|
},
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -5,8 +5,12 @@
|
|||||||
"usb": {
|
"usb": {
|
||||||
"vid": "0x00D8",
|
"vid": "0x00D8",
|
||||||
"pid": "0x6068",
|
"pid": "0x6068",
|
||||||
"device_version": "0.0.1",
|
"device_version": "0.0.1"
|
||||||
"force_nkro": true
|
},
|
||||||
|
"host": {
|
||||||
|
"default": {
|
||||||
|
"nkro": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"backlight": true,
|
"backlight": true,
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
"rows": ["E6", "B3"]
|
"rows": ["E6", "B3"]
|
||||||
},
|
},
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -25,8 +25,7 @@
|
|||||||
"qmk": {
|
"qmk": {
|
||||||
"tap_keycode_delay": 50
|
"tap_keycode_delay": 50
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -31,8 +31,7 @@
|
|||||||
"ws2812": {
|
"ws2812": {
|
||||||
"pin": "D3"
|
"pin": "D3"
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
if (index == 0) { /* First encoder */
|
if (index == 0) { /* First encoder */
|
||||||
if (clockwise) {
|
if (clockwise) {
|
||||||
tap_code(KC_MS_WH_UP);
|
tap_code(MS_WHLU);
|
||||||
} else {
|
} else {
|
||||||
tap_code(KC_MS_WH_DOWN);
|
tap_code(MS_WHLD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -10,7 +10,7 @@ enum layers {
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[BASE] = LAYOUT(
|
[BASE] = LAYOUT(
|
||||||
KC_VOLU, 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_EQL, KC_PSCR, KC_DEL,
|
KC_VOLU, 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_EQL, KC_PSCR, KC_DEL,
|
||||||
KC_VOLD, KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, RM_NEXT, KC_BTN1, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC,
|
KC_VOLD, KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, RM_NEXT, MS_BTN1, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC,
|
||||||
KC_MPLY, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, C(KC_C), C(KC_V), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_MPLY, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, C(KC_C), C(KC_V), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
KC_MNXT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, C(KC_Z), C(KC_Y), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
KC_MNXT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, C(KC_Z), C(KC_Y), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_MPRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_HOME,
|
KC_MPRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_HOME,
|
||||||
@ -20,6 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
#if defined(ENCODER_MAP_ENABLE)
|
#if defined(ENCODER_MAP_ENABLE)
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
[BASE] = { ENCODER_CCW_CW(RM_HUEU, RM_HUED), ENCODER_CCW_CW(KC_WH_U, KC_WH_D) },
|
[BASE] = { ENCODER_CCW_CW(RM_HUEU, RM_HUED), ENCODER_CCW_CW(MS_WHLU, MS_WHLD) },
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,8 +18,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
[_LAYERB] = LAYOUT_5x16(
|
[_LAYERB] = LAYOUT_5x16(
|
||||||
KC_ESC ,RM_TOGG,RM_PREV ,RM_NEXT ,RM_VALD ,RM_VALU ,RM_SPDD ,RM_SPDU ,RM_HUED ,RM_HUEU ,RM_SATD ,RM_SATU ,
|
KC_ESC ,RM_TOGG,RM_PREV ,RM_NEXT ,RM_VALD ,RM_VALU ,RM_SPDD ,RM_SPDU ,RM_HUED ,RM_HUEU ,RM_SATD ,RM_SATU ,
|
||||||
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_P ,KC_EQL ,
|
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,MS_BTN1 ,MS_UP ,MS_BTN2 ,KC_P ,KC_EQL ,
|
||||||
KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_SCLN ,KC_QUOT ,
|
KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,MS_LEFT ,MS_DOWN ,MS_RGHT ,KC_SCLN ,KC_QUOT ,
|
||||||
KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
|
KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_MUTE ,KC_RBRC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
|
||||||
KC_LBRC,KC_PSCR,KC_CAPS ,_______ ,KC_LGUI ,KC_LALT ,KC_SPC ,KC_END ,KC_HOME ,KC_ENT ,KC_BSPC ,_______ ,KC_INS ,KC_DEL ,KC_BSLS ,KC_RBRC
|
KC_LBRC,KC_PSCR,KC_CAPS ,_______ ,KC_LGUI ,KC_LALT ,KC_SPC ,KC_END ,KC_HOME ,KC_ENT ,KC_BSPC ,_______ ,KC_INS ,KC_DEL ,KC_BSLS ,KC_RBRC
|
||||||
),
|
),
|
||||||
|
@ -5,8 +5,12 @@
|
|||||||
"usb": {
|
"usb": {
|
||||||
"vid": "0x416B",
|
"vid": "0x416B",
|
||||||
"pid": "0x0081",
|
"pid": "0x0081",
|
||||||
"device_version": "0.0.1",
|
"device_version": "0.0.1"
|
||||||
"force_nkro": true
|
},
|
||||||
|
"host": {
|
||||||
|
"default": {
|
||||||
|
"nkro": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"rgb_matrix": {
|
"rgb_matrix": {
|
||||||
"animations": {
|
"animations": {
|
||||||
|
@ -203,8 +203,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
|
[_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
|
||||||
KC_NUM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___,
|
KC_NUM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___,
|
||||||
KC_SCRL, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR,
|
KC_SCRL, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR,
|
||||||
KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U,
|
KC_CAPS, MS_BTN5, MS_BTN4, MS_BTN3, MS_BTN2, MS_ACL0, MS_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, MS_WHLU,
|
||||||
_______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D,
|
_______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, MS_UP, MS_WHLD,
|
||||||
_______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
|
_______, _______, _______, _______, _______, MS_BTN1, MS_BTN1, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_RGHT
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
"rows": ["D2", "D3", "D1", "D0", "D4"]
|
"rows": ["D2", "D3", "D1", "D0", "D4"]
|
||||||
},
|
},
|
||||||
"diode_direction": "ROW2COL",
|
"diode_direction": "ROW2COL",
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -31,9 +31,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|||||||
}
|
}
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
if (clockwise) {
|
if (clockwise) {
|
||||||
tap_code(KC_WH_U);
|
tap_code(MS_WHLU);
|
||||||
} else {
|
} else {
|
||||||
tap_code(KC_WH_D);
|
tap_code(MS_WHLD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -31,9 +31,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|||||||
}
|
}
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
if (clockwise) {
|
if (clockwise) {
|
||||||
tap_code(KC_WH_U);
|
tap_code(MS_WHLU);
|
||||||
} else {
|
} else {
|
||||||
tap_code(KC_WH_D);
|
tap_code(MS_WHLD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -25,8 +25,7 @@
|
|||||||
"pin": "D2"
|
"pin": "D2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -39,8 +39,7 @@
|
|||||||
"pin": "D2"
|
"pin": "D2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -38,8 +38,7 @@
|
|||||||
"ws2812": {
|
"ws2812": {
|
||||||
"pin": "D3"
|
"pin": "D3"
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -53,8 +53,7 @@
|
|||||||
"alternating": true
|
"alternating": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -37,8 +37,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT(
|
||||||
_______, KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL,
|
_______, 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_BTN2, KC_Q , KC_W , KC_E , KC_R , KC_T, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC,
|
_______, MS_BTN2, 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_BTN1, KC_A , KC_S , KC_D , KC_F , KC_G, _______, _______, KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS,
|
_______, MS_BTN1, KC_A , KC_S , KC_D , KC_F , KC_G, _______, _______, KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS,
|
||||||
_______, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B, KC_LALT, MO(2) , _______, KC_DEL , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
_______, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B, KC_LALT, MO(2) , _______, KC_DEL , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
||||||
KC_LSFT, _LG_ESC, KC_TAB , MO(1) , _______, KC_ENT, _RC_SPC, _RS_BSP
|
KC_LSFT, _LG_ESC, KC_TAB , MO(1) , _______, KC_ENT, _RC_SPC, _RS_BSP
|
||||||
),
|
),
|
||||||
@ -79,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[2] = LAYOUT(
|
[2] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, MS_WHLL, MS_WHLD, MS_WHLU, MS_WHLR, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2
|
_______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
"levels": 7,
|
"levels": 7,
|
||||||
"max_brightness": 150
|
"max_brightness": 150
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layout_aliases": {
|
"layout_aliases": {
|
||||||
"LAYOUT_rev41lp": "LAYOUT"
|
"LAYOUT_rev41lp": "LAYOUT"
|
||||||
},
|
},
|
||||||
|
@ -21,6 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "bajjak.h"
|
#include "bajjak.h"
|
||||||
|
|
||||||
|
bool bajjak_left_led_1 = 0;
|
||||||
|
bool bajjak_left_led_2 = 0;
|
||||||
|
bool bajjak_left_led_3 = 0;
|
||||||
|
|
||||||
extern inline void bajjak_board_led_on(void);
|
extern inline void bajjak_board_led_on(void);
|
||||||
extern inline void bajjak_right_led_1_on(void);
|
extern inline void bajjak_right_led_1_on(void);
|
||||||
extern inline void bajjak_right_led_2_on(void);
|
extern inline void bajjak_right_led_2_on(void);
|
||||||
|
@ -66,9 +66,9 @@ inline void bajjak_right_led_3_off(void) { gpio_set_pin_input(B7); gpio_write_
|
|||||||
inline void bajjak_right_led_off(uint8_t led) { gpio_set_pin_input(led+4); gpio_write_pin_low(led+4); }
|
inline void bajjak_right_led_off(uint8_t led) { gpio_set_pin_input(led+4); gpio_write_pin_low(led+4); }
|
||||||
|
|
||||||
#ifdef LEFT_LEDS
|
#ifdef LEFT_LEDS
|
||||||
bool bajjak_left_led_1;
|
extern bool bajjak_left_led_1;
|
||||||
bool bajjak_left_led_2;
|
extern bool bajjak_left_led_2;
|
||||||
bool bajjak_left_led_3;
|
extern bool bajjak_left_led_3;
|
||||||
|
|
||||||
inline void bajjak_left_led_1_on(void) { bajjak_left_led_1 = 1; }
|
inline void bajjak_left_led_1_on(void) { bajjak_left_led_1 = 1; }
|
||||||
inline void bajjak_left_led_2_on(void) { bajjak_left_led_2 = 1; }
|
inline void bajjak_left_led_2_on(void) { bajjak_left_led_2 = 1; }
|
||||||
|
@ -122,9 +122,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// Left hand Right hand
|
// Left hand Right hand
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
KC_SLEP, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, KC_EJCT, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
|
KC_SLEP, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, KC_EJCT, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||||
XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, MS_BTN1, MS_UP, MS_BTN2, MS_WHLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
QK_BOOT, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
QK_BOOT, XXXXXXX, MS_LEFT, MS_DOWN, MS_RGHT, MS_WHLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
_______, XXXXXXX, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX, DF(SYMB), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
_______, XXXXXXX, MS_WHLL, XXXXXXX, MS_WHLR, XXXXXXX, DF(SYMB), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
_______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, DF(BASE),
|
_______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, DF(BASE),
|
||||||
_______, _______, _______, _______,
|
_______, _______, _______, _______,
|
||||||
_______, _______,
|
_______, _______,
|
||||||
|
@ -128,9 +128,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// Left hand Right hand
|
// Left hand Right hand
|
||||||
KC_SLEP, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_EJCT,
|
KC_SLEP, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_EJCT,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_TAB, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______,
|
KC_TAB, _______, MS_BTN1, MS_UP, MS_BTN2, MS_WHLU, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_CAPS, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______,
|
KC_CAPS, _______, MS_LEFT, MS_DOWN, MS_RGHT, MS_WHLD, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_LSFT, _______, KC_WH_L, _______, KC_WH_R, _______, _______, _______, _______, _______, _______, _______,
|
KC_LSFT, _______, MS_WHLL, _______, MS_WHLR, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_LCTL, KC_LGUI, ALT_T(KC_INSERT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, _______, _______, QK_BOOT,
|
KC_LCTL, KC_LGUI, ALT_T(KC_INSERT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, _______, _______, QK_BOOT,
|
||||||
CTL_T(KC_ESC), KC_LALT, KC_RGUI, CTL_T(KC_RALT),
|
CTL_T(KC_ESC), KC_LALT, KC_RGUI, CTL_T(KC_RALT),
|
||||||
KC_HOME, KC_PGUP,
|
KC_HOME, KC_PGUP,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"manufacturer": "Balloondog",
|
"manufacturer": "Balloondog",
|
||||||
"keyboard_name": "TR90PM",
|
"keyboard_name": "TR90PM",
|
||||||
"maintainer": "balloondogcaps",
|
"maintainer": "balloondogcaps",
|
||||||
"bootloader": "caterina",
|
"development_board": "promicro",
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"features": {
|
"features": {
|
||||||
"bootmagic": true,
|
"bootmagic": true,
|
||||||
@ -14,7 +14,6 @@
|
|||||||
"cols": ["D1", "D0", "D4"],
|
"cols": ["D1", "D0", "D4"],
|
||||||
"rows": ["C6", "D7", "E6"]
|
"rows": ["C6", "D7", "E6"]
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
|
||||||
"usb": {
|
"usb": {
|
||||||
"device_version": "1.0.0",
|
"device_version": "1.0.0",
|
||||||
"pid": "0x0002",
|
"pid": "0x0002",
|
||||||
|
@ -47,8 +47,7 @@
|
|||||||
"ws2812": {
|
"ws2812": {
|
||||||
"pin": "D3"
|
"pin": "D3"
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -30,8 +30,7 @@
|
|||||||
"pin": "D2"
|
"pin": "D2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -56,8 +56,7 @@
|
|||||||
"twinkle": true
|
"twinkle": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processor": "atmega32u4",
|
"development_board": "promicro",
|
||||||
"bootloader": "caterina",
|
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
"layout": [
|
||||||
|
@ -1,37 +1,12 @@
|
|||||||
/**
|
// Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Handedness. */
|
|
||||||
#define SPLIT_HAND_PIN GP29
|
|
||||||
#define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left.
|
|
||||||
|
|
||||||
/* CRC. */
|
|
||||||
#define CRC8_USE_TABLE
|
|
||||||
#define CRC8_OPTIMIZE_SPEED
|
|
||||||
|
|
||||||
/* Cirque trackpad. */
|
|
||||||
#define SPI_SCK_PIN GP22
|
#define SPI_SCK_PIN GP22
|
||||||
#define SPI_MOSI_PIN GP23
|
#define SPI_MOSI_PIN GP23
|
||||||
#define SPI_MISO_PIN GP20
|
#define SPI_MISO_PIN GP20
|
||||||
#define POINTING_DEVICE_CS_PIN GP21
|
#define POINTING_DEVICE_CS_PIN GP21
|
||||||
|
|
||||||
/* Reset. */
|
|
||||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
|
||||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
/**
|
// Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define HAL_USE_SPI TRUE
|
#define HAL_USE_SPI TRUE
|
||||||
|
@ -1,22 +1,17 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Dilemma (3x5+2) Assembled",
|
"bootloader": "rp2040",
|
||||||
"features": {
|
|
||||||
"bootmagic": true,
|
|
||||||
"mousekey": true,
|
|
||||||
"extrakey": true,
|
|
||||||
"pointing_device": true
|
|
||||||
},
|
|
||||||
"matrix_pins": {
|
"matrix_pins": {
|
||||||
"cols": ["GP8", "GP9", "GP7", "GP6", "GP27"],
|
"cols": ["GP8", "GP9", "GP7", "GP6", "GP27"],
|
||||||
"rows": ["GP4", "GP5", "GP28", "GP26"]
|
"rows": ["GP4", "GP5", "GP28", "GP26"]
|
||||||
},
|
},
|
||||||
"diode_direction": "ROW2COL",
|
"processor": "RP2040",
|
||||||
"split": {
|
"split": {
|
||||||
"enabled": true,
|
"handedness": {
|
||||||
|
"pin": "GP29"
|
||||||
|
},
|
||||||
"serial": {
|
"serial": {
|
||||||
|
"driver": "vendor",
|
||||||
"pin": "GP1"
|
"pin": "GP1"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"processor": "RP2040",
|
|
||||||
"bootloader": "rp2040"
|
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
/**
|
// Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include_next <mcuconf.h>
|
#include_next <mcuconf.h>
|
||||||
|
@ -1,7 +1 @@
|
|||||||
AUDIO_SUPPORTED = no # Audio is not supported
|
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
|
||||||
RGB_MATRIX_SUPPORTED = no # RGB matrix is supported and enabled by default
|
|
||||||
RGBLIGHT_SUPPORTED = no # RGB underglow is supported, but not enabled by default
|
|
||||||
|
|
||||||
SERIAL_DRIVER = vendor
|
|
||||||
|
|
||||||
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi # Assembled version uses SPI.
|
|
||||||
|
5
keyboards/bastardkb/dilemma/3x5_2/config.h
Normal file
5
keyboards/bastardkb/dilemma/3x5_2/config.h
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define SPLIT_HAND_PIN_LOW_IS_LEFT
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user