summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRys Sommefeldt <rys@pixeltards.com>2019-02-16 00:59:03 +0000
committerDrashna Jaelre <drashna@live.com>2019-02-15 16:59:03 -0800
commit3309e91e0b6c7edc0c164e25ff1638c4852b40e7 (patch)
tree93a59d4bd951d80b8fca64eff5a2d8b0ede703ef
parente04e55c8720cf8fdd3d31ce07b4723042775a67d (diff)
[Keymap] Add new layout for wilba_text WT8-A (#5141)
-rw-r--r--keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c84
-rw-r--r--keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk9
2 files changed, 93 insertions, 0 deletions
diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c
new file mode 100644
index 0000000000..bf0dda0fa8
--- /dev/null
+++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c
@@ -0,0 +1,84 @@
+#include QMK_KEYBOARD_H
+
+#define _BL0 0
+#define _FL1 1
+#define _FL2 2
+#define _FL3 3
+
+#define MACOSLK LCTL(LGUI(KC_Q)) // CTRL+CMD+Q == screen lock in macOS 10.13+
+
+enum rys_keycodes {
+ STOKEN1 = SAFE_RANGE,
+ STOKEN2,
+ STOKEN3,
+ STOKEN4
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case STOKEN1:
+ if (record->event.pressed) {
+ SEND_STRING(RYS_STOKEN1);
+ }
+ break;
+ case STOKEN2:
+ if (record->event.pressed) {
+ SEND_STRING(RYS_STOKEN2);
+ }
+ break;
+ case STOKEN3:
+ if (record->event.pressed) {
+ SEND_STRING(RYS_STOKEN3);
+ }
+ break;
+ case STOKEN4:
+ if (record->event.pressed) {
+ SEND_STRING(RYS_STOKEN4);
+ }
+ break;
+ }
+ return true;
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap base layer (_BL0) - default layer
+ * ,---------------------------.
+ * | ST1 | ST2 | ST3 | ST4 |
+ * |---------------------------|
+ * | | LOCK | VOL- | VOL+ |
+ * `---------------------------'
+ */
+ [_BL0] = LAYOUT(
+ STOKEN1, STOKEN2, STOKEN3, STOKEN4,
+ _______, MACOSLK, KC__VOLDOWN, KC__VOLUP),
+ /* Keymap base layer (_FL1) - function layer 1
+ * ,---------------------------.
+ * | | | | |
+ * |---------------------------|
+ * | | | | |
+ * `---------------------------'
+ */
+ [_FL1] = LAYOUT(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______),
+ /* Keymap base layer (_FL2) - function layer 2
+ * ,---------------------------.
+ * | | | | |
+ * |---------------------------|
+ * | | | | |
+ * `---------------------------'
+ */
+ [_FL2] = LAYOUT(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______),
+ /* Keymap base layer (_FL3) - function layer 3
+ * ,---------------------------.
+ * | | | | |
+ * |---------------------------|
+ * | | | | |
+ * `---------------------------'
+ */
+ [_FL3] = LAYOUT(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______),
+};
diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk
new file mode 100644
index 0000000000..60cbf8bfc4
--- /dev/null
+++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk
@@ -0,0 +1,9 @@
+RYS_STOKEN1 = "$(shell security find-generic-password -a qmk -s wt8a-1 -w)"
+RYS_STOKEN2 = "$(shell security find-generic-password -a qmk -s wt8a-2 -w)"
+RYS_STOKEN3 = "$(shell security find-generic-password -a qmk -s wt8a-3 -w)"
+RYS_STOKEN4 = "$(shell security find-generic-password -a qmk -s wt8a-4 -w)"
+
+CFLAGS += -DRYS_STOKEN1=\"$(RYS_STOKEN1)\"
+CFLAGS += -DRYS_STOKEN2=\"$(RYS_STOKEN2)\"
+CFLAGS += -DRYS_STOKEN3=\"$(RYS_STOKEN3)\"
+CFLAGS += -DRYS_STOKEN4=\"$(RYS_STOKEN4)\"