mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-28 03:59:33 +06:00
e0f91f37c4
* Added 4by3 keyboard * Added DEVICE_VER and DESCRIPTION * Removed F_CPU, F_USB, ARCH, and OPT_DEFS * Add 3 new LAYOUT macros for orientations and fixes * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Added comments to 4by3 and changed info.json * Update keyboards/4by3/4by3.h Co-Authored-By: fauxpark <fauxpark@gmail.com>
71 lines
1.8 KiB
C
71 lines
1.8 KiB
C
#pragma once
|
|
|
|
#include "quantum.h"
|
|
|
|
/* LAYOUT_horizontal
|
|
* ┌───┐
|
|
* │USB│
|
|
* ├───┼───┬───┬───┐
|
|
* │K00│K01│K02│K03│
|
|
* ├───┼───┼───┼───┤
|
|
* │K10│K11│K12│K13│
|
|
* ├───┼───┼───┼───┤
|
|
* │K20│K21│K22│K23│
|
|
* └───┴───┴───┴───┘
|
|
*/
|
|
#define LAYOUT_horizontal( \
|
|
K00, K01, K02, K03, \
|
|
K10, K11, K12, K13, \
|
|
K20, K21, K22, K23 \
|
|
) { \
|
|
{ K00, K01, K02, K03 }, \
|
|
{ K10, K11, K12, K13 }, \
|
|
{ K20, K21, K22, K23 } \
|
|
}
|
|
|
|
/* LAYOUT_vertical_right
|
|
* ┌───┬───┬───┬───┐
|
|
* │K00│K01│K03│USB│
|
|
* ├───┼───┼───┬───┘
|
|
* │K04│K05│K06│
|
|
* ├───┼───┼───┤
|
|
* │K07│K08│K09│
|
|
* ├───┼───┼───┤
|
|
* │K10│K11│K12│
|
|
* └───┴───┴───┘
|
|
*/
|
|
#define LAYOUT_vertical_right( \
|
|
K20, K10, K00, \
|
|
K21, K11, K01, \
|
|
K22, K12, K02, \
|
|
K23, K13, K03 \
|
|
) { \
|
|
{ K00, K01, K02, K03 }, \
|
|
{ K10, K11, K12, K13 }, \
|
|
{ K20, K21, K22, K23 } \
|
|
}
|
|
|
|
/* LAYOUT_vertical_left
|
|
* ┌───┬───┬───┐
|
|
* │K00│K01│K03│
|
|
* ├───┼───┼───┤
|
|
* │K04│K05│K06│
|
|
* ├───┼───┼───┤
|
|
* │K07│K08│K09│
|
|
* ┌───┼───┼───┼───┤
|
|
* │USB│K10│K11│K12│
|
|
* └───┴───┴───┴───┘
|
|
*/
|
|
#define LAYOUT_vertical_left( \
|
|
K03, K13, K23, \
|
|
K02, K12, K22, \
|
|
K01, K11, K21, \
|
|
K00, K10, K20 \
|
|
) { \
|
|
{ K00, K01, K02, K03 }, \
|
|
{ K10, K11, K12, K13 }, \
|
|
{ K20, K21, K22, K23 } \
|
|
}
|
|
|
|
#define LAYOUT LAYOUT_horizontal
|