summaryrefslogtreecommitdiff
path: root/keyboards/takashicompany/goat51/keymaps/via
diff options
context:
space:
mode:
authortakashicompany <t@kashi.company>2022-09-24 23:05:53 +0900
committerGitHub <noreply@github.com>2022-09-24 07:05:53 -0700
commit45cc7f1e94e2eeee2a25195fcb7719d08570272d (patch)
treeffd5106939ccef1d5977b68fe19e343438b4e1b5 /keyboards/takashicompany/goat51/keymaps/via
parentfe9c1d8e456c293166ff8664ff280710eb5aa416 (diff)
[Keyboard] Add GOAT51 (#18220)
Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/takashicompany/goat51/keymaps/via')
-rw-r--r--keyboards/takashicompany/goat51/keymaps/via/config.h6
-rw-r--r--keyboards/takashicompany/goat51/keymaps/via/keymap.c106
-rw-r--r--keyboards/takashicompany/goat51/keymaps/via/rules.mk2
3 files changed, 114 insertions, 0 deletions
diff --git a/keyboards/takashicompany/goat51/keymaps/via/config.h b/keyboards/takashicompany/goat51/keymaps/via/config.h
new file mode 100644
index 0000000000..dc91fa69c2
--- /dev/null
+++ b/keyboards/takashicompany/goat51/keymaps/via/config.h
@@ -0,0 +1,6 @@
+// Copyright 2022 takashicompany (@takashicompany)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 7 \ No newline at end of file
diff --git a/keyboards/takashicompany/goat51/keymaps/via/keymap.c b/keyboards/takashicompany/goat51/keymaps/via/keymap.c
new file mode 100644
index 0000000000..6adb87dc32
--- /dev/null
+++ b/keyboards/takashicompany/goat51/keymaps/via/keymap.c
@@ -0,0 +1,106 @@
+// Copyright 2022 takashicompany (@takashicompany)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+enum custom_keycodes {
+ GOAT51 = SAFE_RANGE,
+ WEB,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ // 0: JIS-Alphabet
+ LAYOUT(
+ KC_ESC, LT(4, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, LT(3, KC_D), KC_F, KC_G, GOAT51, KC_H, KC_J, LT(3, KC_K), KC_L, KC_ENT, KC_ENT,
+ KC_LSFT, LSFT_T(KC_Z), LGUI_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, LCTL_T(KC_DOT), KC_BSPC, KC_DEL,
+ TG(3), KC_PGUP, KC_PGDN, KC_LCTL, KC_LGUI, ALT_T(KC_LANG2), LSFT_T(KC_TAB), LT(2, KC_SPC), LT(1, KC_LANG1), KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
+ KC_PGDN, KC_PGUP
+ ),
+
+ // 1: JIS-Num
+ LAYOUT(
+ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, LCTL_T(KC_EQL), KC_LBRC, KC_SLSH, KC_MINS, KC_RO, GOAT51, KC_SCLN, KC_QUOT, KC_RBRC, KC_NUHS, KC_JYEN, KC_TRNS,
+ KC_TRNS, LSFT_T(KC_PLUS), KC_LCBR, KC_QUES, KC_UNDS, LSFT(KC_RO), KC_COLN, KC_DQUO, KC_RCBR, LSFT(KC_NUHS), LSFT(KC_JYEN), KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ // 2: JIS-Shift-Num
+ LAYOUT(
+ KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, LGUI(KC_JYEN), KC_TRNS,
+ KC_TRNS, KC_PLUS, KC_LCBR, KC_QUES, KC_UNDS, LSFT(KC_RO), GOAT51, KC_COLN, KC_DQUO, KC_RCBR, LSFT(KC_NUHS), LSFT(KC_JYEN), KC_TRNS,
+ KC_TRNS, KC_LSFT, KC_LGUI, KC_LALT, KC_LANG2, KC_LSFT, KC_SPC, KC_LANG1, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ // 3: Cursor
+ LAYOUT(
+ KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PCMM, GOAT51, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS,
+ KC_TRNS, LSFT_T(KC_P1), KC_P2, KC_P3, KC_PMNS, KC_KP_EQUAL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ TG(3), KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ // 4: Function
+ LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, GOAT51, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_TRNS, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(5), MO(6), KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ // 5: LED
+ LAYOUT(
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, GOAT51, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case GOAT51:
+ if (record->event.pressed) {
+ SEND_STRING("GOAT51");
+ rgblight_toggle();
+ }
+ return false;
+
+ case WEB:
+ if (record->event.pressed) {
+ SEND_STRING("github.com/takashicompany/goat51");
+ }
+ return false;
+ }
+
+ return true;
+}
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
+ { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+};
+#endif \ No newline at end of file
diff --git a/keyboards/takashicompany/goat51/keymaps/via/rules.mk b/keyboards/takashicompany/goat51/keymaps/via/rules.mk
new file mode 100644
index 0000000000..4253f570f0
--- /dev/null
+++ b/keyboards/takashicompany/goat51/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes \ No newline at end of file