summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/ergodox_ez/base/info.json6
-rw-r--r--keyboards/ergodox_ez/base/rules.mk0
-rw-r--r--keyboards/ergodox_ez/config.h7
-rw-r--r--keyboards/ergodox_ez/glow/config.h35
-rw-r--r--keyboards/ergodox_ez/glow/info.json6
-rw-r--r--keyboards/ergodox_ez/info.json6
-rw-r--r--keyboards/ergodox_ez/rules.mk2
-rw-r--r--keyboards/ergodox_ez/shine/config.h26
-rw-r--r--keyboards/ergodox_ez/shine/info.json6
-rwxr-xr-xkeyboards/ergodox_ez/util/compile_keymap.py110
-rw-r--r--keyboards/moonlander/config.h9
-rw-r--r--keyboards/moonlander/info.json6
-rw-r--r--keyboards/moonlander/keymaps/oryx/rules.mk2
-rw-r--r--keyboards/moonlander/matrix.c4
-rw-r--r--keyboards/moonlander/moonlander.c2
-rw-r--r--keyboards/moonlander/moonlander.h2
-rw-r--r--keyboards/moonlander/readme.md16
-rw-r--r--keyboards/planck/config.h6
-rw-r--r--keyboards/planck/ez/base/info.json6
-rw-r--r--keyboards/planck/ez/base/rules.mk0
-rw-r--r--keyboards/planck/ez/config.h13
-rw-r--r--keyboards/planck/ez/ez.c21
-rw-r--r--keyboards/planck/ez/glow/config.h25
-rw-r--r--keyboards/planck/ez/glow/info.json6
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/keymap.c2
-rw-r--r--keyboards/planck/ez/info.json6
-rwxr-xr-xkeyboards/planck/ez/rules.mk2
-rw-r--r--keyboards/planck/info.json1
-rw-r--r--keyboards/planck/keymaps/default/keymap.c2
-rw-r--r--keyboards/planck/keymaps/oryx/keymap.c4
-rw-r--r--keyboards/planck/planck.c10
31 files changed, 143 insertions, 206 deletions
diff --git a/keyboards/ergodox_ez/base/info.json b/keyboards/ergodox_ez/base/info.json
new file mode 100644
index 0000000000..be1433ccba
--- /dev/null
+++ b/keyboards/ergodox_ez/base/info.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "ErgoDox EZ",
+ "usb": {
+ "pid": "0x4974"
+ }
+}
diff --git a/keyboards/ergodox_ez/base/rules.mk b/keyboards/ergodox_ez/base/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/ergodox_ez/base/rules.mk
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index 8208ea9728..c62b306600 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -22,13 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x3297
-#define DEVICE_VER 0x0001
-#define MANUFACTURER ZSA Technology Labs
-#define PRODUCT_ID 0x4974
-#define PRODUCT ErgoDox EZ
-
/* key matrix size */
#define MATRIX_ROWS 14
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
diff --git a/keyboards/ergodox_ez/glow/config.h b/keyboards/ergodox_ez/glow/config.h
deleted file mode 100644
index 1666aa47c3..0000000000
--- a/keyboards/ergodox_ez/glow/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
-Copyright 2015 ZSA Technology Labs Inc (@zsa)
-Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
-
-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
-
-#undef PRODUCT_ID
-#define PRODUCT_ID 0x4976
-#undef PRODUCT
-#define PRODUCT ErgoDox EZ Glow
-
-#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-#undef ENABLE_RGB_MATRIX_PIXEL_FLOW
-#undef ENABLE_RGB_MATRIX_PIXEL_RAIN
-
-#undef ENABLE_RGB_MATRIX_HUE_BREATHING
-#undef ENABLE_RGB_MATRIX_HUE_PENDULUM
-#undef ENABLE_RGB_MATRIX_HUE_WAVE
-
-#undef RGBLIGHT_EFFECT_CHRISTMAS
-#undef ENABLE_RGB_MATRIX_CYCLE_ALL
diff --git a/keyboards/ergodox_ez/glow/info.json b/keyboards/ergodox_ez/glow/info.json
new file mode 100644
index 0000000000..dcbb1999ca
--- /dev/null
+++ b/keyboards/ergodox_ez/glow/info.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "ErgoDox EZ Glow",
+ "usb": {
+ "pid": "0x4976"
+ }
+}
diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json
index 1682f4bb45..46a0fbbacd 100644
--- a/keyboards/ergodox_ez/info.json
+++ b/keyboards/ergodox_ez/info.json
@@ -1,7 +1,11 @@
{
- "keyboard_name": "ErgoDox EZ",
+ "manufacturer": "ZSA Technology Labs",
"url": "ergodox-ez.com",
"maintainer": "ZSA via Drashna",
+ "usb": {
+ "vid": "0x3297",
+ "device_version": "0.0.1"
+ },
"layouts": {
"LAYOUT_ergodox": {
"layout": [
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index 99d1df039a..f3732107e5 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -40,3 +40,5 @@ AUDIO_SUPPORTED = no
BACKLIGHT_SUPPORTED = no
MOUSE_SHARED_EP = no
+
+DEFAULT_FOLDER = ergodox_ez/base
diff --git a/keyboards/ergodox_ez/shine/config.h b/keyboards/ergodox_ez/shine/config.h
deleted file mode 100644
index cf4f59f3b8..0000000000
--- a/keyboards/ergodox_ez/shine/config.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
-Copyright 2015 ZSA Technology Labs Inc (@zsa)
-Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
-
-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
-
-#undef PRODUCT_ID
-#define PRODUCT_ID 0x4975
-#undef PRODUCT
-#define PRODUCT ErgoDox EZ Shine
diff --git a/keyboards/ergodox_ez/shine/info.json b/keyboards/ergodox_ez/shine/info.json
new file mode 100644
index 0000000000..11c3a8b209
--- /dev/null
+++ b/keyboards/ergodox_ez/shine/info.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "ErgoDox EZ Shine",
+ "usb": {
+ "pid": "0x4975"
+ }
+}
diff --git a/keyboards/ergodox_ez/util/compile_keymap.py b/keyboards/ergodox_ez/util/compile_keymap.py
index b447ecaf5c..310512c920 100755
--- a/keyboards/ergodox_ez/util/compile_keymap.py
+++ b/keyboards/ergodox_ez/util/compile_keymap.py
@@ -27,29 +27,34 @@ PY2 = sys.version_info.major == 2
if PY2:
chr = unichr
-
KEYBOARD_LAYOUTS = {
# These map positions in the parsed layout to
# positions in the KEYMAP MATRIX
'ergodox_ez': [
- [ 0, 1, 2, 3, 4, 5, 6], [38, 39, 40, 41, 42, 43, 44],
- [ 7, 8, 9, 10, 11, 12, 13], [45, 46, 47, 48, 49, 50, 51],
- [14, 15, 16, 17, 18, 19 ], [ 52, 53, 54, 55, 56, 57],
- [20, 21, 22, 23, 24, 25, 26], [58, 59, 60, 61, 62, 63, 64],
- [27, 28, 29, 30, 31 ], [ 65, 66, 67, 68, 69],
- [ 32, 33], [70, 71 ],
- [ 34], [72 ],
- [ 35, 36, 37], [73, 74, 75 ],
+ [0, 1, 2, 3, 4, 5, 6],
+ [38, 39, 40, 41, 42, 43, 44],
+ [7, 8, 9, 10, 11, 12, 13],
+ [45, 46, 47, 48, 49, 50, 51],
+ [14, 15, 16, 17, 18, 19],
+ [52, 53, 54, 55, 56, 57],
+ [20, 21, 22, 23, 24, 25, 26],
+ [58, 59, 60, 61, 62, 63, 64],
+ [27, 28, 29, 30, 31],
+ [65, 66, 67, 68, 69],
+ [32, 33],
+ [70, 71],
+ [34],
+ [72],
+ [35, 36, 37],
+ [73, 74, 75],
]
}
-ROW_INDENTS = {
- 'ergodox_ez': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0]
-}
+ROW_INDENTS = {'ergodox_ez': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0]}
BLANK_LAYOUTS = [
-# Compact Layout
-"""
+ # Compact Layout
+ """
.------------------------------------.------------------------------------.
| | | | | | | | | | | | | | |
!-----+----+----+----+----+----------!-----+----+----+----+----+----+-----!
@@ -70,8 +75,8 @@ BLANK_LAYOUTS = [
'-----------------' '-----------------'
""",
-# Wide Layout
-"""
+ # Wide Layout
+ """
.---------------------------------------------. .---------------------------------------------.
| | | | | | | | ! | | | | | | |
!-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------!
@@ -93,26 +98,22 @@ BLANK_LAYOUTS = [
""",
]
-
DEFAULT_CONFIG = {
- "keymaps_includes": [
- "keymap_common.h",
- ],
+ "keymaps_includes": ["keymap_common.h",],
'filler': "-+.'!:x",
'separator': "|",
'default_key_prefix': ["KC_"],
}
-
SECTIONS = [
'layout_config',
'layers',
]
-
# Markdown Parsing
-ONELINE_COMMENT_RE = re.compile(r"""
+ONELINE_COMMENT_RE = re.compile(
+ r"""
^ # comment must be at the start of the line
\s* # arbitrary whitespace
// # start of the comment
@@ -121,22 +122,26 @@ ONELINE_COMMENT_RE = re.compile(r"""
""", re.MULTILINE | re.VERBOSE
)
-INLINE_COMMENT_RE = re.compile(r"""
+INLINE_COMMENT_RE = re.compile(
+ r"""
([\,\"\[\]\{\}\d]) # anythig that might end a expression
\s+ # comment must be preceded by whitespace
// # start of the comment
\s # and succeded by whitespace
(?:[^\"\]\}\{\[]*) # the comment (except things which might be json)
$ # until the end of line
-""", re.MULTILINE | re.VERBOSE)
+""", re.MULTILINE | re.VERBOSE
+)
-TRAILING_COMMA_RE = re.compile(r"""
+TRAILING_COMMA_RE = re.compile(
+ r"""
, # the comma
(?:\s*) # arbitrary whitespace
$ # only works if the trailing comma is followed by newline
(\s*) # arbitrary whitespace
([\]\}]) # end of an array or object
-""", re.MULTILINE | re.VERBOSE)
+""", re.MULTILINE | re.VERBOSE
+)
def loads(raw_data):
@@ -178,9 +183,7 @@ def parse_config(path):
def end_section():
if section['start_line'] >= 0:
if section['name'] == 'layout_config':
- config.update(loads("\n".join(
- section['code_lines']
- )))
+ config.update(loads("\n".join(section['code_lines'])))
elif section['sub_name'].startswith('layer'):
layer_name = section['sub_name']
config['layer_lines'][layer_name] = section['code_lines']
@@ -215,6 +218,7 @@ def parse_config(path):
assert 'layout' in config
return config
+
# header file parsing
IF0_RE = re.compile(r"""
@@ -224,7 +228,6 @@ IF0_RE = re.compile(r"""
#endif
""", re.MULTILINE | re.DOTALL | re.VERBOSE)
-
COMMENT_RE = re.compile(r"""
/\*
.*?
@@ -244,6 +247,7 @@ def regex_partial(re_str_fmt, flags):
def partial(*args, **kwargs):
re_str = re_str_fmt.format(*args, **kwargs)
return re.compile(re_str, flags)
+
return partial
@@ -256,7 +260,6 @@ KEYDEF_REP = regex_partial(r"""
) # capture group end
""", re.MULTILINE | re.DOTALL | re.VERBOSE)
-
ENUM_RE = re.compile(r"""
(
enum
@@ -268,7 +271,6 @@ ENUM_RE = re.compile(r"""
) # capture group end
""", re.MULTILINE | re.DOTALL | re.VERBOSE)
-
ENUM_KEY_REP = regex_partial(r"""
(
{} # the prefixes
@@ -309,14 +311,13 @@ def parse_valid_keys(config, out_path):
include_path = os.path.join(dirpath, include)
if os.path.exists(include_path):
header_data = read_header_file(include_path)
- valid_keycodes.update(
- parse_keydefs(config, header_data)
- )
+ valid_keycodes.update(parse_keydefs(config, header_data))
return valid_keycodes
# Keymap Parsing
+
def iter_raw_codes(layer_lines, filler, separator):
filler_re = re.compile("[" + filler + " ]")
for line in layer_lines:
@@ -346,28 +347,21 @@ LAYER_CHANGE_RE = re.compile(r"""
(DF|TG|MO)\(\d+\)
""", re.VERBOSE)
-
MACRO_RE = re.compile(r"""
M\(\w+\)
""", re.VERBOSE)
-
UNICODE_RE = re.compile(r"""
U[0-9A-F]{4}
""", re.VERBOSE)
-
NON_CODE = re.compile(r"""
^[^A-Z0-9_]$
""", re.VERBOSE)
def parse_uni_code(raw_code):
- macro_id = "UC_" + (
- unicodedata.name(raw_code)
- .replace(" ", "_")
- .replace("-", "_")
- )
+ macro_id = "UC_" + (unicodedata.name(raw_code).replace(" ", "_").replace("-", "_"))
code = "M({})".format(macro_id)
uc_hex = "{:04X}".format(ord(raw_code))
return code, macro_id, uc_hex
@@ -407,19 +401,13 @@ def parse_code(raw_code, key_prefixes, valid_keycodes):
def parse_keymap(config, key_indexes, layer_lines, valid_keycodes):
keymap = {}
- raw_codes = list(iter_raw_codes(
- layer_lines, config['filler'], config['separator']
- ))
+ raw_codes = list(iter_raw_codes(layer_lines, config['filler'], config['separator']))
indexed_codes = iter_indexed_codes(raw_codes, key_indexes)
key_prefixes = config['key_prefixes']
for raw_code, key_index, row_index in indexed_codes:
- code, macro_id, uc_hex = parse_code(
- raw_code, key_prefixes, valid_keycodes
- )
+ code, macro_id, uc_hex = parse_code(raw_code, key_prefixes, valid_keycodes)
# TODO: line numbers for invalid codes
- err_msg = "Could not parse key '{}' on row {}".format(
- raw_code, row_index
- )
+ err_msg = "Could not parse key '{}' on row {}".format(raw_code, row_index)
assert code is not None, err_msg
# print(repr(raw_code), repr(code), macro_id, uc_hex)
if macro_id:
@@ -432,17 +420,14 @@ def parse_keymap(config, key_indexes, layer_lines, valid_keycodes):
def parse_keymaps(config, valid_keycodes):
keymaps = collections.OrderedDict()
- key_indexes = config.get(
- 'key_indexes', KEYBOARD_LAYOUTS[config['layout']]
- )
+ key_indexes = config.get('key_indexes', KEYBOARD_LAYOUTS[config['layout']])
# TODO: maybe validate key_indexes
for layer_name, layer_lines, in config['layer_lines'].items():
- keymaps[layer_name] = parse_keymap(
- config, key_indexes, layer_lines, valid_keycodes
- )
+ keymaps[layer_name] = parse_keymap(config, key_indexes, layer_lines, valid_keycodes)
return keymaps
+
# keymap.c output
USERCODE = """
@@ -453,7 +438,7 @@ void matrix_init_user(void) {
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
- uint8_t layer = biton32(layer_state);
+ uint8_t layer = get_highest_layer(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
@@ -572,7 +557,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{
}};
"""
-
UNICODE_MACRO_TEMPLATE = """
case {macro_id}:
unicode_action_function(0x{hi:02x}, 0x{lo:02x});
@@ -584,9 +568,7 @@ def unicode_macro_cases(config):
for macro_id, uc_hex in config['unicode_macros'].items():
hi = int(uc_hex, 16) >> 8
lo = int(uc_hex, 16) & 0xFF
- yield UNICODE_MACRO_TEMPLATE.format(
- macro_id=macro_id, hi=hi, lo=lo
- )
+ yield UNICODE_MACRO_TEMPLATE.format(macro_id=macro_id, hi=hi, lo=lo)
def iter_keymap_lines(keymap, row_indents=None):
diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h
index 5951a485d3..2e5d862e37 100644
--- a/keyboards/moonlander/config.h
+++ b/keyboards/moonlander/config.h
@@ -20,17 +20,8 @@
#include "config_common.h"
-/* USB Device descriptor parameter */
-// clang-format off
-#define VENDOR_ID 0x3297
-#define PRODUCT_ID 0x1969
-#define MANUFACTURER ZSA Technology Labs
-#define PRODUCT Moonlander Mark I
-#define DEVICE_VER 0x0001
#define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com"
-// clang-format on
-
/* key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 7
diff --git a/keyboards/moonlander/info.json b/keyboards/moonlander/info.json
index 60b560eeee..6322dccd5b 100644
--- a/keyboards/moonlander/info.json
+++ b/keyboards/moonlander/info.json
@@ -1,7 +1,13 @@
{
"keyboard_name": "Moonlander Mark I",
+ "manufacturer": "ZSA Technology Labs",
"url": "zsa.io/moonlander",
"maintainer": "ZSA via Drashna",
+ "usb": {
+ "vid": "0x3297",
+ "pid": "0x1969",
+ "device_version": "0.0.1"
+ },
"layouts": {
"LAYOUT_moonlander": {
"layout": [
diff --git a/keyboards/moonlander/keymaps/oryx/rules.mk b/keyboards/moonlander/keymaps/oryx/rules.mk
index d269d04c82..5026e22db5 100644
--- a/keyboards/moonlander/keymaps/oryx/rules.mk
+++ b/keyboards/moonlander/keymaps/oryx/rules.mk
@@ -1,4 +1,4 @@
-SRC += ../default/keymap.c
+INTROSPECTION_KEYMAP_C = ../default/keymap.c
-include ../default/rules.mk
ORYX_ENABLE = yes
diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c
index 5f95dccc01..2ad4ccc5fd 100644
--- a/keyboards/moonlander/matrix.c
+++ b/keyboards/moonlander/matrix.c
@@ -227,3 +227,7 @@ void matrix_power_up(void) {
}
}
+
+bool is_transport_connected(void) {
+ return mcp23018_initd;
+} \ No newline at end of file
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index e849bff4e2..c217782d3f 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -320,7 +320,7 @@ bool music_mask_kb(uint16_t keycode) {
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX:
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case AU_ON ... MUV_DE:
- case RESET:
+ case QK_BOOT:
case EEP_RST:
return false;
default:
diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h
index e2b4c76a11..b2e251900e 100644
--- a/keyboards/moonlander/moonlander.h
+++ b/keyboards/moonlander/moonlander.h
@@ -77,3 +77,5 @@ typedef union {
} keyboard_config_t;
extern keyboard_config_t keyboard_config;
+
+bool is_transport_connected(void); \ No newline at end of file
diff --git a/keyboards/moonlander/readme.md b/keyboards/moonlander/readme.md
index bf80f05569..733780abde 100644
--- a/keyboards/moonlander/readme.md
+++ b/keyboards/moonlander/readme.md
@@ -41,4 +41,18 @@ If you're using the Smart LED (layer indication) feature from the Oryx Configura
This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off.
-Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already.
+Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already.
+
+### Detecting split / Gaming mode
+
+To make it extra gaming friendly, you can configure what happens when you disconnect the right half. This is especially useful when using gaming unfriendly layers or layouts (e.g. home row mods, dvorak, colemak).
+
+Example for enabling a specific layer while right side is disconnected:
+
+```
+void housekeeping_task_user(void) {
+ if (!is_transport_connected()) {
+ // set layer
+ }
+}
+``` \ No newline at end of file
diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h
index 8fb9dda32a..87221a81f8 100644
--- a/keyboards/planck/config.h
+++ b/keyboards/planck/config.h
@@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x03A8
-#define MANUFACTURER OLKB
-#define PRODUCT Planck
-
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 12
@@ -31,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Planck PCB default pin-out */
#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
-#define UNUSED_PINS
#define QMK_ESC_OUTPUT F1
#define QMK_ESC_INPUT D5
diff --git a/keyboards/planck/ez/base/info.json b/keyboards/planck/ez/base/info.json
new file mode 100644
index 0000000000..07167a8c2a
--- /dev/null
+++ b/keyboards/planck/ez/base/info.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "Planck EZ",
+ "usb": {
+ "pid": "0xC6CE"
+ }
+}
diff --git a/keyboards/planck/ez/base/rules.mk b/keyboards/planck/ez/base/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/planck/ez/base/rules.mk
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index a79f49aa38..4b47e2fe2f 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -18,18 +18,6 @@
#pragma once
-
-#undef VENDOR_ID
-#define VENDOR_ID 0x3297
-#undef PRODUCT_ID
-#define PRODUCT_ID 0xC6CE
-#undef MANUFACTURER
-#define MANUFACTURER ZSA Technology Labs
-#undef PRODUCT
-#define PRODUCT Planck EZ
-#define DEVICE_VER 0x0000
-
-
#undef MATRIX_ROWS
#undef MATRIX_COLS
/* key matrix size */
@@ -181,4 +169,3 @@
#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL
#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED
#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX
-
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index 5294be9ec0..93a17be293 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -292,7 +292,7 @@ bool music_mask_kb(uint16_t keycode) {
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX:
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case AU_ON ... MUV_DE:
- case RESET:
+ case QK_BOOT:
case EEP_RST:
return false;
default:
@@ -371,3 +371,22 @@ void matrix_scan_kb(void) {
#endif
matrix_scan_user();
}
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
+ {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}},
+ {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
+ {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+
+ {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
+};
+
+# ifdef ENCODER_MAP_ENABLE
+const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {0};
+# endif
+#endif
diff --git a/keyboards/planck/ez/glow/config.h b/keyboards/planck/ez/glow/config.h
deleted file mode 100644
index 55ce289010..0000000000
--- a/keyboards/planck/ez/glow/config.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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
- * 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
-
-#undef PRODUCT_ID
-#define PRODUCT_ID 0xC6CF
-
-#undef PRODUCT
-#define PRODUCT Planck EZ Glow
diff --git a/keyboards/planck/ez/glow/info.json b/keyboards/planck/ez/glow/info.json
new file mode 100644
index 0000000000..4852258570
--- /dev/null
+++ b/keyboards/planck/ez/glow/info.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "Planck EZ Glow",
+ "usb": {
+ "pid": "0xC6CF"
+ }
+}
diff --git a/keyboards/planck/ez/glow/keymaps/glow/keymap.c b/keyboards/planck/ez/glow/keymaps/glow/keymap.c
index 37659fbc32..fb150a8901 100644
--- a/keyboards/planck/ez/glow/keymaps/glow/keymap.c
+++ b/keyboards/planck/ez/glow/keymaps/glow/keymap.c
@@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_planck_grid(
- _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, QK_BOOT, 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, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json
index 6c9332b052..4008cb7057 100644
--- a/keyboards/planck/ez/info.json
+++ b/keyboards/planck/ez/info.json
@@ -1,7 +1,11 @@
{
- "keyboard_name": "Planck EZ",
+ "manufacturer": "ZSA Technology Labs",
"url": "https://ergodox-ez.com/pages/planck",
"maintainer": "jackhumbert",
+ "usb": {
+ "vid": "0x3297",
+ "device_version": "0.0.1"
+ },
"layouts": {
"LAYOUT_planck_1x2uC": {
"layout": [
diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk
index d8494f1843..d493550fa8 100755
--- a/keyboards/planck/ez/rules.mk
+++ b/keyboards/planck/ez/rules.mk
@@ -30,3 +30,5 @@ RGBLIGHT_SUPPORTED = no
BAKCLIGHT_SUPPORTED = no
MOUSE_SHARED_EP = no
+
+DEFAULT_FOLDER = planck/ez/base
diff --git a/keyboards/planck/info.json b/keyboards/planck/info.json
index a4710d781f..cc57b6da60 100644
--- a/keyboards/planck/info.json
+++ b/keyboards/planck/info.json
@@ -1,5 +1,4 @@
{
- "keyboard_name": "Planck",
"url": "https://olkb.com/planck",
"maintainer": "jackhumbert",
"layouts": {
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 3453d41746..8041e0bada 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_planck_grid(
_______, QK_BOOT, 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, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c
index d7b4bafe25..7a198f8693 100644
--- a/keyboards/planck/keymaps/oryx/keymap.c
+++ b/keyboards/planck/keymaps/oryx/keymap.c
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_planck_grid(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- KC_DEL, _______, AU_ON, AU_OFF, AU_TOG, _______, _______, RGB_TOG, RGB_VAI, RGB_VAD, LED_LEVEL, RESET,
+ KC_DEL, _______, AU_ON, AU_OFF, AU_TOG, _______, _______, RGB_TOG, RGB_VAI, RGB_VAD, LED_LEVEL, QK_BOOT,
_______, _______, MU_ON, MU_OFF, MU_TOG, _______, _______, RGB_MOD, RGB_HUI, RGB_HUD, TOGGLE_LAYER_COLOR, _______,
_______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______
),
@@ -95,7 +95,7 @@ void rgb_matrix_indicators_user(void) {
if (keyboard_config.disable_layer_led) {
return;
}
- switch (biton32(layer_state)) {
+ switch (get_highest_layer(layer_state)) {
case 1:
set_layer_color(0);
break;
diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c
index e9bd90bdfe..20db22055c 100644
--- a/keyboards/planck/planck.c
+++ b/keyboards/planck/planck.c
@@ -1,15 +1,5 @@
#include "planck.h"
-#ifdef SWAP_HANDS_ENABLE
-__attribute__ ((weak))
-const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
- {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
- {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
- {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
- {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
-};
-#endif
-
__attribute__ ((weak))
void matrix_init_kb(void) {
// Turn status LED on, with the exception of THK