aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ai03/README.md4
-rw-r--r--keyboards/ai03/lunar/config.h266
-rw-r--r--keyboards/ai03/lunar/info.json13
-rw-r--r--keyboards/ai03/lunar/keymaps/default/keymap.c90
-rw-r--r--keyboards/ai03/lunar/keymaps/default/readme.md2
-rw-r--r--keyboards/ai03/lunar/keymaps/via/keymap.c64
-rw-r--r--keyboards/ai03/lunar/keymaps/via/readme.md2
-rw-r--r--keyboards/ai03/lunar/keymaps/via/rules.mk86
-rw-r--r--keyboards/ai03/lunar/lunar.c22
-rw-r--r--keyboards/ai03/lunar/lunar.h41
-rw-r--r--keyboards/ai03/lunar/readme.md15
-rw-r--r--keyboards/ai03/lunar/rules.mk81
12 files changed, 686 insertions, 0 deletions
diff --git a/keyboards/ai03/README.md b/keyboards/ai03/README.md
new file mode 100644
index 000000000..90bd21928
--- /dev/null
+++ b/keyboards/ai03/README.md
@@ -0,0 +1,4 @@
1# ai03
2QMK folders for PCB commissions.
3
4Website: [ai03 Keyboard Designs](https://kb.ai03.me/) \ No newline at end of file
diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h
new file mode 100644
index 000000000..4b30ca309
--- /dev/null
+++ b/keyboards/ai03/lunar/config.h
@@ -0,0 +1,266 @@
1/*
2Copyright 2019 Ryota Goto
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#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xA103
24#define PRODUCT_ID 0x0001
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Switchplate Peripherals
27#define PRODUCT Lunar
28#define DESCRIPTION 65% AEK keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 5
32#define MATRIX_COLS 15
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43*/
44#define MATRIX_ROW_PINS { B3, D0, D1, D2, D3 }
45#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49#define DIODE_DIRECTION COL2ROW
50
51/*
52 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
53 */
54#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
55
56// #define BACKLIGHT_PIN B7
57// #define BACKLIGHT_BREATHING
58// #define BACKLIGHT_LEVELS 3
59
60// #define RGB_DI_PIN E2
61// #ifdef RGB_DI_PIN
62// #define RGBLED_NUM 16
63// #define RGBLIGHT_HUE_STEP 8
64// #define RGBLIGHT_SAT_STEP 8
65// #define RGBLIGHT_VAL_STEP 8
66// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
67// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
68// /*== all animations enable ==*/
69// #define RGBLIGHT_ANIMATIONS
70// /*== or choose animations ==*/
71// #define RGBLIGHT_EFFECT_BREATHING
72// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
73// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
74// #define RGBLIGHT_EFFECT_SNAKE
75// #define RGBLIGHT_EFFECT_KNIGHT
76// #define RGBLIGHT_EFFECT_CHRISTMAS
77// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
78// #define RGBLIGHT_EFFECT_RGB_TEST
79// #define RGBLIGHT_EFFECT_ALTERNATING
80// #endif
81
82/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
83#define DEBOUNCING_DELAY 5
84
85/* define if matrix has ghost (lacks anti-ghosting diodes) */
86//#define MATRIX_HAS_GHOST
87
88/* number of backlight levels */
89
90/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
91#define LOCKING_SUPPORT_ENABLE
92/* Locking resynchronize hack */
93#define LOCKING_RESYNC_ENABLE
94
95/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
96 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
97 */
98// #define GRAVE_ESC_CTRL_OVERRIDE
99
100/*
101 * Force NKRO
102 *
103 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
104 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
105 * makefile for this to work.)
106 *
107 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
108 * until the next keyboard reset.
109 *
110 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
111 * fully operational during normal computer usage.
112 *
113 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
114 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
115 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
116 * power-up.
117 *
118 */
119//#define FORCE_NKRO
120
121/*
122 * Magic Key Options
123 *
124 * Magic keys are hotkey commands that allow control over firmware functions of
125 * the keyboard. They are best used in combination with the HID Listen program,
126 * found here: https://www.pjrc.com/teensy/hid_listen.html
127 *
128 * The options below allow the magic key functionality to be changed. This is
129 * useful if your keyboard/keypad is missing keys and you want magic key support.
130 *
131 */
132
133/* key combination for magic key command */
134/* defined by default; to change, uncomment and set to the combination you want */
135// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
136
137/* control how magic key switches layers */
138//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
139//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
140//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
141
142/* override magic key keymap */
143//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
144//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
145//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
146//#define MAGIC_KEY_HELP1 H
147//#define MAGIC_KEY_HELP2 SLASH
148//#define MAGIC_KEY_DEBUG D
149//#define MAGIC_KEY_DEBUG_MATRIX X
150//#define MAGIC_KEY_DEBUG_KBD K
151//#define MAGIC_KEY_DEBUG_MOUSE M
152//#define MAGIC_KEY_VERSION V
153//#define MAGIC_KEY_STATUS S
154//#define MAGIC_KEY_CONSOLE C
155//#define MAGIC_KEY_LAYER0_ALT1 ESC
156//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
157//#define MAGIC_KEY_LAYER0 0
158//#define MAGIC_KEY_LAYER1 1
159//#define MAGIC_KEY_LAYER2 2
160//#define MAGIC_KEY_LAYER3 3
161//#define MAGIC_KEY_LAYER4 4
162//#define MAGIC_KEY_LAYER5 5
163//#define MAGIC_KEY_LAYER6 6
164//#define MAGIC_KEY_LAYER7 7
165//#define MAGIC_KEY_LAYER8 8
166//#define MAGIC_KEY_LAYER9 9
167//#define MAGIC_KEY_BOOTLOADER PAUSE
168//#define MAGIC_KEY_LOCK CAPS
169//#define MAGIC_KEY_EEPROM E
170//#define MAGIC_KEY_NKRO N
171//#define MAGIC_KEY_SLEEP_LED Z
172
173/*
174 * Feature disable options
175 * These options are also useful to firmware size reduction.
176 */
177
178/* disable debug print */
179//#define NO_DEBUG
180
181/* disable print */
182//#define NO_PRINT
183
184/* disable action features */
185//#define NO_ACTION_LAYER
186//#define NO_ACTION_TAPPING
187//#define NO_ACTION_ONESHOT
188//#define NO_ACTION_MACRO
189//#define NO_ACTION_FUNCTION
190
191/*
192 * MIDI options
193 */
194
195/* Prevent use of disabled MIDI features in the keymap */
196//#define MIDI_ENABLE_STRICT 1
197
198/* enable basic MIDI features:
199 - MIDI notes can be sent when in Music mode is on
200*/
201//#define MIDI_BASIC
202
203/* enable advanced MIDI features:
204 - MIDI notes can be added to the keymap
205 - Octave shift and transpose
206 - Virtual sustain, portamento, and modulation wheel
207 - etc.
208*/
209//#define MIDI_ADVANCED
210
211/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
212//#define MIDI_TONE_KEYCODE_OCTAVES 1
213
214/*
215 * HD44780 LCD Display Configuration
216 */
217/*
218#define LCD_LINES 2 //< number of visible lines of the display
219#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
220
221#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
222
223#if LCD_IO_MODE
224#define LCD_PORT PORTB //< port for the LCD lines
225#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
226#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
227#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
228#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
229#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
230#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
231#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
232#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
233#define LCD_RS_PORT LCD_PORT //< port for RS line
234#define LCD_RS_PIN 3 //< pin for RS line
235#define LCD_RW_PORT LCD_PORT //< port for RW line
236#define LCD_RW_PIN 2 //< pin for RW line
237#define LCD_E_PORT LCD_PORT //< port for Enable line
238#define LCD_E_PIN 1 //< pin for Enable line
239#endif
240*/
241
242/* Bootmagic Lite key configuration */
243// #define BOOTMAGIC_LITE_ROW 0
244// #define BOOTMAGIC_LITE_COLUMN 0
245
246/* VIA Configurator Compatibility */
247
248#define DYNAMIC_KEYMAP_LAYER_COUNT 4
249
250// EEPROM usage
251
252#define EEPROM_MAGIC 0x451F
253#define EEPROM_MAGIC_ADDR 32
254// Bump this every time we change what we store
255// This will automatically reset the EEPROM with defaults
256// and avoid loading invalid data from the EEPROM
257#define EEPROM_VERSION 0x08
258#define EEPROM_VERSION_ADDR 34
259
260// Dynamic keymap starts after EEPROM version
261#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
262// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
263#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
264// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
265#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389
266#define DYNAMIC_KEYMAP_MACRO_COUNT 16
diff --git a/keyboards/ai03/lunar/info.json b/keyboards/ai03/lunar/info.json
new file mode 100644
index 000000000..c7f6454f0
--- /dev/null
+++ b/keyboards/ai03/lunar/info.json
@@ -0,0 +1,13 @@
1{
2 "keyboard_name": "Lunar",
3 "url": "https://geekhack.org/index.php?topic=96112.0",
4 "maintainer": "ai03",
5 "bootloader": "",
6 "width": 16,
7 "height": 5,
8 "layouts": {
9 "LAYOUT": {
10 "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Home", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":2.25}, {"x":6.5, "y":4, "w":1.5}, {"x":8, "y":4, "w":2.75}, {"label":"Alt", "x":10.75, "y":4, "w":1.25}, {"label":"Win", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}]
11 }
12 }
13} \ No newline at end of file
diff --git a/keyboards/ai03/lunar/keymaps/default/keymap.c b/keyboards/ai03/lunar/keymaps/default/keymap.c
new file mode 100644
index 000000000..4705d00ec
--- /dev/null
+++ b/keyboards/ai03/lunar/keymaps/default/keymap.c
@@ -0,0 +1,90 @@
1/* Copyright 2019 Ryota Goto
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// Defines the keycodes used by our macros in process_record_user
19enum custom_keycodes {
20 MANUAL = SAFE_RANGE,
21 SWPLURL
22};
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25
26 /*
27
28 Layout
29
30 K000 K001 K002 K003 K004 K005 K006 K007 K008 K009 K010 K011 K012 K013 K212 K014
31 K100 K101 K102 K103 K104 K105 K106 K107 K108 K109 K110 K111 K112 K113 K114
32 K200 K201 K202 K203 K204 K205 K206 K207 K208 K209 K210 K211 K213 K214
33 K300 K301 K302 K303 K304 K305 K306 K307 K308 K309 K310 K311 K313 K314
34 K400 K401 K402 K403 K405 K407 K409 K410 K411 K413 K414
35
36 K212 = Split backspace (bound to Del by default)
37 K403, K407 = Split space (bound to space by default)
38 K405 = Main space
39
40 */
41
42 [0] = LAYOUT( /* Base */
43 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_BSPC, KC_BSPC, KC_HOME,
44 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_END,
45 MO(1), 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,
46 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
47 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT
48 ),
49 [1] = LAYOUT( /* FN */
50 RESET, 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_DEL, KC_DEL, MANUAL,
51 KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, SWPLURL,
52 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______,
53 _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______,
54 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
55 )
56};
57
58bool process_record_user(uint16_t keycode, keyrecord_t *record) {
59 switch (keycode) {
60 case MANUAL:
61 if (record->event.pressed) {
62 // when keycode QMKBEST is pressed
63 SEND_STRING("https://kb.ai03.me/redir/lunar/index.html");
64 } else {
65 // when keycode QMKBEST is released
66 }
67 break;
68 case SWPLURL:
69 if (record->event.pressed) {
70 // when keycode QMKURL is pressed
71 SEND_STRING("https://switchplate.co/collections/lunar-group-buy");
72 } else {
73 // when keycode QMKURL is released
74 }
75 break;
76 }
77 return true;
78}
79
80void matrix_init_user(void) {
81
82}
83
84void matrix_scan_user(void) {
85
86}
87
88void led_set_user(uint8_t usb_led) {
89
90}
diff --git a/keyboards/ai03/lunar/keymaps/default/readme.md b/keyboards/ai03/lunar/keymaps/default/readme.md
new file mode 100644
index 000000000..8ff536ffc
--- /dev/null
+++ b/keyboards/ai03/lunar/keymaps/default/readme.md
@@ -0,0 +1,2 @@
1# The default keymap for Lunar
2For use without VIA configurator. \ No newline at end of file
diff --git a/keyboards/ai03/lunar/keymaps/via/keymap.c b/keyboards/ai03/lunar/keymaps/via/keymap.c
new file mode 100644
index 000000000..b98e6cf0a
--- /dev/null
+++ b/keyboards/ai03/lunar/keymaps/via/keymap.c
@@ -0,0 +1,64 @@
1/* Copyright 2019 Ryota Goto
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
20 /*
21
22 Layout
23
24 K000 K001 K002 K003 K004 K005 K006 K007 K008 K009 K010 K011 K012 K013 K212 K014
25 K100 K101 K102 K103 K104 K105 K106 K107 K108 K109 K110 K111 K112 K113 K114
26 K200 K201 K202 K203 K204 K205 K206 K207 K208 K209 K210 K211 K213 K214
27 K300 K301 K302 K303 K304 K305 K306 K307 K308 K309 K310 K311 K313 K314
28 K400 K401 K402 K403 K405 K407 K409 K410 K411 K413 K414
29
30 K212 = Split backspace (bound to Del by default)
31 K403, K407 = Split space (bound to space by default)
32 K405 = Main space
33
34 */
35
36 [0] = LAYOUT( /* Base */
37 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_BSPC, KC_BSPC, KC_HOME,
38 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_END,
39 MO(1), 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,
40 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
41 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT
42 ),
43 [1] = LAYOUT( /* FN */
44 RESET, 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_DEL, KC_DEL, _______,
45 KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______,
46 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______,
47 _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______,
48 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
49 ),
50 [2] = LAYOUT( /* Blank. For VIA compatibility */
51 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
52 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
53 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
54 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
56 ),
57 [3] = LAYOUT( /* Blank. For VIA compatibility */
58 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
61 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
62 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
63 )
64};
diff --git a/keyboards/ai03/lunar/keymaps/via/readme.md b/keyboards/ai03/lunar/keymaps/via/readme.md
new file mode 100644
index 000000000..ff0b73bfc
--- /dev/null
+++ b/keyboards/ai03/lunar/keymaps/via/readme.md
@@ -0,0 +1,2 @@
1# The VIA keymap for Lunar
2This keymap is for compatibility with the VIA configurator. \ No newline at end of file
diff --git a/keyboards/ai03/lunar/keymaps/via/rules.mk b/keyboards/ai03/lunar/keymaps/via/rules.mk
new file mode 100644
index 000000000..7c10c3fbb
--- /dev/null
+++ b/keyboards/ai03/lunar/keymaps/via/rules.mk
@@ -0,0 +1,86 @@
1# MCU name
2#MCU = at90usb1286
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Bootloader selection
43# Teensy halfkay
44# Pro Micro caterina
45# Atmel DFU atmel-dfu
46# LUFA DFU lufa-dfu
47# QMK DFU qmk-dfu
48# atmega32a bootloadHID
49BOOTLOADER = atmel-dfu
50
51
52# If you don't know the bootloader type, then you can specify the
53# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
54# Teensy halfKay 512
55# Teensy++ halfKay 1024
56# Atmel DFU loader 4096
57# LUFA bootloader 4096
58# USBaspLoader 2048
59# OPT_DEFS += -DBOOTLOADER_SIZE=4096
60
61
62# Build Options
63# change yes to no to disable
64#
65BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
66MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
67EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
68CONSOLE_ENABLE = yes # Console for debug(+400)
69COMMAND_ENABLE = yes # Commands for debug and configuration
70# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
71SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
72# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
73NKRO_ENABLE = yes # USB Nkey Rollover
74BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
75RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
76MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
77UNICODE_ENABLE = no # Unicode
78BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
79AUDIO_ENABLE = no # Audio output on port C6
80FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
81HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
82
83SRC += keyboards/wilba_tech/wt_main.c
84
85RAW_ENABLE = yes
86DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/ai03/lunar/lunar.c b/keyboards/ai03/lunar/lunar.c
new file mode 100644
index 000000000..37438c71e
--- /dev/null
+++ b/keyboards/ai03/lunar/lunar.c
@@ -0,0 +1,22 @@
1/* Copyright 2019 Ryota Goto
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 "lunar.h"
17
18void led_set_kb(uint8_t usb_led) {
19 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
20
21 led_set_user(usb_led);
22}
diff --git a/keyboards/ai03/lunar/lunar.h b/keyboards/ai03/lunar/lunar.h
new file mode 100644
index 000000000..2e66ecb5c
--- /dev/null
+++ b/keyboards/ai03/lunar/lunar.h
@@ -0,0 +1,41 @@
1/* Copyright 2019 Ryota Goto
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#pragma once
17
18#include "quantum.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28#define LAYOUT( \
29 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \
30 K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
31 K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \
32 K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
33 K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \
34) \
35{ \
36 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
37 { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
38 { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
39 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
40 { K400, K401, K402, K403, KC_NO, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \
41}
diff --git a/keyboards/ai03/lunar/readme.md b/keyboards/ai03/lunar/readme.md
new file mode 100644
index 000000000..585d6454b
--- /dev/null
+++ b/keyboards/ai03/lunar/readme.md
@@ -0,0 +1,15 @@
1# Lunar
2
3![Photo](https://i.imgur.com/hYoW8IJ.jpg)
4
5A 65% keyboard made specifically for Alps SKCM/L switches and AEK/M0116 keycaps.
6
7Keyboard Maintainer: [ai03](https://github.com/ai03-2725)
8Hardware Supported: Official Lunar PCB
9Hardware Availability: [Switchplate Peripherals](https://switchplate.co/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make ai03/lunar:default
14
15See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk
new file mode 100644
index 000000000..8c2532574
--- /dev/null
+++ b/keyboards/ai03/lunar/rules.mk
@@ -0,0 +1,81 @@
1# MCU name
2#MCU = at90usb1286
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Bootloader selection
43# Teensy halfkay
44# Pro Micro caterina
45# Atmel DFU atmel-dfu
46# LUFA DFU lufa-dfu
47# QMK DFU qmk-dfu
48# atmega32a bootloadHID
49BOOTLOADER = atmel-dfu
50
51
52# If you don't know the bootloader type, then you can specify the
53# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
54# Teensy halfKay 512
55# Teensy++ halfKay 1024
56# Atmel DFU loader 4096
57# LUFA bootloader 4096
58# USBaspLoader 2048
59# OPT_DEFS += -DBOOTLOADER_SIZE=4096
60
61
62# Build Options
63# change yes to no to disable
64#
65BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
66MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
67EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
68CONSOLE_ENABLE = yes # Console for debug(+400)
69COMMAND_ENABLE = yes # Commands for debug and configuration
70# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
71SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
72# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
73NKRO_ENABLE = yes # USB Nkey Rollover
74BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
75RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
76MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
77UNICODE_ENABLE = no # Unicode
78BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
79AUDIO_ENABLE = no # Audio output on port C6
80FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
81HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)