mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-07 03:31:25 +00:00
Compare commits
117 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6c2e58eb4d | ||
![]() |
96ee4c21a3 | ||
![]() |
efce9bc9b5 | ||
![]() |
7a939ec218 | ||
![]() |
542440eac5 | ||
![]() |
717b6b8f13 | ||
![]() |
a954b568ea | ||
![]() |
65cce9105d | ||
![]() |
43853b337b | ||
![]() |
8474aee2fe | ||
![]() |
865c29f4de | ||
![]() |
507c948ed8 | ||
![]() |
f0b04b2a3a | ||
![]() |
20555f9a33 | ||
![]() |
56ad3a5f43 | ||
![]() |
5ef94415aa | ||
![]() |
d67e94fb1b | ||
![]() |
f797d4f49d | ||
![]() |
ad4233d078 | ||
![]() |
2c34b480fc | ||
![]() |
e295937e54 | ||
![]() |
a08ee4a737 | ||
![]() |
5ef7919022 | ||
![]() |
6b38dc17cd | ||
![]() |
71b88b333d | ||
![]() |
108a2fceca | ||
![]() |
e1b42d5252 | ||
![]() |
558fee16e4 | ||
![]() |
4b295009ae | ||
![]() |
3d61139567 | ||
![]() |
15e7c8f37a | ||
![]() |
8d29bd07c2 | ||
![]() |
75b899d87d | ||
![]() |
56650d7a2b | ||
![]() |
0f182ef674 | ||
![]() |
bf28a303c6 | ||
![]() |
e814bb9453 | ||
![]() |
8644965c81 | ||
![]() |
e19991ec46 | ||
![]() |
e4e5bca6bc | ||
![]() |
7827f9fbe3 | ||
![]() |
d9f2d8d241 | ||
![]() |
058919923a | ||
![]() |
d151b1bef5 | ||
![]() |
baf0060761 | ||
![]() |
036745e853 | ||
![]() |
b99e2f7230 | ||
![]() |
e68389a11e | ||
![]() |
0842f54a27 | ||
![]() |
584ad807cc | ||
![]() |
e92f1fb220 | ||
![]() |
67c97da654 | ||
![]() |
0b33318a24 | ||
![]() |
a9a2b699cd | ||
![]() |
49a4ec538d | ||
![]() |
711b109246 | ||
![]() |
6347d18a2d | ||
![]() |
d7b09ad560 | ||
![]() |
52e2af7753 | ||
![]() |
fef7932e55 | ||
![]() |
48a421bb10 | ||
![]() |
f09f3643ad | ||
![]() |
5b0039aae6 | ||
![]() |
18f5a04eaa | ||
![]() |
3db5ffcfb7 | ||
![]() |
0dee127b29 | ||
![]() |
21ca1eb7ae | ||
![]() |
a1a5869ef8 | ||
![]() |
bc5c5e3251 | ||
![]() |
f39e08e2ba | ||
![]() |
eeac23464b | ||
![]() |
35785a6c49 | ||
![]() |
ea5ef746e2 | ||
![]() |
8c8f4b3c06 | ||
![]() |
55e1acec07 | ||
![]() |
584e390703 | ||
![]() |
2c152c3425 | ||
![]() |
8a06238054 | ||
![]() |
25d7ac9ecc | ||
![]() |
681d6a29e6 | ||
![]() |
d044a6bcc2 | ||
![]() |
091eac1fce | ||
![]() |
02bed7e5a5 | ||
![]() |
7919848324 | ||
![]() |
a4436b32df | ||
![]() |
0f9c1c57b4 | ||
![]() |
e725cdbc4b | ||
![]() |
9ef5dcd113 | ||
![]() |
ef6e9a5312 | ||
![]() |
5bdeb7dad1 | ||
![]() |
8347a6688f | ||
![]() |
3ce196ff52 | ||
![]() |
0326355edc | ||
![]() |
94f1aade5c | ||
![]() |
fe54121cfa | ||
![]() |
77b2742863 | ||
![]() |
021c3cc125 | ||
![]() |
0b3a54f9f2 | ||
![]() |
7808f8f56b | ||
![]() |
e3c8c23d91 | ||
![]() |
b4cabc3cf7 | ||
![]() |
e8e3c7addb | ||
![]() |
608ce78778 | ||
![]() |
977433443a | ||
![]() |
5bf8248dd3 | ||
![]() |
7b36727ed1 | ||
![]() |
f096e5a3f3 | ||
![]() |
53c6fa5de7 | ||
![]() |
97168180cf | ||
![]() |
57374489da | ||
![]() |
1d145c7511 | ||
![]() |
820202cd53 | ||
![]() |
4c773971a7 | ||
![]() |
9e8e9af485 | ||
![]() |
4f60946513 | ||
![]() |
ac9318c78f | ||
![]() |
76cf8dff93 |
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)
|
||||
|
||||
# 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
|
||||
# Split on ":", padding with empty strings to avoid indexing issues
|
||||
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
|
||||
# for each of them
|
||||
define PARSE_ALL_KEYBOARDS
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell $(QMK_BIN) list-keyboards --no-resolve-defaults)))
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell $(QMK_BIN) list-keyboards)))
|
||||
endef
|
||||
|
||||
# Prints a list of all known keymaps for the given keyboard
|
||||
@@ -447,7 +447,7 @@ git-submodules: git-submodule
|
||||
|
||||
.PHONY: list-keyboards
|
||||
list-keyboards:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '
|
||||
$(QMK_BIN) list-keyboards | tr '\n' ' '
|
||||
|
||||
.PHONY: list-tests
|
||||
list-tests:
|
||||
@@ -455,7 +455,7 @@ list-tests:
|
||||
|
||||
.PHONY: generate-keyboards-file
|
||||
generate-keyboards-file:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults
|
||||
$(QMK_BIN) list-keyboards
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
@@ -29,6 +29,8 @@ QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/logging/debug.c \
|
||||
$(QUANTUM_DIR)/logging/sendchar.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
|
||||
|
||||
@@ -633,6 +635,9 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
|
||||
RAW_ENABLE := yes
|
||||
BOOTMAGIC_ENABLE := yes
|
||||
TRI_LAYER_ENABLE := yes
|
||||
ifeq ($(strip $(VIA_INSECURE)), yes)
|
||||
OPT_DEFS += -DVIA_INSECURE
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RAW_ENABLE)), yes)
|
||||
|
@@ -120,6 +120,7 @@
|
||||
"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_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
|
||||
"MATRIX_MASKED": {"info_key": "matrix_pins.masked", "value_type": "flag"},
|
||||
|
||||
// Mouse Keys
|
||||
"MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"},
|
||||
|
@@ -53,8 +53,8 @@
|
||||
"WS2812_DRIVER": {"info_key": "ws2812.driver"},
|
||||
|
||||
// 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"},
|
||||
"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}
|
||||
}
|
||||
|
@@ -68,6 +68,57 @@
|
||||
"bakeneko80": {
|
||||
"target": "kkatano/bakeneko80"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/elitec": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/splinky_2": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/splinky_3": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"bastardkb/charybdis/3x5/v2/stemcell": {
|
||||
"target": "bastardkb/charybdis/3x5/elitec"
|
||||
},
|
||||
"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": {
|
||||
"target": "bear_face/v1"
|
||||
},
|
||||
@@ -257,44 +308,11 @@
|
||||
"handwired/jscotto/scottostarter": {
|
||||
"target": "handwired/scottokeebs/scottostarter"
|
||||
},
|
||||
"helix/pico/sc/back": {
|
||||
"target": "helix/pico/sc"
|
||||
"helix": {
|
||||
"target": "helix/beta"
|
||||
},
|
||||
"helix/pico/sc/under": {
|
||||
"target": "helix/pico/sc"
|
||||
},
|
||||
"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"
|
||||
"helix/rev2": {
|
||||
"target": "helix/beta"
|
||||
},
|
||||
"honeycomb": {
|
||||
"target": "keyhive/honeycomb"
|
||||
@@ -407,6 +425,9 @@
|
||||
"lfkeyboards/smk65": {
|
||||
"target": "lfkeyboards/smk65/revb"
|
||||
},
|
||||
"ll3macorn/bongopad": {
|
||||
"target": "ll3ma/bongopad"
|
||||
},
|
||||
"m3v3van": {
|
||||
"target": "matthewdias/m3n3van"
|
||||
},
|
||||
@@ -1881,6 +1902,12 @@
|
||||
"kin80": {
|
||||
"target": "kin80/blackpill401"
|
||||
},
|
||||
"kprepublic/cstc40/daughterboard": {
|
||||
"target": "kprepublic/cstc40/rev1"
|
||||
},
|
||||
"kprepublic/cstc40/single_pcb": {
|
||||
"target": "kprepublic/cstc40/rev2"
|
||||
},
|
||||
"kumaokobo/kudox_full": {
|
||||
"target": "kumaokobo/kudox_full/rev1"
|
||||
},
|
||||
@@ -2258,5 +2285,54 @@
|
||||
},
|
||||
"zsa/planck_ez": {
|
||||
"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"
|
||||
},
|
||||
"helix/rev3_4rows": {
|
||||
"target": "helix/rev3"
|
||||
},
|
||||
"helix/rev3_5rows": {
|
||||
"target": "helix/rev3"
|
||||
},
|
||||
"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"},
|
||||
"input_pressed_state": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"io_delay": {"$ref": "./definitions.jsonschema#/unsigned_int"},
|
||||
"masked": {"type": "boolean"},
|
||||
"direct": {
|
||||
"type": "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
|
||||
|
||||
* `DEFAULT_FOLDER`
|
||||
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
||||
* `FIRMWARE_FORMAT`
|
||||
* Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building.
|
||||
* `SRC`
|
||||
|
@@ -2,36 +2,36 @@
|
||||
|
||||
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 |
|
||||
|----------|----------------------------------|-------------------------------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control 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` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|
||||
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||
|`LCG(kc)` | |Hold Left Control and Left 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` |
|
||||
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RCA(kc)` | |Hold Right Control and Right Alt 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)` |`SAGR(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>|
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|-------------------------------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control 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` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||
|`LCG(kc)` | |Hold Left Control and Left GUI and press `kc` |
|
||||
|`LSA(kc)` | |Hold Left Shift and Left Alt 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` |
|
||||
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RCA(kc)` | |Hold Right Control and Right Alt 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>|
|
||||
|
||||
<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>
|
||||
|
||||
|
@@ -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/`.
|
||||
|
||||
|
||||
## 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}
|
||||
|
||||
```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_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off
|
||||
#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:
|
||||
|
||||
```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; }
|
||||
uint16_t pointing_device_driver_get_cpi(void) { return 0; }
|
||||
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
|
||||
|
||||
| Function | Description |
|
||||
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `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_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_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_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_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. |
|
||||
| `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. |
|
||||
| Function | Description |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `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_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_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_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_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. |
|
||||
| `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_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
|
||||
|
@@ -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!
|
||||
|
||||
|
||||
## 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}
|
||||
|
||||
```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_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
|
||||
#define RGB_MATRIX_SLEEP // turn off effects when suspended
|
||||
|
@@ -657,38 +657,38 @@ See also: [Mouse Keys](features/mouse_keys)
|
||||
|
||||
See also: [Modifier Keys](feature_advanced_keycodes#modifier-keys)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|----------------------------------|-------------------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control 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` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|
||||
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||
|`LCG(kc)` | |Hold Left Control and Left 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` |
|
||||
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|
||||
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||
|`RCA(kc)` | |Hold Right Control and Right Alt and press `kc` |
|
||||
|`RCG(kc)` | |Hold Right Control and Right GUI and press `kc` |
|
||||
|`RSA(kc)` |`SAGR(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 |
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|-------------------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control 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` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
|
||||
|`LCG(kc)` | |Hold Left Control and Left GUI and press `kc` |
|
||||
|`LSA(kc)` | |Hold Left Shift and Left Alt 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` |
|
||||
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
|
||||
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||
|`RCA(kc)` | |Hold Right Control and Right Alt 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`|
|
||||
|`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}
|
||||
|
||||
@@ -705,7 +705,7 @@ See also: [Mod-Tap](mod_tap)
|
||||
|`LCA_T(kc)` | |Left Control and Left Alt when held, `kc` when tapped |
|
||||
|`LCG_T(kc)` | |Left Control and Left 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 Left 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 Left GUI when held, `kc` when tapped |
|
||||
|`LCSG_T(kc)` | |Left Control, Left Shift and Left GUI when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)` | |Left Control, Left Alt and Left GUI when held, `kc` when tapped |
|
||||
@@ -717,14 +717,14 @@ See also: [Mod-Tap](mod_tap)
|
||||
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
||||
|`RCA_T(kc)` | |Right Control and Right Alt when held, `kc` when tapped |
|
||||
|`RCG_T(kc)` | |Right Control and Right GUI when held, `kc` when tapped |
|
||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt when held, `kc` when tapped |
|
||||
|`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)` |`ALL_T(kc)` |Left Control, Left Shift, Left Alt and Left GUI 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}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
||||
|`LCA_T(kc)` | |Left Control and Left Alt when held, `kc` when tapped |
|
||||
|`LCG_T(kc)` | |Left Control and Left 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 Left 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 Left GUI when held, `kc` when tapped |
|
||||
|`LCSG_T(kc)`| |Left Control, Left Shift and Left GUI when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)`| |Left Control, Left Alt and Left GUI when held, `kc` when tapped |
|
||||
@@ -49,14 +49,14 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
||||
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
||||
|`RCA_T(kc)` | |Right Control and Right Alt when held, `kc` when tapped |
|
||||
|`RCG_T(kc)` | |Right Control and Right GUI when held, `kc` when tapped |
|
||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt when held, `kc` when tapped |
|
||||
|`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)`|`ALL_T(kc)` |Left Control, Left Shift, Left Alt and Left GUI when held, `kc` when tapped<sup>1</sup>|
|
||||
|`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>
|
||||
|
||||
|
@@ -480,6 +480,9 @@ Configures the [LED Matrix](features/led_matrix) feature.
|
||||
* `io_delay` <Badge type="info">Number</Badge>
|
||||
* The amount of time to wait between row/col selection and col/row pin reading, in microseconds.
|
||||
* 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>
|
||||
* A list of GPIO pins connected to the matrix rows.
|
||||
* Example: `["B0", "B1", "B2"]`
|
||||
|
@@ -55,7 +55,7 @@ const pointing_device_driver_t adns5050_pointing_device_driver = {
|
||||
|
||||
static bool powered_down = false;
|
||||
|
||||
void adns5050_init(void) {
|
||||
bool adns5050_init(void) {
|
||||
// Initialize the ADNS serial pins.
|
||||
gpio_set_pin_output(ADNS5050_SCLK_PIN);
|
||||
gpio_set_pin_output(ADNS5050_SDIO_PIN);
|
||||
@@ -75,6 +75,8 @@ void adns5050_init(void) {
|
||||
// gets the adns ready for write commands
|
||||
// (for example, setting the dpi).
|
||||
adns5050_read_burst();
|
||||
|
||||
return adns5050_check_signature();
|
||||
}
|
||||
|
||||
// Perform a synchronization with the ADNS.
|
||||
@@ -220,7 +222,7 @@ uint16_t adns5050_get_cpi(void) {
|
||||
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 rid = adns5050_read_reg(REG_REVISION_ID);
|
||||
uint8_t pid2 = adns5050_read_reg(REG_PRODUCT_ID2);
|
||||
|
@@ -70,12 +70,12 @@ typedef struct {
|
||||
int8_t dy;
|
||||
} 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.
|
||||
// Note that the "serial.h" driver is insufficient, because it does not
|
||||
// manually manipulate a serial clock signal.
|
||||
void adns5050_init(void);
|
||||
bool adns5050_init(void);
|
||||
void adns5050_sync(void);
|
||||
uint8_t adns5050_serial_read(void);
|
||||
void adns5050_serial_write(uint8_t data);
|
||||
|
@@ -115,7 +115,14 @@ uint8_t adns9800_read(uint8_t reg_addr) {
|
||||
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);
|
||||
|
||||
spi_init();
|
||||
@@ -178,6 +185,8 @@ void adns9800_init(void) {
|
||||
adns9800_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0);
|
||||
|
||||
adns9800_set_cpi(ADNS9800_CPI);
|
||||
|
||||
return adns9800_check_signature();
|
||||
}
|
||||
|
||||
config_adns9800_t adns9800_get_config(void) {
|
||||
|
@@ -61,9 +61,9 @@ typedef struct {
|
||||
int16_t y;
|
||||
} 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);
|
||||
void adns9800_set_config(config_adns9800_t);
|
||||
uint16_t adns9800_get_cpi(void);
|
||||
|
@@ -135,7 +135,7 @@ report_analog_joystick_t analog_joystick_read(void) {
|
||||
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_Y_AXIS_PIN);
|
||||
|
||||
@@ -152,6 +152,8 @@ void analog_joystick_init(void) {
|
||||
maxAxisValues[0] = xOrigin + 100;
|
||||
maxAxisValues[1] = yOrigin + 100;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) {
|
||||
|
@@ -43,7 +43,7 @@
|
||||
# define ANALOG_JOYSTICK_SPEED_MAX 2
|
||||
#endif
|
||||
|
||||
const pointing_device_driver_t analog_joystick_pointing_device_driver;
|
||||
extern const pointing_device_driver_t analog_joystick_pointing_device_driver;
|
||||
|
||||
typedef struct {
|
||||
int8_t x;
|
||||
@@ -51,5 +51,5 @@ typedef struct {
|
||||
bool button;
|
||||
} report_analog_joystick_t;
|
||||
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);
|
||||
|
@@ -321,7 +321,7 @@ void azoteq_iqs5xx_setup_resolution(void) {
|
||||
|
||||
static i2c_status_t azoteq_iqs5xx_init_status = 1;
|
||||
|
||||
void azoteq_iqs5xx_init(void) {
|
||||
bool azoteq_iqs5xx_init(void) {
|
||||
i2c_init();
|
||||
i2c_ping_address(AZOTEQ_IQS5XX_ADDRESS, 1); // wake
|
||||
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);
|
||||
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 temp_report = {0};
|
||||
|
||||
if (azoteq_iqs5xx_init_status == I2C_STATUS_SUCCESS) {
|
||||
azoteq_iqs5xx_base_data_t base_data = {0};
|
||||
i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
|
||||
bool ignore_movement = false;
|
||||
azoteq_iqs5xx_base_data_t base_data = {0};
|
||||
i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
|
||||
bool ignore_movement = false;
|
||||
|
||||
if (status == I2C_STATUS_SUCCESS) {
|
||||
if (status == I2C_STATUS_SUCCESS) {
|
||||
#ifdef POINTING_DEVICE_DEBUG
|
||||
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);
|
||||
}
|
||||
#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);
|
||||
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);
|
||||
}
|
||||
#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 - Init failed, i2c status: %d \n", azoteq_iqs5xx_init_status);
|
||||
pd_dprintf("IQS5XX - get report failed, i2c status: %d \n", status);
|
||||
}
|
||||
|
||||
return temp_report;
|
||||
|
@@ -178,9 +178,9 @@ typedef struct {
|
||||
# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE + 1
|
||||
#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);
|
||||
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);
|
||||
|
@@ -18,7 +18,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
bool touchpad_init;
|
||||
uint16_t scale_data = CIRQUE_PINNACLE_DEFAULT_SCALE;
|
||||
|
||||
void cirque_pinnacle_clear_flags(void);
|
||||
@@ -232,14 +231,14 @@ bool cirque_pinnacle_connected(void) {
|
||||
}
|
||||
|
||||
/* Pinnacle-based TM040040/TM035035/TM023023 Functions */
|
||||
void cirque_pinnacle_init(void) {
|
||||
bool cirque_pinnacle_init(void) {
|
||||
#if defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
|
||||
spi_init();
|
||||
#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c)
|
||||
i2c_init();
|
||||
#endif
|
||||
|
||||
touchpad_init = true;
|
||||
bool touchpad_init = true;
|
||||
|
||||
// send a RESET command now, in case QMK had a soft-reset without a power cycle
|
||||
RAP_Write(HOSTREG__SYSCONFIG1, HOSTREG__SYSCONFIG1__RESET);
|
||||
@@ -293,6 +292,8 @@ void cirque_pinnacle_init(void) {
|
||||
#ifndef CIRQUE_PINNACLE_SKIP_SENSOR_CHECK
|
||||
touchpad_init = cirque_pinnacle_connected();
|
||||
#endif
|
||||
|
||||
return touchpad_init;
|
||||
}
|
||||
|
||||
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_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_cursor_smoothing(bool enable);
|
||||
pinnacle_data_t cirque_pinnacle_read_data(void);
|
||||
|
@@ -7,29 +7,22 @@
|
||||
#define WRITE_MASK 0x80
|
||||
#define READ_MASK 0xA0
|
||||
|
||||
extern bool touchpad_init;
|
||||
|
||||
/* RAP Functions */
|
||||
// Reads <count> Pinnacle registers starting at <address>
|
||||
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
||||
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);
|
||||
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");
|
||||
touchpad_init = false;
|
||||
}
|
||||
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) {
|
||||
pd_dprintf("error cirque_pinnacle i2c_read_register\n");
|
||||
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
// Writes single-byte <data> to <address>
|
||||
void RAP_Write(uint8_t address, uint8_t data) {
|
||||
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
|
||||
|
||||
if (touchpad_init) {
|
||||
if (i2c_write_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||
pd_dprintf("error cirque_pinnacle i2c_write_register\n");
|
||||
touchpad_init = false;
|
||||
}
|
||||
if (i2c_write_register(CIRQUE_PINNACLE_ADDR << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) {
|
||||
pd_dprintf("error cirque_pinnacle i2c_write_register\n");
|
||||
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||
}
|
||||
}
|
||||
|
@@ -7,40 +7,35 @@
|
||||
#define READ_MASK 0xA0
|
||||
#define FILLER_BYTE 0xFC
|
||||
|
||||
extern bool touchpad_init;
|
||||
|
||||
/* RAP Functions */
|
||||
// Reads <count> Pinnacle registers starting at <address>
|
||||
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
|
||||
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)) {
|
||||
spi_write(cmdByte); // write command byte, receive filler
|
||||
spi_write(FILLER_BYTE); // write & receive filler
|
||||
spi_write(FILLER_BYTE); // write & receive filler
|
||||
for (uint8_t i = 0; i < count; i++) {
|
||||
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;
|
||||
|
||||
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(FILLER_BYTE); // write & receive filler
|
||||
spi_write(FILLER_BYTE); // write & receive filler
|
||||
for (uint8_t i = 0; i < count; i++) {
|
||||
data[i] = spi_write(FILLER_BYTE); // write filler, receive data on the third filler send
|
||||
}
|
||||
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>
|
||||
void RAP_Write(uint8_t address, uint8_t data) {
|
||||
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)) {
|
||||
spi_write(cmdByte);
|
||||
spi_write(data);
|
||||
} else {
|
||||
pd_dprintf("error cirque_pinnacle spi_start write\n");
|
||||
touchpad_init = false;
|
||||
}
|
||||
spi_stop();
|
||||
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(data);
|
||||
} else {
|
||||
pd_dprintf("error cirque_pinnacle spi_start write\n");
|
||||
pointing_device_set_status(POINTING_DEVICE_STATUS_FAILED);
|
||||
}
|
||||
spi_stop();
|
||||
}
|
||||
|
@@ -58,7 +58,15 @@ const pointing_device_driver_t paw3204_pointing_device_driver = {
|
||||
.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_input_high(PAW3204_SDIO_PIN); // set datapin input high
|
||||
|
||||
@@ -69,6 +77,8 @@ void paw3204_init(void) {
|
||||
paw3204_read_reg(0x01); // read id2
|
||||
// PAW3204_write_reg(REG_SETUP,0x06); // dont reset sensor and set cpi 1600
|
||||
paw3204_write_reg(REG_IMGTRASH, 0x32); // write image trashhold
|
||||
|
||||
return paw3204_check_signature();
|
||||
}
|
||||
|
||||
uint8_t paw3204_serial_read(void) {
|
||||
@@ -175,10 +185,6 @@ uint16_t paw3204_get_cpi(void) {
|
||||
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_paw3204_t data = paw3204_read();
|
||||
if (data.isMotion) {
|
||||
|
@@ -41,7 +41,7 @@ typedef struct {
|
||||
bool isMotion;
|
||||
} 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
|
||||
@@ -50,7 +50,7 @@ const pointing_device_driver_t paw3204_pointing_device_driver;
|
||||
* @return true Initialization was a success
|
||||
* @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
|
||||
|
@@ -82,9 +82,12 @@ i2c_status_t read_pimoroni_trackball(pimoroni_data_t *data) {
|
||||
return status;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void pimoroni_trackball_device_init(void) {
|
||||
__attribute__((weak)) bool pimoroni_trackball_device_init(void) {
|
||||
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) {
|
||||
|
@@ -50,9 +50,9 @@ typedef struct {
|
||||
uint8_t click;
|
||||
} 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);
|
||||
int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale);
|
||||
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,
|
||||
};
|
||||
|
||||
void pmw3320_init(void) {
|
||||
bool pmw3320_init(void) {
|
||||
// Initialize sensor serial pins.
|
||||
gpio_set_pin_output(PMW3320_SCLK_PIN);
|
||||
gpio_set_pin_output(PMW3320_SDIO_PIN);
|
||||
@@ -56,6 +56,8 @@ void pmw3320_init(void) {
|
||||
pmw3320_write_reg(REG_Led_Control, 0x4);
|
||||
// Disable rest mode
|
||||
pmw3320_write_reg(REG_Performance, 0x80);
|
||||
|
||||
return pmw3320_check_signature();
|
||||
}
|
||||
|
||||
// Perform a synchronization with sensor.
|
||||
@@ -192,7 +194,7 @@ void pmw3320_set_cpi(uint16_t cpi) {
|
||||
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 pid2 = pmw3320_read_reg(REG_Inverse_Product_ID);
|
||||
|
||||
|
@@ -55,13 +55,13 @@ typedef struct {
|
||||
int8_t dy;
|
||||
} 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.
|
||||
// Mostly taken from ADNS5050 driver.
|
||||
// Note that the "serial.h" driver is insufficient, because it does not
|
||||
// manually manipulate a serial clock signal.
|
||||
void pmw3320_init(void);
|
||||
bool pmw3320_init(void);
|
||||
void pmw3320_sync(void);
|
||||
uint8_t pmw3320_serial_read(void);
|
||||
void pmw3320_serial_write(uint8_t data);
|
||||
|
@@ -29,4 +29,4 @@ void pmw33xx_set_cpi(uint8_t sensor, uint16_t cpi) {
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
bool pmw33xx_check_signature(uint8_t sensor) {
|
||||
__attribute__((weak)) bool pmw33xx_check_signature(uint8_t sensor) {
|
||||
uint8_t signature_dump[2] = {
|
||||
pmw33xx_read(sensor, REG_Product_ID),
|
||||
pmw33xx_read(sensor, REG_Inverse_Product_ID),
|
||||
@@ -236,8 +236,8 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) {
|
||||
return report;
|
||||
}
|
||||
|
||||
void pmw33xx_init_wrapper(void) {
|
||||
pmw33xx_init(0);
|
||||
bool pmw33xx_init_wrapper(void) {
|
||||
return pmw33xx_init(0);
|
||||
}
|
||||
|
||||
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 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
|
||||
@@ -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);
|
||||
|
||||
void pmw33xx_init_wrapper(void);
|
||||
bool pmw33xx_init_wrapper(void);
|
||||
void pmw33xx_set_cpi_wrapper(uint16_t cpi);
|
||||
uint16_t pmw33xx_get_cpi_wrapper(void);
|
||||
report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report);
|
||||
|
@@ -8,3 +8,4 @@
|
||||
#define I2C_DRIVER I2CD1
|
||||
#define OLED_BRIGHTNESS 128
|
||||
#define OLED_FONT_H "keyboards/1upkeyboards/pi50/lib/glcdfont.c"
|
||||
#define RGB_MATRIX_MODE_NAME_ENABLE
|
||||
|
@@ -18,49 +18,6 @@
|
||||
#include <ctype.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
|
||||
#if defined(COMMUNITY_MODULES_ENABLE) && __has_include("rgb_matrix_community_modules.inc")
|
||||
# include "rgb_matrix_community_modules.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
|
||||
#if defined(COMMUNITY_MODULES_ENABLE) && __has_include("rgb_matrix_community_modules.inc")
|
||||
# include "rgb_matrix_community_modules.inc"
|
||||
#endif
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
static uint32_t oled_logo_timer = 0;
|
||||
@@ -154,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.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) {
|
||||
int len = strlen(mode_name);
|
||||
bool capitalize_next = true;
|
||||
|
@@ -89,9 +89,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||
if (IS_MOUSEKEY_BUTTON(keycode)) {
|
||||
report_mouse_t currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
currentReport.buttons |= 1 << (keycode - KC_MS_BTN1);
|
||||
currentReport.buttons |= 1 << (keycode - QK_MOUSE_BUTTON_1);
|
||||
} else {
|
||||
currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1));
|
||||
currentReport.buttons &= ~(1 << (keycode - QK_MOUSE_BUTTON_1));
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
pointing_device_send();
|
||||
|
@@ -101,7 +101,7 @@ LAYOUT( /* Tab */
|
||||
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, 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, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, 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": {
|
||||
"tap_keycode_delay": 10
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [
|
||||
|
@@ -29,13 +29,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_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
|
||||
// └────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┘
|
||||
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//┌────────┬────────┬────────┐┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐┌────────┬────────┬────────┐
|
||||
_______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||
_______, KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, MS_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//├────────┼────────┼────────┤├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤├────────┼────────┼────────┤
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"manufacturer": "Louis Dalibard",
|
||||
"keyboard_name": "ai",
|
||||
"maintainer": "make42",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
@@ -14,7 +14,6 @@
|
||||
"cols": ["F5", "F6", "F7", "B1"],
|
||||
"rows": ["D0", "D4", "C6", "D7", "D1"]
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
|
@@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
[2] = LAYOUT( /* Mousekeys and Numpad */
|
||||
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, _______, _______,
|
||||
TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, 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,
|
||||
KC_NO, _______, MS_BTN1, MS_UP, MS_BTN2, MS_WHLU, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______,
|
||||
TO(1), _______, MS_LEFT, MS_DOWN, MS_RGHT, MS_WHLD, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______,
|
||||
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_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_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",
|
||||
"pid": "0x000C",
|
||||
"device_version": "1.0.4",
|
||||
"suspend_wakeup_delay": 400,
|
||||
"force_nkro": true
|
||||
"suspend_wakeup_delay": 400
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"processor": "WB32FQ95",
|
||||
"bootloader": "wb32-dfu",
|
||||
|
@@ -7,8 +7,12 @@
|
||||
"vid": "0xFFFE",
|
||||
"pid": "0x000D",
|
||||
"device_version": "1.0.3",
|
||||
"suspend_wakeup_delay": 400,
|
||||
"force_nkro": true
|
||||
"suspend_wakeup_delay": 400
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"processor": "WB32FQ95",
|
||||
"bootloader": "wb32-dfu",
|
||||
|
@@ -7,8 +7,12 @@
|
||||
"vid": "0xFFFE",
|
||||
"pid": "0x0010",
|
||||
"device_version": "1.0.1",
|
||||
"suspend_wakeup_delay": 400,
|
||||
"force_nkro": true
|
||||
"suspend_wakeup_delay": 400
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"processor": "WB32FQ95",
|
||||
"bootloader": "wb32-dfu",
|
||||
|
@@ -7,8 +7,12 @@
|
||||
"vid": "0xFFFE",
|
||||
"pid": "0x000E",
|
||||
"device_version": "1.0.2",
|
||||
"suspend_wakeup_delay": 400,
|
||||
"force_nkro": true
|
||||
"suspend_wakeup_delay": 400
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"processor": "WB32FQ95",
|
||||
"bootloader": "wb32-dfu",
|
||||
|
@@ -71,8 +71,7 @@
|
||||
"pin": "D3"
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -45,8 +45,7 @@
|
||||
"rows": ["D4", "B4", "B5"]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -5,8 +5,12 @@
|
||||
"usb": {
|
||||
"vid": "0x00D8",
|
||||
"pid": "0x6068",
|
||||
"device_version": "0.0.1",
|
||||
"force_nkro": true
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"backlight": true,
|
||||
|
@@ -15,8 +15,7 @@
|
||||
"rows": ["E6", "B3"]
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -25,8 +25,7 @@
|
||||
"qmk": {
|
||||
"tap_keycode_delay": 50
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -31,8 +31,7 @@
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"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) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_WH_UP);
|
||||
tap_code(MS_WHLU);
|
||||
} else {
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
tap_code(MS_WHLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@@ -10,7 +10,7 @@ enum layers {
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[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_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_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,
|
||||
@@ -20,6 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
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
|
||||
|
@@ -18,8 +18,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
[_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_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_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_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 ,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_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": {
|
||||
"vid": "0x416B",
|
||||
"pid": "0x0081",
|
||||
"device_version": "0.0.1",
|
||||
"force_nkro": true
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"host": {
|
||||
"default": {
|
||||
"nkro": true
|
||||
}
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"animations": {
|
||||
|
@@ -203,8 +203,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_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_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,
|
||||
_______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D,
|
||||
_______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
|
||||
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___, MS_UP, MS_WHLD,
|
||||
_______, _______, _______, _______, _______, MS_BTN1, MS_BTN1, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_RGHT
|
||||
),
|
||||
};
|
||||
|
@@ -27,8 +27,7 @@
|
||||
"rows": ["D2", "D3", "D1", "D0", "D4"]
|
||||
},
|
||||
"diode_direction": "ROW2COL",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -31,9 +31,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
}
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_WH_U);
|
||||
tap_code(MS_WHLU);
|
||||
} else {
|
||||
tap_code(KC_WH_D);
|
||||
tap_code(MS_WHLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@@ -31,9 +31,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
}
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_WH_U);
|
||||
tap_code(MS_WHLU);
|
||||
} else {
|
||||
tap_code(KC_WH_D);
|
||||
tap_code(MS_WHLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@@ -25,8 +25,7 @@
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -39,8 +39,7 @@
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -38,8 +38,7 @@
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -53,8 +53,7 @@
|
||||
"alternating": true
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -37,8 +37,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[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_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_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_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_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(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, MS_WHLL, MS_WHLD, MS_WHLU, MS_WHLR, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2
|
||||
_______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2
|
||||
),
|
||||
};
|
||||
|
@@ -27,8 +27,7 @@
|
||||
"levels": 7,
|
||||
"max_brightness": 150
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layout_aliases": {
|
||||
"LAYOUT_rev41lp": "LAYOUT"
|
||||
},
|
||||
|
@@ -21,6 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#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_right_led_1_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); }
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
bool bajjak_left_led_1;
|
||||
bool bajjak_left_led_2;
|
||||
bool bajjak_left_led_3;
|
||||
extern bool bajjak_left_led_1;
|
||||
extern bool bajjak_left_led_2;
|
||||
extern bool bajjak_left_led_3;
|
||||
|
||||
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; }
|
||||
|
@@ -122,9 +122,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Left hand Right hand
|
||||
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,
|
||||
XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, 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,
|
||||
_______, XXXXXXX, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX, DF(SYMB), 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, MS_LEFT, MS_DOWN, MS_RGHT, MS_WHLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, MS_WHLL, XXXXXXX, MS_WHLR, XXXXXXX, DF(SYMB), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, DF(BASE),
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
|
@@ -128,9 +128,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// 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_TAB, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_LSFT, _______, KC_WH_L, _______, KC_WH_R, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_TAB, _______, MS_BTN1, MS_UP, MS_BTN2, MS_WHLU, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, _______, MS_LEFT, MS_DOWN, MS_RGHT, MS_WHLD, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_LSFT, _______, MS_WHLL, _______, MS_WHLR, _______, _______, _______, _______, _______, _______, _______,
|
||||
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),
|
||||
KC_HOME, KC_PGUP,
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"manufacturer": "Balloondog",
|
||||
"keyboard_name": "TR90PM",
|
||||
"maintainer": "balloondogcaps",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
@@ -14,7 +14,6 @@
|
||||
"cols": ["D1", "D0", "D4"],
|
||||
"rows": ["C6", "D7", "E6"]
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0002",
|
||||
|
@@ -47,8 +47,7 @@
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -30,8 +30,7 @@
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -56,8 +56,7 @@
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"development_board": "promicro",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
|
||||
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Publicw License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "charybdis.h"
|
||||
|
||||
// clang-format off
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
/**
|
||||
* \brief LEDs index.
|
||||
*
|
||||
* ╭────────────────────╮ ╭────────────────────╮
|
||||
* 2 3 8 9 12 30 27 26 21 20
|
||||
* ├────────────────────┤ ├────────────────────┤
|
||||
* 1 4 7 10 13 31 28 25 22 19
|
||||
* ├────────────────────┤ ├────────────────────┤
|
||||
* 0 5 6 11 14 32 29 24 23 18
|
||||
* ╰────────────────────╯ ╰────────────────────╯
|
||||
* 15 16 17 33 34 XX
|
||||
* ╰────────────╯ ╰────────────╯
|
||||
*
|
||||
* Note: the LED config simulates 36 LEDs instead of the actual 35 to prevent
|
||||
* confusion when testing LEDs during assembly when handedness is not set
|
||||
* correctly. Those fake LEDs are bound to the physical top-left corner.
|
||||
*/
|
||||
led_config_t g_led_config = { {
|
||||
/* Key Matrix to LED index. */
|
||||
// Left split.
|
||||
{ 2, 3, 8, 9, 12 }, // Top row
|
||||
{ 1, 4, 7, 10, 13 }, // Middle row
|
||||
{ 0, 5, 6, 11, 14 }, // Bottom row
|
||||
{ 17, NO_LED, 15, 16, NO_LED }, // Thumb cluster
|
||||
// Right split.
|
||||
{ 20, 21, 26, 27, 30 }, // Top row
|
||||
{ 19, 22, 25, 28, 31 }, // Middle row
|
||||
{ 18, 23, 24, 29, 32 }, // Bottom row
|
||||
{ 33, NO_LED, 34, NO_LED, NO_LED }, // Thumb cluster
|
||||
}, {
|
||||
/* LED index to physical position. */
|
||||
// Left split.
|
||||
/* index=0 */ { 0, 42 }, { 0, 21 }, { 0, 0 }, // col 1 (left most)
|
||||
/* index=3 */ { 18, 0 }, { 18, 21 }, { 18, 42 }, // col 2
|
||||
/* index=6 */ { 36, 42 }, { 36, 21 }, { 36, 0 },
|
||||
/* index=9 */ { 54, 0 }, { 54, 21 }, { 54, 42 },
|
||||
/* index=12 */ { 72, 0 }, { 72, 21 }, { 72, 42 },
|
||||
/* index=15 */ { 72, 64 }, { 90, 64 }, { 108, 64 }, // Thumb cluster
|
||||
// Right split.
|
||||
/* index=18 */ { 224, 42 }, { 224, 21 }, { 224, 0 }, // col 10 (right most)
|
||||
/* index=21 */ { 206, 0 }, { 206, 21 }, { 206, 42 }, // col 9
|
||||
/* index=24 */ { 188, 42 }, { 188, 21 }, { 188, 0 },
|
||||
/* index=27 */ { 170, 0 }, { 170, 21 }, { 170, 42 },
|
||||
/* index=30 */ { 152, 0 }, { 152, 21 }, { 152, 42 },
|
||||
/* index=33 */ { 134, 64 }, { 152, 64 }, { 0, 0 },
|
||||
}, {
|
||||
/* LED index to flag. */
|
||||
// Left split.
|
||||
/* index=0 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 1
|
||||
/* index=3 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 2
|
||||
/* index=6 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
|
||||
/* index=9 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
|
||||
/* index=12 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
|
||||
/* index=15 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster
|
||||
// Right split.
|
||||
/* index=18 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 10
|
||||
/* index=21 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 9
|
||||
/* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
|
||||
/* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
|
||||
/* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
|
||||
/* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
|
||||
} };
|
||||
#endif
|
||||
// clang-format on
|
@@ -1,28 +1,9 @@
|
||||
/*
|
||||
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
|
||||
* Copyright 2021 Stefan Kerkmann (@KarlK90)
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Publicw 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/>.
|
||||
*/
|
||||
|
||||
// Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
|
||||
// Copyright 2021 Stefan Kerkmann (@KarlK90)
|
||||
// Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
/* Handedness. */
|
||||
#define SPLIT_HAND_PIN A3 // High -> left, Low -> right.
|
||||
|
||||
/* RGB settings. */
|
||||
#define WS2812_PWM_DRIVER PWMD2
|
||||
#define WS2812_PWM_CHANNEL 2
|
||||
#define WS2812_PWM_PAL_MODE 1
|
||||
@@ -30,14 +11,6 @@
|
||||
#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM1
|
||||
#define WS2812_PWM_DMA_CHANNEL 3
|
||||
|
||||
/* Serial configuration for split keyboard. */
|
||||
#define SERIAL_USART_TX_PIN A9
|
||||
|
||||
/* CRC. */
|
||||
#define CRC8_USE_TABLE
|
||||
#define CRC8_OPTIMIZE_SPEED
|
||||
|
||||
/* SPI config for EEPROM and pmw3360 sensor. */
|
||||
#define SPI_DRIVER SPID1
|
||||
#define SPI_SCK_PIN A5
|
||||
#define SPI_SCK_PAL_MODE 5
|
||||
@@ -46,9 +19,7 @@
|
||||
#define SPI_MISO_PIN A6
|
||||
#define SPI_MISO_PAL_MODE 5
|
||||
|
||||
/* EEPROM config. */
|
||||
#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4
|
||||
|
||||
/* PMW3360 settings. */
|
||||
#define POINTING_DEVICE_CS_PIN B14
|
||||
#define PMW33XX_CS_DIVISOR 64
|
||||
|
@@ -1,21 +1,6 @@
|
||||
/**
|
||||
* Copyright 2020 Nick Brassel (tzarc)
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
// Copyright 2020 Nick Brassel (tzarc)
|
||||
// Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
@@ -1,38 +1,23 @@
|
||||
{
|
||||
"keyboard_name": "Charybdis Nano (3x5) Blackpill",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"shared_endpoint": {
|
||||
"keyboard": true
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"mousekey": true,
|
||||
"extrakey": true,
|
||||
"rgb_matrix": true,
|
||||
"pointing_device": true
|
||||
},
|
||||
"development_board": "blackpill_f411",
|
||||
"eeprom": {
|
||||
"driver": "spi"
|
||||
},
|
||||
"split": {
|
||||
"enabled": true
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "A1",
|
||||
"driver": "pwm"
|
||||
},
|
||||
"build": {
|
||||
"debounce_type": "asym_eager_defer_pk"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["B1", "B10", "B3", "B4", "B5"],
|
||||
"rows": ["A2", "B8", "A8", "B9"]
|
||||
},
|
||||
"diode_direction": "ROW2COL",
|
||||
"development_board": "blackpill_f411"
|
||||
"split": {
|
||||
"handedness": {
|
||||
"pin": "A3"
|
||||
},
|
||||
"serial": {
|
||||
"driver": "usart",
|
||||
"pin": "A9"
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"driver": "pwm",
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
||||
|
@@ -1,22 +1,7 @@
|
||||
/*
|
||||
* Copyright 2020 Nick Brassel (tzarc)
|
||||
* Copyright 2021 Stefan Kerkmann (@KarlK90)
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
// Copyright 2020 Nick Brassel (tzarc)
|
||||
// Copyright 2021 Stefan Kerkmann (@KarlK90)
|
||||
// Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
@@ -30,11 +15,6 @@
|
||||
#undef STM32_SPI_USE_SPI1
|
||||
#define STM32_SPI_USE_SPI1 TRUE
|
||||
|
||||
#undef STM32_SPI_SPI1_RX_DMA_STREAM
|
||||
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
|
||||
#undef STM32_SPI_SPI1_TX_DMA_STREAM
|
||||
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
|
||||
|
||||
#undef STM32_SERIAL_USE_USART1
|
||||
#define STM32_SERIAL_USE_USART1 TRUE
|
||||
|
||||
|
@@ -1,3 +0,0 @@
|
||||
# Charybdis Nano (3x5) BlackPill
|
||||
|
||||
An ergonomic keyboard with integrated trackball, with BlackPill (STM32F411) mod.
|
@@ -1,5 +0,0 @@
|
||||
AUDIO_SUPPORTED = no # Audio is not supported
|
||||
|
||||
POINTING_DEVICE_DRIVER = pmw3360
|
||||
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
|
||||
SERIAL_DRIVER = usart
|
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* 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
|
||||
|
||||
/* Trackball angle adjustment. */
|
||||
#define ROTATIONAL_TRANSFORM_ANGLE -25
|
5
keyboards/bastardkb/charybdis/3x5/elitec/config.h
Normal file
5
keyboards/bastardkb/charybdis/3x5/elitec/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 POINTING_DEVICE_CS_PIN F0
|
19
keyboards/bastardkb/charybdis/3x5/elitec/keyboard.json
Normal file
19
keyboards/bastardkb/charybdis/3x5/elitec/keyboard.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"development_board": "elite_c",
|
||||
"matrix_pins": {
|
||||
"cols": ["F5", "B6", "D7", "E6", "B4"],
|
||||
"rows": ["F7", "C6", "D4", "B5"]
|
||||
},
|
||||
"pin_compatible": "elite_c",
|
||||
"split": {
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
}
|
||||
}
|
@@ -1,15 +1,58 @@
|
||||
{
|
||||
"manufacturer": "Bastard Keyboards",
|
||||
"url": "https://bastardkb.com/charybdis-nano",
|
||||
"usb": {
|
||||
"pid": "0x1832",
|
||||
"vid": "0xA8F8"
|
||||
"keyboard_name": "Charybdis Nano (3x5)",
|
||||
"diode_direction": "ROW2COL",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"extrakey": true,
|
||||
"mousekey": false,
|
||||
"pointing_device": true,
|
||||
"rgb_matrix": true
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812",
|
||||
"layout": [
|
||||
{"matrix": [2, 0], "x": 0, "y": 42, "flags": 4},
|
||||
{"matrix": [1, 0], "x": 0, "y": 21, "flags": 4},
|
||||
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 18, "y": 0, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 18, "y": 21, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 18, "y": 42, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 36, "y": 42, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 36, "y": 21, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 36, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 54, "y": 0, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 54, "y": 21, "flags": 4},
|
||||
{"matrix": [2, 3], "x": 54, "y": 42, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 72, "y": 0, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 72, "y": 21, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 72, "y": 42, "flags": 4},
|
||||
{"matrix": [3, 2], "x": 72, "y": 64, "flags": 1},
|
||||
{"matrix": [3, 3], "x": 90, "y": 64, "flags": 1},
|
||||
{"matrix": [3, 0], "x": 108, "y": 64, "flags": 1},
|
||||
{"matrix": [6, 0], "x": 224, "y": 42, "flags": 4},
|
||||
{"matrix": [5, 0], "x": 224, "y": 21, "flags": 4},
|
||||
{"matrix": [4, 0], "x": 224, "y": 0, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 206, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 1], "x": 206, "y": 21, "flags": 4},
|
||||
{"matrix": [6, 1], "x": 206, "y": 42, "flags": 4},
|
||||
{"matrix": [6, 2], "x": 188, "y": 42, "flags": 4},
|
||||
{"matrix": [5, 2], "x": 188, "y": 21, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 188, "y": 0, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 170, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 3], "x": 170, "y": 21, "flags": 4},
|
||||
{"matrix": [6, 3], "x": 170, "y": 42, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 152, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 4], "x": 152, "y": 21, "flags": 4},
|
||||
{"matrix": [6, 4], "x": 152, "y": 42, "flags": 4},
|
||||
{"matrix": [7, 0], "x": 134, "y": 64, "flags": 4},
|
||||
{"matrix": [7, 2], "x": 152, "y": 64, "flags": 4},
|
||||
{"x": 170, "y": 64, "flags": 4}
|
||||
],
|
||||
"split_count": [18, 18]
|
||||
},
|
||||
"layout_aliases": {
|
||||
"LAYOUT_charybdis_3x5": "LAYOUT"
|
||||
"usb": {
|
||||
"device_version": "2.0.0",
|
||||
"pid": "0x1832"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
@@ -19,41 +62,34 @@
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
|
||||
{"matrix": [4, 4], "x": 11, "y": 0},
|
||||
{"matrix": [4, 3], "x": 12, "y": 0},
|
||||
{"matrix": [4, 2], "x": 13, "y": 0},
|
||||
{"matrix": [4, 1], "x": 14, "y": 0},
|
||||
{"matrix": [4, 0], "x": 15, "y": 0},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
|
||||
{"matrix": [5, 4], "x": 11, "y": 1},
|
||||
{"matrix": [5, 3], "x": 12, "y": 1},
|
||||
{"matrix": [5, 2], "x": 13, "y": 1},
|
||||
{"matrix": [5, 1], "x": 14, "y": 1},
|
||||
{"matrix": [5, 0], "x": 15, "y": 1},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
|
||||
{"matrix": [6, 4], "x": 11, "y": 2},
|
||||
{"matrix": [6, 3], "x": 12, "y": 2},
|
||||
{"matrix": [6, 2], "x": 13, "y": 2},
|
||||
{"matrix": [6, 1], "x": 14, "y": 2},
|
||||
{"matrix": [6, 0], "x": 15, "y": 2},
|
||||
|
||||
{"matrix": [3, 2], "x": 4, "y": 3},
|
||||
{"matrix": [3, 3], "x": 5, "y": 3},
|
||||
{"matrix": [3, 0], "x": 6, "y": 3},
|
||||
|
||||
{"matrix": [7, 0], "x": 9, "y": 3},
|
||||
{"matrix": [7, 2], "x": 10, "y": 3}
|
||||
]
|
||||
|
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum charybdis_keymap_layers {
|
||||
LAYER_BASE = 0,
|
||||
LAYER_LOWER,
|
||||
LAYER_RAISE,
|
||||
};
|
||||
|
||||
#define LOWER MO(LAYER_LOWER)
|
||||
#define RAISE MO(LAYER_RAISE)
|
||||
|
||||
#define CTL_BSP CTL_T(KC_BSPC)
|
||||
#define SFT_SPC SFT_T(KC_SPC)
|
||||
#define GUI_ENT GUI_T(KC_ENT)
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[LAYER_BASE] = LAYOUT(
|
||||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯
|
||||
CTL_BSP, SFT_SPC, LOWER, RAISE, GUI_ENT
|
||||
// ╰───────────────────────────╯ ╰──────────────────╯
|
||||
),
|
||||
|
||||
[LAYER_LOWER] = LAYOUT(
|
||||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮
|
||||
RM_TOGG, KC_MNXT, KC_MPLY, KC_MPRV, XXXXXXX, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC,
|
||||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤
|
||||
KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_4, KC_5, KC_6, KC_PMNS,
|
||||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, EE_CLR, QK_BOOT, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS,
|
||||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯
|
||||
XXXXXXX, XXXXXXX, _______, XXXXXXX, _______
|
||||
// ╰───────────────────────────╯ ╰──────────────────╯
|
||||
),
|
||||
|
||||
[LAYER_RAISE] = LAYOUT(
|
||||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX,
|
||||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤
|
||||
KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI,
|
||||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤
|
||||
KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EE_CLR, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯
|
||||
_______, _______, XXXXXXX, _______, XXXXXXX
|
||||
// ╰───────────────────────────╯ ╰──────────────────╯
|
||||
),
|
||||
};
|
||||
// clang-format on
|
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"keyboard": "bastardkb/charybdis/3x5/elitec",
|
||||
"keymap": "default",
|
||||
"layout": "LAYOUT",
|
||||
"layers": [
|
||||
[
|
||||
"KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P",
|
||||
"KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN",
|
||||
"KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH",
|
||||
"KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)"
|
||||
],
|
||||
[
|
||||
"KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0",
|
||||
"KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______"
|
||||
],
|
||||
[
|
||||
"QK_BOOT", "_______", "_______", "_______", "_______", "RM_VALU", "RM_HUEU", "RM_SATU", "RM_NEXT", "RM_TOGG",
|
||||
"EE_CLR", "_______", "_______", "_______", "_______", "RM_VALD", "RM_HUED", "RM_SATD", "RM_PREV", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______"
|
||||
]
|
||||
]
|
||||
}
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# Charybdis (3x5) default keymap
|
||||
|
||||
> :bulb: Have a look at the [`via` keymap](../via) for a more feature-rich layout.
|
||||
|
||||
The Charydbis (3x5) default keymap is inspired from the original [Dactyl Manuform](../../../../../handwired/dactyl_manuform) default keymap.
|
||||
|
||||
This layout supports RGB matrix. However, due to space constraints on the MCU, only a limited number of effect can be enabled at once. Look at the `config.h` file and enable your favorite effect.
|
@@ -1,15 +0,0 @@
|
||||
# Charybdis Nano (3x5)
|
||||
|
||||
An ergonomic keyboard with integrated trackball.
|
||||
|
||||
The Charybdis is available in 4x6 and 3x5 form factor at [bastardkb.com](https://bastardkb.com).
|
||||
|
||||
## Keymaps
|
||||
|
||||
### [`default`](keymaps/default)
|
||||
|
||||
A simple QWERTY layout with 4 layers.
|
||||
|
||||
### [`via`](keymaps/via)
|
||||
|
||||
A [Miryoku-inspired](https://github.com/manna-harbour/miryoku), feature-rich, keymap with VIA support.
|
1
keyboards/bastardkb/charybdis/3x5/rules.mk
Normal file
1
keyboards/bastardkb/charybdis/3x5/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
POINTING_DEVICE_DRIVER = pmw3360
|
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
|
||||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* 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
|
||||
|
||||
/* Handedness. */
|
||||
#define MASTER_RIGHT
|
||||
|
||||
/* PMW3360 settings. */
|
||||
#define POINTING_DEVICE_CS_PIN B0
|
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "Charybdis Nano (3x5) Elite-C",
|
||||
"usb": {
|
||||
"device_version": "1.0.0"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"mousekey": false,
|
||||
"extrakey": true,
|
||||
"rgb_matrix": true,
|
||||
"pointing_device": true
|
||||
},
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["C7", "F0", "D7", "E6", "B4"],
|
||||
"rows": ["B7", "C6", "D4", "B5"]
|
||||
},
|
||||
"diode_direction": "ROW2COL",
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"right": {
|
||||
"cols": ["C7", "B7", "D7", "E6", "B4"],
|
||||
"rows": ["F0", "C6", "D4", "B5"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
AUDIO_SUPPORTED = no # Audio is not supported
|
||||
|
||||
POINTING_DEVICE_DRIVER = pmw3360
|
||||
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
|
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
*
|
||||
* 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
|
||||
|
||||
/* Handedness. */
|
||||
#define MASTER_RIGHT
|
||||
|
||||
/* PMW3360 settings. */
|
||||
#define POINTING_DEVICE_CS_PIN F0
|
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "Charybdis Nano (3x5) Elite-C",
|
||||
"usb": {
|
||||
"device_version": "2.0.0"
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"mousekey": false,
|
||||
"extrakey": true,
|
||||
"rgb_matrix": true,
|
||||
"pointing_device": true
|
||||
},
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812"
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F5", "B6", "D7", "E6", "B4"],
|
||||
"rows": ["F7", "C6", "D4", "B5"]
|
||||
},
|
||||
"diode_direction": "ROW2COL",
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
AUDIO_SUPPORTED = no # Audio is not supported
|
||||
|
||||
POINTING_DEVICE_DRIVER = pmw3360
|
||||
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user