aboutsummaryrefslogtreecommitdiff
path: root/keyboards/rart
diff options
context:
space:
mode:
authorAlabahuy <rezzaadio@gmail.com>2020-10-24 04:58:54 +0700
committerGitHub <noreply@github.com>2020-10-23 14:58:54 -0700
commit5d2deaca069834843bacb5769787c907bdd6bf15 (patch)
tree879892e43c0ef1dc4d8719c45a3793468c0b6fcc /keyboards/rart
parent8e7517aebcfbb438857aae50e4b8f5da0227a654 (diff)
downloadqmk_firmware-5d2deaca069834843bacb5769787c907bdd6bf15.tar.gz
qmk_firmware-5d2deaca069834843bacb5769787c907bdd6bf15.zip
[Keyboard] add via support and fix info.json for rartlice (#10690)
* Update info.json * Create keymap.c * Create config.h * Create rules.mk * Update keymap.c * Update keymap.c
Diffstat (limited to 'keyboards/rart')
-rw-r--r--keyboards/rart/rartlice/info.json2
-rw-r--r--keyboards/rart/rartlice/keymaps/via/config.h1
-rw-r--r--keyboards/rart/rartlice/keymaps/via/keymap.c80
-rw-r--r--keyboards/rart/rartlice/keymaps/via/rules.mk1
4 files changed, 83 insertions, 1 deletions
diff --git a/keyboards/rart/rartlice/info.json b/keyboards/rart/rartlice/info.json
index 543a5369f..065df8f08 100644
--- a/keyboards/rart/rartlice/info.json
+++ b/keyboards/rart/rartlice/info.json
@@ -46,7 +46,7 @@
46 {"label" : "S", "x":4, "y":2}, 46 {"label" : "S", "x":4, "y":2},
47 {"label" : "D", "x":5, "y":2}, 47 {"label" : "D", "x":5, "y":2},
48 {"label" : "F", "x":6, "y":2}, 48 {"label" : "F", "x":6, "y":2},
49 {"label" : "G", "x":8, "y":2}, 49 {"label" : "G", "x":7, "y":2},
50 {"label" : "H", "x":9, "y":2}, 50 {"label" : "H", "x":9, "y":2},
51 {"label" : "J", "x":10, "y":2}, 51 {"label" : "J", "x":10, "y":2},
52 {"label" : "K", "x":11, "y":2}, 52 {"label" : "K", "x":11, "y":2},
diff --git a/keyboards/rart/rartlice/keymaps/via/config.h b/keyboards/rart/rartlice/keymaps/via/config.h
new file mode 100644
index 000000000..3e019f9ac
--- /dev/null
+++ b/keyboards/rart/rartlice/keymaps/via/config.h
@@ -0,0 +1 @@
#define OLED_TIMEOUT 600000
diff --git a/keyboards/rart/rartlice/keymaps/via/keymap.c b/keyboards/rart/rartlice/keymaps/via/keymap.c
new file mode 100644
index 000000000..0156c2fa4
--- /dev/null
+++ b/keyboards/rart/rartlice/keymaps/via/keymap.c
@@ -0,0 +1,80 @@
1/*
2Copyright 2020 Alabahuy
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#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_all(
21 KC_GESC, 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_DEL,
22 KC_PGUP, 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,
23 KC_PGDN, 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,
24 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,
25 KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
26 ),
27 [1] = LAYOUT_all(
28 KC_NLCK, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, _______,
29 KC_SLCK, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______,
30 _______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______,
31 _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______,
32 _______, _______, _______, _______, _______, _______, _______, _______, _______
33 ),
34 [2] = LAYOUT_all(
35 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, _______, _______, _______, _______, _______, _______, _______, _______
40 ),
41 [3] = LAYOUT_all(
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______
47 ),
48
49};
50
51#ifdef OLED_DRIVER_ENABLE
52void oled_task_user(void) {
53 // Host Keyboard Layer Status
54 oled_write_P(PSTR("* R A R T L I C E *\n Powered by QMK\nLayer: "), false);
55
56 switch (get_highest_layer(layer_state)) {
57 case 0:
58 oled_write_P(PSTR("Default\n"), false);
59 break;
60 case 1:
61 oled_write_P(PSTR("Fn\n"), false);
62 break;
63 case 2:
64 oled_write_P(PSTR("Layer 3\n"), false);
65 break;
66 case 3:
67 oled_write_P(PSTR("Layer 4\n"), false);
68 break;
69 default:
70 // Or use the write_ln shortcut over adding '\n' to the end of your string
71 oled_write_ln_P(PSTR("Undifined\n"), false);
72 }
73
74 // Host Keyboard LED Status
75 led_t led_state = host_keyboard_led_state();
76 oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
77 oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
78 oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
79}
80#endif
diff --git a/keyboards/rart/rartlice/keymaps/via/rules.mk b/keyboards/rart/rartlice/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/rart/rartlice/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes