aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Dekkers <maartenwut@gmail.com>2020-01-20 01:23:03 +0100
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2020-01-19 16:23:03 -0800
commit251a69ea3d63ac8783e30b6e03e3866b9579af72 (patch)
tree50e1050504c8e7e133404d723554a8e2a0e2d43c
parent31c0fe69f6f0b9e3a88e7f4cc6388727aecbeb08 (diff)
downloadqmk_firmware-251a69ea3d63ac8783e30b6e03e3866b9579af72.tar.gz
qmk_firmware-251a69ea3d63ac8783e30b6e03e3866b9579af72.zip
[Keyboard] Add mx5160 keyboard (#7142)
* Add mx5160 keyboard * Make necessary changes for merging rules.mk cleanup, QMK's built in alias for KC_TRNS and change readme blurb * Add info.json as well * Update readme, info.json * Change layout name, update led function * Fix info.json * Update rules.mk
-rw-r--r--keyboards/maartenwut/mx5160/config.h252
-rw-r--r--keyboards/maartenwut/mx5160/info.json12
-rw-r--r--keyboards/maartenwut/mx5160/keymaps/default/keymap.c41
-rw-r--r--keyboards/maartenwut/mx5160/keymaps/default/readme.md1
-rw-r--r--keyboards/maartenwut/mx5160/mx5160.c58
-rw-r--r--keyboards/maartenwut/mx5160/mx5160.h47
-rw-r--r--keyboards/maartenwut/mx5160/readme.md15
-rw-r--r--keyboards/maartenwut/mx5160/rules.mk33
8 files changed, 459 insertions, 0 deletions
diff --git a/keyboards/maartenwut/mx5160/config.h b/keyboards/maartenwut/mx5160/config.h
new file mode 100644
index 000000000..7d3be7938
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/config.h
@@ -0,0 +1,252 @@
1/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
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
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x4705
23#define PRODUCT_ID 0x5160
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Maartenwut
26#define PRODUCT MX-5160
27#define DESCRIPTION Replacement PCB for the Chicony 5160c
28
29/* key matrix size */
30#define MATRIX_ROWS 10
31#define MATRIX_COLS 10
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42*/
43#define MATRIX_ROW_PINS {C6,C7,B5,B6,D7,B4,D4,D6,D5,D3}
44#define MATRIX_COL_PINS {D0,D1,D2,F7,F6,F5,F4,F1,F0,E6}
45#define UNUSED_PINS {B7,B0}
46
47/* COL2ROW, ROW2COL*/
48#define DIODE_DIRECTION ROW2COL
49
50// For QMK DFU
51#define QMK_ESC_OUTPUT C6
52#define QMK_ESC_INPUT D1
53#define QMK_LED B1
54/*
55 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
56 */
57// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
58
59// #define BACKLIGHT_PIN B7
60// #define BACKLIGHT_BREATHING
61// #define BACKLIGHT_LEVELS 3
62
63// #define RGB_DI_PIN E2
64// #ifdef RGB_DI_PIN
65// #define RGBLED_NUM 16
66// #define RGBLIGHT_HUE_STEP 8
67// #define RGBLIGHT_SAT_STEP 8
68// #define RGBLIGHT_VAL_STEP 8
69// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
70// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
71// /*== all animations enable ==*/
72// #define RGBLIGHT_ANIMATIONS
73// /*== or choose animations ==*/
74// #define RGBLIGHT_EFFECT_BREATHING
75// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
76// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
77// #define RGBLIGHT_EFFECT_SNAKE
78// #define RGBLIGHT_EFFECT_KNIGHT
79// #define RGBLIGHT_EFFECT_CHRISTMAS
80// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
81// #define RGBLIGHT_EFFECT_RGB_TEST
82// #define RGBLIGHT_EFFECT_ALTERNATING
83// /*== customize breathing effect ==*/
84// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
85// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
86// /*==== use exp() and sin() ====*/
87// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
88// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
89// #endif
90
91/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
92#define DEBOUNCE 5
93
94/* define if matrix has ghost (lacks anti-ghosting diodes) */
95//#define MATRIX_HAS_GHOST
96
97/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
98#define LOCKING_SUPPORT_ENABLE
99/* Locking resynchronize hack */
100#define LOCKING_RESYNC_ENABLE
101
102/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
103 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
104 */
105// #define GRAVE_ESC_CTRL_OVERRIDE
106
107/*
108 * Force NKRO
109 *
110 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
111 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
112 * makefile for this to work.)
113 *
114 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
115 * until the next keyboard reset.
116 *
117 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
118 * fully operational during normal computer usage.
119 *
120 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
121 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
122 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
123 * power-up.
124 *
125 */
126//#define FORCE_NKRO
127
128/*
129 * Magic Key Options
130 *
131 * Magic keys are hotkey commands that allow control over firmware functions of
132 * the keyboard. They are best used in combination with the HID Listen program,
133 * found here: https://www.pjrc.com/teensy/hid_listen.html
134 *
135 * The options below allow the magic key functionality to be changed. This is
136 * useful if your keyboard/keypad is missing keys and you want magic key support.
137 *
138 */
139
140/* key combination for magic key command */
141/* defined by default; to change, uncomment and set to the combination you want */
142// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
143
144/* control how magic key switches layers */
145//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
146//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
147//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
148
149/* override magic key keymap */
150//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
151//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
152//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
153//#define MAGIC_KEY_HELP H
154//#define MAGIC_KEY_HELP_ALT SLASH
155//#define MAGIC_KEY_DEBUG D
156//#define MAGIC_KEY_DEBUG_MATRIX X
157//#define MAGIC_KEY_DEBUG_KBD K
158//#define MAGIC_KEY_DEBUG_MOUSE M
159//#define MAGIC_KEY_VERSION V
160//#define MAGIC_KEY_STATUS S
161//#define MAGIC_KEY_CONSOLE C
162//#define MAGIC_KEY_LAYER0 0
163//#define MAGIC_KEY_LAYER0_ALT GRAVE
164//#define MAGIC_KEY_LAYER1 1
165//#define MAGIC_KEY_LAYER2 2
166//#define MAGIC_KEY_LAYER3 3
167//#define MAGIC_KEY_LAYER4 4
168//#define MAGIC_KEY_LAYER5 5
169//#define MAGIC_KEY_LAYER6 6
170//#define MAGIC_KEY_LAYER7 7
171//#define MAGIC_KEY_LAYER8 8
172//#define MAGIC_KEY_LAYER9 9
173//#define MAGIC_KEY_BOOTLOADER B
174//#define MAGIC_KEY_BOOTLOADER_ALT ESC
175//#define MAGIC_KEY_LOCK CAPS
176//#define MAGIC_KEY_EEPROM E
177//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
178//#define MAGIC_KEY_NKRO N
179//#define MAGIC_KEY_SLEEP_LED Z
180
181/*
182 * Feature disable options
183 * These options are also useful to firmware size reduction.
184 */
185
186/* disable debug print */
187//#define NO_DEBUG
188
189/* disable print */
190//#define NO_PRINT
191
192/* disable action features */
193//#define NO_ACTION_LAYER
194//#define NO_ACTION_TAPPING
195//#define NO_ACTION_ONESHOT
196//#define NO_ACTION_MACRO
197//#define NO_ACTION_FUNCTION
198
199/*
200 * MIDI options
201 */
202
203/* Prevent use of disabled MIDI features in the keymap */
204//#define MIDI_ENABLE_STRICT 1
205
206/* enable basic MIDI features:
207 - MIDI notes can be sent when in Music mode is on
208*/
209//#define MIDI_BASIC
210
211/* enable advanced MIDI features:
212 - MIDI notes can be added to the keymap
213 - Octave shift and transpose
214 - Virtual sustain, portamento, and modulation wheel
215 - etc.
216*/
217//#define MIDI_ADVANCED
218
219/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
220//#define MIDI_TONE_KEYCODE_OCTAVES 1
221
222/*
223 * HD44780 LCD Display Configuration
224 */
225/*
226#define LCD_LINES 2 //< number of visible lines of the display
227#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
228
229#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
230
231#if LCD_IO_MODE
232#define LCD_PORT PORTB //< port for the LCD lines
233#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
234#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
235#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
236#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
237#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
238#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
239#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
240#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
241#define LCD_RS_PORT LCD_PORT //< port for RS line
242#define LCD_RS_PIN 3 //< pin for RS line
243#define LCD_RW_PORT LCD_PORT //< port for RW line
244#define LCD_RW_PIN 2 //< pin for RW line
245#define LCD_E_PORT LCD_PORT //< port for Enable line
246#define LCD_E_PIN 1 //< pin for Enable line
247#endif
248*/
249
250/* Bootmagic Lite key configuration */
251// #define BOOTMAGIC_LITE_ROW 0
252// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/maartenwut/mx5160/info.json b/keyboards/maartenwut/mx5160/info.json
new file mode 100644
index 000000000..8962522ba
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "mx5160",
3 "url": "https://github.com/Maartenwut/mx-5160",
4 "maintainer": "qmk",
5 "width": 22,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_all": {
9 "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":18, "y":0}, {"x":19, "y":0}, {"x":20, "y":0}, {"x":21, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1, "w":1.5}, {"x":18, "y":1}, {"x":19, "y":1}, {"x":20, "y":1}, {"x":21, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2}, {"x":16.25, "y":2, "w":1.25}, {"x":18, "y":2}, {"x":19, "y":2}, {"x":20, "y":2}, {"x":21, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.75}, {"x":16.5, "y":3}, {"x":18, "y":3}, {"x":19, "y":3}, {"x":20, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":1.5}, {"x":6.5, "y":4, "w":7}, {"x":13.5, "y":4, "w":1.5}, {"x":16, "y":4, "w":1.5}, {"x":18, "y":4}, {"x":19, "y":4}, {"x":20, "y":4}, {"x":21, "y":3, "h":2}]
10 }
11 }
12} \ No newline at end of file
diff --git a/keyboards/maartenwut/mx5160/keymaps/default/keymap.c b/keyboards/maartenwut/mx5160/keymaps/default/keymap.c
new file mode 100644
index 000000000..be6cc89f6
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/keymaps/default/keymap.c
@@ -0,0 +1,41 @@
1/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
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// Each layer gets a name for readability, which is then used in the keymap matrix below.
19// The underscores don't mean anything - you can have a layer called STUFF or any other name.
20// Layer names don't all need to be of the same length, obviously, and you can also skip them
21// entirely and just use numbers.
22
23#define _MA 0 //Main layer
24#define _FN 1 //Main layer
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27[_MA] = LAYOUT_all(
28 KC_F1, KC_F2, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
29 KC_F3, KC_F4, 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, _______, \
30 KC_F5, KC_F6, 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_P4, KC_P5, KC_P6, KC_PPLS, \
31 KC_F7, KC_F8, 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_P1, KC_P2, KC_P3, \
32 KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_P0, _______, KC_PDOT, KC_PENT), \
33
34[_FN] = LAYOUT_all(
35 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_PSCR, _______, _______, _______, \
36 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, \
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, \
38 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, \
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \
40
41};
diff --git a/keyboards/maartenwut/mx5160/keymaps/default/readme.md b/keyboards/maartenwut/mx5160/keymaps/default/readme.md
new file mode 100644
index 000000000..c93867735
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/keymaps/default/readme.md
@@ -0,0 +1 @@
This is the default keymap for the mx-5160 PCB. \ No newline at end of file
diff --git a/keyboards/maartenwut/mx5160/mx5160.c b/keyboards/maartenwut/mx5160/mx5160.c
new file mode 100644
index 000000000..96859693c
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/mx5160.c
@@ -0,0 +1,58 @@
1/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
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 "mx5160.h"
17
18
19void matrix_init_kb(void) {
20 // put your keyboard start-up code here
21 // runs once when the firmware starts up
22
23 matrix_init_user();
24 led_init_ports();
25}
26
27void matrix_scan_kb(void) {
28 // put your looping keyboard code here
29 // runs every cycle (a lot)
30
31 matrix_scan_user();
32}
33
34void led_init_ports(void) {
35 //Set led pin as output, then high (off)
36
37 //Caps lock
38 setPinOutput(B1);
39 writePinHigh(B1);
40
41 //Num lock
42 setPinOutput(B2);
43 writePinHigh(B2);
44
45 //Scroll lock
46 setPinOutput(B3);
47 writePinHigh(B3);
48}
49
50bool led_update_kb(led_t led_state) {
51 bool res = led_update_user(led_state);
52 if (res) {
53 writePin(B2, !led_state.num_lock);
54 writePin(B1, !led_state.caps_lock);
55 writePin(B3, !led_state.scroll_lock);
56 }
57 return res;
58}
diff --git a/keyboards/maartenwut/mx5160/mx5160.h b/keyboards/maartenwut/mx5160/mx5160.h
new file mode 100644
index 000000000..89179a7f8
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/mx5160.h
@@ -0,0 +1,47 @@
1/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
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#define XXX KC_NO
20
21/* This a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT_all( \
30 k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k87, k17, k08, k18, k09, k19, \
31 k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k38, k29, k39, \
32 k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k48, k58, k49, k59, \
33 k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k78, k69, \
34 k80, k90, k81, k82, k94, k96, k97, k88, k98, k89, k99 \
35) \
36{ \
37 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
38 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
39 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
40 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \
41 { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \
42 { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \
43 { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \
44 { k70, k71, k72, k73, k74, k75, k76, k77, k78, XXX }, \
45 { k80, k81, k82, XXX, XXX, XXX, XXX, k87, k88, k89 }, \
46 { k90, XXX, XXX, XXX, k94, XXX, k96, k97, k98, k99 } \
47}
diff --git a/keyboards/maartenwut/mx5160/readme.md b/keyboards/maartenwut/mx5160/readme.md
new file mode 100644
index 000000000..40753a8f5
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/readme.md
@@ -0,0 +1,15 @@
1# mx5160
2
3![mx5160](https://i.imgur.com/XZ9xUeq.jpg)
4
5## Support
6* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut)
7* Hardware Supported: mx-5160 (Chicony 5160c case)
8* Hardware Availability: [Github](https://github.com/Maartenwut/mx-5160)
9
10## Build
11Make example for this keyboard (after setting up your build environment):
12
13 make maartenwut/mx5160: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). \ No newline at end of file
diff --git a/keyboards/maartenwut/mx5160/rules.mk b/keyboards/maartenwut/mx5160/rules.mk
new file mode 100644
index 000000000..eb1e55955
--- /dev/null
+++ b/keyboards/maartenwut/mx5160/rules.mk
@@ -0,0 +1,33 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = qmk-dfu
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = no # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = no # USB Nkey Rollover
26BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI support
29UNICODE_ENABLE = no # Unicode
30BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
31AUDIO_ENABLE = no # Audio output on port C6
32FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
33HD44780_ENABLE = no # Enable support for HD44780 based LCDs