summaryrefslogtreecommitdiffstats
path: root/keyboards/han60/han60.h
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2022-10-23 06:33:25 -0700
committerGitHub <noreply@github.com>2022-10-23 14:33:25 +0100
commit64e84419106013d9977192fd2087c0bb8baae84a (patch)
treed85fa9434bd98c094d431754274403aed8d522dc /keyboards/han60/han60.h
parent9248a04e17618a796532c62d6cf71427bce9133a (diff)
Han60 Refactor (#18819)
* info.json: apply friendly formatting * han60.h: add matrix diagram * han60.h: tidy file - remove trailing whitespace - use four-space indent * info.json: remove key overlaps from LAYOUT_all rendering * rename LAYOUT_tsangan to LAYOUT_60_ansi_tsangan * rename LAYOUT_tsangan_arrowkeys to LAYOUT_60_ansi_arrow_tsangan * refactor LAYOUT_tsangan_iso into LAYOUT_60_iso_tsangan Moves position `K2C` (Enter) to the home row. * refactor LAYOUT_tsangan_iso_arrowkeys into LAYOUT_60_iso_arrow_tsangan Moves position `K2C` (Enter) to the home row. * refactor default keymap - use four-space indent - use QMK-native keycode aliases - grid-align keycodes * bugfix layout macros * add reference keymaps
Diffstat (limited to 'keyboards/han60/han60.h')
-rw-r--r--keyboards/han60/han60.h106
1 files changed, 61 insertions, 45 deletions
diff --git a/keyboards/han60/han60.h b/keyboards/han60/han60.h
index f6e25c23b2..ebc443a277 100644
--- a/keyboards/han60/han60.h
+++ b/keyboards/han60/han60.h
@@ -26,78 +26,94 @@
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
-
+
#define XXX KC_NO
+/*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───────┐
+ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │2D │ │0D │ 2u Backspace
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ └─┬─────┤
+ * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ │ │
+ * 2.25u ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ┌──┴┐2C │ ISO Enter
+ * LShift │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │ │1D │ │
+ * ┌────────┐ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌─────┴┬──┴┬───┤
+ * │30 │ │30 │40 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │ │3B │3D │4D │ 1.75u/1u/1u
+ * └────────┘ ├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ └──────┴───┴───┘
+ * │41 │42 │43 │44 │47 │49 │4B │ Tsangan/WKL
+ * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
+ * ┌─────┬───┬─────┬───────────────────────────┬───┬───┬───┬───┐
+ * │41 │42 │43 │44 │47 │48 │4A │4C │ Arrow
+ * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘
+ */
#define LAYOUT_all( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
- K30, K40, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K4D, \
- K41, K42, K43, K44, K47, K48, K49, K4A, K4B, K4C \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K40, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K4D, \
+ K41, K42, K43, K44, K47, K48, K49, K4A, K4B, K4C \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
- { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \
- { K40, K41, K42, K43, K44, XXX, XXX, K47, K48, K49, K4A, K4B, K4C, K4D } \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \
+ { K40, K41, K42, K43, K44, XXX, XXX, K47, K48, K49, K4A, K4B, K4C, K4D } \
}
-#define LAYOUT_tsangan( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
- K41, K42, K43, K44, K47, K49, K4B \
+#define LAYOUT_60_ansi_tsangan( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
+ K41, K42, K43, K44, K47, K49, K4B \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
- { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \
- { XXX, K41, K42, K43, K44, XXX, XXX, K47, XXX, K49, XXX, K4B, XXX, XXX } \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \
+ { XXX, K41, K42, K43, K44, XXX, XXX, K47, XXX, K49, XXX, K4B, XXX, XXX } \
}
-#define LAYOUT_tsangan_arrowkeys( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3D, K4D, \
- K41, K42, K43, K44, K47, K48, K4A, K4C \
+#define LAYOUT_60_ansi_arrow_tsangan( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3D, K4D, \
+ K41, K42, K43, K44, K47, K48, K4A, K4C \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
- { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, XXX, K3D }, \
- { XXX, K41, K42, K43, K44, XXX, XXX, K47, K48, XXX, K4A, XXX, K4C, K4D } \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, XXX, K3D }, \
+ { XXX, K41, K42, K43, K44, XXX, XXX, K47, K48, XXX, K4A, XXX, K4C, K4D } \
}
-#define LAYOUT_tsangan_iso( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, \
- K30, K40, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
- K41, K42, K43, K44, K47, K49, K4B \
+#define LAYOUT_60_iso_tsangan( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2C, \
+ K30, K40, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
+ K41, K42, K43, K44, K47, K49, K4B \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
- { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \
- { K40, K41, K42, K43, K44, XXX, XXX, K47, XXX, K49, XXX, K4B, XXX, XXX } \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \
+ { K40, K41, K42, K43, K44, XXX, XXX, K47, XXX, K49, XXX, K4B, XXX, XXX } \
}
-#define LAYOUT_tsangan_iso_arrowkeys( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, \
- K30, K40, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3D, K4D, \
- K41, K42, K43, K44, K47, K48, K4A, K4C \
+#define LAYOUT_60_iso_arrow_tsangan( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2C, \
+ K30, K40, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3D, K4D, \
+ K41, K42, K43, K44, K47, K48, K4A, K4C \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
- { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, XXX, K3D }, \
- { K40, K41, K42, K43, K44, XXX, XXX, K47, K48, XXX, K4A, XXX, K4C, K4D } \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, XXX, K3D }, \
+ { K40, K41, K42, K43, K44, XXX, XXX, K47, K48, XXX, K4A, XXX, K4C, K4D } \
}