aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Stein <stein3@users.noreply.github.com>2020-11-09 16:30:31 -0800
committerGitHub <noreply@github.com>2020-11-09 16:30:31 -0800
commited8d1d1ae75ae30c19c3133aa8bea96e3cd54f10 (patch)
treeb20fefac8a58f4dbf4dd9d79ecddb7da22158685
parentf38a3b7408e38f6467a2eb9160791f584b46d39e (diff)
downloadqmk_firmware-ed8d1d1ae75ae30c19c3133aa8bea96e3cd54f10.tar.gz
qmk_firmware-ed8d1d1ae75ae30c19c3133aa8bea96e3cd54f10.zip
Add VIA Keymap for Worldspawn Gothic70. (#10617)
* Add VIA Keymap for Worldspawn Gothic70. * Prevent LEDs from turning on at startup. * Add license header to keymap. * Fix Keymap Formatting.
-rw-r--r--keyboards/wsk/gothic70/config.h2
-rw-r--r--keyboards/wsk/gothic70/keymaps/via/keymap.c76
-rw-r--r--keyboards/wsk/gothic70/keymaps/via/rules.mk3
3 files changed, 80 insertions, 1 deletions
diff --git a/keyboards/wsk/gothic70/config.h b/keyboards/wsk/gothic70/config.h
index 98e70e615..bef22e82f 100644
--- a/keyboards/wsk/gothic70/config.h
+++ b/keyboards/wsk/gothic70/config.h
@@ -3,7 +3,7 @@
3#include "config_common.h" 3#include "config_common.h"
4 4
5/* USB Device descriptor parameter */ 5/* USB Device descriptor parameter */
6#define VENDOR_ID 0xFEED 6#define VENDOR_ID 0x5753 // "WS"
7#define PRODUCT_ID 0x63CC 7#define PRODUCT_ID 0x63CC
8#define DEVICE_VER 0x0001 8#define DEVICE_VER 0x0001
9#define MANUFACTURER Worldspawn00 9#define MANUFACTURER Worldspawn00
diff --git a/keyboards/wsk/gothic70/keymaps/via/keymap.c b/keyboards/wsk/gothic70/keymaps/via/keymap.c
new file mode 100644
index 000000000..f386f0b3f
--- /dev/null
+++ b/keyboards/wsk/gothic70/keymaps/via/keymap.c
@@ -0,0 +1,76 @@
1/*
2Copyright 2020 worldspawn00
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include QMK_KEYBOARD_H
19
20// Defines names for use in layer keycodes and the keymap
21enum layer_names {
22 _BASE,
23 _FN,
24 _MEDIA };
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27 [_BASE] = LAYOUT(
28 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PSCR,
29 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS,
30 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_ENT, KC_DEL,
31 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
32 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
33 ),
34
35 [_FN] = LAYOUT(
36 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PAUS,
37 _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
40 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
41 ),
42
43 [_MEDIA] = LAYOUT(
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______,
47 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
48 _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
49 ),
50
51 [3] = LAYOUT(
52 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
53 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
54 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
56 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
57 )
58};
59
60void matrix_init_user(void) {
61 // set CapsLock LED to output and off (active high)
62 setPinOutput(F5);
63 // set NumLock LED to output and off (active high)
64 setPinOutput(F6);
65 // set ScrollLock LED to output and off (active high)
66 setPinOutput(F7);
67}
68
69// write to above indicators in a binary fashion based on current layer
70layer_state_t layer_state_set_user(layer_state_t state)
71{
72 writePin(F5, (state & 0x1));
73 writePin(F6, (state & 0x2));
74 writePin(F7, (state & 0x4));
75 return state;
76}
diff --git a/keyboards/wsk/gothic70/keymaps/via/rules.mk b/keyboards/wsk/gothic70/keymaps/via/rules.mk
new file mode 100644
index 000000000..0638fd5d9
--- /dev/null
+++ b/keyboards/wsk/gothic70/keymaps/via/rules.mk
@@ -0,0 +1,3 @@
1VIA_ENABLE = yes
2CONSOLE_ENABLE = no
3COMMAND_ENABLE = no \ No newline at end of file