Fix layouts for FM2U (#9604)

* Fix layouts for FM2U

* Leave old layout names as deprecated aliases
This commit is contained in:
Ryan 2020-07-02 15:47:53 +10:00 committed by GitHub
parent d4dc2a577f
commit 7c57efaaf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 140 additions and 63 deletions

View File

@ -26,21 +26,88 @@
* The second converts the arguments into a two-dimensional array which * The second converts the arguments into a two-dimensional array which
* represents the switch matrix. * represents the switch matrix.
*/ */
#define LAYOUT_100u( \ #define LAYOUT_1u( \
k00 \ k00 \
) \ ) { \
{ \
{ k00 } \ { k00 } \
} }
#define LAYOUT_125u LAYOUT_100u #define LAYOUT_1u25( \
#define LAYOUT_150u LAYOUT_100u k00 \
#define LAYOUT_175u LAYOUT_100u ) { \
#define LAYOUT_200u LAYOUT_100u { k00 } \
#define LAYOUT_225u LAYOUT_100u }
#define LAYOUT_275u LAYOUT_100u
#define LAYOUT_300u LAYOUT_100u #define LAYOUT_1u5( \
#define LAYOUT_600u LAYOUT_100u k00 \
#define LAYOUT_625u LAYOUT_100u ) { \
#define LAYOUT_700u LAYOUT_100u { k00 } \
#define LAYOUT_iso LAYOUT_100u }
#define LAYOUT_1u75( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_2u( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_2u25( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_2u75( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_3u( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_6u( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_6u25( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_7u( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_isoenter( \
k00 \
) { \
{ k00 } \
}
// Backward compatibility TODO: remove these
#define LAYOUT_100u LAYOUT_1u
#define LAYOUT_125u LAYOUT_1u25
#define LAYOUT_150u LAYOUT_1u5
#define LAYOUT_175u LAYOUT_1u75
#define LAYOUT_200u LAYOUT_2u
#define LAYOUT_225u LAYOUT_2u25
#define LAYOUT_275u LAYOUT_2u75
#define LAYOUT_300u LAYOUT_3u
#define LAYOUT_600u LAYOUT_6u
#define LAYOUT_625u LAYOUT_6u25
#define LAYOUT_700u LAYOUT_7u
#define LAYOUT_iso LAYOUT_isoenter

View File

@ -1,56 +1,69 @@
{ {
"keyboard_name": "fm2u", "keyboard_name": "Botanical Keyboards FM2U",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 1, "width": 1,
"height": 1, "height": 1,
"layouts": { "layouts": {
"LAYOUT_100u": { "LAYOUT_1u": {
"layout": [{"x":0, "y":0}] "layout": [
{"x": 0, "y": 0}
]
}, },
"LAYOUT_1u25": {
"LAYOUT_125u": { "layout": [
"layout": [{"x":0, "y":0, "w":1.25}] {"x": 0, "y": 0, "w": 1.25}
]
}, },
"LAYOUT_1u5": {
"LAYOUT_150u": { "layout": [
"layout": [{"x":0, "y":0, "w":1.50}] {"x": 0, "y": 0, "w": 1.50}
]
}, },
"LAYOUT_1u75": {
"LAYOUT_175u": { "layout": [
"layout": [{"x":0, "y":0, "w":1.75}] {"x": 0, "y": 0, "w": 1.75}
]
}, },
"LAYOUT_2u": {
"LAYOUT_200u": { "layout": [
"layout": [{"x":0, "y":0, "w":2.00}] {"x": 0, "y": 0, "w": 2}
]
}, },
"LAYOUT_2u25": {
"LAYOUT_225u": { "layout": [
"layout": [{"x":0, "y":0, "w":2.25}] {"x": 0, "y": 0, "w": 2.25}
]
}, },
"LAYOUT_2u75": {
"LAYOUT_275u": { "layout": [
"layout": [{"x":0, "y":0, "w":2.75}] {"x": 0, "y": 0, "w": 2.75}
]
}, },
"LAYOUT_3u": {
"LAYOUT_300u": { "layout": [
"layout": [{"x":0, "y":0, "w":3.00}] {"x": 0, "y": 0, "w": 3}
]
}, },
"LAYOUT_6u": {
"LAYOUT_600u": { "layout": [
"layout": [{"x":0, "y":0, "w":6.00}] {"x": 0, "y": 0, "w": 6}
]
}, },
"LAYOUT_6u25": {
"LAYOUT_625u": { "layout": [
"layout": [{"x":0, "y":0, "w":6.25}] {"x": 0, "y": 0, "w": 6.25}
]
}, },
"LAYOUT_7u": {
"LAYOUT_700u": { "layout": [
"layout": [{"x":0, "y":0, "w":7.00}] {"x": 0, "y": 0, "w": 7}
]
}, },
"LAYOUT_isoenter": {
"LAYOUT_iso": { "layout": [
"layout": [{"x":0.25, "y":0, "w":1.25, "h":2}] {"x": 0.25, "y": 0, "w": 1.25, "h": 2}
]
} }
} }
} }

View File

@ -15,11 +15,9 @@
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */ /* Base */
[0] = LAYOUT_100u( [0] = LAYOUT_2u(
KC_B KC_B
) )
}; };

View File

@ -18,20 +18,19 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */ /* Base */
[0] = LAYOUT_100u( [0] = LAYOUT_2u(
KC_B KC_B
), ),
[1] = LAYOUT_100u( [1] = LAYOUT_2u(
KC_TRNS KC_TRNS
), ),
[2] = LAYOUT_100u( [2] = LAYOUT_2u(
KC_TRNS KC_TRNS
), ),
[3] = LAYOUT_100u( [3] = LAYOUT_2u(
KC_TRNS KC_TRNS
), )
}; };