aboutsummaryrefslogtreecommitdiff
path: root/keyboards/aeboards/ext65/keymaps/via/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/aeboards/ext65/keymaps/via/keymap.c')
-rw-r--r--keyboards/aeboards/ext65/keymaps/via/keymap.c99
1 files changed, 99 insertions, 0 deletions
diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c
new file mode 100644
index 000000000..1f933ca1c
--- /dev/null
+++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c
@@ -0,0 +1,99 @@
1/* Copyright 2020 Harrison Chan (Xelus)
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 /* Keymap BASE: (Base Layer) Default Layer
20 * ,-------------------. ,-------------------------------------------------------------------.
21 * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr|
22 * |-------------------| |-------------------------------------------------------------------|
23 * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del |
24 * | + |--------------| |-------------------------------------------------------------------|
25 * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup|
26 * |-------------------| |-------------------------------------------------------------------|
27 * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn|
28 * | ENT|-------------------------------------------------------------------------------------|
29 * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
30 * `------------------------------------------------------------------------------------------'
31 */
32 [0] = LAYOUT_ext65(
33 KC_PMNS, KC_PAST, KC_PSLS, KC_NLCK, 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_BSLS, KC_GRV , KC_PSCR,
34 KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_BSPC, KC_DEL ,
35 KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_CAPS, 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_PGUP,
36 KC_PENT, KC_P3 , KC_P2 , KC_P1 , KC_LSFT, 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_PGDN,
37 KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
38 ),
39
40 [1] = LAYOUT_ext65(
41 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, RESET,
42 KC_TRNS, RGB_TOG, RGB_MOD, 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, EEP_RST,
43 KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, 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, DEBUG,
44 KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, 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,
45 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
46 ),
47
48 [2] = LAYOUT_ext65(
49 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,
50 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,
51 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,
52 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,
53 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
54 ),
55
56 [3] = LAYOUT_ext65(
57 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,
58 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,
59 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,
60 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,
61 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
62 )
63};
64
65#ifdef OLED_ENABLE
66
67void render_layer_state(void) {
68 oled_write_ln(PSTR("LAYER"), false);
69 oled_write_ln(PSTR("L1"), layer_state_is(1));
70 oled_write_ln(PSTR("L2"), layer_state_is(2));
71 oled_write_ln(PSTR("L3"), layer_state_is(3));
72 oled_write_ln(PSTR(" "), false);
73}
74
75void render_keylock_status(led_t led_state) {
76 oled_write_ln(PSTR("Lock:"), false);
77 oled_write(PSTR("N"), led_state.num_lock);
78 oled_write(PSTR("C"), led_state.caps_lock);
79 oled_write_ln(PSTR("S"), led_state.scroll_lock);
80 oled_write_ln(PSTR(" "), false);
81}
82
83void render_mod_status(uint8_t modifiers) {
84 oled_write_ln(PSTR("Mods:"), false);
85 oled_write(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
86 oled_write(PSTR("C"), (modifiers & MOD_MASK_CTRL));
87 oled_write(PSTR("A"), (modifiers & MOD_MASK_ALT));
88 oled_write_ln(PSTR("G"), (modifiers & MOD_MASK_GUI));
89 oled_write_ln(PSTR(" "), false);
90}
91
92bool oled_task_user(void) {
93 render_layer_state();
94 render_keylock_status(host_keyboard_led_state());
95 render_mod_status(get_mods()|get_oneshot_mods());
96 return false;
97}
98
99#endif