aboutsummaryrefslogtreecommitdiff
path: root/keyboards/tkc/tkc1800/keymaps/via/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tkc/tkc1800/keymaps/via/keymap.c')
-rw-r--r--keyboards/tkc/tkc1800/keymaps/via/keymap.c130
1 files changed, 130 insertions, 0 deletions
diff --git a/keyboards/tkc/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c
new file mode 100644
index 000000000..55c2874c6
--- /dev/null
+++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c
@@ -0,0 +1,130 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18//Layers
19
20enum {
21 BASE = 0,
22 FUNCTION,
23 ALTERNATE,
24 LAST,
25};
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 /* Keymap BASE: (Base Layer) Default Layer
29 * ,-------------------------------------------------------. ,-------------------.
30 * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc|
31 * `-------------------------------------------------------' |-------------------|
32 * |Del |End |PgDn|ScrL|
33 * ,-----------------------------------------------------------. |-------------------|
34 * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus|
35 * |-----------------------------------------------------------| |-------------------|
36 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - |
37 * |-----------------------------------------------------------| |-------------------|
38 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + |
39 * |-----------------------------------------------------------' |-------------------|
40 * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent|
41 * |--------------------------------------------------------'----`--------------| |
42 * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | |
43 * `---------------------------------------------------------------------------------'
44 */
45 [BASE] = LAYOUT(
46 KC_ESC, 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_INS, KC_HOME, KC_PGUP, KC_PSCR, \
47 KC_DEL, KC_END, KC_PGDN, KC_SLCK, \
48 KC_GRV, 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_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \
49 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_P7, KC_P8, KC_P9, KC_PMNS, \
50 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
51 KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \
52 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \
53 ),
54 /* Keymap FUNCTION: (Function Layer)
55 * ,-------------------------------------------------------. ,-------------------.
56 * | | | | | | | | | | | | | | | | | | | | |
57 * `-------------------------------------------------------' |-------------------|
58 * | | | | |
59 * ,-----------------------------------------------------------. |-------------------|
60 * | | | | | | | | | | | | | | RESET | | | | | |
61 * |-----------------------------------------------------------| |-------------------|
62 * | | | | | | | | | | | | | | | | | | | |
63 * |-----------------------------------------------------------| |-------------------|
64 * | | | | | | | | | | | | | | | | | | |
65 * |-----------------------------------------------------------' |-------------------|
66 * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | |
67 * |--------------------------------------------------------'----`--------------| |
68 * | | | | | | | | | | | | . | |
69 * `---------------------------------------------------------------------------------'
70 */
71 [FUNCTION] = LAYOUT(
72 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
73 _______, _______, _______, _______, \
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \
75 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
76 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \
77 _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \
78 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
79 ),
80 [ALTERNATE] = LAYOUT(
81 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
82 _______, _______, _______, _______, \
83 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \
84 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
85 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \
86 _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \
87 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
88 ),
89 [LAST] = LAYOUT(
90 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
91 _______, _______, _______, _______, \
92 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \
93 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \
95 _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \
96 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
97 ),
98};
99
100#ifdef OLED_DRIVER_ENABLE
101void oled_task_user(void) {
102 oled_write_P(PSTR("TKC1800\n"),false);
103 // Host Keyboard Layer Status
104 oled_write_P(PSTR("Layer: "), false);
105
106 switch (get_highest_layer(layer_state)) {
107 case BASE:
108 oled_write_P(PSTR("Base\n"), false);
109 break;
110 case FUNCTION:
111 oled_write_P(PSTR("Function\n"), false);
112 break;
113 case ALTERNATE:
114 oled_write_P(PSTR("Alternate\n"), false);
115 break;
116 case LAST:
117 oled_write_P(PSTR("Last\n"), false);
118 break;
119 default:
120 // Or use the write_ln shortcut over adding '\n' to the end of your string
121 oled_write_ln_P(PSTR("Undefined"), false);
122 }
123
124 // Host Keyboard LED Status
125 led_t led_state = host_keyboard_led_state();
126 oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
127 oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
128 oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
129}
130#endif \ No newline at end of file