summaryrefslogtreecommitdiff
path: root/keyboards/gorthage_truck
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-08-16 02:41:02 +0000
committerGitHub <noreply@github.com>2021-08-15 19:41:02 -0700
commit3c3c5965f1186e23985befab428ce29427c147a5 (patch)
tree721ffb15c1cb2e0927d09500b9d29f9f11986ba6 /keyboards/gorthage_truck
parent4c93c350a6f399e261a1d2ada2bfe97a838d7dcb (diff)
Gorthage Truck Refactor (#14006)
* info.json: apply human-friendly formatting * info.json: make key labels more friendly to `qmk info -l` * correct LAYOUT_3u key sequence * correct LAYOUT_7u key sequence * correct LAYOUT_10u key sequence * refactor default keymap - use QMK short-form keycodes - update grid alignment - use four-space indent - touch up with `qmk cformat` * refactor 10u keymap - use QMK short-form keycodes - add encoder_update_user() function - update grid alignment - use four-space indent * refactor 7u keymap - use QMK short-form keycodes - add encoder_update_user() function - update grid alignment - use four-space indent * refactor gorthage_truck.h - update grid alignments - use XXX for KC_NO - insert omitted KC_NO instances * correct keyboard metadata in info.json - use GitHub username for maintainer - correct keyboard dimensions * add encoder_update_kb() function to gorthage_truck.c Gives QMK Configurator compile jobs encoder functionality. * update maintainer field in info.json As requested by jpuerto96 (s8erdude).
Diffstat (limited to 'keyboards/gorthage_truck')
-rw-r--r--keyboards/gorthage_truck/gorthage_truck.c12
-rw-r--r--keyboards/gorthage_truck/gorthage_truck.h44
-rw-r--r--keyboards/gorthage_truck/info.json212
-rw-r--r--keyboards/gorthage_truck/keymaps/10u/keymap.c22
-rw-r--r--keyboards/gorthage_truck/keymaps/7u/keymap.c22
-rw-r--r--keyboards/gorthage_truck/keymaps/default/keymap.c13
6 files changed, 269 insertions, 56 deletions
diff --git a/keyboards/gorthage_truck/gorthage_truck.c b/keyboards/gorthage_truck/gorthage_truck.c
index c6f75d7270..2745666916 100644
--- a/keyboards/gorthage_truck/gorthage_truck.c
+++ b/keyboards/gorthage_truck/gorthage_truck.c
@@ -15,3 +15,15 @@
*/
#include "gorthage_truck.h"
+
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) { return false; }
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/gorthage_truck/gorthage_truck.h b/keyboards/gorthage_truck/gorthage_truck.h
index 9d9ddb4f07..ed0ff9d228 100644
--- a/keyboards/gorthage_truck/gorthage_truck.h
+++ b/keyboards/gorthage_truck/gorthage_truck.h
@@ -18,6 +18,8 @@
#include "quantum.h"
+#define XXX KC_NO
+
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
@@ -30,46 +32,46 @@
k00, k01, k02, k03, k04, k05, k06, k07, k40, k41, k42, k43, k44, k45, k46, k47, k48, \
k10, k11, k12, k13, k14, k15, k16, k17, k50, k51, k52, k53, k54, k56, k57, k58, \
k20, k21, k22, k23, k24, k25, k26, k27, k60, k61, k62, k63, k64, k65, k66, k67, k68, \
- k30, k31, k32, k34, k70, k71, k73, k74, k75, k76, k77, k78 \
+ k30, k31, k32, k34, k70, k71, k73, k74, k75, k76, k77, k78 \
) { \
- { k00, k01, k02, k03, k04, k05, k06, k07 }, \
- { k10, k11, k12, k13, k14, k15, k16, k17 }, \
- { k20, k21, k22, k23, k24, k25, k26, k27 }, \
- { k30, k31, k32, KC_NO, k34, KC_NO, KC_NO, KC_NO }, \
+ { k00, k01, k02, k03, k04, k05, k06, k07, XXX }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, XXX }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, XXX }, \
+ { k30, k31, k32, XXX, k34, XXX, XXX, XXX, XXX }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \
- { k50, k51, k52, k53, k54, KC_NO, k56, k57, k58 }, \
+ { k50, k51, k52, k53, k54, XXX, k56, k57, k58 }, \
{ k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \
- { k70, k71, KC_NO, k73, k74, k75, k76, k77, k78} \
+ { k70, k71, XXX, k73, k74, k75, k76, k77, k78 } \
}
#define LAYOUT_7u( \
k00, k01, k02, k03, k04, k05, k06, k07, k40, k41, k42, k43, k44, k45, k46, k47, k48, \
k10, k11, k12, k13, k14, k15, k16, k17, k50, k51, k52, k53, k54, k56, k57, k58, \
k20, k21, k22, k23, k24, k25, k26, k27, k60, k61, k62, k63, k64, k65, k66, k67, k68, \
- k30, k31, k32, k37, k73, k74, k75, k76, k77, k78 \
+ k30, k31, k32, k37, k73, k74, k75, k76, k77, k78 \
) { \
- { k00, k01, k02, k03, k04, k05, k06, k07 }, \
- { k10, k11, k12, k13, k14, k15, k16, k17 }, \
- { k20, k21, k22, k23, k24, k25, k26, k27 }, \
- { k30, k31, k32, KC_NO, KC_NO, KC_NO, KC_NO, k37 }, \
+ { k00, k01, k02, k03, k04, k05, k06, k07, XXX }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, XXX }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, XXX }, \
+ { k30, k31, k32, XXX, XXX, XXX, XXX, k37, XXX }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \
- { k50, k51, k52, k53, k54, KC_NO, k56, k57, k58 }, \
+ { k50, k51, k52, k53, k54, XXX, k56, k57, k58 }, \
{ k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \
- { KC_NO, KC_NO, KC_NO, k73, k74, k75, k76, k77, k78} \
+ { XXX, XXX, XXX, k73, k74, k75, k76, k77, k78 } \
}
#define LAYOUT_10u( \
k00, k01, k02, k03, k04, k05, k06, k07, k40, k41, k42, k43, k44, k45, k46, k47, k48, \
k10, k11, k12, k13, k14, k15, k16, k17, k50, k51, k52, k53, k54, k56, k57, k58, \
k20, k21, k22, k23, k24, k25, k26, k27, k60, k61, k62, k63, k64, k65, k66, k67, k68, \
- k30, k36, k73, k74, k75, k76, k77, k78 \
+ k30, k36, k73, k74, k75, k76, k77, k78 \
) { \
- { k00, k01, k02, k03, k04, k05, k06, k07 }, \
- { k10, k11, k12, k13, k14, k15, k16, k17 }, \
- { k20, k21, k22, k23, k24, k25, k26, k27 }, \
- { k30, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k36, KC_NO }, \
+ { k00, k01, k02, k03, k04, k05, k06, k07, XXX }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, XXX }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, XXX }, \
+ { k30, XXX, XXX, XXX, XXX, XXX, k36, XXX, XXX }, \
{ k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \
- { k50, k51, k52, k53, k54, KC_NO, k56, k57, k58 }, \
+ { k50, k51, k52, k53, k54, XXX, k56, k57, k58 }, \
{ k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \
- { KC_NO, KC_NO, KC_NO, k73, k74, k75, k76, k77, k78} \
+ { XXX, XXX, XXX, k73, k74, k75, k76, k77, k78 } \
}
diff --git a/keyboards/gorthage_truck/info.json b/keyboards/gorthage_truck/info.json
index 840832b6d8..05f20e8066 100644
--- a/keyboards/gorthage_truck/info.json
+++ b/keyboards/gorthage_truck/info.json
@@ -1,35 +1,209 @@
{
"keyboard_name": "gorthage_truck",
"url": "https://github.com/jpuerto96",
- "maintainer": "s8erdude",
- "width": 17,
- "height": 4,
+ "maintainer": "jpuerto96 (s8erdude)",
+ "width": 18,
+ "height": 4.5,
"layouts": {
"LAYOUT_3u": {
"layout": [
- {"label": "KC_TAB", "x":0, "y":0}, {"label":"KC_Q", "x":1, "y":0}, {"label":"KC_W", "x":2, "y":0}, {"label":"KC_E", "x":3, "y":0}, {"label":"KC_R", "x":4, "y":0}, {"label":"KC_T", "x":5, "y":0}, {"label":"KC_Y", "x":6, "y":0}, {"label":"KC_U", "x":7, "y":0}, {"label":"KC_I", "x":8, "y":0}, {"label":"KC_O", "x":9, "y":0}, {"label":"KC_P", "x":10, "y":0}, {"label":"KC_LBRC", "x":11, "y":0}, {"label":"KC_RBRC", "x":12, "y":0}, {"label":"KC_7", "x":15, "y":0}, {"label":"KC_8", "x":16, "y":0}, {"label":"KC_9", "x":17, "y":0},
- {"label":"KC_CAPS", "x":0, "y":1}, {"label":"KC_A", "x":1, "y":1}, {"label":"KC_S", "x":2, "y":1}, {"label":"KC_D", "x":3, "y":1}, {"label":"KC_F", "x":4, "y":1}, {"label":"KC_G", "x":5, "y":1}, {"label":"KC_H", "x":6, "y":1}, {"label":"KC_J", "x":7, "y":1}, {"label":"KC_K", "x":8, "y":1}, {"label":"KC_L", "x":9, "y":1}, {"label":"KC_SCLN", "x":10, "y":1}, {"label":"KC_QUOT", "x":11, "y":1}, {"label":"KC_BSLS", "x":12, "y":1}, {"label":"KC_4", "x":15, "y":1}, {"label":"KC_5", "x":16, "y":1}, {"label":"KC_6", "x":17, "y":1},
- {"label":"KC_MINS", "x":0, "y":2}, {"label":"KC_Z", "x":1, "y":2}, {"label":"KC_X", "x":2, "y":2}, {"label":"KC_C", "x":3, "y":2}, {"label":"KC_V", "x":4, "y":2}, {"label":"KC_B", "x":5, "y":2}, {"label":"KC_N", "x":6, "y":2}, {"label":"KC_M", "x":7, "y":2}, {"label":"KC_COMM", "x":8, "y":2}, {"label":"KC_DOT", "x":9, "y":2}, {"label":"KC_SLSH", "x":10, "y":2}, {"label":"KC_RSFT", "x":11, "y":2}, {"label":"KC_BSPC", "x":12, "y":2}, {"label":"KC_1", "x":15, "y":2}, {"label":"KC_2", "x":16, "y":2}, {"label":"KC_3", "x":17, "y":2},
- {"label":"KC_UP", "x":13.5, "y":2.5}, {"label":"KC_0", "x":16, "y":3}, {"label":"KC_DOT", "x":17, "y":3}, {"label":"KC_LEFT", "x":12.5, "y":3.5}, {"label":"KC_DOWN", "x":13.5, "y":3.5}, {"label":"KC_RGHT", "x":14.5, "y":3.5}, {"label":"KC_MPLY", "x":13.5, "y":0.5},
- {"label":"KC_LCTL", "x":0, "y":3, "w":1.25}, {"label":"KC_LALT", "x":1.25, "y":3, "w":1.25}, {"label":"KC_LGUI", "x":2.5, "y":3}, {"label":"KC_SPC", "x":3.5, "y":3, "w":3}, {"label":"KC_ENT", "x":6.5, "y":3, "w":3}, {"label":"KC_RGUI", "x":9.5, "y":3, "w":1.25}, {"label":"KC_RALT", "x":10.75, "y":3, "w":1.25}
+ {"label":"Tab", "x":0, "y":0},
+ {"label":"Q", "x":1, "y":0},
+ {"label":"W", "x":2, "y":0},
+ {"label":"E", "x":3, "y":0},
+ {"label":"R", "x":4, "y":0},
+ {"label":"T", "x":5, "y":0},
+ {"label":"Y", "x":6, "y":0},
+ {"label":"U", "x":7, "y":0},
+ {"label":"I", "x":8, "y":0},
+ {"label":"O", "x":9, "y":0},
+ {"label":"P", "x":10, "y":0},
+ {"label":"[{", "x":11, "y":0},
+ {"label":"]}", "x":12, "y":0},
+ {"label":"Play", "x":13.5, "y":0.5},
+ {"label":"7", "x":15, "y":0},
+ {"label":"8", "x":16, "y":0},
+ {"label":"9", "x":17, "y":0},
+
+ {"label":"Caps Lock", "x":0, "y":1},
+ {"label":"A", "x":1, "y":1},
+ {"label":"S", "x":2, "y":1},
+ {"label":"D", "x":3, "y":1},
+ {"label":"F", "x":4, "y":1},
+ {"label":"G", "x":5, "y":1},
+ {"label":"H", "x":6, "y":1},
+ {"label":"J", "x":7, "y":1},
+ {"label":"K", "x":8, "y":1},
+ {"label":"L", "x":9, "y":1},
+ {"label":";:", "x":10, "y":1},
+ {"label":"'\"", "x":11, "y":1},
+ {"label":"\\|", "x":12, "y":1},
+ {"label":"4", "x":15, "y":1},
+ {"label":"5", "x":16, "y":1},
+ {"label":"6", "x":17, "y":1},
+
+ {"label":"-_", "x":0, "y":2},
+ {"label":"Z", "x":1, "y":2},
+ {"label":"X", "x":2, "y":2},
+ {"label":"C", "x":3, "y":2},
+ {"label":"V", "x":4, "y":2},
+ {"label":"B", "x":5, "y":2},
+ {"label":"N", "x":6, "y":2},
+ {"label":"M", "x":7, "y":2},
+ {"label":",<", "x":8, "y":2},
+ {"label":".>", "x":9, "y":2},
+ {"label":"/?", "x":10, "y":2},
+ {"label":"Shift", "x":11, "y":2},
+ {"label":"Backspace", "x":12, "y":2},
+ {"label":"\u2191", "x":13.5, "y":2.5},
+ {"label":"1", "x":15, "y":2},
+ {"label":"2", "x":16, "y":2},
+ {"label":"3", "x":17, "y":2},
+
+ {"label":"Ctrl", "x":0, "y":3, "w":1.25},
+ {"label":"Alt", "x":1.25, "y":3, "w":1.25},
+ {"label":"GUI", "x":2.5, "y":3},
+ {"label":"Space", "x":3.5, "y":3, "w":3},
+ {"label":"Enter", "x":6.5, "y":3, "w":3},
+ {"label":"GUI", "x":9.5, "y":3, "w":1.25},
+ {"label":"Alt", "x":10.75, "y":3, "w":1.25},
+ {"label":"\u2190", "x":12.5, "y":3.5},
+ {"label":"\u2193", "x":13.5, "y":3.5},
+ {"label":"\u2192", "x":14.5, "y":3.5},
+ {"label":"0", "x":16, "y":3},
+ {"label":".", "x":17, "y":3}
]
- },
+ },
"LAYOUT_7u": {
"layout": [
- {"label":"KC_TAB", "x":0, "y":0}, {"label":"KC_Q", "x":1, "y":0}, {"label":"KC_W", "x":2, "y":0}, {"label":"KC_E", "x":3, "y":0}, {"label":"KC_R", "x":4, "y":0}, {"label":"KC_T", "x":5, "y":0}, {"label":"KC_Y", "x":6, "y":0}, {"label":"KC_U", "x":7, "y":0}, {"label":"KC_I", "x":8, "y":0}, {"label":"KC_O", "x":9, "y":0}, {"label":"KC_P", "x":10, "y":0}, {"label":"KC_LBRC", "x":11, "y":0}, {"label":"KC_RBRC", "x":12, "y":0}, {"label":"KC_7", "x":15, "y":0}, {"label":"KC_8", "x":16, "y":0}, {"label":"KC_9", "x":17, "y":0},
- {"label":"KC_CAPS", "x":0, "y":1}, {"label":"KC_A", "x":1, "y":1}, {"label":"KC_S", "x":2, "y":1}, {"label":"KC_D", "x":3, "y":1}, {"label":"KC_F", "x":4, "y":1}, {"label":"KC_G", "x":5, "y":1}, {"label":"KC_H", "x":6, "y":1}, {"label":"KC_J", "x":7, "y":1}, {"label":"KC_K", "x":8, "y":1}, {"label":"KC_L", "x":9, "y":1}, {"label":"KC_SCLN", "x":10, "y":1}, {"label":"KC_QUOT", "x":11, "y":1}, {"label":"KC_BSLS", "x":12, "y":1}, {"label":"KC_4", "x":15, "y":1}, {"label":"KC_5", "x":16, "y":1}, {"label":"KC_6", "x":17, "y":1},
- {"label":"KC_MINS", "x":0, "y":2}, {"label":"KC_Z", "x":1, "y":2}, {"label":"KC_X", "x":2, "y":2}, {"label":"KC_C", "x":3, "y":2}, {"label":"KC_V", "x":4, "y":2}, {"label":"KC_B", "x":5, "y":2}, {"label":"KC_N", "x":6, "y":2}, {"label":"KC_M", "x":7, "y":2}, {"label":"KC_COMM", "x":8, "y":2}, {"label":"KC_DOT", "x":9, "y":2}, {"label":"KC_SLSH", "x":10, "y":2}, {"label":"KC_RSFT", "x":11, "y":2}, {"label":"KC_BSPC", "x":12, "y":2}, {"label":"KC_1", "x":15, "y":2}, {"label":"KC_2", "x":16, "y":2}, {"label":"KC_3", "x":17, "y":2},
- {"label":"KC_UP", "x":13.5, "y":2.5}, {"label":"KC_0", "x":16, "y":3}, {"label":"KC_DOT", "x":17, "y":3}, {"label":"KC_LEFT", "x":12.5, "y":3.5}, {"label":"KC_DOWN", "x":13.5, "y":3.5}, {"label":"KC_RGHT", "x":14.5, "y":3.5}, {"label":"KC_MPLY", "x":13.5, "y":0.5},
- {"label":"KC_LCTL", "x":0, "y":3, "w":1.25}, {"label":"KC_LALT", "x":1.25, "y":3, "w":1.25}, {"label":"KC_LGUI", "x":2.5, "y":3, "w":1.25}, {"label":"KC_SPC", "x":3.75, "y":3, "w":7}, {"label":"KC_RGUI", "x":10.75, "y":3, "w":1.25}
+ {"label":"Tab", "x":0, "y":0},
+ {"label":"Q", "x":1, "y":0},
+ {"label":"W", "x":2, "y":0},
+ {"label":"E", "x":3, "y":0},
+ {"label":"R", "x":4, "y":0},
+ {"label":"T", "x":5, "y":0},
+ {"label":"Y", "x":6, "y":0},
+ {"label":"U", "x":7, "y":0},
+ {"label":"I", "x":8, "y":0},
+ {"label":"O", "x":9, "y":0},
+ {"label":"P", "x":10, "y":0},
+ {"label":"[{", "x":11, "y":0},
+ {"label":"]}", "x":12, "y":0},
+ {"label":"Play", "x":13.5, "y":0.5},
+ {"label":"7", "x":15, "y":0},
+ {"label":"8", "x":16, "y":0},
+ {"label":"9", "x":17, "y":0},
+
+ {"label":"Caps Lock", "x":0, "y":1},
+ {"label":"A", "x":1, "y":1},
+ {"label":"S", "x":2, "y":1},
+ {"label":"D", "x":3, "y":1},
+ {"label":"F", "x":4, "y":1},
+ {"label":"G", "x":5, "y":1},
+ {"label":"H", "x":6, "y":1},
+ {"label":"J", "x":7, "y":1},
+ {"label":"K", "x":8, "y":1},
+ {"label":"L", "x":9, "y":1},
+ {"label":";:", "x":10, "y":1},
+ {"label":"'\"", "x":11, "y":1},
+ {"label":"\\|", "x":12, "y":1},
+ {"label":"4", "x":15, "y":1},
+ {"label":"5", "x":16, "y":1},
+ {"label":"6", "x":17, "y":1},
+
+ {"label":"-_", "x":0, "y":2},
+ {"label":"Z", "x":1, "y":2},
+ {"label":"X", "x":2, "y":2},
+ {"label":"C", "x":3, "y":2},
+ {"label":"V", "x":4, "y":2},
+ {"label":"B", "x":5, "y":2},
+ {"label":"N", "x":6, "y":2},
+ {"label":"M", "x":7, "y":2},
+ {"label":",<", "x":8, "y":2},
+ {"label":".>", "x":9, "y":2},
+ {"label":"/?", "x":10, "y":2},
+ {"label":"Shift", "x":11, "y":2},
+ {"label":"Backspace", "x":12, "y":2},
+ {"label":"\u2191", "x":13.5, "y":2.5},
+ {"label":"1", "x":15, "y":2},
+ {"label":"2", "x":16, "y":2},
+ {"label":"3", "x":17, "y":2},
+
+ {"label":"Ctrl", "x":0, "y":3, "w":1.25},
+ {"label":"Alt", "x":1.25, "y":3, "w":1.25},
+ {"label":"GUI", "x":2.5, "y":3, "w":1.25},
+ {"label":"Space", "x":3.75, "y":3, "w":7},
+ {"label":"GUI", "x":10.75, "y":3, "w":1.25},
+ {"label":"\u2190", "x":12.5, "y":3.5},
+ {"label":"\u2193", "x":13.5, "y":3.5},
+ {"label":"\u2192", "x":14.5, "y":3.5},
+ {"label":"0", "x":16, "y":3},
+ {"label":".", "x":17, "y":3}
]
},
"LAYOUT_10u": {
"layout": [
- {"label":"KC_TAB", "x":0, "y":0}, {"label":"KC_Q", "x":1, "y":0}, {"label":"KC_W", "x":2, "y":0}, {"label":"KC_E", "x":3, "y":0}, {"label":"KC_R", "x":4, "y":0}, {"label":"KC_T", "x":5, "y":0}, {"label":"KC_Y", "x":6, "y":0}, {"label":"KC_U", "x":7, "y":0}, {"label":"KC_I", "x":8, "y":0}, {"label":"KC_O", "x":9, "y":0}, {"label":"KC_P", "x":10, "y":0}, {"label":"KC_LBRC", "x":11, "y":0}, {"label":"KC_RBRC", "x":12, "y":0}, {"label":"KC_7", "x":15, "y":0}, {"label":"KC_8", "x":16, "y":0}, {"label":"KC_9", "x":17, "y":0},
- {"label":"KC_CAPS", "x":0, "y":1}, {"label":"KC_A", "x":1, "y":1}, {"label":"KC_S", "x":2, "y":1}, {"label":"KC_D", "x":3, "y":1}, {"label":"KC_F", "x":4, "y":1}, {"label":"KC_G", "x":5, "y":1}, {"label":"KC_H", "x":6, "y":1}, {"label":"KC_J", "x":7, "y":1}, {"label":"KC_K", "x":8, "y":1}, {"label":"KC_L", "x":9, "y":1}, {"label":"KC_SCLN", "x":10, "y":1}, {"label":"KC_QUOT", "x":11, "y":1}, {"label":"KC_BSLS", "x":12, "y":1}, {"label":"KC_4", "x":15, "y":1}, {"label":"KC_5", "x":16, "y":1}, {"label":"KC_6", "x":17, "y":1},
- {"label":"KC_MINS", "x":0, "y":2}, {"label":"KC_Z", "x":1, "y":2}, {"label":"KC_X", "x":2, "y":2}, {"label":"KC_C", "x":3, "y":2}, {"label":"KC_V", "x":4, "y":2}, {"label":"KC_B", "x":5, "y":2}, {"label":"KC_N", "x":6, "y":2}, {"label":"KC_M", "x":7, "y":2}, {"label":"KC_COMM", "x":8, "y":2}, {"label":"KC_DOT", "x":9, "y":2}, {"label":"KC_SLSH", "x":10, "y":2}, {"label":"KC_RSFT", "x":11, "y":2}, {"label":"KC_BSPC", "x":12, "y":2}, {"label":"KC_1", "x":15, "y":2}, {"label":"KC_2", "x":16, "y":2}, {"label":"KC_3", "x":17, "y":2},
- {"label":"KC_UP", "x":13.5, "y":2.5}, {"label":"KC_0", "x":16, "y":3}, {"label":"KC_DOT", "x":17, "y":3}, {"label":"KC_LEFT", "x":12.5, "y":3.5}, {"label":"KC_DOWN", "x":13.5, "y":3.5}, {"label":"KC_RGHT", "x":14.5, "y":3.5}, {"label":"KC_MPLY", "x":13.5, "y":0.5},
- {"label":"KC_LCTL", "x":0, "y":3}, {"label":"KC_SPC", "x":1, "y":3, "w":10}, {"label":"KC_RGUI", "x":11, "y":3}
+ {"label":"Tab", "x":0, "y":0},
+ {"label":"Q", "x":1, "y":0},
+ {"label":"W", "x":2, "y":0},
+ {"label":"E", "x":3, "y":0},
+ {"label":"R", "x":4, "y":0},
+ {"label":"T", "x":5, "y":0},
+ {"label":"Y", "x":6, "y":0},
+ {"label":"U", "x":7, "y":0},
+ {"label":"I", "x":8, "y":0},
+ {"label":"O", "x":9, "y":0},
+ {"label":"P", "x":10, "y":0},
+ {"label":"[{", "x":11, "y":0},
+ {"label":"]}", "x":12, "y":0},
+ {"label":"Play", "x":13.5, "y":0.5},
+ {"label":"7", "x":15, "y":0},
+ {"label":"8", "x":16, "y":0},
+ {"label":"9", "x":17, "y":0},
+
+ {"label":"Caps Lock", "x":0, "y":1},
+ {"label":"A", "x":1, "y":1},
+ {"label":"S", "x":2, "y":1},
+ {"label":"D", "x":3, "y":1},
+ {"label":"F", "x":4, "y":1},
+ {"label":"G", "x":5, "y":1},
+ {"label":"H", "x":6, "y":1},
+ {"label":"J", "x":7, "y":1},
+ {"label":"K", "x":8, "y":1},
+ {"label":"L", "x":9, "y":1},
+ {"label":";:", "x":10, "y":1},
+ {"label":"'\"", "x":11, "y":1},
+ {"label":"\\|", "x":12, "y":1},
+ {"label":"4", "x":15, "y":1},
+ {"label":"5", "x":16, "y":1},
+ {"label":"6", "x":17, "y":1},
+
+ {"label":"-_", "x":0, "y":2},
+ {"label":"Z", "x":1, "y":2},
+ {"label":"X", "x":2, "y":2},
+ {"label":"C", "x":3, "y":2},
+ {"label":"V", "x":4, "y":2},
+ {"label":"B", "x":5, "y":2},
+ {"label":"N", "x":6, "y":2},
+ {"label":"M", "x":7, "y":2},
+ {"label":",<", "x":8, "y":2},
+ {"label":".>", "x":9, "y":2},
+ {"label":"/?", "x":10, "y":2},
+ {"label":"Shift", "x":11, "y":2},
+ {"label":"Backspace", "x":12, "y":2},
+ {"label":"\u2191", "x":13.5, "y":2.5},
+ {"label":"1", "x":15, "y":2},
+ {"label":"2", "x":16, "y":2},
+ {"label":"3", "x":17, "y":2},
+
+ {"label":"Ctrl", "x":0, "y":3},
+ {"label":"Space", "x":1, "y":3, "w":10},
+ {"label":"GUI", "x":11, "y":3},
+ {"label":"\u2190", "x":12.5, "y":3.5},
+ {"label":"\u2193", "x":13.5, "y":3.5},
+ {"label":"\u2192", "x":14.5, "y":3.5},
+ {"label":"0", "x":16, "y":3},
+ {"label":".", "x":17, "y":3}
]
}
}
diff --git a/keyboards/gorthage_truck/keymaps/10u/keymap.c b/keyboards/gorthage_truck/keymaps/10u/keymap.c
index 89e628defa..f289c3c8c8 100644
--- a/keyboards/gorthage_truck/keymaps/10u/keymap.c
+++ b/keyboards/gorthage_truck/keymaps/10u/keymap.c
@@ -23,8 +23,20 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_10u(
-KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MINUS, KC_MPLY, KC_1, KC_2, KC_3,
-KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_EQUAL, KC_4, KC_5, KC_6,
-KC_LCAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, KC_SLSH, KC_GRAVE, KC_UP, KC_7, KC_8, KC_9,
-KC_LGUI, KC_RSFT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DOT, KC_0
-)};
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MINS, KC_MPLY, KC_1, KC_2, KC_3,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_EQL, KC_4, KC_5, KC_6,
+ KC_LCAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, KC_SLSH, KC_GRV, KC_UP, KC_7, KC_8, KC_9,
+ KC_LGUI, KC_RSFT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOT, KC_0
+ )
+};
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/gorthage_truck/keymaps/7u/keymap.c b/keyboards/gorthage_truck/keymaps/7u/keymap.c
index 224580c30b..679e6eeb64 100644
--- a/keyboards/gorthage_truck/keymaps/7u/keymap.c
+++ b/keyboards/gorthage_truck/keymaps/7u/keymap.c
@@ -23,8 +23,20 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_7u(
-KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MINUS, KC_MPLY, KC_1, KC_2, KC_3,
-KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_EQUAL, KC_4, KC_5, KC_6,
-KC_LCAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, KC_SLSH, KC_GRAVE, KC_UP, KC_7, KC_8, KC_9,
-KC_LGUI, KC_LCTL, KC_LSFT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DOT, KC_0
-)};
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MINS, KC_MPLY, KC_1, KC_2, KC_3,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_EQL, KC_4, KC_5, KC_6,
+ KC_LCAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, KC_SLSH, KC_GRV, KC_UP, KC_7, KC_8, KC_9,
+ KC_LGUI, KC_LCTL, KC_LSFT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOT, KC_0
+ )
+};
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/gorthage_truck/keymaps/default/keymap.c b/keyboards/gorthage_truck/keymaps/default/keymap.c
index c1cb087b86..e875883250 100644
--- a/keyboards/gorthage_truck/keymaps/default/keymap.c
+++ b/keyboards/gorthage_truck/keymaps/default/keymap.c
@@ -23,15 +23,16 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_3u(
-KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MINUS, KC_MPLY, KC_1, KC_2, KC_3,
-KC_SLCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_EQUAL, KC_4, KC_5, KC_6,
-KC_NLCK, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, KC_SLSH, KC_GRAVE, KC_UP, KC_7, KC_8, KC_9,
-KC_CLCK, KC_LCTL, KC_LSFT, KC_SPC, KC_RSFT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DOT, KC_0
-)};
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_MINS, KC_MPLY, KC_1, KC_2, KC_3,
+ KC_SLCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_EQL, KC_4, KC_5, KC_6,
+ KC_NLCK, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, KC_SLSH, KC_GRV, KC_UP, KC_7, KC_8, KC_9,
+ KC_CLCK, KC_LCTL, KC_LSFT, KC_SPC, KC_RSFT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOT, KC_0
+ )
+};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
-if (clockwise) {
+ if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);