Compare commits

...
10 Commits
Author SHA1 Message Date
Ryan 491b83aa32 Update "make format" message (#13741)
* Update "make format" message

* Add examples for `qmk` command as well
2021-07-28 12:02:29 +01:00
Shane Celis fcce9f2a4f fix: Fix typo in documentation for one shot keys. ON_TOGG -> OS_TOGG (#13754)
`ON_TOGG` doesn't exist in the codebase.
2021-07-28 12:00:55 +01:00
JonavinandJonavin 9088df04c3 [Keyboard] fix short circuit in led_update_kb for quefrency rev3 (#13752)
Co-authored-by: Jonavin <=>
2021-07-28 00:24:51 -07:00
ForsakenRei ae2c2358ec [Docs] Add default case in Tap Dance Example 6 (#13727)
Added a `default` case in `switch(ql_tap_state.state)` at line 493 and 494.
Without it compile firmware with Example 6 code will encounter 2 errors:
`enumeration value 'TD_NONE' not handled in switch`
`enumeration value 'TD_UNKNOWN' not handled in switch`
2021-07-26 19:45:08 -07:00
James Young a617c8b80a [Keyboard] Ares refactor (#13730) 2021-07-26 19:43:48 -07:00
datafx b1c5a53a68 Add bootloader size (#13729)
* Add bootloader size

Bootloader size needs to be 6144 to allow QMK to jump to the correct location with bootmagic

* Include dz60rgb v2.1

Add boot loader size to this pcb also
2021-07-27 10:07:29 +10:00
James Young e6e4ec6267 40percentclub/nein: update info.json layout macro reference (#13726)
- change LAYOUT to LAYOUT_ortho_3x3
2021-07-26 21:02:44 +01:00
Cyril a73e0a7b13 Revert "Fixed the ortho60 and ortho48 matrix layout after testing (#12106)" (#13456)
This reverts commit e25f05224f.
2021-07-25 22:51:23 -07:00
2e5cecd704 [Keyboard] Change RGB light defaults for melgeek/mj6xy (#13657)
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: Ryan <[email protected]>
2021-07-25 21:22:13 -07:00
Drashna JaelreandRyan d45da3f0fb [Keyboard] Update ZSA Keyboard Readmes and keymaps (#13041)
* [Keyboard] Update ZSA Keyboard Readmes and keymaps

* Apply suggestions from code review

Co-authored-by: Ryan <[email protected]>

* Remove custom rgb code for RGB_M_P

* Fix inevitable typo

Co-authored-by: Ryan <[email protected]>

* Update keyboards/planck/ez/readme.md

Co-authored-by: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
2021-07-25 18:18:22 -07:00
36 changed files with 702 additions and 612 deletions

No files matched your search

+14 -5
View File
@@ -252,11 +252,20 @@ define PARSE_RULE
else else
$$(info make: *** No rule to make target '$1'. Stop.) $$(info make: *** No rule to make target '$1'. Stop.)
$$(info |) $$(info |)
$$(info | QMK's make format recently changed to use folder locations and colons:) $$(info | QMK's make format is:)
$$(info | make project_folder:keymap[:target]) $$(info | make keyboard_folder:keymap_folder[:target])
$$(info | Examples:) $$(info |)
$$(info | make dz60:default) $$(info | Where `keyboard_folder` is the path to the keyboard relative to)
$$(info | make planck/rev6:default:flash) $$(info | `qmk_firmware/keyboards/`, and `keymap_folder` is the name of the)
$$(info | keymap folder under that board's `keymaps/` directory.)
$$(info |)
$$(info | Examples:)
$$(info | keyboards/dz60, keyboards/dz60/keymaps/default)
$$(info | -> make dz60:default)
$$(info | -> qmk compile -kb dz60 -km default)
$$(info | keyboards/planck/rev6, keyboards/planck/keymaps/default)
$$(info | -> make planck/rev6:default:flash)
$$(info | -> qmk flash -kb planck/rev6 -km default)
$$(info |) $$(info |)
endif endif
endef endef
+2
View File
@@ -490,6 +490,8 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
layer_on(_MY_LAYER); layer_on(_MY_LAYER);
} }
break; break;
default:
break;
} }
} }
+1 -1
View File
@@ -19,7 +19,7 @@ You can control the behavior of one shot keys by defining these in `config.h`:
* `OSL(layer)` - momentary switch to *layer*. * `OSL(layer)` - momentary switch to *layer*.
* `OS_ON` - Turns on One Shot keys. * `OS_ON` - Turns on One Shot keys.
* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`. * `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
* `ON_TOGG` - Toggles the one shot key status. * `OS_TOGG` - Toggles the one shot key status.
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine. Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
+1 -1
View File
@@ -5,7 +5,7 @@
"width": 3, "width": 3,
"height": 3, "height": 3,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT_ortho_3x3": {
"layout": [ "layout": [
{"x":0, "y":0}, {"x":0, "y":0},
{"x":1, "y":0}, {"x":1, "y":0},
+32 -1
View File
@@ -1,5 +1,6 @@
/* /*
Copyright 2019 Evy Dekkers Copyright 2019 Evy Dekkers
2021 James Young for QMK (@noroadsleft)
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -21,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define XXX KC_NO #define XXX KC_NO
#define LAYOUT( \ #define LAYOUT_all( \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
@@ -35,3 +36,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
{k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e} \ {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e} \
} }
#define LAYOUT_60_ansi_split_bs_rshift( \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
k00, k01, k02, k06, k0a, k0b, k0c, k0d \
) \
{ \
{k00, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, k0a, k0b, k0c, k0d, XXX}, \
{k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
{k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e} \
}
#define LAYOUT_60_hhkb( \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
k01, k02, k06, k0b, k0c \
) \
{ \
{XXX, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, XXX, k0b, k0c, XXX, XXX}, \
{k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
{k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e} \
}
+2 -2
View File
@@ -49,5 +49,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
/* Bootmagic Lite key configuration */ /* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_ROW 4
// #define BOOTMAGIC_LITE_COLUMN 0 #define BOOTMAGIC_LITE_COLUMN 0
+220 -8
View File
@@ -1,12 +1,224 @@
{ {
"keyboard_name": "LSJ Ares", "keyboard_name": "LSJ Ares",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 15, "width": 15,
"height": 5, "height": 5,
"layout_aliases": {
"LAYOUT": "LAYOUT_all"
},
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT_all": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"Back space", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"|", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] "layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"|", "x":13, "y":0},
{"label":"Back space", "x":14, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":"{", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"|", "x":13.5, "y":1, "w":1.5},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"\"", "x":11.75, "y":2},
{"label":"|", "x":12.75, "y":2},
{"label":"Enter", "x":13.75, "y":2, "w":1.25},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"|", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":1.75},
{"label":"Fn", "x":14, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"label":"Space", "x":3.75, "y":4, "w":6.25},
{"label":"Alt", "x":10, "y":4, "w":1.25},
{"label":"Win", "x":11.25, "y":4, "w":1.25},
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
{"label":"Ctrl", "x":13.75, "y":4, "w":1.25}
]
},
"LAYOUT_60_ansi_split_bs_rshift": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0},
{"x":14, "y":0},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":1.75},
{"x":14, "y":3},
{"x":0, "y":4, "w":1.25},
{"x":1.25, "y":4, "w":1.25},
{"x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"x":10, "y":4, "w":1.25},
{"x":11.25, "y":4, "w":1.25},
{"x":12.5, "y":4, "w":1.25},
{"x":13.75, "y":4, "w":1.25}
]
},
"LAYOUT_60_hhkb": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6, "y":0},
{"x":7, "y":0},
{"x":8, "y":0},
{"x":9, "y":0},
{"x":10, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0},
{"x":14, "y":0},
{"x":0, "y":1, "w":1.5},
{"x":1.5, "y":1},
{"x":2.5, "y":1},
{"x":3.5, "y":1},
{"x":4.5, "y":1},
{"x":5.5, "y":1},
{"x":6.5, "y":1},
{"x":7.5, "y":1},
{"x":8.5, "y":1},
{"x":9.5, "y":1},
{"x":10.5, "y":1},
{"x":11.5, "y":1},
{"x":12.5, "y":1},
{"x":13.5, "y":1, "w":1.5},
{"x":0, "y":2, "w":1.75},
{"x":1.75, "y":2},
{"x":2.75, "y":2},
{"x":3.75, "y":2},
{"x":4.75, "y":2},
{"x":5.75, "y":2},
{"x":6.75, "y":2},
{"x":7.75, "y":2},
{"x":8.75, "y":2},
{"x":9.75, "y":2},
{"x":10.75, "y":2},
{"x":11.75, "y":2},
{"x":12.75, "y":2, "w":2.25},
{"x":0, "y":3, "w":2.25},
{"x":2.25, "y":3},
{"x":3.25, "y":3},
{"x":4.25, "y":3},
{"x":5.25, "y":3},
{"x":6.25, "y":3},
{"x":7.25, "y":3},
{"x":8.25, "y":3},
{"x":9.25, "y":3},
{"x":10.25, "y":3},
{"x":11.25, "y":3},
{"x":12.25, "y":3, "w":1.75},
{"x":14, "y":3},
{"x":1.5, "y":4},
{"x":2.5, "y":4, "w":1.5},
{"x":4, "y":4, "w":7},
{"x":11, "y":4, "w":1.5},
{"x":12.5, "y":4}
]
} }
} }
} }
+19 -17
View File
@@ -17,24 +17,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#define _MA 0 enum layer_names {
#define _FN 1 _MA,
_FN,
#define ______ KC_TRNS };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MA] = LAYOUT( [_MA] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
[_FN] = LAYOUT( ),
RGB_MOD, BL_TOGG, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, [_FN] = LAYOUT_all(
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RGB_MOD, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
______, ______, ______, ______, ______, ______, ______, ______) _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
)
}; };
+3 -3
View File
@@ -1,8 +1,8 @@
# lSJ Ares # LSJ Ares
* Keyboard Maintainer: QMK Community * Keyboard Maintainer: QMK Community
* Hardware Supported: LSJ Ares PCB * Hardware Supported: LSJ Ares PCB
* Hardware Availability: <https://geekhack.org/index.php?topic=93146.0> * Hardware Availability: [2018 Geekhack Group Buy](https://geekhack.org/index.php?topic=93146.0)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
@@ -12,6 +12,6 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e
make ares:default:flash make ares:default:flash
**Reset Key**: Hold down the *left control* key while plugging in the keyboard. **Reset Key**: Hold down the top left key, commonly programmed as *Escape*, while plugging in the keyboard.
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+14 -15
View File
@@ -2,21 +2,20 @@
MCU = atmega32a MCU = atmega32a
# Bootloader selection # Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = bootloadHID BOOTLOADER = bootloadHID
# build options # Build Options
BOOTMAGIC_ENABLE = lite # change yes to no to disable
MOUSEKEY_ENABLE = no #
EXTRAKEY_ENABLE = yes BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
CONSOLE_ENABLE = no MOUSEKEY_ENABLE = no # Mouse keys
COMMAND_ENABLE = yes EXTRAKEY_ENABLE = yes # Audio control and System control
BACKLIGHT_ENABLE = yes CONSOLE_ENABLE = no # Console for debug
RGBLIGHT_ENABLE = no COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
WS2812_DRIVER = i2c WS2812_DRIVER = i2c
LAYOUTS = 60_ansi_split_bs_rshift 60_hhkb
+2 -2
View File
@@ -6,13 +6,13 @@
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k36 , k37, k38, k39, k3a, k3b \ k30, k31, k32, k33, k34, k35 , k37, k38, k39, k3a, k3b \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, KC_NO, k36, k37, k38, k39, k3a, k3b } \ { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \
} }
#define LAYOUT_ortho_4x12( \ #define LAYOUT_ortho_4x12( \
+2 -2
View File
@@ -7,14 +7,14 @@
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
k40, k41, k42, k43, k44, k46 , k47, k48, k49, k4a, k4b \ k40, k41, k42, k43, k44, k45 , k47, k48, k49, k4a, k4b \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
{ k40, k41, k42, k43, k44, KC_NO, k46, k47, k48, k49, k4a, k4b }, \ { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b }, \
} }
#define LAYOUT_ortho_5x12( \ #define LAYOUT_ortho_5x12( \
+1
View File
@@ -3,6 +3,7 @@ MCU = atmega32u4
# Bootloader selection # Bootloader selection
BOOTLOADER = lufa-ms BOOTLOADER = lufa-ms
BOOTLOADER_SIZE = 6144
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
+1
View File
@@ -3,6 +3,7 @@ MCU = atmega32u4
# Bootloader selection # Bootloader selection
BOOTLOADER = lufa-ms BOOTLOADER = lufa-ms
BOOTLOADER_SIZE = 6144
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
+85 -96
View File
@@ -44,29 +44,29 @@ extern inline void ergodox_led_all_set(uint8_t n);
keyboard_config_t keyboard_config; keyboard_config_t keyboard_config;
bool i2c_initialized = 0; bool i2c_initialized = 0;
i2c_status_t mcp23018_status = 0x20; i2c_status_t mcp23018_status = 0x20;
void matrix_init_kb(void) { void matrix_init_kb(void) {
// keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
TCCR1A = 0b10101001; // set and configure fast PWM TCCR1A = 0b10101001; // set and configure fast PWM
TCCR1B = 0b00001001; // set and configure fast PWM TCCR1B = 0b00001001; // set and configure fast PWM
// (tied to Vcc for hardware convenience) // (tied to Vcc for hardware convenience)
DDRB &= ~(1<<4); // set B(4) as input DDRB &= ~(1 << 4); // set B(4) as input
PORTB &= ~(1<<4); // set B(4) internal pull-up disabled PORTB &= ~(1 << 4); // set B(4) internal pull-up disabled
// unused pins - C7, D4, D5, D7, E6 // unused pins - C7, D4, D5, D7, E6
// set as input with internal pull-up enabled // set as input with internal pull-up enabled
DDRC &= ~(1<<7); DDRC &= ~(1 << 7);
DDRD &= ~(1<<5 | 1<<4); DDRD &= ~(1 << 5 | 1 << 4);
DDRE &= ~(1<<6); DDRE &= ~(1 << 6);
PORTC |= (1<<7); PORTC |= (1 << 7);
PORTD |= (1<<5 | 1<<4); PORTD |= (1 << 5 | 1 << 4);
PORTE |= (1<<6); PORTE |= (1 << 6);
keyboard_config.raw = eeconfig_read_kb(); keyboard_config.raw = eeconfig_read_kb();
ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4 ); ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4);
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
if (keyboard_config.rgb_matrix_enable) { if (keyboard_config.rgb_matrix_enable) {
rgb_matrix_set_flags(LED_FLAG_ALL); rgb_matrix_set_flags(LED_FLAG_ALL);
@@ -80,8 +80,7 @@ void matrix_init_kb(void) {
matrix_init_user(); matrix_init_user();
} }
void ergodox_blink_all_leds(void) void ergodox_blink_all_leds(void) {
{
ergodox_led_all_off(); ergodox_led_all_off();
ergodox_led_all_set(LED_BRIGHTNESS_DEFAULT); ergodox_led_all_set(LED_BRIGHTNESS_DEFAULT);
ergodox_right_led_1_on(); ergodox_right_led_1_on();
@@ -94,17 +93,17 @@ void ergodox_blink_all_leds(void)
ergodox_left_led_1_on(); ergodox_left_led_1_on();
_delay_ms(50); _delay_ms(50);
if (!mcp23018_status) { if (!mcp23018_status) {
mcp23018_status = ergodox_left_leds_update(); mcp23018_status = ergodox_left_leds_update();
} }
ergodox_left_led_2_on(); ergodox_left_led_2_on();
_delay_ms(50); _delay_ms(50);
if (!mcp23018_status) { if (!mcp23018_status) {
mcp23018_status = ergodox_left_leds_update(); mcp23018_status = ergodox_left_leds_update();
} }
ergodox_left_led_3_on(); ergodox_left_led_3_on();
_delay_ms(50); _delay_ms(50);
if (!mcp23018_status) { if (!mcp23018_status) {
mcp23018_status = ergodox_left_leds_update(); mcp23018_status = ergodox_left_leds_update();
} }
#endif #endif
ergodox_right_led_1_off(); ergodox_right_led_1_off();
@@ -116,21 +115,21 @@ void ergodox_blink_all_leds(void)
_delay_ms(50); _delay_ms(50);
ergodox_left_led_1_off(); ergodox_left_led_1_off();
if (!mcp23018_status) { if (!mcp23018_status) {
mcp23018_status = ergodox_left_leds_update(); mcp23018_status = ergodox_left_leds_update();
} }
_delay_ms(50); _delay_ms(50);
ergodox_left_led_2_off(); ergodox_left_led_2_off();
if (!mcp23018_status) { if (!mcp23018_status) {
mcp23018_status = ergodox_left_leds_update(); mcp23018_status = ergodox_left_leds_update();
} }
_delay_ms(50); _delay_ms(50);
ergodox_left_led_3_off(); ergodox_left_led_3_off();
if (!mcp23018_status) { if (!mcp23018_status) {
mcp23018_status = ergodox_left_leds_update(); mcp23018_status = ergodox_left_leds_update();
} }
#endif #endif
//ergodox_led_all_on(); // ergodox_led_all_on();
//_delay_ms(333); //_delay_ms(333);
ergodox_led_all_off(); ergodox_led_all_off();
} }
@@ -156,27 +155,35 @@ uint8_t init_mcp23018(void) {
// - unused : input : 1 // - unused : input : 1
// - input : input : 1 // - input : input : 1
// - driving : output : 0 // - driving : output : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT);
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out;
i2c_stop(); i2c_stop();
// set pull-up // set pull-up
// - unused : on : 1 // - unused : on : 1
// - input : on : 1 // - input : on : 1
// - driving : off : 0 // - driving : off : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT);
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out;
out: out:
i2c_stop(); i2c_stop();
#ifdef LEFT_LEDS #ifdef LEFT_LEDS
if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update(); if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
#endif // LEFT_LEDS #endif // LEFT_LEDS
// SREG=sreg_prev; // SREG=sreg_prev;
@@ -185,12 +192,12 @@ out:
#ifdef LEFT_LEDS #ifdef LEFT_LEDS
uint8_t ergodox_left_leds_update(void) { uint8_t ergodox_left_leds_update(void) {
if (mcp23018_status) { // if there was an error if (mcp23018_status) { // if there was an error
return mcp23018_status; return mcp23018_status;
} }
#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B # define LEFT_LED_1_SHIFT 7 // in MCP23018 port B
#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B # define LEFT_LED_2_SHIFT 6 // in MCP23018 port B
#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A # define LEFT_LED_3_SHIFT 7 // in MCP23018 port A
// set logical value (doesn't matter on inputs) // set logical value (doesn't matter on inputs)
// - unused : hi-Z : 1 // - unused : hi-Z : 1
@@ -200,47 +207,42 @@ uint8_t ergodox_left_leds_update(void) {
if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(OLATA, ERGODOX_EZ_I2C_TIMEOUT); mcp23018_status = i2c_write(OLATA, ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111 mcp23018_status = i2c_write(0b11111111 & ~(ergodox_left_led_3 << LEFT_LED_3_SHIFT), ERGODOX_EZ_I2C_TIMEOUT);
& ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT),
ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out; if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111 mcp23018_status = i2c_write(0b11111111 & ~(ergodox_left_led_2 << LEFT_LED_2_SHIFT) & ~(ergodox_left_led_1 << LEFT_LED_1_SHIFT), ERGODOX_EZ_I2C_TIMEOUT);
& ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT)
& ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT),
ERGODOX_EZ_I2C_TIMEOUT);
if (mcp23018_status) goto out; if (mcp23018_status) goto out;
out: out:
i2c_stop(); i2c_stop();
return mcp23018_status; return mcp23018_status;
} }
#endif #endif
#ifdef SWAP_HANDS_ENABLE #ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak)) __attribute__((weak))
// swap-hands action needs a matrix to define the swap // swap-hands action needs a matrix to define the swap
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
/* Left hand, matrix positions */ /* Left hand, matrix positions */
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, {{0, 13}, {1, 13}, {2, 13}, {3, 13}, {4, 13}, {5, 13}},
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}, {5, 12}},
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}, {5, 11}},
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}, {5, 10}},
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}},
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}},
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
/* Right hand, matrix positions */ /* Right hand, matrix positions */
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
}; };
#endif #endif
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
// clang-format off
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* driver /* driver
* | R location * | R location
@@ -335,24 +337,14 @@ led_config_t g_led_config = { {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 1, 1, 1, 1 4, 4, 1, 1, 1, 1
} }; } };
// clang-format on
void suspend_power_down_kb(void) { # ifdef ORYX_CONFIGURATOR
rgb_matrix_set_color_all(0, 0, 0);
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
#ifdef ORYX_CONFIGURATOR
void keyboard_post_init_kb(void) { void keyboard_post_init_kb(void) {
rgb_matrix_enable_noeeprom(); rgb_matrix_enable_noeeprom();
keyboard_post_init_user(); keyboard_post_init_user();
} }
#endif # endif
#endif #endif
#ifdef ORYX_CONFIGURATOR #ifdef ORYX_CONFIGURATOR
@@ -360,51 +352,48 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case LED_LEVEL: case LED_LEVEL:
if (record->event.pressed) { if (record->event.pressed) {
keyboard_config.led_level++; keyboard_config.led_level++;
if (keyboard_config.led_level > 4) { if (keyboard_config.led_level > 4) {
keyboard_config.led_level = 0; keyboard_config.led_level = 0;
} }
ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4 ); ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4);
eeconfig_update_kb(keyboard_config.raw); eeconfig_update_kb(keyboard_config.raw);
layer_state_set_kb(layer_state); layer_state_set_kb(layer_state);
} }
break; break;
#ifdef RGB_MATRIX_ENABLE # ifdef RGB_MATRIX_ENABLE
case TOGGLE_LAYER_COLOR: case TOGGLE_LAYER_COLOR:
if (record->event.pressed) { if (record->event.pressed) {
keyboard_config.disable_layer_led ^= 1; keyboard_config.disable_layer_led ^= 1;
if (keyboard_config.disable_layer_led) if (keyboard_config.disable_layer_led) rgb_matrix_set_color_all(0, 0, 0);
rgb_matrix_set_color_all(0, 0, 0);
eeconfig_update_kb(keyboard_config.raw); eeconfig_update_kb(keyboard_config.raw);
} }
break; break;
case RGB_TOG: case RGB_TOG:
if (record->event.pressed) { if (record->event.pressed) {
switch (rgb_matrix_get_flags()) { switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: { case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE); rgb_matrix_set_flags(LED_FLAG_NONE);
keyboard_config.rgb_matrix_enable = false; keyboard_config.rgb_matrix_enable = false;
rgb_matrix_set_color_all(0, 0, 0); rgb_matrix_set_color_all(0, 0, 0);
} } break;
break; default: {
default: { rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_set_flags(LED_FLAG_ALL); keyboard_config.rgb_matrix_enable = true;
keyboard_config.rgb_matrix_enable = true; } break;
} }
break; eeconfig_update_kb(keyboard_config.raw);
}
eeconfig_update_kb(keyboard_config.raw);
} }
return false; return false;
#endif # endif
} }
return process_record_user(keycode, record); return process_record_user(keycode, record);
} }
#endif #endif
void eeconfig_init_kb(void) { // EEPROM is getting reset! void eeconfig_init_kb(void) { // EEPROM is getting reset!
keyboard_config.raw = 0; keyboard_config.raw = 0;
keyboard_config.led_level = 4; keyboard_config.led_level = 4;
keyboard_config.rgb_matrix_enable = true; keyboard_config.rgb_matrix_enable = true;
eeconfig_update_kb(keyboard_config.raw); eeconfig_update_kb(keyboard_config.raw);
eeconfig_init_user(); eeconfig_init_user();
+76 -80
View File
@@ -2,20 +2,20 @@
#include "version.h" #include "version.h"
enum layers { enum layers {
BASE, // default layer BASE, // default layer
SYMB, // symbols SYMB, // symbols
MDIA, // media keys MDIA, // media keys
}; };
enum custom_keycodes { enum custom_keycodes {
#ifdef ORYX_CONFIGURATOR #ifdef ORYX_CONFIGURATOR
VRSN = EZ_SAFE_RANGE, VRSN = EZ_SAFE_RANGE,
#else #else
VRSN = SAFE_RANGE, VRSN = SAFE_RANGE,
#endif #endif
RGB_SLD
}; };
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer /* Keymap 0: Basic layer
* *
@@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS,
RGB_MOD, KC_TRNS, RGB_TOG, RGB_SLD, RGB_MOD, KC_TRNS, RGB_TOG, RGB_M_P,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI
), ),
@@ -115,94 +115,90 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK
), ),
}; };
// clang-format on
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) { if (record->event.pressed) {
switch (keycode) { switch (keycode) {
case VRSN: case VRSN:
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
return false; return false;
#ifdef RGBLIGHT_ENABLE }
case RGB_SLD:
rgblight_mode(1);
return false;
#endif
} }
} return true;
return true;
} }
// Runs just one time when the keyboard initializes. // Runs just one time when the keyboard initializes.
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {
#ifdef RGBLIGHT_COLOR_LAYER_0 #ifdef RGBLIGHT_COLOR_LAYER_0
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#endif #endif
}; };
// Runs whenever there is a layer state change. // Runs whenever there is a layer state change.
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
ergodox_board_led_off(); ergodox_board_led_off();
ergodox_right_led_1_off(); ergodox_right_led_1_off();
ergodox_right_led_2_off(); ergodox_right_led_2_off();
ergodox_right_led_3_off(); ergodox_right_led_3_off();
uint8_t layer = get_highest_layer(state); uint8_t layer = get_highest_layer(state);
switch (layer) { switch (layer) {
case 0: case 0:
#ifdef RGBLIGHT_COLOR_LAYER_0 #ifdef RGBLIGHT_COLOR_LAYER_0
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#endif #endif
break; break;
case 1: case 1:
ergodox_right_led_1_on(); ergodox_right_led_1_on();
#ifdef RGBLIGHT_COLOR_LAYER_1 #ifdef RGBLIGHT_COLOR_LAYER_1
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
#endif #endif
break; break;
case 2: case 2:
ergodox_right_led_2_on(); ergodox_right_led_2_on();
#ifdef RGBLIGHT_COLOR_LAYER_2 #ifdef RGBLIGHT_COLOR_LAYER_2
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
#endif #endif
break; break;
case 3: case 3:
ergodox_right_led_3_on(); ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_3 #ifdef RGBLIGHT_COLOR_LAYER_3
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
#endif #endif
break; break;
case 4: case 4:
ergodox_right_led_1_on(); ergodox_right_led_1_on();
ergodox_right_led_2_on(); ergodox_right_led_2_on();
#ifdef RGBLIGHT_COLOR_LAYER_4 #ifdef RGBLIGHT_COLOR_LAYER_4
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
#endif #endif
break; break;
case 5: case 5:
ergodox_right_led_1_on(); ergodox_right_led_1_on();
ergodox_right_led_3_on(); ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_5 #ifdef RGBLIGHT_COLOR_LAYER_5
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
#endif #endif
break; break;
case 6: case 6:
ergodox_right_led_2_on(); ergodox_right_led_2_on();
ergodox_right_led_3_on(); ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_6 #ifdef RGBLIGHT_COLOR_LAYER_6
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
#endif #endif
break; break;
case 7: case 7:
ergodox_right_led_1_on(); ergodox_right_led_1_on();
ergodox_right_led_2_on(); ergodox_right_led_2_on();
ergodox_right_led_3_on(); ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_7 #ifdef RGBLIGHT_COLOR_LAYER_7
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7);
#endif #endif
break; break;
default: default:
break; break;
} }
return state; return state;
}; };
-7
View File
@@ -2,13 +2,6 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = halfkay BOOTLOADER = halfkay
# If you have Left LEDs (see # If you have Left LEDs (see
+1 -1
View File
@@ -24,7 +24,7 @@ void matrix_init_kb(void) {
bool led_update_kb(led_t led_state) { bool led_update_kb(led_t led_state) {
// Only update if left half // Only update if left half
if (isLeftHand && led_update_user(led_state)) { if (led_update_user(led_state) && isLeftHand) {
writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
} }
return true; return true;
+2
View File
@@ -42,6 +42,8 @@
#ifdef RGB_DI_PIN #ifdef RGB_DI_PIN
# define RGBLIGHT_ANIMATIONS # define RGBLIGHT_ANIMATIONS
# define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6)
# define RGBLIGHT_DEFAULT_SPD 10
# define RGBLED_NUM 16 # define RGBLED_NUM 16
# define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_SAT_STEP 8
+1 -1
View File
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> /* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com> * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> /* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com> * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> /* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com> * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> /* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com> * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+1 -10
View File
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> /* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com> * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -340,15 +340,6 @@ led_config_t g_led_config = { {
} }; } };
// clang-format on // clang-format on
void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
#endif #endif
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
+1 -1
View File
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> /* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com> * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+17 -1
View File
@@ -19,7 +19,23 @@ Flashing example for this keyboard:
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Oryx Configuation
## Moonlander Customization
### Indicator LEDs
There are 6 functions for enabling and disabling the LEDs on the top of the boards. The functions are `ML_LED_1(bool)` through `ML_LED_6(bool)`, with the first LED being the left most LED on the left hand, and the sixth LED being the right most LED on the right side.
By default, the Indicator LEDs are used to indicate the layer state for the keyboard. If you wish to change this (and indicate caps/num/scroll lock status instead), then define `MOONLANDER_USER_LEDS` in your `config.h` file.
### Oryx Configuration
To enable the features from Oryx (ZSA's Configurator), either compile the the `default` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file.
This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR` keycode. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx.
### RGB Matrix Features
If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`.
+3 -2
View File
@@ -1,5 +1,6 @@
/* /* Copyright 2018 Jack Humbert <[email protected]>
* Copyright 2018 Jack Humbert <jack.humb@gmail.com> * Copyright 2015 ZSA Technology Labs Inc (@zsa)
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+2
View File
@@ -1,4 +1,6 @@
/* Copyright 2018 Jack Humbert <[email protected]> /* Copyright 2018 Jack Humbert <[email protected]>
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+2
View File
@@ -1,4 +1,6 @@
/* Copyright 2018 Jack Humbert <[email protected]> /* Copyright 2018 Jack Humbert <[email protected]>
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+3 -2
View File
@@ -1,5 +1,6 @@
/* /* Copyright 2018 Jack Humbert <[email protected]>
* Copyright 2018 Jack Humbert <jack.humb@gmail.com> * Copyright 2015 ZSA Technology Labs Inc (@zsa)
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
+18
View File
@@ -1 +1,19 @@
/* Copyright 2018 Jack Humbert <[email protected]>
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* 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 "glow.h" #include "glow.h"
+18
View File
@@ -1,3 +1,21 @@
/* Copyright 2018 Jack Humbert <[email protected]>
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once #pragma once
#include "ez.h" #include "ez.h"
+10 -8
View File
@@ -4,24 +4,26 @@
A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting. A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting.
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert), [Drashna Jael're](https://github.com/drashna)
Hardware Supported: Planck EZ Hardware Supported: Planck EZ
Hardware Availability: [ergodox-ez.com](https://ergodox-ez.com/pages/planck) Hardware Availability: [ZSA](https://www.zsa.io/planck/)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make planck/ez:default make planck/ez:oryx
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
# Planck EZ Glow
For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example: For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example:
make planck/ez/glow:default make planck/ez/glow:oryx
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Planck EZ Configuration (from Oryx) ## Planck EZ Configuration (from Oryx)
To enable the features from Oryx (ZSA's Configurator), either compile the the `oryx` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file.
This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR`, and `LED_LEVEL` keycodes. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. The `LED_LEVEL` cycles through the brightness levels for the front "teeth" LEDs.
### Indicator LEDs ### Indicator LEDs
The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage) The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage)
+26 -3
View File
@@ -1,16 +1,39 @@
/* Copyright 2020 ZSA Technology Inc
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once #pragma once
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND) # define STARTUP_SONG SONG(PLANCK_SOUND)
#endif #endif
#define MIDI_BASIC #define MIDI_BASIC
#define ENCODER_RESOLUTION 4 #define ENCODER_RESOLUTION 4
#define ORYX_CONFIGURATOR
/* /*
Set any config.h overrides for your specific keymap here. Set any config.h overrides for your specific keymap here.
See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file
*/ */
#define ORYX_CONFIGURATOR
#define USB_SUSPEND_WAKEUP_DELAY 0
#define FIRMWARE_VERSION u8"vAxxa/ZlQEV"
#define RGB_MATRIX_STARTUP_SPD 60
#define PLANCK_EZ_LED_LOWER 1
#define PLANCK_EZ_LED_RAISE 2
#define PLANCK_EZ_LED_ADJUST 3
+116 -338
View File
@@ -1,373 +1,151 @@
/* Copyright 2020 ZSA Technology Inc
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* 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 #include QMK_KEYBOARD_H
#include "muse.h"
#include "eeprom.h"
#include "keymap_german.h"
#include "keymap_nordic.h"
#include "keymap_french.h"
#include "keymap_spanish.h"
#include "keymap_hungarian.h"
#include "keymap_swedish.h"
//#include "keymap_br_abnt2.h"
#include "keymap_canadian_multilingual.h"
#include "keymap_german_ch.h"
#define KC_MAC_UNDO LGUI(KC_Z)
#define KC_MAC_CUT LGUI(KC_X)
#define KC_MAC_COPY LGUI(KC_C)
#define KC_MAC_PASTE LGUI(KC_V)
#define KC_PC_UNDO LCTL(KC_Z)
#define KC_PC_CUT LCTL(KC_X)
#define KC_PC_COPY LCTL(KC_C)
#define KC_PC_PASTE LCTL(KC_V)
#define NO_TH ALGR(KC_T)
#define NO_ETH ALGR(KC_D)
enum planck_layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_PLOVER,
_ADJUST
};
enum planck_keycodes { enum planck_keycodes {
QWERTY = EZ_SAFE_RANGE, RGB_SLD = EZ_SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
BACKLIT,
EXT_PLV,
RGB_SLD
}; };
#define LOWER MO(_LOWER) enum planck_layers {
#define RAISE MO(_RAISE) _BASE,
_LOWER,
_RAISE,
_ADJUST,
};
# define LOWER MO(_LOWER)
# define RAISE MO(_RAISE)
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_planck_grid(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE,
KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_ENTER,
WEBUSB_PAIR, KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPACE, KC_NO, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
),
/* Qwerty [_LOWER] = LAYOUT_planck_grid(
* ,-----------------------------------------------------------------------------------. KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | KC_DELETE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
* |------+------+------+------+------+------+------+------+------+------+------+------| _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH,KC_HOME, KC_END, _______,
* | Esc | A | S | D | F | G | H | J | K | L | ; | " | KC_COMMA, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_MEDIA_PLAY_PAUSE
* |------+------+------+------+------+------+------+------+------+------+------+------| ),
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_planck_grid(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Colemak [_RAISE] = LAYOUT_planck_grid(
* ,-----------------------------------------------------------------------------------. KC_GRAVE,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINUS, KC_EQUAL, KC_LBRACKET, KC_RBRACKET, KC_BSLASH,
* |------+------+------+------+------+------+------+------+------+------+------+------| _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH,KC_PGUP, KC_PGDOWN, _______,
* | Esc | A | R | S | T | D | H | N | E | I | O | " | _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_MEDIA_PLAY_PAUSE
* |------+------+------+------+------+------+------+------+------+------+------+------| ),
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_planck_grid(
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Dvorak [_ADJUST] = LAYOUT_planck_grid(
* ,-----------------------------------------------------------------------------------. _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | KC_DEL, _______, AU_ON, AU_OFF, AU_TOG, _______, _______, RGB_TOG, RGB_VAI, RGB_VAD, LED_LEVEL, RESET,
* |------+------+------+------+------+------+------+------+------+------+------+------| _______, _______, MU_ON, MU_OFF, MU_TOG, _______, _______, RGB_MOD, RGB_HUI, RGB_HUD, TOGGLE_LAYER_COLOR, _______,
* | Esc | A | O | E | U | I | D | H | T | N | S | / | _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______
* |------+------+------+------+------+------+------+------+------+------+------+------| ),
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = LAYOUT_planck_grid(
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_planck_grid(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_planck_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | S | T | P | H | * | * | F | P | L | T | D |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | S | K | W | R | * | * | R | B | G | S | Z |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------------------'
*/
[_PLOVER] = LAYOUT_planck_grid(
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
),
/* Adjust (Lower + Raise)
* v------------------------RGB CONTROL--------------------v
* ,-----------------------------------------------------------------------------------
* | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_planck_grid(
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, TOGGLE_LAYER_COLOR, LED_LEVEL, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
}; };
// clang-format on
#ifdef AUDIO_ENABLE
float plover_song[][2] = SONG(PLOVER_SOUND);
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
#endif
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
[0] = { {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255}, {130,255,255} }, [0] = {{42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}},
[1] = { {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {146,224,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {42,255,255}, {32,255,234}, {32,255,234}, {32,255,234}, {32,255,234} }, [1] = {{89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}},
[2] = { {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246}, {89,255,246} }, [2] = {{216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {249, 228, 255}, {249, 228, 255}, {249, 228, 255}, {216, 255, 255}, {216, 255, 255}, {105, 255, 255}, {105, 255, 255}, {105, 255, 255}, {216, 255, 255}, {14, 255, 255}, {216, 255, 255}, {216, 255, 255}, {249, 228, 255}, {249, 228, 255}, {249, 228, 255}, {216, 255, 255}, {216, 255, 255}, {105, 255, 255}, {105, 255, 255}, {105, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}},
[3] = { {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {249,228,255}, {249,228,255}, {249,228,255}, {216,255,255}, {216,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {216,255,255}, {14,255,255}, {216,255,255}, {216,255,255}, {249,228,255}, {249,228,255}, {249,228,255}, {216,255,255}, {216,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255}, {216,255,255} },
}; };
void set_layer_color(int layer) { void set_layer_color(int layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
HSV hsv = { HSV hsv = {
.h = pgm_read_byte(&ledmap[layer][i][0]), .h = pgm_read_byte(&ledmap[layer][i][0]),
.s = pgm_read_byte(&ledmap[layer][i][1]), .s = pgm_read_byte(&ledmap[layer][i][1]),
.v = pgm_read_byte(&ledmap[layer][i][2]), .v = pgm_read_byte(&ledmap[layer][i][2]),
}; };
if (!hsv.h && !hsv.s && !hsv.v) { if (!hsv.h && !hsv.s && !hsv.v) {
rgb_matrix_set_color( i, 0, 0, 0 ); rgb_matrix_set_color(i, 0, 0, 0);
} else { } else {
RGB rgb = hsv_to_rgb( hsv ); RGB rgb = hsv_to_rgb(hsv);
float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX;
rgb_matrix_set_color( i, f * rgb.r, f * rgb.g, f * rgb.b ); rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b);
}
} }
}
} }
void rgb_matrix_indicators_user(void) { void rgb_matrix_indicators_user(void) {
if (g_suspend_state || keyboard_config.disable_layer_led) { return; } if (g_suspend_state || keyboard_config.disable_layer_led) {
switch (biton32(layer_state)) { return;
case 0: }
set_layer_color(0); switch (biton32(layer_state)) {
break; case 1:
case 3: set_layer_color(0);
set_layer_color(1); break;
break; case 2:
case 4: set_layer_color(1);
set_layer_color(2); break;
break; case 3:
case 6: set_layer_color(2);
set_layer_color(3); break;
break; default:
default: if (rgb_matrix_get_flags() == LED_FLAG_NONE) rgb_matrix_set_color_all(0, 0, 0);
if (rgb_matrix_get_flags() == LED_FLAG_NONE) break;
rgb_matrix_set_color_all(0, 0, 0); }
break;
}
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case RGB_SLD: case RGB_SLD:
if (record->event.pressed) { if (record->event.pressed) {
rgblight_mode(1); rgblight_mode(1);
}
return false;
case QWERTY:
if (record->event.pressed) {
print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
#ifdef KEYBOARD_planck_rev5
PORTE &= ~(1<<6);
#endif
} else {
unregister_code(KC_RSFT);
#ifdef KEYBOARD_planck_rev5
PORTE |= (1<<6);
#endif
}
return false;
break;
case PLOVER:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_SONG(plover_song);
#endif
layer_off(_RAISE);
layer_off(_LOWER);
layer_off(_ADJUST);
layer_on(_PLOVER);
if (!eeconfig_is_enabled()) {
eeconfig_init();
}
keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
}
return false;
break;
case EXT_PLV:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(plover_gb_song);
#endif
layer_off(_PLOVER);
}
return false;
break;
}
return true;
}
bool muse_mode = false;
uint8_t last_muse_note = 0;
uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
muse_offset++;
} else {
muse_offset--;
} }
} else { return false;
if (clockwise) {
muse_tempo+=1;
} else {
muse_tempo-=1;
}
}
} else {
if (clockwise) {
#ifdef MOUSEKEY_ENABLE
register_code(KC_MS_WH_DOWN);
unregister_code(KC_MS_WH_DOWN);
#else
register_code(KC_PGDN);
unregister_code(KC_PGDN);
#endif
} else {
#ifdef MOUSEKEY_ENABLE
register_code(KC_MS_WH_UP);
unregister_code(KC_MS_WH_UP);
#else
register_code(KC_PGUP);
unregister_code(KC_PGUP);
#endif
}
} }
return true; return true;
} }
void matrix_scan_user(void) { bool encoder_update_user(uint8_t index, bool clockwise) {
#ifdef AUDIO_ENABLE if (clockwise) {
if (muse_mode) { # ifdef MOUSEKEY_ENABLE
if (muse_counter == 0) { tap_code(KC_MS_WH_DOWN);
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; # else
if (muse_note != last_muse_note) { tap_code(KC_PGDN);
stop_note(compute_freq_for_midi_note(last_muse_note)); # endif
play_note(compute_freq_for_midi_note(muse_note), 0xF); } else {
last_muse_note = muse_note; # ifdef MOUSEKEY_ENABLE
} tap_code(KC_MS_WH_UP);
} # else
muse_counter = (muse_counter + 1) % muse_tempo; tap_code(KC_PGUP);
# endif
} }
#endif return true;
} }
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
case RAISE:
case LOWER:
return false;
default:
return true;
}
}
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }
+3 -2
View File
@@ -1,6 +1,7 @@
SRC += muse.c
# Set any rules.mk overrides for your specific keymap here. # Set any rules.mk overrides for your specific keymap here.
# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file
LTO_ENABLE = yes CONSOLE_ENABLE = no
COMMAND_ENABLE = no COMMAND_ENABLE = no
MOUSEKEY_ENABLE = no MOUSEKEY_ENABLE = no
WEBUSB_ENABLE = yes
ORYX_ENABLE = yes