Fix layouts for FM2U (#9604)

* Fix layouts for FM2U

* Leave old layout names as deprecated aliases
master
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
* represents the switch matrix.
*/
#define LAYOUT_100u( \
#define LAYOUT_1u( \
k00 \
) \
{ \
) { \
{ k00 } \
}
#define LAYOUT_125u LAYOUT_100u
#define LAYOUT_150u LAYOUT_100u
#define LAYOUT_175u LAYOUT_100u
#define LAYOUT_200u LAYOUT_100u
#define LAYOUT_225u LAYOUT_100u
#define LAYOUT_275u LAYOUT_100u
#define LAYOUT_300u LAYOUT_100u
#define LAYOUT_600u LAYOUT_100u
#define LAYOUT_625u LAYOUT_100u
#define LAYOUT_700u LAYOUT_100u
#define LAYOUT_iso LAYOUT_100u
#define LAYOUT_1u25( \
k00 \
) { \
{ k00 } \
}
#define LAYOUT_1u5( \
k00 \
) { \
{ k00 } \
}
#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": "",
"maintainer": "qmk",
"width": 1,
"height": 1,
"layouts": {
"LAYOUT_100u": {
"layout": [{"x":0, "y":0}]
"LAYOUT_1u": {
"layout": [
{"x": 0, "y": 0}
]
},
"LAYOUT_125u": {
"layout": [{"x":0, "y":0, "w":1.25}]
"LAYOUT_1u25": {
"layout": [
{"x": 0, "y": 0, "w": 1.25}
]
},
"LAYOUT_150u": {
"layout": [{"x":0, "y":0, "w":1.50}]
"LAYOUT_1u5": {
"layout": [
{"x": 0, "y": 0, "w": 1.50}
]
},
"LAYOUT_175u": {
"layout": [{"x":0, "y":0, "w":1.75}]
"LAYOUT_1u75": {
"layout": [
{"x": 0, "y": 0, "w": 1.75}
]
},
"LAYOUT_200u": {
"layout": [{"x":0, "y":0, "w":2.00}]
"LAYOUT_2u": {
"layout": [
{"x": 0, "y": 0, "w": 2}
]
},
"LAYOUT_225u": {
"layout": [{"x":0, "y":0, "w":2.25}]
"LAYOUT_2u25": {
"layout": [
{"x": 0, "y": 0, "w": 2.25}
]
},
"LAYOUT_275u": {
"layout": [{"x":0, "y":0, "w":2.75}]
"LAYOUT_2u75": {
"layout": [
{"x": 0, "y": 0, "w": 2.75}
]
},
"LAYOUT_300u": {
"layout": [{"x":0, "y":0, "w":3.00}]
"LAYOUT_3u": {
"layout": [
{"x": 0, "y": 0, "w": 3}
]
},
"LAYOUT_600u": {
"layout": [{"x":0, "y":0, "w":6.00}]
"LAYOUT_6u": {
"layout": [
{"x": 0, "y": 0, "w": 6}
]
},
"LAYOUT_625u": {
"layout": [{"x":0, "y":0, "w":6.25}]
"LAYOUT_6u25": {
"layout": [
{"x": 0, "y": 0, "w": 6.25}
]
},
"LAYOUT_700u": {
"layout": [{"x":0, "y":0, "w":7.00}]
"LAYOUT_7u": {
"layout": [
{"x": 0, "y": 0, "w": 7}
]
},
"LAYOUT_iso": {
"layout": [{"x":0.25, "y":0, "w":1.25, "h":2}]
"LAYOUT_isoenter": {
"layout": [
{"x": 0.25, "y": 0, "w": 1.25, "h": 2}
]
}
}
}

View File

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

View File

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