summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/CMD60/CMD60.c8
-rw-r--r--keyboards/handwired/CMD60/CMD60.h20
-rw-r--r--keyboards/handwired/CMD60/Makefile3
-rw-r--r--keyboards/handwired/CMD60/README.md35
-rw-r--r--keyboards/handwired/CMD60/config.h162
-rw-r--r--keyboards/handwired/CMD60/keymaps/default/keymap.c66
-rw-r--r--keyboards/handwired/CMD60/rules.mk73
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c1
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h48
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/Makefile3
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/babblePaste.c460
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/babblePaste.h238
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/babblePaste.txt123
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/config.h100
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile21
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c64
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md1
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile21
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h32
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c272
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md1
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/readme.md58
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/rules.mk48
-rw-r--r--keyboards/handwired/Makefile3
-rw-r--r--keyboards/handwired/arrow_pad/Makefile3
-rw-r--r--keyboards/handwired/arrow_pad/arrow_pad.c1
-rw-r--r--keyboards/handwired/arrow_pad/arrow_pad.h13
-rw-r--r--keyboards/handwired/arrow_pad/config.h160
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/default/keymap.c163
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/Makefile17
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/config.h158
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c160
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_24/Makefile17
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_24/config.h160
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c163
-rw-r--r--keyboards/handwired/arrow_pad/readme.md133
-rw-r--r--keyboards/handwired/arrow_pad/rules.mk70
-rw-r--r--keyboards/handwired/atreus50/Makefile3
-rw-r--r--keyboards/handwired/atreus50/atreus50.c10
-rw-r--r--keyboards/handwired/atreus50/atreus50.h36
-rw-r--r--keyboards/handwired/atreus50/config.h163
-rw-r--r--keyboards/handwired/atreus50/keymaps/default/Makefile6
-rw-r--r--keyboards/handwired/atreus50/keymaps/default/keymap.c250
-rw-r--r--keyboards/handwired/atreus50/readme.md16
-rw-r--r--keyboards/handwired/atreus50/rules.mk81
-rw-r--r--keyboards/handwired/fivethirteen/Makefile3
-rw-r--r--keyboards/handwired/fivethirteen/README.md28
-rw-r--r--keyboards/handwired/fivethirteen/config.h162
-rw-r--r--keyboards/handwired/fivethirteen/fivethirteen.c8
-rw-r--r--keyboards/handwired/fivethirteen/fivethirteen.h21
-rw-r--r--keyboards/handwired/fivethirteen/keymaps/default/keymap.c49
-rw-r--r--keyboards/handwired/fivethirteen/rules.mk73
-rw-r--r--keyboards/handwired/frenchdev/Makefile3
-rw-r--r--keyboards/handwired/frenchdev/config.h85
-rw-r--r--keyboards/handwired/frenchdev/frenchdev.c87
-rw-r--r--keyboards/handwired/frenchdev/frenchdev.h115
-rw-r--r--keyboards/handwired/frenchdev/i2cmaster.h178
-rw-r--r--keyboards/handwired/frenchdev/keymaps/default/keymap.c409
-rw-r--r--keyboards/handwired/frenchdev/keymaps/default/readme.md13
-rw-r--r--keyboards/handwired/frenchdev/matrix.c396
-rw-r--r--keyboards/handwired/frenchdev/readme.md102
-rw-r--r--keyboards/handwired/frenchdev/rules.mk92
-rw-r--r--keyboards/handwired/frenchdev/twimaster.c208
-rw-r--r--keyboards/handwired/gamenum/Makefile3
-rw-r--r--keyboards/handwired/gamenum/README.md102
-rw-r--r--keyboards/handwired/gamenum/config.h162
-rw-r--r--keyboards/handwired/gamenum/gamenum.c14
-rw-r--r--keyboards/handwired/gamenum/gamenum.h21
-rw-r--r--keyboards/handwired/gamenum/keymaps/default/keymap.c68
-rw-r--r--keyboards/handwired/gamenum/rules.mk73
-rw-r--r--keyboards/handwired/handwired.c1
-rw-r--r--keyboards/handwired/handwired.h1
-rw-r--r--keyboards/handwired/kbod/Makefile3
-rw-r--r--keyboards/handwired/kbod/config.h167
-rw-r--r--keyboards/handwired/kbod/kbod.c28
-rw-r--r--keyboards/handwired/kbod/kbod.h21
-rw-r--r--keyboards/handwired/kbod/keymaps/default/Makefile21
-rw-r--r--keyboards/handwired/kbod/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/kbod/keymaps/default/keymap.c104
-rw-r--r--keyboards/handwired/kbod/keymaps/default/readme.md5
-rw-r--r--keyboards/handwired/kbod/readme.md21
-rw-r--r--keyboards/handwired/kbod/rules.mk68
-rw-r--r--keyboards/handwired/magicforce61/Makefile3
-rw-r--r--keyboards/handwired/magicforce61/README.md24
-rw-r--r--keyboards/handwired/magicforce61/config.h162
-rw-r--r--keyboards/handwired/magicforce61/keymaps/default/keymap.c69
-rw-r--r--keyboards/handwired/magicforce61/magicforce61.c8
-rw-r--r--keyboards/handwired/magicforce61/magicforce61.h20
-rw-r--r--keyboards/handwired/magicforce61/rules.mk83
-rw-r--r--keyboards/handwired/magicforce68/Makefile3
-rw-r--r--keyboards/handwired/magicforce68/README.md20
-rw-r--r--keyboards/handwired/magicforce68/config.h162
-rw-r--r--keyboards/handwired/magicforce68/keymaps/default/keymap.c67
-rw-r--r--keyboards/handwired/magicforce68/magicforce68.c8
-rw-r--r--keyboards/handwired/magicforce68/magicforce68.h20
-rw-r--r--keyboards/handwired/magicforce68/rules.mk83
-rw-r--r--keyboards/handwired/minorca/Makefile3
-rw-r--r--keyboards/handwired/minorca/config.h80
-rw-r--r--keyboards/handwired/minorca/keymaps/default/Makefile25
-rw-r--r--keyboards/handwired/minorca/keymaps/default/config.h12
-rw-r--r--keyboards/handwired/minorca/keymaps/default/keymap.c44
-rw-r--r--keyboards/handwired/minorca/keymaps/default/readme.md5
-rw-r--r--keyboards/handwired/minorca/keymaps/readme.md23
-rw-r--r--keyboards/handwired/minorca/keymaps/rgb/Makefile25
-rw-r--r--keyboards/handwired/minorca/keymaps/rgb/config.h20
-rw-r--r--keyboards/handwired/minorca/keymaps/rgb/keymap.c65
-rw-r--r--keyboards/handwired/minorca/keymaps/rgb/readme.md25
-rw-r--r--keyboards/handwired/minorca/minorca.c6
-rw-r--r--keyboards/handwired/minorca/minorca.h6
-rw-r--r--keyboards/handwired/minorca/readme.md33
-rw-r--r--keyboards/handwired/minorca/rules.mk67
-rw-r--r--keyboards/handwired/numpad20/Makefile3
-rw-r--r--keyboards/handwired/numpad20/config.h162
-rw-r--r--keyboards/handwired/numpad20/keymaps/default/keymap.c16
-rw-r--r--keyboards/handwired/numpad20/numpad20.c8
-rw-r--r--keyboards/handwired/numpad20/numpad20.h20
-rw-r--r--keyboards/handwired/numpad20/rules.mk83
-rw-r--r--keyboards/handwired/onekey/Makefile3
-rw-r--r--keyboards/handwired/onekey/config.h75
-rw-r--r--keyboards/handwired/onekey/keymaps/default/keymap.c5
-rw-r--r--keyboards/handwired/onekey/onekey.c1
-rw-r--r--keyboards/handwired/onekey/onekey.h1
-rw-r--r--keyboards/handwired/onekey/rules.mk65
-rw-r--r--keyboards/handwired/ortho5x13/Makefile3
-rw-r--r--keyboards/handwired/ortho5x13/config.h162
-rw-r--r--keyboards/handwired/ortho5x13/keymaps/default/keymap.c289
-rw-r--r--keyboards/handwired/ortho5x13/ortho5x13.c8
-rw-r--r--keyboards/handwired/ortho5x13/ortho5x13.h36
-rw-r--r--keyboards/handwired/ortho5x13/rules.mk83
-rw-r--r--keyboards/handwired/pilcrow/Makefile3
-rw-r--r--keyboards/handwired/pilcrow/config.h162
-rw-r--r--keyboards/handwired/pilcrow/keymaps/default/Makefile21
-rw-r--r--keyboards/handwired/pilcrow/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/pilcrow/keymaps/default/keymap.c88
-rw-r--r--keyboards/handwired/pilcrow/keymaps/default/readme.md1
-rw-r--r--keyboards/handwired/pilcrow/pilcrow.c28
-rw-r--r--keyboards/handwired/pilcrow/pilcrow.h23
-rw-r--r--keyboards/handwired/pilcrow/readme.md28
-rw-r--r--keyboards/handwired/pilcrow/rules.mk67
-rw-r--r--keyboards/handwired/promethium/Makefile3
-rw-r--r--keyboards/handwired/promethium/color.h15
-rw-r--r--keyboards/handwired/promethium/config.h356
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/Makefile31
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/README.md44
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/config.h29
-rwxr-xr-xkeyboards/handwired/promethium/keymaps/priyadi/flash.sh4
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c1368
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h1
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h36
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h36
-rw-r--r--keyboards/handwired/promethium/keymaps/readme.md22
-rw-r--r--keyboards/handwired/promethium/matrix.c306
-rw-r--r--keyboards/handwired/promethium/promethium.c47
-rw-r--r--keyboards/handwired/promethium/promethium.h10
-rw-r--r--keyboards/handwired/promethium/readme.md13
-rw-r--r--keyboards/handwired/promethium/rgbsps.c73
-rw-r--r--keyboards/handwired/promethium/rgbsps.h5
-rw-r--r--keyboards/handwired/promethium/rules.mk78
-rwxr-xr-xkeyboards/handwired/reddot/Makefile3
-rwxr-xr-xkeyboards/handwired/reddot/config.h162
-rwxr-xr-xkeyboards/handwired/reddot/keymaps/default/keymap.c29
-rwxr-xr-xkeyboards/handwired/reddot/keymaps/default/readme.md1
-rwxr-xr-xkeyboards/handwired/reddot/readme.md24
-rwxr-xr-xkeyboards/handwired/reddot/reddot.c7
-rwxr-xr-xkeyboards/handwired/reddot/reddot.h20
-rwxr-xr-xkeyboards/handwired/reddot/rules.mk88
-rw-r--r--keyboards/handwired/retro_refit/Makefile3
-rw-r--r--keyboards/handwired/retro_refit/config.h123
-rw-r--r--keyboards/handwired/retro_refit/keymaps/default/keymap.c33
-rw-r--r--keyboards/handwired/retro_refit/readme.md60
-rw-r--r--keyboards/handwired/retro_refit/retro_refit.c47
-rw-r--r--keyboards/handwired/retro_refit/retro_refit.h38
-rw-r--r--keyboards/handwired/retro_refit/rules.mk68
-rw-r--r--keyboards/handwired/rules.mk0
-rw-r--r--keyboards/handwired/trackpoint/Makefile3
-rw-r--r--keyboards/handwired/trackpoint/README.md10
-rw-r--r--keyboards/handwired/trackpoint/config.h75
-rw-r--r--keyboards/handwired/trackpoint/keymaps/default/keymap.c7
-rw-r--r--keyboards/handwired/trackpoint/rules.mk25
-rw-r--r--keyboards/handwired/trackpoint/trackpoint.c5
-rw-r--r--keyboards/handwired/trackpoint/trackpoint.h13
-rw-r--r--keyboards/handwired/traveller/Makefile3
-rw-r--r--keyboards/handwired/traveller/config.h173
-rw-r--r--keyboards/handwired/traveller/keymaps/default/keymap.c305
-rw-r--r--keyboards/handwired/traveller/keymaps/default/readme.md2
-rw-r--r--keyboards/handwired/traveller/readme.md35
-rw-r--r--keyboards/handwired/traveller/rules.mk89
-rw-r--r--keyboards/handwired/traveller/traveller.c61
-rw-r--r--keyboards/handwired/traveller/traveller.h32
190 files changed, 13219 insertions, 0 deletions
diff --git a/keyboards/handwired/CMD60/CMD60.c b/keyboards/handwired/CMD60/CMD60.c
new file mode 100644
index 000000000..799848e34
--- /dev/null
+++ b/keyboards/handwired/CMD60/CMD60.c
@@ -0,0 +1,8 @@
+#include "CMD60.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/CMD60/CMD60.h b/keyboards/handwired/CMD60/CMD60.h
new file mode 100644
index 000000000..f90871fc7
--- /dev/null
+++ b/keyboards/handwired/CMD60/CMD60.h
@@ -0,0 +1,20 @@
+#ifndef CMD60_H
+#define CMD60_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+ K40, K41, K42, K45, K4A, K4B, K4C, K4D \
+ ) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
+ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/CMD60/Makefile b/keyboards/handwired/CMD60/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/CMD60/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/CMD60/README.md b/keyboards/handwired/CMD60/README.md
new file mode 100644
index 000000000..83e371543
--- /dev/null
+++ b/keyboards/handwired/CMD60/README.md
@@ -0,0 +1,35 @@
+CMD60 keyboard firmware
+======================
+
+##CMD60
+
+This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work
+with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2
+and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to
+achieve a higher level of productivity if you take the time to learn its function layers.
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 folder.
+Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use
+the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+
+To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
+
+```
+$ make keymap=[default|jack|<name>]
+```
+
+Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
diff --git a/keyboards/handwired/CMD60/config.h b/keyboards/handwired/CMD60/config.h
new file mode 100644
index 000000000..27eb400b8
--- /dev/null
+++ b/keyboards/handwired/CMD60/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER cmd
+#define PRODUCT CMD60
+#define DESCRIPTION Advanced Programming Keeb Layout
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F0, F4, F5, F6, F7 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/CMD60/keymaps/default/keymap.c b/keyboards/handwired/CMD60/keymaps/default/keymap.c
new file mode 100644
index 000000000..9f9cbcd66
--- /dev/null
+++ b/keyboards/handwired/CMD60/keymaps/default/keymap.c
@@ -0,0 +1,66 @@
+#include "CMD60.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = KEYMAP( /* CMD60 - QWERTY */
+ 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_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, \
+ LT(3, KC_ENT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_NO, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \
+ ),
+ [1] = KEYMAP( /* CMD60 - GameMode */
+ 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
+ KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \
+ KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+ [2] = KEYMAP( /* CMD60 - Arrows */
+ KC_GRV, 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_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+ [3] = KEYMAP( /* CMD60 - Functions */
+ KC_GRV, 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_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \
+ KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+ [4] = KEYMAP( /* CMD60 - Mouse */
+ KC_SYSTEM_SLEEP, 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, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+ [5] = KEYMAP( /* CMD60 - Media */
+ KC_SYSTEM_WAKE, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/handwired/CMD60/rules.mk b/keyboards/handwired/CMD60/rules.mk
new file mode 100644
index 000000000..f50987cde
--- /dev/null
+++ b/keyboards/handwired/CMD60/rules.mk
@@ -0,0 +1,73 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+
diff --git a/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c
new file mode 100644
index 000000000..64982fb62
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c
@@ -0,0 +1 @@
+#include "MS_sculpt_mobile.h"
diff --git a/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h
new file mode 100644
index 000000000..1583dea6e
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h
@@ -0,0 +1,48 @@
+#ifndef MICROSOFT_SCULPT_MOBILE_H
+#define MICROSOFT_SCULPT_MOBILE_H
+
+#include "quantum.h"
+
+
+#define KEYMAP( \
+ k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \
+ k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \
+ k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \
+ k0J, k6A, k6B, k6C, k7H, k1A, k1B, k5D, k5E, k5F, k5G, k1C, k7P, k2G, \
+ k2P, k7K, k7L, k7M, k7O, k0A, k0B, k0C, k0D, k0E, k0F, k2L, k6G, k1P,\
+ k1Q, k4N, k3O,k6N, k3K, k0R, k1M, k6H, k6I, k6J \
+) \
+{ \
+ {k0A, k0B, k0C, k0D, k0E, k0F, KC_NO, KC_NO, KC_NO, k0J, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, k0R},\
+ {k1A, k1B, k1C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k1K, k1L, k1M, KC_NO, k1O, k1P, k1Q, KC_NO},\
+ {k2A, k2B, k2C, k2D, k2E, KC_NO, k2G, KC_NO, KC_NO, KC_NO, KC_NO, k2L, KC_NO, KC_NO, KC_NO, k2P, KC_NO, KC_NO},\
+ {k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k3K, KC_NO, KC_NO, KC_NO, k3O, KC_NO, KC_NO, KC_NO},\
+ {k4A, k4B, k4C, k4D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k4N, KC_NO,KC_NO, KC_NO, KC_NO},\
+ {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q, KC_NO },\
+ {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6J, KC_NO, KC_NO, KC_NO, k6N, k6O, k6P, k6Q, k6R},\
+ {k7A, k7B, k7C, k7D, k7E, k7F, KC_NO, k7H, k7I, k7J, k7K, k7L, k7M, KC_NO, k7O, k7P, k7Q, KC_NO},\
+}
+
+
+#define MATRIX_TESTING_KEYMAP( \
+ k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\
+ k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\
+ k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\
+ k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q,\
+ k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q,\
+ k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q,\
+ k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q,\
+ k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q\
+) \
+{ \
+ {k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q},\
+ {k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q},\
+ {k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q},\
+ {k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q},\
+ {k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q},\
+ {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q},\
+ {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q},\
+ {k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q},\
+}
+
+#endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/Makefile b/keyboards/handwired/MS_sculpt_mobile/Makefile
new file mode 100644
index 000000000..bd09e5885
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/babblePaste.c b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c
new file mode 100644
index 000000000..22394cc7d
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c
@@ -0,0 +1,460 @@
+/* A library to output the right key shortcut in any common app.
+Given a global variable babble_mode to show the environment and a
+key that calls the paste macro, do the right type of paste.
+Setting the context is done by another macro, or TBD interaction with the host.
+
+Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
+and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
+*/
+
+#include "../MS_sculpt_mobile/babblePaste.h"
+
+#include "action_macro.h"
+
+#ifdef USE_BABLPASTE
+
+// GLOBAL variable to determine mode. Sets startup default if no eeppom
+uint8_t babble_mode =0 ;
+
+// small function that we might also want to call from a keymap.
+
+macro_t* switch_babble_mode( uint8_t id) {
+ babble_mode= id;
+ return MACRO_NONE; //less typing where called
+}
+
+
+// Today I learned that the preprocessor can not create a switch statement label from an argument
+// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
+#define BABLM(ent, macro...) \
+ if ( ent == shortcut ) \
+ { action_macro_play( MACRO(macro)); return MACRO_NONE; }
+
+
+/* this function runs the appropriate babblepaste macro, given
+the global babble_mode, and a shortcut from the ENUM in babblePaste.h
+TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
+But that requires even more clever preprocessor foo.
+*/
+const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
+/*
+ if ( shortcut < BABL_START_NUM || \
+ shortcut >= (BABL_START_NUM + BABL_NUM_MACROS ) ) {
+ return MACRO_NONE;
+ }
+*/
+
+
+#ifdef MS_MODE
+ if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
+#endif
+#ifdef MAC_MODE
+ if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
+#endif
+#ifdef LINUX_MODE
+ if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
+#endif
+ #ifdef READMUX_MODE
+ if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
+#endif
+#ifdef VI_MODE
+ if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
+#endif
+#ifdef EMACS_MODE
+ if ( BABL_EMACS == shortcut ) { return switch_babble_mode(EMACS_MODE); }
+#endif
+
+
+
+ switch(babble_mode) {
+
+#ifdef MS_MODE
+
+ case MS_MODE:
+ BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
+ BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
+ BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END );
+ BABLM( BABL_GO_RIGHT_WORD, D(LCTL), T(RIGHT), U(LCTL), END );
+ BABLM( BABL_GO_START_LINE, T(HOME), END );
+ BABLM( BABL_GO_END_LINE, T(END), END );
+ BABLM( BABL_GO_START_DOC, D(LCTL),T(HOME), U(LCTL),END );
+ BABLM( BABL_GO_END_DOC, D(LCTL),T(END), U(LCTL),END );
+ BABLM( BABL_GO_NEXT_LINE, T(DOWN), END );
+ BABLM( BABL_GO_PREV_LINE, T(UP), END );
+ BABLM( BABL_PGDN, T(PGDN), END );
+ BABLM( BABL_PGUP, T(PGUP), END );
+ BABLM( BABL_DEL_RIGHT_1C, T(DEL), END );
+ BABLM( BABL_DEL_LEFT_WORD, D(LCTL), T(BSPACE), U(LCTL), END );
+ BABLM( BABL_DEL_RIGHT_WORD, D(LCTL), T(DEL), U(LCTL), END );
+ BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
+ BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END );
+#ifndef BABL_MOVEMENTONLY
+ BABLM( BABL_UNDO, D(LCTL), T(Z), U(LCTL), END );
+ BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END );
+ BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END );
+ BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END );
+ BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
+ BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
+ BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
+ BABLM( BABL_FIND_NEXT, T(F3),END );
+ BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END );
+ BABLM( BABL_RUNAPP, D(LGUI),T(R), U(LGUI),END );
+ BABLM( BABL_SWITCH_APP_NEXT, D(LALT),T(TAB), U(LALT),END );
+ BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LALT),T(TAB), U(LALT), U(LSFT),END );
+ BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
+ BABLM( BABL_HELP, T(F1),END );
+#ifndef BABL_NOBROWSER
+ BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
+ BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END );
+ BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END );
+ BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END );
+ BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END );
+ BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END );
+ BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END );
+ BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
+ BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
+ BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
+ //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
+ BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
+ // Chrome
+ BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
+ BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F
+ BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), D(RSFT), T(EQL), U(RSFT), U(LCTL),END ); // ctr+ +
+ BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END );
+#endif
+#endif
+
+ // Todo, ring bell, flash light, show user this isn't supported
+ return MACRO_NONE;
+
+
+#endif /* MS_MODE*/
+
+
+#ifdef LINUX_MODE
+
+ case LINUX_MODE:
+ BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
+ BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
+ BABLM( BABL_GO_LEFT_WORD , D(LCTL), T(LEFT), U(LCTL), END );
+ BABLM( BABL_GO_RIGHT_WORD , D(LCTL), T(RIGHT), U(LCTL), END );
+ BABLM( BABL_GO_START_LINE , T(HOME), END );
+ BABLM( BABL_GO_END_LINE , T(END), END );
+ BABLM( BABL_GO_START_DOC , D(LCTL),T(HOME), U(LCTL),END );
+ BABLM( BABL_GO_END_DOC , D(LCTL),T(END), U(LCTL),END );
+ BABLM( BABL_GO_NEXT_LINE , T(DOWN), END );
+ BABLM( BABL_GO_PREV_LINE , T(UP), END );
+ BABLM( BABL_PGDN , T(PGDN), END );
+ BABLM( BABL_PGUP , T(PGUP), END );
+ BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
+ BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
+ BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END );
+ BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
+ BABLM( BABL_DEL_TO_LINE_START, D(RSFT), T(END), U(RSFT), T(DEL), END );
+#ifndef BABL_MOVEMENTONLY
+ BABLM( BABL_UNDO , D(LCTL), T(Z), U(LCTL), END );
+ BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END );
+ BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END );
+ BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END );
+ BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
+ BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
+ BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
+ /* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */
+ BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/
+ /* BABLM( , D(LCTL),T(R), U(LCTL),END ); KDE */
+ BABLM( BABL_FIND_REPLACE, D(LCTL),T(H), U(LCTL),END ); // Gnome*/
+ BABLM( BABL_RUNAPP, D(LALT),T(F2), U(LALT),END );
+ BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END );
+ BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END );
+ BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
+ //BABLM( BABL_HELP, END );
+
+#ifndef BABL_NOBROWSER
+ BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
+ BABLM( BABL_BROWSER_CLOSE_TAB, D(LCTL), T(W), U(LCTL),END );
+ BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LCTL), D(RSFT),T(T), U(RSFT),U(LCTL),END );
+ BABLM( BABL_BROWSER_NEXT_TAB, D(LCTL), T(TAB), U(LCTL),END );
+ BABLM( BABL_BROWSER_PREV_TAB, D(LCTL), D(RSFT), T(TAB), U(RSFT), U(LCTL),END );
+ BABLM( BABL_BROWSER_URL_BAR, D(LCTL), T(L), U(LCTL),END );
+ BABLM( BABL_BROWSER_FORWARD, D(LALT), T(RIGHT), U(LALT),END );
+ BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
+ BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
+ BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
+ BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
+ BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
+ BABLM( BABL_BROWSER_FULLSCREEN, T(F11),END ); //command shift F
+ BABLM( BABL_BROWSER_ZOOM_IN, D(LCTL), T(PLUS), U(LCTL),END );
+ BABLM( BABL_BROWSER_ZOOM_OUT, D(LCTL), T(MINS), U(LCTL),END );
+#endif
+#endif
+ return MACRO_NONE;
+
+#endif
+
+#ifdef MAC_MODE
+
+ case MAC_MODE:
+ BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
+ BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END );
+ BABLM( BABL_GO_LEFT_WORD , D(LALT), T(LEFT), U(LALT), END );
+ BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(RIGHT), U(LALT), END );
+ BABLM( BABL_GO_START_LINE , D(LGUI), T(LEFT), U(LGUI), END );
+ BABLM( BABL_GO_END_LINE , D(LGUI), T(RIGHT), U(LGUI), END );
+ BABLM( BABL_GO_START_DOC , D(LGUI),T(UP), U(LGUI),END );
+ BABLM( BABL_GO_END_DOC , D(LGUI),T(DOWN), U(LGUI),END );
+ BABLM( BABL_GO_NEXT_LINE , T(DOWN), END );
+ BABLM( BABL_GO_PREV_LINE , T(UP), END );
+ BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END );
+ BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END );
+ BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
+ BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END );
+ BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END );
+ BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way
+ BABLM( BABL_DEL_TO_LINE_START, D(LGUI), T(BSPACE), U(LGUI), END );
+#ifndef BABL_MOVEMENTONLY
+ BABLM( BABL_UNDO , D(1), D(LGUI), T(Z), U(LGUI), END );
+ BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END );
+ BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END );
+ BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END );
+ BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
+ BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END );
+ BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END );
+ BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END );
+ BABLM( BABL_FIND_REPLACE, D(LGUI),T(F), U(LGUI),END );
+ BABLM( BABL_RUNAPP , D(LGUI),T(R), U(LGUI),END );
+ BABLM( BABL_SWITCH_APP_NEXT , D(LGUI),T(TAB), U(LGUI),END );
+ BABLM( BABL_SWITCH_APP_LAST , D(LSFT),D(LGUI),T(TAB), U(LGUI), U(LSFT),END );
+ BABLM( BABL_CLOSE_APP , D(LGUI),T(Q), U(LGUI),END );
+ BABLM( BABL_HELP , D(LSFT),D(LGUI),T(SLASH), U(LGUI), U(LSFT),END );
+
+#ifndef BABL_NOBROWSER
+ BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
+ BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
+ BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
+ BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
+ BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
+ BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
+ BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
+ BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
+ //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
+ BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
+ // Chrome
+ BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
+ BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
+ BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ +
+ BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
+#endif
+#endif
+
+ return MACRO_NONE;
+#endif
+
+#ifdef EMACS_MODE
+
+ case EMACS_MODE:
+ switch(shortcut) {
+//probably should allow meta to not be ALT
+
+ BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
+ BABLM( BABL_GO_RIGHT_1C, T(RIGHT), END );
+ BABLM( BABL_GO_LEFT_WORD, D(LALT), T(B), U(LALT), END );
+ BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END );
+ BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END );
+ BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END );
+ BABLM( BABL_GO_START_DOC , D(LALT), D(LSFT), T(COMM),U(LSFT), U(LALT) ,END );
+ BABLM( BABL_GO_END_DOC , D(LALT), D(LSFT), T(DOT), U(LSFT), U(LALT) ,END );
+ BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END );
+ BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
+ BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END );
+ BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END );
+ BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
+ BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
+ BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
+ BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
+ BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END );
+#ifndef BABL_MOVEMENTONLY
+ BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END );
+ BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
+ BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END );
+ BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really?
+ BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
+ BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
+ BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END );
+ BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END );
+ BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
+ BABLM( BABL_RUNAPP , D(LALT), T(X), U(LALT),T(S),T(H),T(E),T(L),T(L),END );// arguably
+ BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(X), U(LCTL),T(RIGHT), END ); // arguably
+ BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(X), U(LCTL),T(LEFT), END ); // arguably
+ BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END );
+ BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help
+#ifndef BABL_NOBROWSER
+/* you get to figure w3 out
+ BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
+ BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
+ BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
+ BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
+ BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
+ BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
+ BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
+ BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
+ //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
+ BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
+ // Chrome
+ BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
+ BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
+ BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), D(RSFT), T(EQL), U(RSFT), U(LGUI),END ); // ctr+ +
+ BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
+*/
+#endif
+#endif
+ break;
+
+ return MACRO_NONE;
+ }
+
+#endif
+
+
+#ifdef VI_MODE
+ case VI_MODE:
+// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
+
+
+ BABLM( BABL_GO_LEFT_1C , T(H), END );
+ BABLM( BABL_GO_RIGHT_1C , T(L), END );
+ BABLM( BABL_GO_LEFT_WORD , T(B),END );
+ BABLM( BABL_GO_RIGHT_WORD , T(W), END );
+ BABLM( BABL_GO_START_LINE , D(LSFT), T(6),U(LSFT), END ); //^
+ BABLM( BABL_GO_END_LINE , D(LSFT), T(4),U(LSFT) , END ); //$
+ BABLM( BABL_GO_START_DOC , T(G),T(G) ,END );
+ BABLM( BABL_GO_END_DOC , D(LSFT), T(G),U(LSFT),END );
+ BABLM( BABL_GO_NEXT_LINE , T(J), END );
+ BABLM( BABL_GO_PREV_LINE, T(K), END );
+ BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END );
+ BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END );
+ BABLM( BABL_DEL_RIGHT_1C , T(X),END );
+ BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END );
+ BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END );
+ BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$
+ BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
+#ifndef BABL_MOVEMENTONLY
+ BABLM( BABL_UNDO , T(U), END );
+ BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
+ BABLM( BABL_CUT , T(X), END );
+ BABLM( BABL_COPY , T(Y),END );
+ BABLM( BABL_PASTE , T(P), END );
+ BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
+ BABLM( BABL_FIND , T(SLASH),END );
+ BABLM( BABL_FIND_NEXT , T(N),END );
+ BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
+ BABLM( BABL_RUNAPP,END );
+ BABLM( BABL_SWITCH_APP_NEXT ,END );
+ BABLM( BABL_SWITCH_APP_LAST ,END );
+ BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END );
+ BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help
+#ifndef BABL_NOBROWSER
+/* you get to figure this out
+ BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
+ BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
+ BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
+ BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
+ BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
+ BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
+ BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
+ BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
+ //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
+ BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
+ // Chrome
+ BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
+ BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
+ BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END );
+ BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
+*/
+#endif
+#endif
+ return MACRO_NONE;
+#endif
+
+
+
+
+#ifdef READMUX_MODE
+// Readline command line editing + tmux windowing
+// I havent decided how much to do readline and how much tmux
+
+
+ case READMUX_MODE:
+
+ BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
+ BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
+ BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END );
+ BABLM( BABL_GO_RIGHT_WORD , D(LALT), T(F), U(LALT), END );
+ BABLM( BABL_GO_START_LINE , D(LCTL), T(A), U(LCTL), END );
+ BABLM( BABL_GO_END_LINE , D(LCTL), T(E), U(LCTL), END );
+ //BABLM( BABL_GO_START_DOC ,END );// tmux?
+ //BABLM( BABL_GO_END_DOC ,END ); // tmux?
+ BABLM( BABL_GO_NEXT_LINE , D(LCTL), T(N), U(LCTL), END );
+ BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
+ BABLM( BABL_PGDN , T(PGDN), END );
+ BABLM( BABL_PGUP , T(PGUP), END );
+ BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
+ BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END );
+ BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
+ BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
+ BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END );
+#ifndef BABL_MOVEMENTONLY
+ BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END );
+ BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
+ BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time
+ //BABLM( BABL_COPY ,END );
+ BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
+ BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
+ BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history
+ BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END );
+ //BABLM( BABL_FIND_REPLACE ,END );
+ BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux
+ BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux
+ BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux
+ BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want
+ // BABLM( BABL_HELP ,END );
+#ifndef BABL_NOBROWSER
+/* Add lynx shortcuts?
+ BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
+ BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
+ BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
+ BABLM( BABL_BROWSER_NEXT_TAB, D(LGUI),D(LALT), T(RIGHT),U(LALT), U(LGUI),END );
+ BABLM( BABL_BROWSER_PREV_TAB, D(LGUI), D(RSFT), T(LEFT), U(RSFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_URL_BAR, D(LGUI), T(L), U(LGUI),END );
+ BABLM( BABL_BROWSER_FORWARD, D(LGUI), T(RIGHT), U(LGUI),END );
+ BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
+ BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
+ BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
+ //BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
+ BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
+ // Chrome
+ BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
+ BABLM( BABL_BROWSER_FULLSCREEN, D(LGUI), D(LCTL), T(P), U(LCTL), U(LGUI),END ); //command shift F
+ BABLM( BABL_BROWSER_ZOOM_IN, D(LGUI), T(PLUS), U(LGUI),END );
+ BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
+*/
+#endif
+#endif
+
+ return MACRO_NONE;
+
+#endif
+
+ default:
+ return MACRO_NONE;
+ }
+
+}
+
+
+#endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/babblePaste.h b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h
new file mode 100644
index 000000000..cedd7d92b
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h
@@ -0,0 +1,238 @@
+/* A library to output the right key shortcut in any common app.
+Given a global variable babble_mode to show the environment and a
+key that calls the paste macro, do the right type of paste.
+
+Setting the bable_mode is done by another macro, or TBD interaction with the host.
+
+Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
+and jeebak & algernon's keymap
+*/
+#ifndef _babblePaste_h_included__
+#define _babblePaste_h_included__
+#include "../MS_sculpt_mobile/config.h"
+#include "action_layer.h"
+#include "quantum_keycodes.h"
+
+#ifdef USE_BABLPASTE
+
+/* ***************************
+
+// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
+// Expect to get errors if you comment a feature out and leave it in your keymap.
+
+#define USE_BABLPASTE
+
+//#define MS_MODE 0 // Windows.
+//#define MAC_MODE 1
+//#define LINUX_MODE 2 //aka gnome+KDE
+//#define EMACS_MODE 3
+//#define VI_MODE 4
+//#define WORDSTAR_MODE 5
+//#define READMUX 6 // Readline and tmux
+
+// This removes everything but cursor movement
+//#define BABL_MOVEMENTONLY
+// and this just removes browser shortcuts
+//#define BABL_NOBROWSER
+****************************/
+
+
+// Uncomment if you need more free flash space
+// It removes everything but cursor movement
+//#define BABL_MOVEMENTONLY
+
+
+// Define starting number for BABL macros in the macro range.
+// Probably can start the default even lower
+#define BABL_START_NUM 50
+
+/* Macros handled by babblepaste. Most should be available for all platforms.
+Whatever isn't defined will NOP */
+enum {
+// Movement macros
+ // left & right
+ BABL_GO_LEFT_1C= BABL_START_NUM,
+ BABL_GO_RIGHT_1C,
+ BABL_GO_LEFT_WORD,
+ BABL_GO_RIGHT_WORD,
+ BABL_GO_START_LINE,
+ BABL_GO_END_LINE,
+ // now up & down
+ BABL_GO_START_DOC,
+ BABL_GO_END_DOC,
+ BABL_GO_NEXT_LINE,
+ BABL_GO_PREV_LINE,
+ BABL_PGDN,
+ BABL_PGUP,
+ // And the delete options
+ //BABL_DEL_LEFT_1C == backspace, so why bother.
+ BABL_DEL_RIGHT_1C, // usually = Del
+ BABL_DEL_LEFT_WORD,
+ BABL_DEL_RIGHT_WORD,
+ BABL_DEL_TO_LINE_END, // delete from cursor to end of line
+ BABL_DEL_TO_LINE_START, // delete from cursor to begining line
+#ifndef BABL_MOVEMENTONLY
+ // Cut & Paste
+ BABL_UNDO,
+ BABL_REDO,
+ BABL_CUT,
+ BABL_COPY,
+ BABL_PASTE,
+ BABL_SELECT_ALL,
+ /* not yet implemented
+ BABL_SWAP_LAST2C // swap last characters before the cursor
+ BABL_SWAP_LAST2W // Swap the last two words before the cursor
+ */
+ // find & replace
+ BABL_FIND,
+ BABL_FIND_NEXT,
+ BABL_FIND_REPLACE,
+ // GUI or app
+ BABL_RUNAPP,
+ BABL_SWITCH_APP_NEXT,
+ BABL_SWITCH_APP_LAST, // previous
+ BABL_CLOSE_APP,
+ BABL_HELP,
+
+#ifndef BABL_NOBROWSER
+ BABL_BROWSER_NEW_TAB,
+ BABL_BROWSER_CLOSE_TAB,
+ BABL_BROWSER_REOPEN_LAST_TAB,
+ BABL_BROWSER_NEXT_TAB,
+ BABL_BROWSER_PREV_TAB,
+ BABL_BROWSER_URL_BAR,
+ BABL_BROWSER_FORWARD,
+ BABL_BROWSER_BACK,
+ BABL_BROWSER_FIND,
+ BABL_BROWSER_BOOKMARK,
+ BABL_BROWSER_DEV_TOOLS, // hard one to remember
+ BABL_BROWSER_RELOAD,
+ BABL_BROWSER_FULLSCREEN,
+ BABL_BROWSER_ZOOM_IN,
+ BABL_BROWSER_ZOOM_OUT,
+
+#endif
+
+#endif
+// Macros for mode switching
+#ifdef MS_MODE
+ BABL_WINDOWS,
+#endif
+#ifdef MAC_MODE
+ BABL_MAC,
+#endif
+#ifdef LINUX_MODE
+ BABL_LINUX,
+#endif
+#ifdef EMACS_MODE
+ BABL_EMACS,
+#endif
+#ifdef VI_MODE
+ BABL_VI,
+#endif
+#ifdef READMUX_MODE
+ BABL_READLINE,
+#endif
+
+
+};
+
+// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
+#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
+
+/* And all the shorthand keymap ready versions */
+// First the mode switching macros
+#ifdef MS_MODE
+#define B_WIN M(BABL_WINDOWS)
+#endif
+#ifdef MAC_MODE
+#define B_MAC M(BABL_MAC)
+#endif
+#ifdef LINUX_MODE
+#define B_LNX M(BABL_LINUX)
+#endif
+#ifdef EMACS_MODE
+#define B_EMAX M(BABL_EMACS)
+#endif
+#ifdef VI_MODE
+#define B_VI M(BABL_VI)
+#endif
+#ifdef READMUX_MODE
+#define B_READ M(BABL_READLINE)
+#endif
+
+// and all the movement & action.
+
+#define B_L1C M(BABL_GO_LEFT_1C)
+#define B_R1C M(BABL_GO_RIGHT_1C)
+#define B_L1W M(BABL_GO_LEFT_WORD)
+#define B_R1W M(BABL_GO_RIGHT_WORD)
+#define B_GSOL M(BABL_GO_START_LINE)
+#define B_GEOL M(BABL_GO_END_LINE)
+#define B_GTOP M(BABL_GO_START_DOC)
+#define B_GEND M(BABL_GO_END_DOC)
+#define B_DOWN M(BABL_GO_NEXT_LINE)
+#define B_UP M(BABL_GO_PREV_LINE)
+#define B_PGDN M(BABL_PGDN)
+#define B_PGUP M(BABL_PGUP)
+//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
+#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
+#define B_DLW M(BABL_DEL_LEFT_WORD)
+#define B_DRW M(BABL_DEL_RIGHT_WORD)
+#define B_DEOL M(BABL_DEL_TO_LINE_END) // delete from cursor to end of line
+#define B_DSOL M(BABL_DEL_TO_LINE_START) // delete from cursor to begining line
+#define B_UNDO M(BABL_UNDO)
+#define B_REDO M(BABL_REDO)
+#define B_CUT M(BABL_CUT)
+#define B_COPY M(BABL_COPY)
+#define B_PAST M(BABL_PASTE)
+#define B_SELA M(BABL_SELECT_ALL)
+#define B_FIND M(BABL_FIND)
+#define B_FINDN M(BABL_FIND_NEXT)
+#define B_FINDR M(BABL_FIND_REPLACE)
+#define B_RAPP M(BABL_RUNAPP)
+#define B_NAPP M(BABL_SWITCH_APP_NEXT)
+#define B_PAPP M(BABL_SWITCH_APP_LAST) // previous
+#define B_CAPP M(BABL_CLOSE_APP)
+#define B_HELP M(BABL_HELP)
+#define B_NTAB M(BABL_BROWSER_NEW_TAB)
+#define B_CTAB M(BABL_BROWSER_CLOSE_TAB)
+#define B_ROTB M(BABL_BROWSER_REOPEN_LAST_TAB)
+#define B_NXTB M(BABL_BROWSER_NEXT_TAB)
+#define B_PTAB M(BABL_BROWSER_PREV_TAB)
+#define B_NURL M(BABL_BROWSER_URL_BAR)
+#define B_BFWD M(BABL_BROWSER_FORWARD)
+#define B_BBAK M(BABL_BROWSER_BACK)
+#define B_BFND M(BABL_BROWSER_FIND)
+#define B_BOOK M(BABL_BROWSER_BOOKMARK)
+#define B_BDEV M(BABL_BROWSER_DEV_TOOLS) // hard one to remember
+#define B_BRLD M(BABL_BROWSER_RELOAD)
+#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
+#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
+#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)
+
+
+
+
+
+
+
+/* from action_macro.h
+typedef uint8_t macro_t;
+
+#define MACRO_NONE (macro_t*)0
+#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
+#define MACRO_GET(p) pgm_read_byte(p)
+
+#define BABL_MSTART (entry, os, macro...) ( const macro_t bablDict[entry][os] PROGMEM = { macro... }; )
+
+*/
+
+const macro_t *babblePaste(keyrecord_t *record, uint8_t shortcut);
+
+macro_t* switch_babble_mode( uint8_t id);
+
+
+#endif
+#endif
+
diff --git a/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt
new file mode 100644
index 000000000..cf75e153e
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt
@@ -0,0 +1,123 @@
+ BabblePaste is a library of common macros used to make sure that
+you can have one "paste" button on one layer, and it will do the
+right thing on any OS or app. Windows=Ctrl-V. Mac = Command-V and so on.
+
+The babblepaste library looks for the current status in a babble_mode global variable.
+To switch modes, run the switch_babble_mode() function, or a pre defined macro.
+Currently supported are Windows, OS X, Gnome/kde, Emacs, VI and readline,
+across 42+ common macro actions.
+
+
+###To use the library
+1) Paste the following into your config.h.
+
+//////Begin//////
+#define USE_BABLPASTE 1
+
+#ifdef USE_BABLPASTE
+/* define BabblePaste maps. Whatever = 0 will be the default. */
+// MAC_MODE 0
+// MS_MODE 1
+// LINUX_MODE 2
+// EMACS_MODE 3
+// VI_MODE 3
+// Readline and tmux
+// READMUX_MODE 2
+// WORDSTAR_MODE 5
+#endif
+
+// Uncomment these to remove options an free up flash space
+
+// This removes everything but cursor movement
+// BABL_MOVEMENTONLY
+// and this just removes browser shortcuts
+// BABL_NOBROWSER
+///////End///////
+
+2) Add the following to your keymap in the action_get_macro
+
+//////Begin//////
+#ifdef USE_BABLPASTE
+
+ if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
+ if (record->event.pressed) { // is there a case where this isn't desired?
+
+ babblePaste ( record, id );
+ return MACRO_NONE;
+ }
+ }
+#endif
+///////End///////
+
+3) add Babbelpaste actions to your keymap. See the full list in babblePaste.h, or the
+list below
+B_L1C // go left 1 char
+B_R1C // go Right 1 char
+ B_L1W //GO_LEFT_1 WORD
+ B_R1W //BABL_GO_RIGHT_1 WORD
+ B_GSOL // BABL_GOTO_START of _LINE
+ B_GEOL // BABL_GOTO_END_LINE
+ B_GTOP //BABL_GOTO_START_DOC
+ B_GEND //BABL_GO_END_DOC
+ B_DOWN //BABL_GO_NEXT_LINE
+ B_UP // BABL_GO_PREV_LINE
+ B_PGDN //PGDN
+ B_PGUP //PGUP
+// B_BKSP //backspace so why bother.
+ B_DEL // DEL_RIGHT_1 Char // usually = Del
+ B_DLW // DEL_LEFT_ 1 WORD)
+ B_DRW //DEL_RIGHT_1 WORD
+ B_DEOL // delete from cursor to end of line
+ B_DSOL // delete from cursor to begining line
+ B_UNDO //UNDO
+ B_REDO // REDO
+ B_CUT // CUT)
+ B_COPY // COPY)
+ B_PAST // PASTE)
+ B_SELA // SELECT_ALL
+ B_FIND // FIND)
+ B_FINDN //FIND_NEXT)
+ B_FINDR // FIND_REPLACE)
+ B_RAPP // open application launcher
+ B_NAPP // switch to next app
+ B_PAPP // switch to previous app
+ B_CAPP // CLOSE_APP)
+ B_HELP // HELP)
+ B_NTAB // BROWSER_NEW_TAB)
+ B_CTAB //BROWSER_CLOSE_TAB)
+ B_ROTB //BROWSER_REOPEN_LAST_TAB)
+ B_NXTB //BROWSER_NEXT_TAB)
+ B_PTAB //BROWSER_PREV_TAB)
+ B_NURL //BROWSER_jump to URL_BAR)
+ B_BFWD // BROWSER_FORWARD (in history)
+ B_BBAK //BROWSER_BACK (in history)
+ B_BFND // BROWSER_FIND)
+ B_BOOK //BROWSER_New BOOKMARK)
+ B_BDEV //BROWSER_ Open DEV_TOOLS) // hard one to remember
+ B_BRLD // BROWSER_RELOAD Page
+ B_BFUlL // BROWSER_FULLSCREEN)
+ B_ZMIN // BROWSER_ZOOM_IN)
+ B_ZMOT //BROWSER_ZOOM_OUT)
+
+
+#### Development notes
+-Why a new function? Because it would make the keymap too ugly to put it there.
+-Why not return the macro to action_get_macro? Because I kept running into scope problems
+and pointers to the wrong type.
+-Why not an array of arrays as a lookup instead of a function? That would allow you
+to store the lookup table in PROGMEM. True, but that takes more pre-processor skill
+than I had.
+
+-Have you tested this on every platform? No. Submit a patch.
+
+
+### Next steps for someone.
+Make it easier to pair macros with modifiers. So key foo will jump to start of line, and
+Shift(foo) will jump to the first tab in a browser.
+
+## Thanks
+
+Thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
+and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
+And of course QMK...
+
diff --git a/keyboards/handwired/MS_sculpt_mobile/config.h b/keyboards/handwired/MS_sculpt_mobile/config.h
new file mode 100644
index 000000000..f89514278
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/config.h
@@ -0,0 +1,100 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Microsoftplus
+#define DESCRIPTION 6000
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 18
+
+#ifdef ASTAR
+#define PRODUCT sculpt mobile astar
+ /*0 1 2 3 4 5 6 7 8 */
+#define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2}
+/* A B C D E F G H I J K L M N O P Q R */
+#define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3}
+
+#else
+#define PRODUCT sculpt mobile teensypp
+/* 0 1 2 3 4 5 6 7 */
+#define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0}
+/* A B C D E F G H I J K L M N O P Q R */
+#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7}
+#define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 }
+
+
+#endif
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#define PREVENT_STUCK_MODIFIERS
+
+#endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile
new file mode 100644
index 000000000..8b829218b
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile
@@ -0,0 +1,21 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../../Makefile
+endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h
new file mode 100644
index 000000000..4f3a425b7
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h
@@ -0,0 +1,8 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../../MS_sculpt_mobile/config.h"
+
+// place overrides here
+
+#endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c
new file mode 100644
index 000000000..a8802c99a
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c
@@ -0,0 +1,64 @@
+#include "../../MS_sculpt_mobile.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/*
+*
+* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute|
+* -------------------------------------------------------------------------------'
+* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del |
+* --------------------------------------------------------------------------
+* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
+* -------------------------------------------------------------------------------'
+* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
+* --------------------------------------------------------------------------------
+* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
+* ---------------------------------------------------------------------------------
+* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght|
+* ---------------------------------------------------------------------------------
+*/
+
+[0] = KEYMAP( \
+ 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_VOLD, KC_VOLU, KC_MUTE,\
+ KC_GRAVE, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
+ 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_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,\
+ 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,\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+)
+
+};
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md
new file mode 100644
index 000000000..e67ddc6fe
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for microsoft-sculpt-mobile
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile
new file mode 100644
index 000000000..1209ad781
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile
@@ -0,0 +1,21 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../../Makefile
+endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h
new file mode 100644
index 000000000..5c04f647c
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h
@@ -0,0 +1,32 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../../MS_sculpt_mobile/config.h"
+
+#define USE_BABLPASTE
+
+// Expect to get errors if you comment a feature out and leave it in your keymap.
+
+#ifdef USE_BABLPASTE
+//define BabblePaste maps
+// Windows.
+#define MAC_MODE 0
+#define MS_MODE 1
+//aka gnome+KDE
+//#define LINUX_MODE 2
+//#define EMACS_MODE 3
+#define VI_MODE 3
+// Readline and tmux
+#define READMUX_MODE 2
+//#define WORDSTAR_MODE 5
+#endif
+
+// Uncomment if you need more free flash space
+
+// This removes everything but cursor movement
+//#define BABL_MOVEMENTONLY
+// and this just removes browser shortcuts
+//#define BABL_NOBROWSER
+
+// place overrides here
+#endif
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c
new file mode 100644
index 000000000..c9a8ccdb6
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c
@@ -0,0 +1,272 @@
+#include "../../../MS_sculpt_mobile/babblePaste.h"
+#include "../../MS_sculpt_mobile.h"
+#include "action_layer.h"
+#include "action_util.h"
+
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif
+
+#define _QWR 0
+#define _CDH 2
+#define _SYM 3
+#define _MOV 4
+#define _TRAN 5
+
+
+enum layer_keycodes {
+QWR,
+CDH,
+SYM,
+MOV,
+NUM,
+TRAN
+};
+
+
+// Shorter spacing
+#define XXXX KC_NO
+#define ____ KC_TRNS
+
+// Custom macros
+
+/* Fn Keys */
+#define TT_SYM MO(_SYM)
+#define TT_MOV KC_FN2
+#define TT_NUM MO(_NUM)
+#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT)
+
+enum macro_keycodes {
+DHPASTE=1,
+VIBRK,
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* QWERTY
+*
+* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH|
+* -------------------------------------------------------------------------------'
+* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
+* ---------------------------------------------------------------------------
+* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
+* -------------------------------------------------------------------------------'
+* |Bak/Mov| a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
+* --------------------------------------------------------------------------------
+* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
+* ---------------------------------------------------------------------------------
+* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
+* ---------------------------------------------------------------------------------
+*/
+
+[_QWR] = KEYMAP( \
+ 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_VOLD, KC_VOLU, CDH,\
+ KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
+ 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,\
+ TT_MOV, 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,\
+ 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,\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+),
+
+[_CDH] = KEYMAP (\
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \
+ KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
+ TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_2,\
+ KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, KC_1,\
+ ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____
+
+),
+
+
+/* SYM
+*
+* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|_CDH|
+* -------------------------------------------------------------------------------'
+* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace|Del |
+* --------------------------------------------------------------------------
+* | ESC: | ^ | { | } | @ | % | | [ | ( | ) | _ | [ | ] | \ | |
+* -------------------------------------------------------------------------------'
+* |Bak/Mov| ! | # | 0 | = | { | } | - | 1 | + | ] | ` | enter |PgUp|
+* --------------------------------------------------------------------------------
+* |Lsft | ; | ~ | : | ~ | "|"| $ | * | | . | / | Rsft| Up| PgDn|
+* ---------------------------------------------------------------------------------
+* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
+* ---------------------------------------------------------------------------------
+*/
+
+[_SYM] = KEYMAP (\
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\
+ ____, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_LCBR, KC_RCBR,KC_MINS,KC_1, KC_PLUS,KC_RBRC, KC_GRV, ____, ____,\
+ ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
+),
+/*
+* |ESC | MAC| Win|RdLn| VI | | | | | | | | | | | |
+* -------------------------------------------------------------------------------'
+* | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del|
+* ---------------------------------------------------------------------------
+* | tab | | |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | |
+* -------------------------------------------------------------------------------'
+* |Bak/Mov| | | | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp|
+* --------------------------------------------------------------------------------
+* |Lsft |Undo| Cut|Copy|Pste| | | | | | / | Rsft| Up| PgDn|
+* ---------------------------------------------------------------------------------
+* |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght|
+* ---------------------------------------------------------------------------------
+*/
+
+[_MOV] = KEYMAP (\
+ ____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \
+ ____, B_SELA, B_BRLD, ____, ____, B_NXTB, B_GSOL, B_L1C, B_DOWN, B_R1C,B_GEOL, ____, ____, ____,\
+ ____, B_UNDO,B_CUT, B_COPY, B_PAST, B_PAST, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
+),
+
+[_TRAN] = KEYMAP (\
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
+)
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+[1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE),
+[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC)
+};
+
+#ifdef AUDIO_ENABLE
+
+float tone_startup[][2] = SONG(STARTUP_SOUND);
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_colemak[][2] = SONG(COLEMAK_SOUND);
+#endif
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWR:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ #endif
+ layer_off(_CDH);
+ }
+ return false;
+ break;
+
+ case CDH:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+ #endif
+ layer_on(_CDH);
+ }
+ return false;
+ break;
+
+ case SYM:
+ if (record->event.pressed) {
+ layer_on(_SYM);
+ } else {
+ layer_off(_SYM);
+ }
+ return false;
+ break;
+
+ }
+ return true;
+
+}
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+
+/* If id is in the range of BABL macros, call the babl function */
+/* Any clever remapping with modifiers should happen here e.g. shift bablkey does opposite*/
+#ifdef USE_BABLPASTE
+
+ if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) {
+ if (record->event.pressed) { // is there a case where this isn't desired?
+
+ babblePaste ( record, id );
+ return MACRO_NONE;
+ }
+ }
+#endif
+
+
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+
+ /* Colemak mod-dh moves the D key to the qwerty V position
+ This hack makes apple-V_position do what I mean */
+ case DHPASTE:
+ if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) {
+ if (record->event.pressed) {
+ clear_keyboard_but_mods();
+ register_code(KC_V);
+ } else {
+ unregister_code(KC_V);
+ }
+ } else {
+ if (record->event.pressed) {
+ register_code(KC_D);
+ } else {
+ unregister_code(KC_D);
+ }
+ }
+ break;
+
+ case VIBRK: // vi esc:
+ if (record->event.pressed) {
+ return MACRO( T(ESC),D(LSFT),T(SCLN),U(LSFT), END );
+ }
+ break;
+
+
+
+
+ default:
+ return MACRO_NONE;
+ }
+
+
+return MACRO_NONE;
+};
+
+
+
+
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+
+}
+
+
+void led_set_user(uint8_t usb_led) {
+
+}
+
+
+
+
+
+
diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md
new file mode 100644
index 000000000..96ee0e77a
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md
@@ -0,0 +1 @@
+# A more programmer oriented keymap for microsoft-sculpt-mobile
diff --git a/keyboards/handwired/MS_sculpt_mobile/readme.md b/keyboards/handwired/MS_sculpt_mobile/readme.md
new file mode 100644
index 000000000..d435b449f
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/readme.md
@@ -0,0 +1,58 @@
+
+This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
+into a hard-wired keyboard running QMK.
+
+The keyboard is known under several different names:
+Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded
+
+I had a stack of them,since they're cheap on ebay, travel well, and are just ergo enough.
+
+The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
+"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
+
+Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
+They're also allow the cable to be inserted on top or bottom.
+
+If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
+and avoid the wires dangling out the bottom.
+
+As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
+but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
+half millimeter off the end of the ribbon cable & the errors go away.
+
+My method for discovering the matrix was to set up a KEYMAP macro that included all pins.
+See MATRIX_TESTING_KEYMAP if you need it. Then set up a keymap that has all printable symbols
+in the first 4 rows. test each key & record output. Then switch the printable symbols to the
+bottom 4 rows & repeat. This was enough to show the matrix.
+
+
+The full original keymap for the sculpt is
+ A B C D E F G H --->
+0 b n m , . /
+1 g h "
+2 7 8 9 0 Del PgUp
+3 p [ ] \
+4 y u i o
+5 ~ - += j k l ; 5
+6 a s d q w e, Up left
+7 F7 F8 F9 F10 F11 F12 f
+
+-----> I J K L M N O P Q R
+0 Caps FN
+1 Vol+ mute Rctl vol- pgdn LCTL
+2 Rshift LShift
+3 Ralt LAlt
+4 LGUI
+5 6 bakspc 1 2 3 4 F4 F5 F6
+6 Down right spc F1 F2 F3 tab
+7 r t z x c v enter Esc
+
+This works with 18 cols + 8 rows on a Teensy++, or Arm based Teensy.
+
+The Astar mini has all pins exposed , so you can do 18x8
+If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns
+R and L to the same pin.
+
+Building - add ASTAR=1 to the compile line or leave out for teensy2++
+
+
diff --git a/keyboards/handwired/MS_sculpt_mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk
new file mode 100644
index 000000000..5b8902031
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/rules.mk
@@ -0,0 +1,48 @@
+
+## Project specific files
+SRC= babblePaste.c
+
+
+ifdef ASTAR
+ CFLAGS=-D ASTAR
+ OPT_DEFS += -DBOOTLOADER_SIZE=4096
+ MCU = atmega32u4
+ OPT_DEFS += -DCATERINA_BOOTLOADER
+ SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \
+ avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+
+else
+ MCU = at90usb1286
+ OPT_DEFS += -DBOOTLOADER_SIZE=2048
+ SCULPT_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
+endif
+
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+
+USB = /dev/cu.usbmodem14141
+
+
+
+upload: build
+ $(SCULPT_UPLOAD_COMMAND)
diff --git a/keyboards/handwired/Makefile b/keyboards/handwired/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/handwired/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/Makefile b/keyboards/handwired/arrow_pad/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/arrow_pad.c b/keyboards/handwired/arrow_pad/arrow_pad.c
new file mode 100644
index 000000000..381934aa8
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/arrow_pad.c
@@ -0,0 +1 @@
+#include "arrow_pad.h" \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/arrow_pad.h b/keyboards/handwired/arrow_pad/arrow_pad.h
new file mode 100644
index 000000000..62882b9b5
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/arrow_pad.h
@@ -0,0 +1,13 @@
+#ifndef ARROW_PAD_H
+#define ARROW_PAD_H
+
+#include "quantum.h"
+#include "matrix.h"
+#include "keymap.h"
+#ifdef BACKLIGHT_ENABLE
+ #include "backlight.h"
+#endif
+#include <avr/io.h>
+#include <stddef.h>
+
+#endif
diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h
new file mode 100644
index 000000000..3d8d8709a
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/config.h
@@ -0,0 +1,160 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x4096
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Nobody
+#define PRODUCT GoldPad
+#define DESCRIPTION A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/arrow_pad/keymaps/default/keymap.c b/keyboards/handwired/arrow_pad/keymaps/default/keymap.c
new file mode 100644
index 000000000..5647f75af
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/default/keymap.c
@@ -0,0 +1,163 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "arrow_pad.h"
+#include "led.h"
+
+// This is the 21-key keypad to 2x11 element matrix mapping
+#define KEYMAP( \
+ KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
+ KM_NUM, KM_FSL, KM_AST, KM_MIN, \
+ KM___7, KM___8, KM___9, KM_EQU, \
+ KM___4, KM___5, KM___6, KM_PLS, \
+ KM___1, KM___2, KM___3, ___ENT, \
+ KM___0, _____0, KM_DOT, KM_ENT \
+) { \
+ { KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
+ { KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
+ { KM___7, KM___8, KM___9, KM_EQU }, \
+ { KM___4, KM___5, KM___6, KM_PLS }, \
+ { KM___1, KM___2, KM___3, KC_NO }, \
+ { KM___0, KC_NO, KM_DOT, KM_ENT } \
+}
+
+#define LAYER_BASE 0
+#define LAYER_EDIT 1
+#define LAYER_FUNCTION 2
+
+#define MACRO_COPY_CUT 0
+#define MACRO_SHIFT_CONTROL 1
+#define MACRO_CONTROL_ALT 2
+
+#define M_COPY KC_FN5
+#define M_SHFCT KC_FN6
+#define M_CTALT KC_FN7
+
+#define SC_UNDO LCTL(KC_Z)
+#define SC_REDO LCTL(KC_Y)
+#define SC_CUT LCTL(KC_X)
+#define SC_COPY LCTL(KC_C)
+#define SC_PSTE LCTL(KC_V)
+#define SC_SELA LCTL(KC_A)
+#define SC_SAVE LCTL(KC_S)
+#define SC_OPEN LCTL(KC_O)
+#define SC_ACLS LALT(KC_F4)
+#define SC_CCLS LCTL(KC_F4)
+
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[LAYER_BASE] = KEYMAP( \
+ KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
+ KC_P7, KC_P8, KC_P9, KC_PEQL, \
+ KC_P4, KC_P5, KC_P6, KC_PPLS, \
+ KC_P1, KC_P2, KC_P3, XXXXXXX, \
+ KC_P0, KC_PCMM, KC_PDOT, KC_PENT ),
+
+[LAYER_EDIT] = KEYMAP( \
+ KC_ESC, KC_TAB, KC_SPC, _______, \
+ KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
+ KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
+ KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
+ KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
+ KC_BSPC, KC_PENT, KC_DEL, M_SHFCT),
+
+[LAYER_FUNCTION] = KEYMAP( \
+ KC_FN2, KC_FN3, KC_FN4, _______, \
+ KC_FN1, _______, _______, _______, \
+ _______, _______, _______, _______, \
+ _______, _______, _______, _______, \
+ _______, _______, _______, XXXXXXX, \
+ RESET, _______, _______, _______ ),
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
+ [1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
+ [2] = ACTION_BACKLIGHT_TOGGLE(),
+ [3] = ACTION_BACKLIGHT_INCREASE(),
+ [4] = ACTION_BACKLIGHT_DECREASE(),
+ [5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
+ [6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
+ [7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
+
+};
+
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+}
+
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id) {
+
+ case MACRO_COPY_CUT:
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ if (record->tap.count == 1) {
+ register_code(KC_C);
+ unregister_code(KC_C);
+ }
+ else if (record->tap.count == 2) {
+ register_code(KC_X);
+ unregister_code(KC_X);
+ }
+ unregister_code(KC_LCTL);
+ }
+ break;
+
+ case MACRO_SHIFT_CONTROL:
+ if (record->event.pressed) {
+ if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
+ if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
+ if (record->tap.count == 3) register_code(KC_PENT);;
+ }
+ else {
+ unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
+ unregister_code(KC_PENT);
+ }
+ break;
+
+ case MACRO_CONTROL_ALT:
+ if (record->event.pressed) {
+ if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
+ if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
+ }
+ else {
+ unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
+ }
+ break;
+ }
+
+ return MACRO_NONE;
+}
+
+void led_set_user(uint8_t usb_led)
+{
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // output high
+ DDRD |= (1<<6);
+ PORTD |= (1<<6);
+ } else {
+ // Hi-Z
+ DDRD &= ~(1<<6);
+ PORTD &= ~(1<<6);
+ }
+ if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ // output low
+ DDRC |= (1<<7);
+ PORTC |= ~(1<<7);
+ } else {
+ // Hi-Z
+ DDRC &= ~(1<<7);
+ PORTC &= ~(1<<7);
+ }
+} \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/Makefile b/keyboards/handwired/arrow_pad/keymaps/pad_21/Makefile
new file mode 100644
index 000000000..af51976a8
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/Makefile
@@ -0,0 +1,17 @@
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+CONFIG_H = keymaps/$(KEYMAP)/config.h \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h
new file mode 100644
index 000000000..a095e8737
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h
@@ -0,0 +1,158 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x4097
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Nobody
+#define PRODUCT Arrow Pad 21
+#define DESCRIPTION 21-Key QMK Assistant
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 11
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D3, D5 }
+#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
new file mode 100644
index 000000000..28917a5d9
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
@@ -0,0 +1,160 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "arrow_pad.h"
+#include "led.h"
+
+// This is the 21-key keypad to 2x11 element matrix mapping
+#define KEYMAP( \
+ KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
+ KM_NUM, KM_FSL, KM_AST, KM_MIN, \
+ KM___7, KM___8, KM___9, ___PLS, \
+ KM___4, KM___5, KM___6, KM_PLS, \
+ KM___1, KM___2, KM___3, ___ENT, \
+ KM___0, _____0, KM_DOT, KM_ENT \
+) { \
+ { KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
+ { KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
+}
+
+
+#define LAYER_BASE 0
+#define LAYER_EDIT 1
+#define LAYER_FUNCTION 2
+
+#define MACRO_COPY_CUT 0
+#define MACRO_SHIFT_CONTROL 1
+#define MACRO_CONTROL_ALT 2
+
+#define M_COPY KC_FN5
+#define M_SHFCT KC_FN6
+#define M_CTALT KC_FN7
+
+#define SC_UNDO LCTL(KC_Z)
+#define SC_REDO LCTL(KC_Y)
+#define SC_CUT LCTL(KC_X)
+#define SC_COPY LCTL(KC_C)
+#define SC_PSTE LCTL(KC_V)
+#define SC_SELA LCTL(KC_A)
+#define SC_SAVE LCTL(KC_S)
+#define SC_OPEN LCTL(KC_O)
+#define SC_ACLS LALT(KC_F4)
+#define SC_CCLS LCTL(KC_F4)
+
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[LAYER_BASE] = KEYMAP( \
+ KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
+ KC_P7, KC_P8, KC_P9, XXXXXXX, \
+ KC_P4, KC_P5, KC_P6, KC_PPLS, \
+ KC_P1, KC_P2, KC_P3, XXXXXXX, \
+ KC_P0, XXXXXXX, KC_PDOT, KC_PENT ),
+
+[LAYER_EDIT] = KEYMAP( \
+ KC_ESC, KC_TAB, KC_SPC, _______, \
+ KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
+ KC_HOME, KC_UP, KC_PGUP, XXXXXXX, \
+ KC_LEFT, M_COPY, KC_RGHT, M_CTALT, \
+ KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
+ KC_BSPC, XXXXXXX, KC_DEL, M_SHFCT),
+
+[LAYER_FUNCTION] = KEYMAP( \
+ KC_FN2, KC_FN3, KC_FN4, _______, \
+ KC_FN1, _______, _______, _______, \
+ _______, _______, _______, XXXXXXX, \
+ _______, _______, _______, _______, \
+ _______, _______, _______, XXXXXXX, \
+ RESET, XXXXXXX, _______, _______ ),
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
+ [1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
+ [2] = ACTION_BACKLIGHT_TOGGLE(),
+ [3] = ACTION_BACKLIGHT_INCREASE(),
+ [4] = ACTION_BACKLIGHT_DECREASE(),
+ [5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
+ [6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
+ [7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
+
+};
+
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+}
+
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id) {
+
+ case MACRO_COPY_CUT:
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ if (record->tap.count == 1) {
+ register_code(KC_C);
+ unregister_code(KC_C);
+ }
+ else if (record->tap.count == 2) {
+ register_code(KC_X);
+ unregister_code(KC_X);
+ }
+ unregister_code(KC_LCTL);
+ }
+ break;
+
+ case MACRO_SHIFT_CONTROL:
+ if (record->event.pressed) {
+ if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
+ if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
+ if (record->tap.count == 3) register_code(KC_PENT);;
+ }
+ else {
+ unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
+ unregister_code(KC_PENT);
+ }
+ break;
+
+ case MACRO_CONTROL_ALT:
+ if (record->event.pressed) {
+ if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
+ if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
+ }
+ else {
+ unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
+ }
+ break;
+ }
+
+ return MACRO_NONE;
+}
+
+void led_set_user(uint8_t usb_led)
+{
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // output high
+ DDRD |= (1<<6);
+ PORTD |= (1<<6);
+ } else {
+ // Hi-Z
+ DDRD &= ~(1<<6);
+ PORTD &= ~(1<<6);
+ }
+ if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ // output low
+ DDRC |= (1<<7);
+ PORTC |= ~(1<<7);
+ } else {
+ // Hi-Z
+ DDRC &= ~(1<<7);
+ PORTC &= ~(1<<7);
+ }
+} \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/Makefile b/keyboards/handwired/arrow_pad/keymaps/pad_24/Makefile
new file mode 100644
index 000000000..e31bfe1af
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/Makefile
@@ -0,0 +1,17 @@
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+CONFIG_H = keymaps/$(KEYMAP)/config.h \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h
new file mode 100644
index 000000000..e940acaa0
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h
@@ -0,0 +1,160 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x4096
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Nobody
+#define PRODUCT Arrow Pad 24
+#define DESCRIPTION 24-Key QMK Assistant
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c
new file mode 100644
index 000000000..5647f75af
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/keymap.c
@@ -0,0 +1,163 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "arrow_pad.h"
+#include "led.h"
+
+// This is the 21-key keypad to 2x11 element matrix mapping
+#define KEYMAP( \
+ KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
+ KM_NUM, KM_FSL, KM_AST, KM_MIN, \
+ KM___7, KM___8, KM___9, KM_EQU, \
+ KM___4, KM___5, KM___6, KM_PLS, \
+ KM___1, KM___2, KM___3, ___ENT, \
+ KM___0, _____0, KM_DOT, KM_ENT \
+) { \
+ { KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
+ { KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
+ { KM___7, KM___8, KM___9, KM_EQU }, \
+ { KM___4, KM___5, KM___6, KM_PLS }, \
+ { KM___1, KM___2, KM___3, KC_NO }, \
+ { KM___0, KC_NO, KM_DOT, KM_ENT } \
+}
+
+#define LAYER_BASE 0
+#define LAYER_EDIT 1
+#define LAYER_FUNCTION 2
+
+#define MACRO_COPY_CUT 0
+#define MACRO_SHIFT_CONTROL 1
+#define MACRO_CONTROL_ALT 2
+
+#define M_COPY KC_FN5
+#define M_SHFCT KC_FN6
+#define M_CTALT KC_FN7
+
+#define SC_UNDO LCTL(KC_Z)
+#define SC_REDO LCTL(KC_Y)
+#define SC_CUT LCTL(KC_X)
+#define SC_COPY LCTL(KC_C)
+#define SC_PSTE LCTL(KC_V)
+#define SC_SELA LCTL(KC_A)
+#define SC_SAVE LCTL(KC_S)
+#define SC_OPEN LCTL(KC_O)
+#define SC_ACLS LALT(KC_F4)
+#define SC_CCLS LCTL(KC_F4)
+
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[LAYER_BASE] = KEYMAP( \
+ KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
+ KC_P7, KC_P8, KC_P9, KC_PEQL, \
+ KC_P4, KC_P5, KC_P6, KC_PPLS, \
+ KC_P1, KC_P2, KC_P3, XXXXXXX, \
+ KC_P0, KC_PCMM, KC_PDOT, KC_PENT ),
+
+[LAYER_EDIT] = KEYMAP( \
+ KC_ESC, KC_TAB, KC_SPC, _______, \
+ KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
+ KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
+ KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
+ KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
+ KC_BSPC, KC_PENT, KC_DEL, M_SHFCT),
+
+[LAYER_FUNCTION] = KEYMAP( \
+ KC_FN2, KC_FN3, KC_FN4, _______, \
+ KC_FN1, _______, _______, _______, \
+ _______, _______, _______, _______, \
+ _______, _______, _______, _______, \
+ _______, _______, _______, XXXXXXX, \
+ RESET, _______, _______, _______ ),
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
+ [1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
+ [2] = ACTION_BACKLIGHT_TOGGLE(),
+ [3] = ACTION_BACKLIGHT_INCREASE(),
+ [4] = ACTION_BACKLIGHT_DECREASE(),
+ [5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
+ [6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
+ [7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
+
+};
+
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+}
+
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id) {
+
+ case MACRO_COPY_CUT:
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ if (record->tap.count == 1) {
+ register_code(KC_C);
+ unregister_code(KC_C);
+ }
+ else if (record->tap.count == 2) {
+ register_code(KC_X);
+ unregister_code(KC_X);
+ }
+ unregister_code(KC_LCTL);
+ }
+ break;
+
+ case MACRO_SHIFT_CONTROL:
+ if (record->event.pressed) {
+ if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
+ if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
+ if (record->tap.count == 3) register_code(KC_PENT);;
+ }
+ else {
+ unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
+ unregister_code(KC_PENT);
+ }
+ break;
+
+ case MACRO_CONTROL_ALT:
+ if (record->event.pressed) {
+ if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
+ if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
+ }
+ else {
+ unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
+ }
+ break;
+ }
+
+ return MACRO_NONE;
+}
+
+void led_set_user(uint8_t usb_led)
+{
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // output high
+ DDRD |= (1<<6);
+ PORTD |= (1<<6);
+ } else {
+ // Hi-Z
+ DDRD &= ~(1<<6);
+ PORTD &= ~(1<<6);
+ }
+ if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ // output low
+ DDRC |= (1<<7);
+ PORTC |= ~(1<<7);
+ } else {
+ // Hi-Z
+ DDRC &= ~(1<<7);
+ PORTC &= ~(1<<7);
+ }
+} \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/readme.md b/keyboards/handwired/arrow_pad/readme.md
new file mode 100644
index 000000000..d0d172272
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/readme.md
@@ -0,0 +1,133 @@
+arrow_pad keyboard firmware
+======================
+
+## Keyboard Info
+
+The ArrowPad is a wired conversion that can be made to any stand-alone keypad. It uses two main layers - a standard numpad, and a more advanced arrow cluster navigator.
+
+The first 24-key ArrowPad was handwired, but the PCB was wired as listed below.
+
+```
+<Chip Ref Des> pin <Pin #>
+<Keycap Name> (Silkscreen Name if different) - <Switch Pin #>
+
+
+Note:
+U2 pin 2 is the Num Lock LED and is active low.
+
+U2 pin 1
+Clear (Num Lock) - 1
+Enter - 2
+Esc (ESC) - 2
+
+
+U2 pin 3
+- - 1
+
+U2 pin 4
+7 - 2
+8 - 2
+9 - 2
+
+U2 pin 5
+* - 2
+Delete (BACK SPACE) - 2
+
+U2 pin 6
+1 - 2
+0 - 2
+. - 2
+, - 2
+
+U2 pin 7
+4 - 2
+5 - 2
+6 - 2
+
+U2 pin 8
+Tab - 2
+= (/) - 2
+
+U2 pin 13
+Delete (BACK SPACE) - 1
+9 - 1
+6 - 1
+3 - 1
+. - 1
+
+U2 pin 14
+Tab - 1
+8 - 1
+5 - 1
+2 - 1
+0 - 1
+
+U2 pin 15
+Esc (ESC) - 1
+= (/) - 1
+/ (*) - 1
+7 - 1
+4 - 1
+1 - 1
++ - 1
+
+U2 pin 16
+Enter - 1
+* (<--) - 1
+, - 1
+
+U2 pin 17
+Fn (#NAME?) - 1
+- - 2
+Clear (Num Lock) - 2
+
+U2 pin 18
+Fn (#NAME?) - 2
+* (<--) - 2
++ - 2
+3 - 2
+2 - 2
+```
+
+More info can be found on [GeekHack](https://geekhack.org/index.php?topic=73632.msg1802497#msg1802497)
+
+The second ArrowPad was a conversion from a 21-key Genovation keypad. It used a 2 row x 11 column matrix.
+
+```
+#define KEYMAP( \
+ KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
+ KM_NUM, KM_FSL, KM_AST, KM_MIN, \
+ KM___7, KM___8, KM___9, ___PLS, \
+ KM___4, KM___5, KM___6, KM_PLS, \
+ KM___1, KM___2, KM___3, ___ENT, \
+ KM___0, _____0, KM_DOT, KM_ENT \
+) { \
+ { KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
+ { KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
+}
+```
+
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/arrow_pad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make default`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
+```
+$ make [default|pad_21|pad_24|<name>]
+```
+
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/arrow_pad/rules.mk b/keyboards/handwired/arrow_pad/rules.mk
new file mode 100644
index 000000000..a03f0836b
--- /dev/null
+++ b/keyboards/handwired/arrow_pad/rules.mk
@@ -0,0 +1,70 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file
diff --git a/keyboards/handwired/atreus50/Makefile b/keyboards/handwired/atreus50/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/handwired/atreus50/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif
diff --git a/keyboards/handwired/atreus50/atreus50.c b/keyboards/handwired/atreus50/atreus50.c
new file mode 100644
index 000000000..225a51bcc
--- /dev/null
+++ b/keyboards/handwired/atreus50/atreus50.c
@@ -0,0 +1,10 @@
+#include "atreus50.h"
+
+void matrix_init_kb(void) {
+
+ // Turn status LED on
+ //DDRE |= (1<<6);
+ PORTE |= (1<<6);
+
+ matrix_init_user();
+};
diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h
new file mode 100644
index 000000000..de06f255e
--- /dev/null
+++ b/keyboards/handwired/atreus50/atreus50.h
@@ -0,0 +1,36 @@
+#ifndef ATREUS50_H
+#define ATREUS50_H
+
+#include "quantum.h"
+
+// The first section contains all of the arguements
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \
+}
+
+#define COMPACT_KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
+ { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
+ { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
+ { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
+}
+
+#define KC_ KC_TRNS
+
+#endif
diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h
new file mode 100644
index 000000000..2e34e0f89
--- /dev/null
+++ b/keyboards/handwired/atreus50/config.h
@@ -0,0 +1,163 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xBB80
+#define PRODUCT_ID 0x040D
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Hexwire
+#define PRODUCT Atreus 50 Keyboard
+#define DESCRIPTION Atreus layout with extra column
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 13
+
+/* Planck PCB default pin-out */
+#define MATRIX_ROW_PINS { D3, D2, D1, D0 }
+#define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN C6
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12 // Number of LEDs
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
+
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/atreus50/keymaps/default/Makefile b/keyboards/handwired/atreus50/keymaps/default/Makefile
new file mode 100644
index 000000000..d7b0fa7fd
--- /dev/null
+++ b/keyboards/handwired/atreus50/keymaps/default/Makefile
@@ -0,0 +1,6 @@
+RGBLIGHT_ENABLE = yes
+AUDIO_ENABLE = no
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c
new file mode 100644
index 000000000..739fb2685
--- /dev/null
+++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c
@@ -0,0 +1,250 @@
+#include "atreus50.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _MOVEMENT 5
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ LOWER,
+ RAISE,
+ MOVEMENT,
+ BACKLIT
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC
+#define KC_X1 LOWER
+#define KC_X2 RAISE
+#define KC_X3 MO(_MOVEMENT)
+#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
+ //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
+ GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+ //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+ ),
+
+ [_COLEMAK] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
+ //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
+ GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+ //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+ ),
+
+ [_DVORAK] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
+ //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
+ GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+ //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+ ),
+
+ [_LOWER] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
+ //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
+ , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
+ //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+ ),
+
+ [_RAISE] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , ,
+ //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
+ , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
+ //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+ ),
+
+ [_MOVEMENT] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
+ //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
+ , , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY
+ //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+ ),
+
+/* Adjust (Lower + Raise)
+ * |------+------+------+------+------+------. ,------+------+------+------+------+------|
+ * | | Reset| | | | | | | | | | | Del |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_ADJUST] = KEYMAP( \
+ _______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ )
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_startup[][2] = {
+ {NOTE_B5, 20},
+ {NOTE_B6, 8},
+ {NOTE_DS6, 20},
+ {NOTE_B6, 8}
+};
+
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_dvorak[][2] = SONG(DVORAK_SOUND);
+float tone_colemak[][2] = SONG(COLEMAK_SOUND);
+
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+
+float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ return false;
+ break;
+ }
+ return true;
+};
+
+void matrix_init_user(void) {
+ #ifdef AUDIO_ENABLE
+ startup_user();
+ #endif
+}
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+ _delay_ms(20); // gets rid of tick
+ PLAY_NOTE_ARRAY(tone_startup, false, 0);
+}
+
+void shutdown_user()
+{
+ PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+ _delay_ms(150);
+ stop_all_notes();
+}
+
+void music_on_user(void)
+{
+ music_scale_user();
+}
+
+void music_scale_user(void)
+{
+ PLAY_NOTE_ARRAY(music_scale, false, 0);
+}
+
+#endif
diff --git a/keyboards/handwired/atreus50/readme.md b/keyboards/handwired/atreus50/readme.md
new file mode 100644
index 000000000..0c24f67db
--- /dev/null
+++ b/keyboards/handwired/atreus50/readme.md
@@ -0,0 +1,16 @@
+Handwired Atreus50
+==================
+
+This firmware is for a Handwired Atreus50 using an Arduino Pro Micro.
+
+## Pinout
+
+The following pins are used:
+- Columns 1-13: D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4
+- Rows 1-4: D3, D2, D1, D0
+
+## Compiling and loading the firmware
+
+To build the firmware, run `make`.
+
+To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button.
diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk
new file mode 100644
index 000000000..5e808dfa7
--- /dev/null
+++ b/keyboards/handwired/atreus50/rules.mk
@@ -0,0 +1,81 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+avrdude: build
+ ls /dev/tty* > /tmp/1; \
+ echo "Reset your Pro Micro now"; \
+ while [[ -z $$USB ]]; do \
+ sleep 1; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/handwired/fivethirteen/Makefile b/keyboards/handwired/fivethirteen/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/fivethirteen/README.md b/keyboards/handwired/fivethirteen/README.md
new file mode 100644
index 000000000..b2e13cd6d
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/README.md
@@ -0,0 +1,28 @@
+fivethirteen keyboard firmware
+======================
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/handwired/fivethirteen folder.
+Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use
+the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+
+To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
+
+```
+$ make keymap=[default|jack|<name>]
+```
+
+Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
diff --git a/keyboards/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h
new file mode 100644
index 000000000..76596342b
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER rdg
+#define PRODUCT fivethirteen
+#define DESCRIPTION handwired 5x13 matrix keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 13
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F6, F7, B6, B5, B4 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, F0, D0, D1, D2, D3, C6, C7, D6, D7 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/fivethirteen/fivethirteen.c b/keyboards/handwired/fivethirteen/fivethirteen.c
new file mode 100644
index 000000000..4c16e72eb
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/fivethirteen.c
@@ -0,0 +1,8 @@
+#include "fivethirteen.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/fivethirteen/fivethirteen.h b/keyboards/handwired/fivethirteen/fivethirteen.h
new file mode 100644
index 000000000..faa6de737
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/fivethirteen.h
@@ -0,0 +1,21 @@
+#ifndef FIVETHIRTEEN_H
+#define FIVETHIRTEEN_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, \
+ k40, k41, k42, k43, k44, k46, k47, k48, k49, k410, k411, k412 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 }, \
+ { k40, k41, k42, k43, k44, KC_NO, k46, k47, k48, k49, k410, k411, k412 } \
+}
+
+#endif
diff --git a/keyboards/handwired/fivethirteen/keymaps/default/keymap.c b/keyboards/handwired/fivethirteen/keymaps/default/keymap.c
new file mode 100644
index 000000000..d718510d5
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/keymaps/default/keymap.c
@@ -0,0 +1,49 @@
+#include "fivethirteen.h"
+
+#define _______ KC_TRNS
+
+#define HDN 1
+#define OSY 2
+#define MOS 3
+#define CTL_ESC CTL_T(KC_ESC)
+#define SFT_BSP SFT_T(KC_BSPC)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = KEYMAP(
+ 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_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, \
+ CTL_ESC, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_BSLS, \
+ MO(MOS), KC_LCTL, KC_LALT, KC_LGUI, MO(HDN), KC_SPC , SFT_BSP, MO(OSY), MO(HDN), KC_LEFT, KC_DOWN, KC_RGHT \
+),
+[HDN] = KEYMAP(
+ _______, 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, \
+ _______, KC_TILD, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TILD, KC_GRV, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, KC_PGUP, _______, \
+ _______, _______, _______, _______, _______, KC_UNDS , KC_DEL, _______, _______, KC_HOME, KC_PGDN, KC_END \
+),
+[OSY] = KEYMAP(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+[MOS] = KEYMAP(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_WH_U, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+)
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+ return MACRO_NONE;
+};
diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk
new file mode 100644
index 000000000..f50987cde
--- /dev/null
+++ b/keyboards/handwired/fivethirteen/rules.mk
@@ -0,0 +1,73 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+
diff --git a/keyboards/handwired/frenchdev/Makefile b/keyboards/handwired/frenchdev/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/handwired/frenchdev/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif
diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h
new file mode 100644
index 000000000..dd386402c
--- /dev/null
+++ b/keyboards/handwired/frenchdev/config.h
@@ -0,0 +1,85 @@
+/*
+Copyright 201 Nicolas Poirey <nicolas.poirey@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef FRENCHDEV_V1_CONFIG_H
+#define FRENCHDEV_V1_CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1307
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Nicolas Poirey
+#define PRODUCT Frenchdev V1
+#define DESCRIPTION QMK keyboard firmware for Frenchdev
+
+/* key matrix size */
+#define MATRIX_ROWS 16
+#define MATRIX_COLS 6
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+#define LED_BRIGHTNESS_LO 15
+#define LED_BRIGHTNESS_HI 255
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+#define USB_MAX_POWER_CONSUMPTION 500
+
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 5
+#define MOUSEKEY_MAX_SPEED 2
+#define MOUSEKEY_WHEEL_DELAY 0
+
+#define TAPPING_TOGGLE 1
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+#define TAPPING_TERM 200
+#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
+ keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
+)
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+//#define DEBUG_MATRIX_SCAN_RATE
+
+#endif //FRENCHDEV_V1_CONFIG_H
diff --git a/keyboards/handwired/frenchdev/frenchdev.c b/keyboards/handwired/frenchdev/frenchdev.c
new file mode 100644
index 000000000..6d5883a3a
--- /dev/null
+++ b/keyboards/handwired/frenchdev/frenchdev.c
@@ -0,0 +1,87 @@
+#include "frenchdev.h"
+#include "i2cmaster.h"
+
+bool i2c_initialized = 0;
+uint8_t mcp23018_status = 0x20;
+
+void matrix_init_kb(void) {
+ // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
+ TCCR1A = 0b10101001; // set and configure fast PWM
+ TCCR1B = 0b00001001; // set and configure fast PWM
+
+
+
+ // unused pins - D4, D5, D7, E6
+ // set as input with internal pull-ip enabled
+ DDRD &= ~(1<<5 | 1<<4);
+ DDRE &= ~(1<<6);
+ PORTD |= (1<<5 | 1<<4);
+ PORTE |= (1<<6);
+
+ frenchdev_blink_all_leds();
+ frenchdev_blink_all_leds();
+ frenchdev_blink_all_leds();
+ frenchdev_blink_all_leds();
+
+ matrix_init_user();
+}
+
+void frenchdev_blink_all_leds(void)
+{
+ frenchdev_led_all_off();
+ frenchdev_led_all_set(LED_BRIGHTNESS_HI);
+ frenchdev_led_1_on();
+ _delay_ms(50);
+ frenchdev_led_2_on();
+ _delay_ms(50);
+ frenchdev_led_3_on();
+ _delay_ms(50);
+ frenchdev_led_1_off();
+ _delay_ms(50);
+ frenchdev_led_2_off();
+ _delay_ms(50);
+ frenchdev_led_3_off();
+ frenchdev_led_all_off();
+}
+
+uint8_t init_mcp23018(void) {
+ mcp23018_status = 0x20;
+
+ // I2C subsystem
+
+ // uint8_t sreg_prev;
+ // sreg_prev=SREG;
+ // cli();
+ if (i2c_initialized == 0) {
+ i2c_init(); // on pins D(1,0)
+ i2c_initialized++;
+ _delay_ms(1000);
+ }
+
+ // set pin direction
+ // - unused : input : 1
+ // - input : input : 1
+ // - driving : output : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
+ i2c_stop();
+
+ // set pull-up
+ // - unused : on : 1
+ // - input : on : 1
+ // - driving : off : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
+
+out:
+ i2c_stop();
+
+ // SREG=sreg_prev;
+
+ return mcp23018_status;
+}
+
diff --git a/keyboards/handwired/frenchdev/frenchdev.h b/keyboards/handwired/frenchdev/frenchdev.h
new file mode 100644
index 000000000..82121e044
--- /dev/null
+++ b/keyboards/handwired/frenchdev/frenchdev.h
@@ -0,0 +1,115 @@
+#ifndef FRENCHDEV_V1_H
+#define FRENCHDEV_V1_H
+
+#include "quantum.h"
+#include <stdint.h>
+#include <stdbool.h>
+#include "i2cmaster.h"
+#include <util/delay.h>
+
+#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+#define CPU_16MHz 0x00
+
+// I2C aliases and register addresses (see "mcp23018.md" on tmk repository)
+#define I2C_ADDR 0b0100000
+#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
+#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
+#define IODIRA 0x00 // i/o direction register
+#define IODIRB 0x01
+#define GPPUA 0x0C // GPIO pull-up resistor register
+#define GPPUB 0x0D
+#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
+#define GPIOB 0x13
+#define OLATA 0x14 // output latch register
+#define OLATB 0x15
+
+extern uint8_t mcp23018_status;
+
+void init_frenchdev(void);
+void frenchdev_blink_all_leds(void);
+uint8_t init_mcp23018(void);
+
+#define LED_BRIGHTNESS_LO 15
+#define LED_BRIGHTNESS_HI 255
+
+
+inline void frenchdev_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); }
+inline void frenchdev_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
+inline void frenchdev_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
+inline void frenchdev_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
+inline void frenchdev_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); }
+
+inline void frenchdev_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
+inline void frenchdev_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
+inline void frenchdev_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
+inline void frenchdev_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
+inline void frenchdev_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); }
+
+inline void frenchdev_led_all_on(void)
+{
+ frenchdev_board_led_on();
+ frenchdev_led_1_on();
+ frenchdev_led_2_on();
+ frenchdev_led_3_on();
+}
+
+inline void frenchdev_led_all_off(void)
+{
+ frenchdev_board_led_off();
+ frenchdev_led_1_off();
+ frenchdev_led_2_off();
+ frenchdev_led_3_off();
+}
+
+inline void frenchdev_led_1_set(uint8_t n) { OCR1A = n; }
+inline void frenchdev_led_2_set(uint8_t n) { OCR1B = n; }
+inline void frenchdev_led_3_set(uint8_t n) { OCR1C = n; }
+inline void frenchdev_led_set(uint8_t led, uint8_t n) {
+ (led == 1) ? (OCR1A = n) :
+ (led == 2) ? (OCR1B = n) :
+ (OCR1C = n);
+}
+
+inline void frenchdev_led_all_set(uint8_t n)
+{
+ frenchdev_led_1_set(n);
+ frenchdev_led_2_set(n);
+ frenchdev_led_3_set(n);
+}
+
+#define KEYMAP( \
+ \
+ k01, k02, k03, k04, k05, k06, k09, k0a, k0b, k0c, k0d, k0e, \
+ k10, k11, k12, k13, k14, k15, k16, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
+ k20, k21, k22, k23, k24, k25, k26, k29, k2a, k2b, k2c, k2d, k2e, k2f, \
+ k30, k31, k32, k33, k34, k35, k36, k39, k3a, k3b, k3c, k3d, k3e, k3f, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k37, k38, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, \
+ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e, k5f, \
+ \
+ PL1, PL2, PL3, \
+ PR1, PR2, PR3 \
+ ) \
+ \
+ /* matrix positions, inverted left and right for I2C to be on row 0-7 */\
+ { \
+ \
+ { k5f, k4f, k3f, k2f, k1f, KC_NO}, \
+ { k5e, k4e, k3e, k2e, k1e, k0e }, \
+ { k5d, k4d, k3d, k2d, k1d, k0d }, \
+ { k5c, k4c, k3c, k2c, k1c, k0c }, \
+ { k5b, k4b, k3b, k2b, k1b, k0b }, \
+ { k5a, k4a, k3a, k2a, k1a, k0a }, \
+ { k59, k49, k39, k29, k19, k09 }, \
+ { k58, k48, k38, PR1, PR2, PR3 }, \
+ \
+ { k57, k47, k37, PL1, PL2, PL3 }, \
+ { k56, k46, k36, k26, k16, k06 }, \
+ { k55, k45, k35, k25, k15, k05 }, \
+ { k54, k44, k34, k24, k14, k04 }, \
+ { k53, k43, k33, k23, k13, k03 }, \
+ { k52, k42, k32, k22, k12, k02 }, \
+ { k51, k41, k31, k21, k11, k01 }, \
+ { k50, k40, k30, k20, k10, KC_NO } \
+ }
+
+#endif
diff --git a/keyboards/handwired/frenchdev/i2cmaster.h b/keyboards/handwired/frenchdev/i2cmaster.h
new file mode 100644
index 000000000..3917b9e6c
--- /dev/null
+++ b/keyboards/handwired/frenchdev/i2cmaster.h
@@ -0,0 +1,178 @@
+#ifndef _I2CMASTER_H
+#define _I2CMASTER_H 1
+/*************************************************************************
+* Title: C include file for the I2C master interface
+* (i2cmaster.S or twimaster.c)
+* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
+* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $
+* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
+* Target: any AVR device
+* Usage: see Doxygen manual
+**************************************************************************/
+
+#ifdef DOXYGEN
+/**
+ @defgroup pfleury_ic2master I2C Master library
+ @code #include <i2cmaster.h> @endcode
+
+ @brief I2C (TWI) Master Software Library
+
+ Basic routines for communicating with I2C slave devices. This single master
+ implementation is limited to one bus master on the I2C bus.
+
+ This I2c library is implemented as a compact assembler software implementation of the I2C protocol
+ which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c).
+ Since the API for these two implementations is exactly the same, an application can be linked either against the
+ software I2C implementation or the hardware I2C implementation.
+
+ Use 4.7k pull-up resistor on the SDA and SCL pin.
+
+ Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module
+ i2cmaster.S to your target when using the software I2C implementation !
+
+ Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion.
+
+ @note
+ The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted
+ to GNU assembler and AVR-GCC C call interface.
+ Replaced the incorrect quarter period delays found in AVR300 with
+ half period delays.
+
+ @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury
+
+ @par API Usage Example
+ The following code shows typical usage of this library, see example test_i2cmaster.c
+
+ @code
+
+ #include <i2cmaster.h>
+
+
+ #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet
+
+ int main(void)
+ {
+ unsigned char ret;
+
+ i2c_init(); // initialize I2C library
+
+ // write 0x75 to EEPROM address 5 (Byte Write)
+ i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
+ i2c_write(0x05); // write address = 5
+ i2c_write(0x75); // write value 0x75 to EEPROM
+ i2c_stop(); // set stop conditon = release bus
+
+
+ // read previously written value back from EEPROM address 5
+ i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
+
+ i2c_write(0x05); // write address = 5
+ i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode
+
+ ret = i2c_readNak(); // read one byte from EEPROM
+ i2c_stop();
+
+ for(;;);
+ }
+ @endcode
+
+*/
+#endif /* DOXYGEN */
+
+/**@{*/
+
+#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
+#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
+#endif
+
+#include <avr/io.h>
+
+/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
+#define I2C_READ 1
+
+/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
+#define I2C_WRITE 0
+
+
+/**
+ @brief initialize the I2C master interace. Need to be called only once
+ @param void
+ @return none
+ */
+extern void i2c_init(void);
+
+
+/**
+ @brief Terminates the data transfer and releases the I2C bus
+ @param void
+ @return none
+ */
+extern void i2c_stop(void);
+
+
+/**
+ @brief Issues a start condition and sends address and transfer direction
+
+ @param addr address and transfer direction of I2C device
+ @retval 0 device accessible
+ @retval 1 failed to access device
+ */
+extern unsigned char i2c_start(unsigned char addr);
+
+
+/**
+ @brief Issues a repeated start condition and sends address and transfer direction
+
+ @param addr address and transfer direction of I2C device
+ @retval 0 device accessible
+ @retval 1 failed to access device
+ */
+extern unsigned char i2c_rep_start(unsigned char addr);
+
+
+/**
+ @brief Issues a start condition and sends address and transfer direction
+
+ If device is busy, use ack polling to wait until device ready
+ @param addr address and transfer direction of I2C device
+ @return none
+ */
+extern void i2c_start_wait(unsigned char addr);
+
+
+/**
+ @brief Send one byte to I2C device
+ @param data byte to be transfered
+ @retval 0 write successful
+ @retval 1 write failed
+ */
+extern unsigned char i2c_write(unsigned char data);
+
+
+/**
+ @brief read one byte from the I2C device, request more data from device
+ @return byte read from I2C device
+ */
+extern unsigned char i2c_readAck(void);
+
+/**
+ @brief read one byte from the I2C device, read is followed by a stop condition
+ @return byte read from I2C device
+ */
+extern unsigned char i2c_readNak(void);
+
+/**
+ @brief read one byte from the I2C device
+
+ Implemented as a macro, which calls either i2c_readAck or i2c_readNak
+
+ @param ack 1 send ack, request more data from device<br>
+ 0 send nak, read is followed by a stop condition
+ @return byte read from I2C device
+ */
+extern unsigned char i2c_read(unsigned char ack);
+#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
+
+
+/**@}*/
+#endif
diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
new file mode 100644
index 000000000..e6d72d013
--- /dev/null
+++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
@@ -0,0 +1,409 @@
+#include "frenchdev.h"
+#include "mousekey.h"
+#include "action.h"
+#include "action_layer.h"
+#include "keymap_extras/keymap_bepo.h"
+
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+#define _BASE 0
+#define _SYMBOLS 1
+#define _MEDIA 2
+#define _TRNS 8
+
+#define PEDAL_DELAY 250
+#define KEY_DELAY 130
+
+enum macros {
+ M_LP, // left pedal
+ M_RP, // right pedal
+ M_SF, // shift
+ M_SFS, // shift and space
+ M_L1E, // L1 and space
+ L2INS, // L2 and insert
+ L2LOC, // Lock L2
+ M_UN, // undo
+ M_CUT, // cut
+ M_CP, // copy
+ M_PS, // paste
+ M_SE, // search
+ M_SFU, // shift and underscore
+};
+
+static uint16_t key_timer_left_pedal;
+static uint16_t key_timer_right_pedal;
+static uint16_t key_timer_shift;
+static uint16_t key_timer_1;
+static uint16_t key_timer_2;
+
+static uint16_t shift_count = 0; //this is used to keep track of shift state and avoid inserting non breakable space
+static uint16_t l2_locked = 0; //this indicate wether L2 is locked
+
+#define BP_CBSP CTL_T(KC_BSPC)
+#define BP_CDEL CTL_T(KC_DEL)
+
+//layout : http://www.keyboard-layout-editor.com/#/gists/4480e3ab8026eb7c710a7e22203ef4aa
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* base
+ * left foot clicked is right click
+ * left foot pressed is layer 2
+ * right foot clicked is left click
+ * right foot pressed is layer 1 + scroll lock (used with autohotkey for easier scrolling with trackballs)
+ * ,------. .. ,------. *
+ * ,------| F3 |-------------. .. ,-------------| F10 |------. *
+ * ,------| F2 |------| F4 | F5 |------. .. ,------| F8 | F9 |------| F11 |------. *
+ * | F1 |------| »/3 |------|------| F6 | .. | F7 |------|------| -/8 |------| F12 | *
+ * ,------+------| «/2 |------| (/4 | )/5 |------| .. |------| @/6 | +/7 |------| //9 |------+------. *
+ * | ESC | "/1 |------| O |------|------| ¨ | .. | ^ |------|------| D |------| * /0 |BCKSP | *
+ * |------+------| É |------| P | È |------| .. |------| K | V |------| L |------+------| *
+ * | TAB | B |------| E |------|------| _ | .. | =/° |------|------| S |------| J |ENTER | *
+ * |------+------| U |------| I | F |------| .. |------| C | T |------| R |------+------| *
+ * | ` | A |------| Y |------|------| ; | .. | ! |------|------| UP |------| N | '/? | *
+ * |------+------| À |------| X | W |------|-------------. .. .-------------|------| M | G |------| H |------+------| *
+ * | SHIFT| Z |------| . |------|------|sp/sh |bsp/ct|L2/ins| .. |L2lock|del/CT|sp/sh |------|------| DOWN |------| Q |SHIFT | *
+ * |------+------| / |------| , | space|------|------|------ .. ------|------|------| L1/sp| LEFT |------| UP |------+------| *
+ * | CTRL | win |------/ \-------------| L1 | alt | .. | CAPS | L1 |-------------/ \------| : | CTRL | *
+ * `-------------/ \-------------/ .. \-------------/ \-------------/ *
+ *M(M_LP)
+ */
+[_BASE] = KEYMAP(
+ 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_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_DTRM, BP_DCRC, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \
+ KC_TAB, BP_B, BP_ECUT, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \
+ BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_APOS, \
+ M(M_SF), BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRACKET, M(M_SFS), BP_CBSP, M(L2INS), M(L2LOC), BP_CDEL, M(M_SFS),BP_M, BP_G, KC_UP, BP_H, BP_Q, M(M_SF), \
+ KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M(M_L1E), KC_LALT, KC_CAPS, M(M_L1E),KC_SPACE,KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \
+ //left pedals
+ M(M_LP), M(M_RP), KC_TRNS, \
+ //right pedals
+ M(M_LP), M(M_RP), KC_TRNS \
+),
+
+ /* Larer 1 for symbols.
+ * left foot is middle click
+ * ,------. .. ,------. *
+ * ,------| |-------------. .. ,-------------| |------. *
+ * ,------| |------| | |------. .. ,------| | |------| |------. *
+ * | |------| § |------|------| | .. | |------|------| ± |------| | *
+ * ,------+------| ¶ |------| µ | |------| .. |------| ≤ | ≥ |------| ÷ |------+------. *
+ * | | ¤ |------| { |------|------| ~ | .. | ˇ |------|------| ] |------| × | | *
+ * |------+------| * |------| } | ` |------| .. |------| # | [ |------| % |------+------| *
+ * | | \ |------| ( |------|------| | .. | ≠ |------|------| > |------| ‰ | | *
+ * |------+------| Ù |------| ) | + |------| .. |------| Ç | < |------| & |------+------| *
+ * | | = |------| copy |------|------| : | .. | ? |------|------| PGUP |------| _ | | *
+ * |------+------| cut |------| paste|search|------|-------------. .. .-------------|------| $ | = |------| | |------+------| *
+ * | | undo |------| \ |------|------| | | | .. | | | |------|------| PGDN |------| / | | *
+ * |------+------| |------| | |------|------|------ .. ------|------|------| | HOME |------| PGDN |------+------| *
+ * | | |------/ \-------------| | | .. | | |-------------/ \------| | | *
+ * `-------------/ \-------------/ .. \-------------/ \-------------/ *
+ *
+ */
+[_SYMBOLS] = KEYMAP(
+ 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, BP_DCUR, BP_PARG, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_DCAR, BP_LEQL, BP_GEQL, BP_PSMS, BP_OBEL, BP_TIMS, KC_TRNS, \
+ KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_DIFF, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PMIL, KC_TRNS, \
+ KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QEST, BP_CCED, BP_LESS, BP_GRTR, BP_AMPR, BP_UNDS, KC_TRNS, \
+ KC_TRNS, M(M_UN), M(M_CUT),M(M_CP), M(M_PS), M(M_SE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \
+ KC_TRNS, KC_TRNS, BP_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, \
+ //left pedals
+ KC_TRNS, KC_BTN1, KC_TRNS, \
+ //right pedals
+ KC_TRNS, KC_BTN1, KC_TRNS \
+),
+
+ /* MEDIA, mouse and numpad.
+ * right pedal is left clic
+ * ,------. .. ,------. *
+ * ,------|PAUSE |-------------. .. ,-------------| PRINT|------. *
+ * ,------|SCROLL|------|MUTE |VOLUD |------. .. ,------| pre | next |------| calc |------. *
+ * |RESET |------| stop |------|------|VOLDU | .. | play |------|------| stop |------| num | *
+ * ,------+------| |------| pre | next |------| .. |------| pre | next |------| |------+------. *
+ * | | |------|scrolu|------|------| play | .. | play |------|------| 8 |------| - | | *
+ * |------+------| |------| | bt4 |------| .. |------| next | 7 |------| 9 |------+------| *
+ * | | |------|scrold|------|------| bt5 | .. | pre |------|------| 5 |------| + | | *
+ * |------+------| |------|mclic | rclic|------| .. |------| rclic| 4 |------| 6 |------+------| *
+ * | | |------| |------|------| lclic| .. | lclic|------|------| 2 |------| * | | *
+ * |------+------| |------| | mclck|------|-------------. .. .-------------|------| mclic| 1 |------| 3 |------+------| *
+ * | | |------| |------|------| | | | .. | | | |------|------| num. |------| / | | *
+ * |------+------| |------| | |------|------|------ .. ------|------|------| | 0 |------| . |------+------| *
+ * | | |------/ \-------------| | | .. | | |-------------/ \------| , | | *
+ * `-------------/ \-------------/ .. \-------------/ \-------------/ *
+ *
+ */
+[_MEDIA] = KEYMAP(
+ RESET, KC_SLCK, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, KC_CALC, KC_NLCK, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MPRV, KC_MNXT, KC_MPLY, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_PMNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_BTN4, KC_BTN5, KC_BTN4, KC_BTN5, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_BTN2, KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, KC_TRNS, \
+ KC_TRNS, M(M_UN), M(M_CUT),M(M_CP), M(M_PS), KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, 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_KP_0, KC_PDOT, BP_DOT, BP_COMM, KC_TRNS, \
+ //left pedals
+ KC_BTN3, M(M_RP), KC_TRNS, \
+ //right pedals
+ KC_BTN3, M(M_RP), KC_TRNS \
+),
+
+/* TRNS - skeleton for laters
+ * ,------. .. ,------. *
+ * ,------| |-------------. .. ,-------------| |------. *
+ * ,------| |------| | |------. .. ,------| | |------| |------. *
+ * | |------| |------|------| | .. | |------|------| |------| | *
+ * ,------+------| |------| | |------| .. |------| | |------| |------+------. *
+ * | | |------| |------|------| | .. | |------|------| |------| | | *
+ * |------+------| |------| | |------| .. |------| | |------| |------+------| *
+ * | | |------| |------|------| | .. | |------|------| |------| | | *
+ * |------+------| |------| | |------| .. |------| | |------| |------+------| *
+ * | | |------| |------|------| | .. | |------|------| |------| | | *
+ * |------+------| |------| | |------|-------------. .. .-------------|------| | |------| |------+------| *
+ * | | |------| |------|------| | | | .. | | | |------|------| |------| | | *
+ * |------+------| |------| | |------|------|------ .. ------|------|------| | |------| |------+------| *
+ * | | |------/ \-------------| | | .. | | |-------------/ \------| | | *
+ * `-------------/ \-------------/ .. \-------------/ \-------------/ *
+ *
+ */
+
+[_TRNS] = KEYMAP(
+ 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, 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, \
+ 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ //left pedals
+ KC_BTN3, M(M_RP), KC_TRNS, \
+ //right pedals
+ KC_BTN3, M(M_RP), KC_TRNS \
+),
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+void hold_shift(void) {
+ shift_count = shift_count + 1;
+ register_code(KC_LSHIFT);
+}
+
+void release_shift(void) {
+ shift_count = shift_count - 1;
+ if(shift_count <= 0){
+ unregister_code(KC_LSHIFT);
+ shift_count = 0;
+ }
+}
+
+void press_space(void) {
+ if(shift_count > 0) unregister_code (KC_LSHIFT);
+ register_code (KC_SPACE);
+ unregister_code (KC_SPACE);
+ if(shift_count > 0) register_code (KC_LSHIFT);
+}
+
+void press_enter(void) {
+ if(shift_count > 0) unregister_code (KC_LSHIFT);
+ register_code (KC_ENT);
+ unregister_code (KC_ENT);
+ if(shift_count > 0) register_code (KC_LSHIFT);
+}
+
+void press_underscore(void) {
+ if(shift_count > 0) unregister_code (KC_LSHIFT);
+ register_code ((unsigned char) BP_UNDS);
+ unregister_code ((unsigned char) BP_UNDS);
+ if(shift_count > 0) register_code (KC_LSHIFT);
+}
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ switch(id) {
+ case M_LP: //left pedal
+ if (record->event.pressed) {
+ layer_on(1);
+ register_code (KC_SLCK);
+ key_timer_left_pedal = timer_read(); // if the key is being pressed, we start the timer.
+ } else {
+ if (timer_elapsed(key_timer_left_pedal) < KEY_DELAY) {
+ mousekey_on (KC_BTN2);
+ mousekey_send();
+ mousekey_off (KC_BTN2);
+ mousekey_send();
+ }
+ unregister_code (KC_SLCK);
+ layer_off(1);
+ }
+ break;
+ case M_RP: //right pedal
+ if (record->event.pressed) {
+ layer_on(2);
+ key_timer_right_pedal = timer_read(); // if the key is being pressed, we start the timer.
+ } else {
+ if (timer_elapsed(key_timer_right_pedal) < PEDAL_DELAY) {
+ mousekey_on (KC_BTN1);
+ mousekey_send();
+ mousekey_off (KC_BTN1);
+ mousekey_send();
+ }
+ layer_off(2);
+ }
+ break;
+ case M_SF: // shift, using macro to keep track of shift state and avoid inserting nbsp by mistake
+ if (record->event.pressed) {
+ hold_shift();
+ } else {
+ release_shift();
+ }
+ break;
+ case M_SFS: // shift when held, space when tapped
+ if (record->event.pressed) {
+ hold_shift();
+ key_timer_shift = timer_read(); // if the key is being pressed, we start the timer.
+ } else {
+ if (timer_elapsed(key_timer_shift) < KEY_DELAY) {
+ press_space();
+ }
+ release_shift();
+ }
+ break;
+ case M_SFU: // shift when held, _ when tapped
+ if (record->event.pressed) {
+ hold_shift();
+ key_timer_shift = timer_read(); // if the key is being pressed, we start the timer.
+ } else {
+ if (timer_elapsed(key_timer_shift) < KEY_DELAY) {
+ press_space();
+ }
+ release_shift();
+ }
+ break;
+ case M_L1E: // L1 when held, space when tapped
+ if (record->event.pressed) {
+ layer_on(1);
+ key_timer_1 = timer_read(); // if the key is being pressed, we start the timer.
+ } else {
+ if (timer_elapsed(key_timer_1) < KEY_DELAY) {
+ press_enter();
+ }
+ layer_off(1);
+ }
+ break;
+ case L2INS: //activate layer 2, if released before 100ms trigger INS. basicaly equivalent to LT(2, KC_INS) but without delay for activation of layer 2
+ if (record->event.pressed) {
+ layer_on(2);
+ key_timer_2 = timer_read(); // if the key is being pressed, we start the timer.
+ } else {
+ if (timer_elapsed(key_timer_2) < KEY_DELAY) {
+ register_code (KC_INS);
+ unregister_code (KC_INS);
+ }
+ l2_locked = 0;
+ layer_off(2);
+ }
+ break;
+ case L2LOC: //lock L2
+ if (record->event.pressed) {
+ key_timer_2 = timer_read(); // if the key is being pressed, we start the timer.
+ layer_on(2);
+ } else {
+ if (timer_elapsed(key_timer_2) < KEY_DELAY && l2_locked == 0) {
+ l2_locked = 1;
+ layer_on(2);
+ } else {
+ l2_locked = 0;
+ layer_off(2);
+ }
+ }
+ break;
+ case M_UN: // undo
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ register_code(BP_Z);
+ unregister_code(BP_Z);
+ unregister_code(KC_LCTL);
+ }
+ break;
+ case M_CUT: // cut
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ register_code(BP_X);
+ unregister_code(BP_X);
+ unregister_code(KC_LCTL);
+ }
+ break;
+ case M_CP: // copy
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ register_code(BP_C);
+ unregister_code(BP_C);
+ unregister_code(KC_LCTL);
+ }
+ break;
+ case M_PS: // paste
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ register_code(BP_V);
+ unregister_code(BP_V);
+ unregister_code(KC_LCTL);
+ }
+ break;
+ case M_SE: // search
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ register_code(BP_F);
+ unregister_code(BP_F);
+ unregister_code(KC_LCTL);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+
+}
+
+void matrix_init_user(void) {
+}
+
+// Bleah globals need to be initialized.
+uint8_t old_layer=_BASE;
+
+void matrix_scan_user(void) {
+ uint8_t layer = biton32(layer_state);
+
+ frenchdev_led_1_off();
+ frenchdev_led_2_off();
+ switch (layer) {
+ case _BASE:
+ frenchdev_led_2_on();
+ break;
+ case _SYMBOLS:
+ frenchdev_led_1_on();
+ break;
+ case _MEDIA:
+ frenchdev_led_1_on();
+ frenchdev_led_2_on();
+ default:
+ // none
+ break;
+ }
+}
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)){
+ frenchdev_led_3_on();
+ } else {
+ frenchdev_led_3_off();
+ }
+ return ;
+}
+
+
diff --git a/keyboards/handwired/frenchdev/keymaps/default/readme.md b/keyboards/handwired/frenchdev/keymaps/default/readme.md
new file mode 100644
index 000000000..1a81d1779
--- /dev/null
+++ b/keyboards/handwired/frenchdev/keymaps/default/readme.md
@@ -0,0 +1,13 @@
+layout :
+
+[default layout](http://i.imgur.com/r2Nvr4p.png)
+
+the thing when finished :
+http://imgur.com/a/6FY8v
+
+concept and mockup:
+http://imgur.com/a/R0vvs
+
+to build :
+
+ docker run --rm -e keymap=default -e keyboard=frenchdev --rm -v D:/Repositories/qmk:/qmk:rw edasque/qmk_firmware
diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c
new file mode 100644
index 000000000..7fe3d0bbf
--- /dev/null
+++ b/keyboards/handwired/frenchdev/matrix.c
@@ -0,0 +1,396 @@
+/*
+
+Note to self: adapted from ergodox EZ matrix
+The "column" and "row" in here actually refers to the opposite on the keyboard
+see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard
+Nicolas
+
+Note for ErgoDox EZ customizers: Here be dragons!
+This is not a file you want to be messing with.
+All of the interesting stuff for you is under keymaps/ :)
+Love, Erez
+
+Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
+Copyright 2013 Nicolas Poirey <nicolas.poirey@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * scan matrix
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include "wait.h"
+#include "action_layer.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "frenchdev.h"
+#include "i2cmaster.h"
+#ifdef DEBUG_MATRIX_SCAN_RATE
+#include "timer.h"
+#endif
+
+/*
+ * This constant define not debouncing time in msecs, but amount of matrix
+ * scan loops which should be made to get stable debounced results.
+ *
+ * On Ergodox matrix scan rate is relatively low, because of slow I2C.
+ * Now it's only 317 scans/second, or about 3.15 msec/scan.
+ * According to Cherry specs, debouncing time is 5 msec.
+ *
+ * And so, there is no sense to have DEBOUNCE higher than 2.
+ */
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+static uint8_t debouncing = DEBOUNCE;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+static matrix_row_t read_cols(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+static uint8_t mcp23018_reset_loop;
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+uint32_t matrix_timer;
+uint32_t matrix_scan_count;
+#endif
+
+
+__attribute__ ((weak))
+void matrix_init_user(void) {}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+void matrix_init(void)
+{
+ // initialize row and col
+ debug_enable = true;
+ debug_matrix = true;
+ debug_keyboard = true;
+ debug_mouse = true;
+
+ mcp23018_status = init_mcp23018();
+
+
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+
+ matrix_init_quantum();
+
+}
+
+void matrix_power_up(void) {
+ mcp23018_status = init_mcp23018();
+
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+
+}
+
+uint8_t matrix_scan(void)
+{
+ if (mcp23018_status) { // if there was an error
+ if (++mcp23018_reset_loop == 0) {
+ // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
+ // this will be approx bit more frequent than once per second
+ print("trying to reset mcp23018\n");
+ mcp23018_status = init_mcp23018();
+ if (mcp23018_status) {
+ print("left side not responding\n");
+ } else {
+ print("left side attached\n");
+ frenchdev_blink_all_leds();
+ }
+ }
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_scan_count++;
+
+ uint32_t timer_now = timer_read32();
+ if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
+ print("matrix scan frequency: ");
+ pdec(matrix_scan_count);
+ print("\n");
+
+ matrix_timer = timer_now;
+ matrix_scan_count = 0;
+ }
+#endif
+
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ select_row(i);
+ wait_us(30); // without this wait read unstable value.
+ matrix_row_t cols = read_cols(i);
+ if (matrix_debouncing[i] != cols) {
+ matrix_debouncing[i] = cols;
+ if (debouncing) {
+ debug("bounce!: "); debug_hex(debouncing); debug("\n");
+ }
+ debouncing = DEBOUNCE;
+ }
+ unselect_rows();
+ }
+
+ if (debouncing) {
+ if (--debouncing) {
+ wait_us(1);
+ // this should be wait_ms(1) but has been left as-is at EZ's request
+ } else {
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = matrix_debouncing[i];
+ }
+ }
+ }
+
+ matrix_scan_quantum();
+
+ return 1;
+}
+
+bool matrix_is_modified(void)
+{
+ if (debouncing) return false;
+ return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+/* Column pin configuration
+ *
+ * Teensy
+ * col: 0 1 2 3 4 5
+ * pin: F0 F1 F4 F5 F6 F7
+ *
+ * MCP23018
+ * col: 0 1 2 3 4 5
+ * pin: B5 B4 B3 B2 B1 B0
+ */
+static void init_cols(void)
+{
+ // init on mcp23018
+ // not needed, already done as part of init_mcp23018()
+
+ // init on teensy
+ // Input with pull-up(DDR:0, PORT:1)
+ DDRF &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
+ PORTF |= (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
+}
+
+static matrix_row_t read_cols(uint8_t row)
+{
+ if (row < 8) {
+ if (mcp23018_status) { // if there was an error
+ return 0;
+ } else {
+ uint8_t data = 0;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out;
+ data = i2c_readNak();
+ data = ~data;
+ out:
+ i2c_stop();
+ return data;
+ }
+ } else {
+ // read from teensy
+ return
+ (PINF&(1<<0) ? 0 : (1<<0)) |
+ (PINF&(1<<1) ? 0 : (1<<1)) |
+ (PINF&(1<<4) ? 0 : (1<<2)) |
+ (PINF&(1<<5) ? 0 : (1<<3)) |
+ (PINF&(1<<6) ? 0 : (1<<4)) |
+ (PINF&(1<<7) ? 0 : (1<<5)) ;
+ }
+}
+
+/* Row pin configuration
+ *
+ * Teensy
+ * row: 7 8 9 10 11 12 13
+ * pin: B0 B1 B2 B3 D2 D3 C6
+ *
+ * MCP23018
+ * row: 0 1 2 3 4 5 6
+ * pin: A0 A1 A2 A3 A4 A5 A6
+ */
+static void unselect_rows(void)
+{
+ // unselect on mcp23018
+ if (mcp23018_status) { // if there was an error
+ // do nothing
+ } else {
+ // set all rows hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write( 0xFF
+ & ~(0<<8)
+ ); if (mcp23018_status) goto out;
+ out:
+ i2c_stop();
+ }
+
+ // unselect on teensy
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
+ PORTB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
+ DDRD &= ~(1<<2 | 1<<3);
+ PORTD &= ~(1<<2 | 1<<3);
+ DDRC &= ~(1<<6 | 1<<7);
+ PORTC &= ~(1<<6 | 1<<7);
+}
+
+static void select_row(uint8_t row)
+{
+ if (row < 8) {
+ // select on mcp23018
+ if (mcp23018_status) { // if there was an error
+ // do nothing
+ } else {
+ // set active row low : 0
+ // set other rows hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write( 0xFF & ~(1<<row)
+ & ~(0<<8)
+ ); if (mcp23018_status) goto out;
+ out:
+ i2c_stop();
+ }
+ } else {
+ // select on teensy
+ // Output low(DDR:1, PORT:0) to select
+ switch (row) {
+ case 8:
+ DDRB |= (1<<0);
+ PORTB &= ~(1<<0);
+ break;
+ case 9:
+ DDRB |= (1<<1);
+ PORTB &= ~(1<<1);
+ break;
+ case 10:
+ DDRB |= (1<<2);
+ PORTB &= ~(1<<2);
+ break;
+ case 11:
+ DDRB |= (1<<3);
+ PORTB &= ~(1<<3);
+ break;
+ case 12:
+ DDRD |= (1<<2);
+ PORTD &= ~(1<<3);
+ break;
+ case 13:
+ DDRD |= (1<<3);
+ PORTD &= ~(1<<3);
+ break;
+ case 14:
+ DDRC |= (1<<6);
+ PORTC &= ~(1<<6);
+ break;
+ case 15:
+ DDRC |= (1<<7);
+ PORTC &= ~(1<<7);
+ break;
+ }
+ }
+}
+
diff --git a/keyboards/handwired/frenchdev/readme.md b/keyboards/handwired/frenchdev/readme.md
new file mode 100644
index 000000000..698b4befb
--- /dev/null
+++ b/keyboards/handwired/frenchdev/readme.md
@@ -0,0 +1,102 @@
+# Frenchdev : My take on a splitted keyboard for dev and french language
+Concept based on
+ - [ergodox](https://ergodox-ez.com/)
+ - [katy](https://deskthority.net/workshop-f7/katy-keyboard-or-k80cs-key80-contoured-split-t8524.html)
+
+with the added possibility to connect up to 6 external switches like pedals,
+ and somewhat like the katy, not all keys are on the same level for easier reach.
+
+###Photos
+- [default layout](http://i.imgur.com/r2Nvr4p.png)
+- [editable layout on keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/4480e3ab8026eb7c710a7e22203ef4aa) (keys placement is NOT precise on this)
+- [the thing when finished](http://imgur.com/a/6FY8v)
+- [concept and cardboard mockup](http://imgur.com/a/R0vvs)
+
+##Build instructions
+
+ docker run --rm -e keymap=default -e keyboard=frenchdev --rm -v D:/Repositories/qmk:/qmk:rw edasque/qmk_firmware
+
+##Laser-cuttable file
+There is intentionnaly no hole for the TRRS connector, you are supposed to use a drill for it.
+This way if you don't want to use the pedals you don't have a useless hole. Plus it's cleaner.
+http://qmk.fm/frenchdev/frenchdev_v1_lasercut_template.svg
+
+##Side stickers
+You can find my original file here : http://qmk.fm/frenchdev/example_printable_stickers.svg
+
+I used it when training but now I use blanks and the layout is different.
+I still uploaded it because I think it can be a good jumpstart for any temporary stickers on the
+side of keycaps.
+
+##List of parts
+- I2C mcp23018
+- [teensy 2](https://www.pjrc.com/store/teensy.html)
+- 3 LED, 5mm tall with flat head
+- 3 330 ohm resistor
+- 2 470 ohm resistor
+- 2 TRRS connectors
+- 1 [micro usb breakout board](http://www.ebay.com/itm/-/201387922085?)
+- 88 cherry/gateron switchs
+- 94 4148 diodes
+- 34 R4 keys
+- 14 R3 keys
+- 20 R2 keys
+- 22 R1 keys
+
+if you fancy adding pedals :
+[these are good enough and cheap](https://www.amazon.fr/gp/product/B00V7WITKI/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1). You also need a RCA connector for each of those to replace the included cable
+
+If you (or your coworkers) find them too loud you can replace the switch inside them.
+For once we don't really care about what's inside :)
+
+##Various indications
+
+The PHYSICAL rows and columns are connected as such :
+
+on right hand (slave) :
+
+ I2C mcp23018
+ .------- --------.
+ GND -| 1 VSS \_/ NC 28 |
+ | 2 NC A7 27 |- C15
+ R5 -| 3 B0 A6 26 |- C14
+ R4 -| 4 B1 A5 25 |- C13
+ R3 -| 5 B2 A4 24 |- C12
+ R2 -| 6 B3 A3 23 |- C11
+ R1 -| 7 B4 A2 22 |- C10
+ R0 -| 8 B5 A1 21 |- C9
+ | 9 B6 A0 20 |- C8
+ | 10 B7 INTA 19 |
+ VCC -| 11 VDD INTB 18 |
+ SCL -| 12 SCL NC 17 |
+ SDA -| 13 SDA RST 16 |- VCC
+ | 14 NC ADDR 15 |- GND
+ `------------------'
+
+and on left hand (main) :
+
+ TEENSY
+ .------------------.
+ | GND VCC |
+ C7 -| B0 F0 |- R5
+ C6 -| B1 F1 |- R4
+ C5 -| B2 F4 |- R3
+ C4 -| B3 F5 |- R2
+ LEDC -| B7 F6 |- R1
+ SCL -| D0 F7 |- R0
+ SDA -| D1 B6 |- LEDB
+ C3 -| D2 B5 |- LEDA
+ C2 -| D3 B4 |
+ C1 -| C6 D7 |
+ C0 -| C7 D6 |- GND
+ | D5 D4 |
+ | VCC RST |
+ | E6 GND |
+ `------------------'
+
+We use pull up resistor for SCL and VDA, see https://github.com/ErgoDox-EZ/docs/blob/master/ErgoDox%20EZ%20Schematic.pdf for example
+
+the connector is a standard TRRS (jack with audio + mic)
+
+Diode direction is row to column
+
diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk
new file mode 100644
index 000000000..2b70ae564
--- /dev/null
+++ b/keyboards/handwired/frenchdev/rules.mk
@@ -0,0 +1,92 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make = Make software.
+#
+# make clean = Clean out built project files.
+#
+# That's pretty much all you need. To compile, always go make clean,
+# followed by make.
+#
+# For advanced users only:
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+# (must have teensy_loader_cli installed).
+#
+#----------------------------------------------------------------------------
+
+# # project specific files
+SRC = twimaster.c \
+ matrix.c
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+CUSTOM_MATRIX = yes # Custom matrix file (taken and adapted from the ErgoDox EZ to handle custom number of columns)
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+UNICODE_ENABLE = yes # Unicode
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+RGBLIGHT_ENABLE = no
+API_SYSEX_ENABLE = no
+
+#ifndef QUANTUM_DIR
+# include ../../../Makefile
+#endif
diff --git a/keyboards/handwired/frenchdev/twimaster.c b/keyboards/handwired/frenchdev/twimaster.c
new file mode 100644
index 000000000..f91c08e6e
--- /dev/null
+++ b/keyboards/handwired/frenchdev/twimaster.c
@@ -0,0 +1,208 @@
+/*************************************************************************
+* Title: I2C master library using hardware TWI interface
+* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
+* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $
+* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
+* Target: any AVR device with hardware TWI
+* Usage: API compatible with I2C Software Library i2cmaster.h
+**************************************************************************/
+#include <inttypes.h>
+#include <compat/twi.h>
+
+#include <i2cmaster.h>
+
+
+/* define CPU frequency in Mhz here if not defined in Makefile */
+#ifndef F_CPU
+#define F_CPU 16000000UL
+#endif
+
+/* I2C clock in Hz */
+#define SCL_CLOCK 400000L
+
+
+/*************************************************************************
+ Initialization of the I2C bus interface. Need to be called only once
+*************************************************************************/
+void i2c_init(void)
+{
+ /* initialize TWI clock
+ * minimal values in Bit Rate Register (TWBR) and minimal Prescaler
+ * bits in the TWI Status Register should give us maximal possible
+ * I2C bus speed - about 444 kHz
+ *
+ * for more details, see 20.5.2 in ATmega16/32 secification
+ */
+
+ TWSR = 0; /* no prescaler */
+ TWBR = 10; /* must be >= 10 for stable operation */
+
+}/* i2c_init */
+
+
+/*************************************************************************
+ Issues a start condition and sends address and transfer direction.
+ return 0 = device accessible, 1= failed to access device
+*************************************************************************/
+unsigned char i2c_start(unsigned char address)
+{
+ uint8_t twst;
+
+ // send START condition
+ TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
+
+ // wait until transmission completed
+ while(!(TWCR & (1<<TWINT)));
+
+ // check value of TWI Status Register. Mask prescaler bits.
+ twst = TW_STATUS & 0xF8;
+ if ( (twst != TW_START) && (twst != TW_REP_START)) return 1;
+
+ // send device address
+ TWDR = address;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+
+ // wail until transmission completed and ACK/NACK has been received
+ while(!(TWCR & (1<<TWINT)));
+
+ // check value of TWI Status Register. Mask prescaler bits.
+ twst = TW_STATUS & 0xF8;
+ if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1;
+
+ return 0;
+
+}/* i2c_start */
+
+
+/*************************************************************************
+ Issues a start condition and sends address and transfer direction.
+ If device is busy, use ack polling to wait until device is ready
+
+ Input: address and transfer direction of I2C device
+*************************************************************************/
+void i2c_start_wait(unsigned char address)
+{
+ uint8_t twst;
+
+
+ while ( 1 )
+ {
+ // send START condition
+ TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
+
+ // wait until transmission completed
+ while(!(TWCR & (1<<TWINT)));
+
+ // check value of TWI Status Register. Mask prescaler bits.
+ twst = TW_STATUS & 0xF8;
+ if ( (twst != TW_START) && (twst != TW_REP_START)) continue;
+
+ // send device address
+ TWDR = address;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+
+ // wail until transmission completed
+ while(!(TWCR & (1<<TWINT)));
+
+ // check value of TWI Status Register. Mask prescaler bits.
+ twst = TW_STATUS & 0xF8;
+ if ( (twst == TW_MT_SLA_NACK )||(twst ==TW_MR_DATA_NACK) )
+ {
+ /* device busy, send stop condition to terminate write operation */
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
+
+ // wait until stop condition is executed and bus released
+ while(TWCR & (1<<TWSTO));
+
+ continue;
+ }
+ //if( twst != TW_MT_SLA_ACK) return 1;
+ break;
+ }
+
+}/* i2c_start_wait */
+
+
+/*************************************************************************
+ Issues a repeated start condition and sends address and transfer direction
+
+ Input: address and transfer direction of I2C device
+
+ Return: 0 device accessible
+ 1 failed to access device
+*************************************************************************/
+unsigned char i2c_rep_start(unsigned char address)
+{
+ return i2c_start( address );
+
+}/* i2c_rep_start */
+
+
+/*************************************************************************
+ Terminates the data transfer and releases the I2C bus
+*************************************************************************/
+void i2c_stop(void)
+{
+ /* send stop condition */
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
+
+ // wait until stop condition is executed and bus released
+ while(TWCR & (1<<TWSTO));
+
+}/* i2c_stop */
+
+
+/*************************************************************************
+ Send one byte to I2C device
+
+ Input: byte to be transfered
+ Return: 0 write successful
+ 1 write failed
+*************************************************************************/
+unsigned char i2c_write( unsigned char data )
+{
+ uint8_t twst;
+
+ // send data to the previously addressed device
+ TWDR = data;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+
+ // wait until transmission completed
+ while(!(TWCR & (1<<TWINT)));
+
+ // check value of TWI Status Register. Mask prescaler bits
+ twst = TW_STATUS & 0xF8;
+ if( twst != TW_MT_DATA_ACK) return 1;
+ return 0;
+
+}/* i2c_write */
+
+
+/*************************************************************************
+ Read one byte from the I2C device, request more data from device
+
+ Return: byte read from I2C device
+*************************************************************************/
+unsigned char i2c_readAck(void)
+{
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
+ while(!(TWCR & (1<<TWINT)));
+
+ return TWDR;
+
+}/* i2c_readAck */
+
+
+/*************************************************************************
+ Read one byte from the I2C device, read is followed by a stop condition
+
+ Return: byte read from I2C device
+*************************************************************************/
+unsigned char i2c_readNak(void)
+{
+ TWCR = (1<<TWINT) | (1<<TWEN);
+ while(!(TWCR & (1<<TWINT)));
+
+ return TWDR;
+
+}/* i2c_readNak */
diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/gamenum/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md
new file mode 100644
index 000000000..5b53004ef
--- /dev/null
+++ b/keyboards/handwired/gamenum/README.md
@@ -0,0 +1,102 @@
+GameNum firmware
+======================
+## Board overview
+
+The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited.
+It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers.
+The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games.
+The RTS layer is meant to be used rotating the device 90 degrees counterclockwise.
+
+The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK.
+
+## Build considerations
+
+Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind.
+Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz.
+The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled.
+'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro.
+
+## schematic of the switches and diodes
+
+![schematic overview](http://i.imgur.com/fleitoA.jpg)
+
+Keep in mind that the minus of the diodes should point towards the pro micros inputs.
+
+##LED hookup
+
+![led overview](http://i.imgur.com/U6m865n.jpg)
+
+## Adding more layers
+
+Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`.
+Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers.
+
+Next thing to do is to add the actual layer for the keymap.
+
+```
+[DEF] = KEYMAP(
+ KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
+ KC_7, KC_8, KC_9, KC_PLUS, \
+ KC_4, KC_5, KC_6, \
+ KC_1, KC_2, KC_3, \
+ KC_0, KC_DOT, KC_ENT \
+)
+```
+
+This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D:
+In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does!
+
+Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer.
+The number that is at the end of the keycode corresponds with the code in the function.
+`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well.
+
+Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`.
+Look for this piece of code:
+
+```
+ DDRD |= (1<<4);
+ PORTD &= ~(1<<4);
+```
+
+Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<<y);` defines that pin as an output. `PORTx &= ~(1<<y);` sets the pin to LOW turning off the LED.
+
+Now go back to `keymap.c` and look for the `process_record_user` function. The function is basically a switch case that checks if you pushed one of the defined layer-switch buttons. When it sees that you pushed one of them it sets the pins of the LED's either low or high.
+
+```
+ case KC_FN1:
+ if (record->event.pressed) {
+ PORTC &= ~(1 << 6); // PC6 goes low
+ PORTD |= (1<<4); //PD4 goes high
+ }
+ break;
+```
+
+This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit.
+
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder.
+Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with.
+Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you.
+Once your dev env is set up, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file.
+
+### Default
+
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+
+To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
+
+```
+$ make keymap=[default|jack|<name>]
+```
+
+Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
+
+
diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h
new file mode 100644
index 000000000..6af876ab7
--- /dev/null
+++ b/keyboards/handwired/gamenum/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x1234
+#define PRODUCT_ID 0x5678
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Seth-Senpai
+#define PRODUCT GameNum
+#define DESCRIPTION Numpad with gamelayers
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 }
+#define MATRIX_COL_PINS { D7, E6, B4, B5 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+// #define BACKLIGHT_PIN C6
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/gamenum/gamenum.c b/keyboards/handwired/gamenum/gamenum.c
new file mode 100644
index 000000000..8048194bb
--- /dev/null
+++ b/keyboards/handwired/gamenum/gamenum.c
@@ -0,0 +1,14 @@
+#include "gamenum.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ DDRC |= (1<<6);
+ PORTC &= ~(1<<6);
+
+ DDRD |= (1<<4);
+ PORTD &= ~(1<<4);
+
+ matrix_init_user();
+
+}
diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h
new file mode 100644
index 000000000..ea633b9bf
--- /dev/null
+++ b/keyboards/handwired/gamenum/gamenum.h
@@ -0,0 +1,21 @@
+#ifndef GAMENUM_H
+#define GAMENUM_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ k00, k01, k02, k03, \
+ k10, k11, k12, k13, \
+ k20, k21, k22, \
+ k30, k31, k32, \
+ k41, k42, k43 \
+) \
+{ \
+ { k00, k01, k02, k03}, \
+ { k10, k11, k12, k13}, \
+ { k20, k21, k22, KC_NO}, \
+ { k30, k31, k32, KC_NO}, \
+ { KC_NO, k41, k42, k43} \
+}
+
+#endif
diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c
new file mode 100644
index 000000000..6950b741a
--- /dev/null
+++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c
@@ -0,0 +1,68 @@
+#include "gamenum.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+
+#define _______ KC_TRNS
+
+#define DEF 0
+#define HDN 1
+#define OSY 2
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[DEF] = KEYMAP(
+ KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
+ KC_7, KC_8, KC_9, KC_PLUS, \
+ KC_4, KC_5, KC_6, \
+ KC_1, KC_2, KC_3, \
+ KC_0, KC_DOT, KC_ENT \
+),
+[HDN] = KEYMAP(
+ KC_FN1, KC_1, KC_2, KC_3, \
+ KC_Q, KC_W, KC_E, KC_R, \
+ KC_A, KC_S, KC_D, \
+ KC_Z, KC_X, KC_C, \
+ KC_LSFT, KC_LALT, KC_SPC \
+),
+[OSY] = KEYMAP(
+ KC_A, KC_Q, KC_1, KC_FN2, \
+ KC_S, KC_W, KC_2, KC_LALT, \
+ KC_D, KC_E, KC_3, \
+ KC_F, KC_R, KC_4, \
+ KC_SPC, KC_T, KC_TAB \
+)
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_SET(HDN, ON_PRESS),
+ [1] = ACTION_LAYER_SET(OSY, ON_PRESS),
+ [2] = ACTION_LAYER_SET(DEF, ON_PRESS),
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+ return MACRO_NONE;
+};
+
+
+bool process_record_user (uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case KC_FN0:
+ if (record->event.pressed) {
+ PORTC |= (1 << 6); // PC6 goes high
+ }
+ break;
+ case KC_FN1:
+ if (record->event.pressed) {
+ PORTC &= ~(1 << 6); // PC6 goes high
+ PORTD |= (1<<4);
+ }
+ break;
+ case KC_FN2:
+ if (record->event.pressed) {
+ PORTD &= ~(1 << 4); // PC6 goes high
+ }
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk
new file mode 100644
index 000000000..e8b0c6048
--- /dev/null
+++ b/keyboards/handwired/gamenum/rules.mk
@@ -0,0 +1,73 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../Makefile
+endif
+
+
diff --git a/keyboards/handwired/handwired.c b/keyboards/handwired/handwired.c
new file mode 100644
index 000000000..feef8a919
--- /dev/null
+++ b/keyboards/handwired/handwired.c
@@ -0,0 +1 @@
+#include "handwired.h" \ No newline at end of file
diff --git a/keyboards/handwired/handwired.h b/keyboards/handwired/handwired.h
new file mode 100644
index 000000000..7a4a4835e
--- /dev/null
+++ b/keyboards/handwired/handwired.h
@@ -0,0 +1 @@
+#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/handwired/kbod/Makefile b/keyboards/handwired/kbod/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/handwired/kbod/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h
new file mode 100644
index 000000000..f3d0c8bf2
--- /dev/null
+++ b/keyboards/handwired/kbod/config.h
@@ -0,0 +1,167 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER fudanchii
+#define PRODUCT kbod
+#define DESCRIPTION Keyboard of Disapproval
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 8
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5, B6, B7, D6 }
+#define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#define PREVENT_STUCK_MODIFIERS
+
+#undef TAPPING_TOGGLE
+#define TAPPING_TOGGLE 2
+
+#endif
diff --git a/keyboards/handwired/kbod/kbod.c b/keyboards/handwired/kbod/kbod.c
new file mode 100644
index 000000000..9a12cae0d
--- /dev/null
+++ b/keyboards/handwired/kbod/kbod.c
@@ -0,0 +1,28 @@
+#include "kbod.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h
new file mode 100644
index 000000000..356063624
--- /dev/null
+++ b/keyboards/handwired/kbod/kbod.h
@@ -0,0 +1,21 @@
+#ifndef KBOD_H
+#define KBOD_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
+ k40, k41, k42, k43, k44, k45, k46, k47 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37 }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47 }, \
+}
+
+#endif
diff --git a/keyboards/handwired/kbod/keymaps/default/Makefile b/keyboards/handwired/kbod/keymaps/default/Makefile
new file mode 100644
index 000000000..0d9def930
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/Makefile
@@ -0,0 +1,21 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/kbod/keymaps/default/config.h b/keyboards/handwired/kbod/keymaps/default/config.h
new file mode 100644
index 000000000..df06a2620
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/config.h
@@ -0,0 +1,8 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c
new file mode 100644
index 000000000..1386b742f
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/keymap.c
@@ -0,0 +1,104 @@
+#include "kbod.h"
+
+#define _____ KC_TRNS
+
+#define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn)))
+
+#define SET_WHETHER(mask, btn1, btn2) \
+if (record->event.pressed) { \
+ if (mask) { \
+ add_key(btn2); \
+ send_keyboard_report(); \
+ } else { \
+ add_key(btn1); \
+ send_keyboard_report(); \
+ } \
+} else { \
+ if (mask) { \
+ del_key(btn2); \
+ send_keyboard_report(); \
+ } else { \
+ del_key(btn1); \
+ send_keyboard_report(); \
+ } \
+} \
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP( /* Base */
+ F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC,
+ 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_BSLASH,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT,
+ TT(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
+ ),
+ KEYMAP( /* Cursor layer */
+ KC_GRAVE, 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,
+ TT(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT,
+ TT(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____,
+ _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP,
+ _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+ KEYMAP( /* Keypad layer */
+ TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC,
+ _____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____,
+ _____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____,
+ _____, _____, _____, _____, _____, _____, _____, KC_P0, KC_PDOT, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2,
+ _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3
+ ),
+ KEYMAP( /* Multimedia layer */
+ TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____,
+ _____, _____, KC_WAKE, _____, _____, _____, _____, _____, _____, _____, KC_MSTP, KC_MPRV, KC_MNXT, _____,
+ _____, _____, KC_SLEP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
+ _____, _____, KC_PWR, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2,
+ _____, _____, _____, KC_MPLY, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3
+ ),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_FUNCTION(0),
+ [1] = ACTION_FUNCTION(1),
+};
+
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+ static uint8_t shift_esc_mask;
+ static uint8_t alt_mask;
+ switch (id) {
+ case 0:
+ shift_esc_mask = MODS_PRESSED(SHIFT);
+ SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE);
+ break;
+ case 1:
+ alt_mask = MODS_PRESSED(ALT);
+ SET_WHETHER(alt_mask, KC_4, KC_F4);
+ break;
+ }
+}
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ return MACRO_NONE;
+};
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & _BV(USB_LED_CAPS_LOCK)) {
+ PORTB |= _BV(PB0);
+ } else {
+ PORTB &= ~_BV(PB0);
+ }
+}
+
+void matrix_init_user(void) {
+ DDRB |= _BV(PB0);
+ DDRC |= _BV(PC7);
+}
+
+void matrix_scan_user(void) {
+ uint8_t layer = biton32(layer_state);
+ if (layer) {
+ PORTC |= _BV(PC7);
+ } else {
+ PORTC &= ~_BV(PC7);
+ }
+} \ No newline at end of file
diff --git a/keyboards/handwired/kbod/keymaps/default/readme.md b/keyboards/handwired/kbod/keymaps/default/readme.md
new file mode 100644
index 000000000..35c22ec00
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# The default keymap for kbod
+
+This is the default keymap for kbod,
+
+it consists of a base layer with QWERTY layout, a momentary cursor-layer, and mouse-keys and multimedia layers. \ No newline at end of file
diff --git a/keyboards/handwired/kbod/readme.md b/keyboards/handwired/kbod/readme.md
new file mode 100644
index 000000000..67bf711be
--- /dev/null
+++ b/keyboards/handwired/kbod/readme.md
@@ -0,0 +1,21 @@
+KBOD keyboard firmware
+======================
+
+KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It's utilize 8x8 matrix and has layout similar to GH-60
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme](/).
+
+## Building
+
+Download or clone the whole firmware and use ```make handwired-kbod-default``` to generate the .hex file. You may flash it with avrdude
+
+## Flashing
+Something along this line:
+
+```
+avrdude -p m32u4 -c avr109 -P <COM PORT> -C <avrdude conf file> -e -u flash:w:handwired_kbod_default.hex
+```
+
+[More info](https://github.com/fudanchii/keyboard_of_disapproval) \ No newline at end of file
diff --git a/keyboards/handwired/kbod/rules.mk b/keyboards/handwired/kbod/rules.mk
new file mode 100644
index 000000000..b97cacd5c
--- /dev/null
+++ b/keyboards/handwired/kbod/rules.mk
@@ -0,0 +1,68 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
diff --git a/keyboards/handwired/magicforce61/Makefile b/keyboards/handwired/magicforce61/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/magicforce61/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/magicforce61/README.md b/keyboards/handwired/magicforce61/README.md
new file mode 100644
index 000000000..5a260f9ad
--- /dev/null
+++ b/keyboards/handwired/magicforce61/README.md
@@ -0,0 +1,24 @@
+Magicforce "61" Handwired
+=======================
+
+Basically I cut 7 keys off the magicforce68 and handwired everything to a
+teensy++ 2.0 to make it a ~60% board.
+
+## Wiring Layout
+
+![Wiring Layout](https://imgur.com/gallery/RxYyA)
+
+## Pinout
+
+The following pins are used:
+
+ ```
+ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 }
+ #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 }
+ ```
+
+## Compiling and loading the firmware
+
+To build the firmware, run `make handwired-magicforce61`.
+
+Flash the firmware using the teensy loader or avrdude.
diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h
new file mode 100644
index 000000000..bb329541c
--- /dev/null
+++ b/keyboards/handwired/magicforce61/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Hexwire
+#define PRODUCT Magicforce 61
+#define DESCRIPTION Handwired Magicforce 61
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 }
+#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c
new file mode 100644
index 000000000..9559be5d2
--- /dev/null
+++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c
@@ -0,0 +1,69 @@
+#include "magicforce61.h"
+
+#define _QWERTY 0
+#define _FN1 1
+#define _FN2 2
+#define KC_ KC_TRNS
+#define KC_X0 LT(_FN2, KC_GRV)
+#define KC_X1 MO(_FN1)
+#define KC_NAV_ESC LT(_FN1, KC_ESC)
+#define KC_GUI MAGIC_UNNO_GUI
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
+ GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC ,
+ /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| */
+ TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS ,
+ /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| */
+ NAV_ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
+ /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| */
+ LSPO , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSPC ,
+ /*|---------`----`----`----`----`----`----`----`----`----`----`-------------. */
+ LCTL , RGUI ,LALT , SPACE , X1 ,RALT ,RCTL , X1
+ /*`-----+-----+-----+------------------------------+------+-----+-----' ANY */
+ ),
+
+ [_FN1] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
+ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC ,
+ /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */
+ , , UP , , , , , ,INS ,PSCR, , , , ,
+ /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */
+ ,LEFT,DOWN,RGHT, , , , PGDN , PGUP , , , , ,
+ /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */
+ , , , , , ,VOLD,VOLU,MUTE, , , ,
+ /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */
+ , , , , , , , MPLY
+ /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */
+ ),
+
+ [_FN2] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
+ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC ,
+ /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */
+ , , , , , , , 7 , 8 , 9 , , , , ,
+ /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */
+ , , , , , , , 4 , 5 , 6 , , , ,
+ /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */
+ , , , , , , 0 , 1 , 2 , 3 , , ,
+ /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */
+ , , , , , , ,
+ /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */
+ )
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/handwired/magicforce61/magicforce61.c b/keyboards/handwired/magicforce61/magicforce61.c
new file mode 100644
index 000000000..379395366
--- /dev/null
+++ b/keyboards/handwired/magicforce61/magicforce61.c
@@ -0,0 +1,8 @@
+#include "magicforce61.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/magicforce61/magicforce61.h b/keyboards/handwired/magicforce61/magicforce61.h
new file mode 100644
index 000000000..784f2b2c8
--- /dev/null
+++ b/keyboards/handwired/magicforce61/magicforce61.h
@@ -0,0 +1,20 @@
+#ifndef MAGICFORCE61_H
+#define MAGICFORCE61_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \
+ K40, K41, K42, K45, K49, K4A, K4C, K4D \
+ ) { \
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D }, \
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_NO, KC_##K3D }, \
+ { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_NO, KC_##K4C, KC_##K4D }, \
+}
+
+#endif
diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk
new file mode 100644
index 000000000..913bcb93e
--- /dev/null
+++ b/keyboards/handwired/magicforce61/rules.mk
@@ -0,0 +1,83 @@
+
+# MCU name
+MCU = at90usb1286
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=1024
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE ?= yes # Console for debug(+400)
+COMMAND_ENABLE ?= yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no # MIDI controls
+UNICODE_ENABLE ?= no # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+avrdude: build
+ ls /dev/tty* > /tmp/1; \
+ echo "Reset your Pro Micro now"; \
+ while [[ -z $$USB ]]; do \
+ sleep 1; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/handwired/magicforce68/Makefile b/keyboards/handwired/magicforce68/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/magicforce68/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md
new file mode 100644
index 000000000..2877169ef
--- /dev/null
+++ b/keyboards/handwired/magicforce68/README.md
@@ -0,0 +1,20 @@
+Magicforce 68 Handwired
+=======================
+
+This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro.
+
+## Wiring Layout
+
+![Wiring Layout](http://imgur.com/NmTCv5u)
+
+## Pinout
+
+The following pins are used:
+- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6
+- Rows 1-5: F0, F1, F4, F5, F6
+
+## Compiling and loading the firmware
+
+To build the firmware, run `make`.
+
+To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button.
diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h
new file mode 100644
index 000000000..1e2b7d3e7
--- /dev/null
+++ b/keyboards/handwired/magicforce68/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Hexwire
+#define PRODUCT Magicforce 68
+#define DESCRIPTION Handwired Magicforce 68
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 }
+#define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c
new file mode 100644
index 000000000..22553f714
--- /dev/null
+++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c
@@ -0,0 +1,67 @@
+#include "magicforce68.h"
+
+#define _QWERTY 0
+#define _FN1 1
+#define _FN2 2
+#define KC_ KC_TRNS
+#define KC_X0 LT(_FN2, KC_GRV)
+#define KC_X1 MO(_FN1)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
+ ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
+ /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
+ TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
+ /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
+ X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
+ /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
+ LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
+ /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
+ LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
+ /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
+ ),
+
+ [_FN1] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
+ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
+ /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
+ , , , UP , , , , , , , , , , , VOLD,END,
+ /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
+ , ,LEFT,DOWN,RGHT, , , , , , , , ,
+ /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
+ , , , , , , ,MUTE, , , , , MUTE,
+ /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
+ , , , , , , , MPRV,MPLY,MNXT
+ /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
+ ),
+
+ [_FN2] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
+ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
+ /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
+ , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
+ /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
+ , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
+ /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
+ , , , , , , 0 , 1 , 2 , 3 , , , MUTE,
+ /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
+ , , , , , , , MPRV,MPLY,MNXT
+ /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
+ )
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/handwired/magicforce68/magicforce68.c b/keyboards/handwired/magicforce68/magicforce68.c
new file mode 100644
index 000000000..84b1007e2
--- /dev/null
+++ b/keyboards/handwired/magicforce68/magicforce68.c
@@ -0,0 +1,8 @@
+#include "magicforce68.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h
new file mode 100644
index 000000000..cfcdce38d
--- /dev/null
+++ b/keyboards/handwired/magicforce68/magicforce68.h
@@ -0,0 +1,20 @@
+#ifndef MAGICFORCE68_H
+#define MAGICFORCE68_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \
+ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \
+ ) { \
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \
+ { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk
new file mode 100644
index 000000000..0e07bde40
--- /dev/null
+++ b/keyboards/handwired/magicforce68/rules.mk
@@ -0,0 +1,83 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+avrdude: build
+ ls /dev/tty* > /tmp/1; \
+ echo "Reset your Pro Micro now"; \
+ while [[ -z $$USB ]]; do \
+ sleep 1; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/handwired/minorca/Makefile b/keyboards/handwired/minorca/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/minorca/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h
new file mode 100644
index 000000000..4cdafcbd2
--- /dev/null
+++ b/keyboards/handwired/minorca/config.h
@@ -0,0 +1,80 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6660
+#define DEVICE_VER 0x0001
+#define MANUFACTURER ME
+#define PRODUCT MinOrca
+#define DESCRIPTION Tiny Whale
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/* MinOrca PCB default pin-out */
+#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
+#define MATRIX_ROW_PINS { B0, B1, B2, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/minorca/keymaps/default/Makefile b/keyboards/handwired/minorca/keymaps/default/Makefile
new file mode 100644
index 000000000..a573488a5
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/default/Makefile
@@ -0,0 +1,25 @@
+
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../../Makefile
+endif
diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h
new file mode 100644
index 000000000..bf40376c1
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/default/config.h
@@ -0,0 +1,12 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/* bootmagic salt key */
+#define BOOTMAGIC_KEY_SALT KC_ESC
+
+/* skip bootmagic and eeconfig */
+#define BOOTMAGIC_KEY_SKIP KC_SPACE
+
+#endif
diff --git a/keyboards/handwired/minorca/keymaps/default/keymap.c b/keyboards/handwired/minorca/keymaps/default/keymap.c
new file mode 100644
index 000000000..a55d578e4
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "minorca.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = { /* Base */
+ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
+ {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_ENT },
+ {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 },
+ {KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO }
+ },
+ [1] = { /* First */
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT },
+ {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI },
+ {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 },
+ {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO }
+ },
+ [2] = { /* Second */
+ {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT },
+ {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT },
+ {KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 },
+ {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO }
+ },
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(1), // to First overlay
+ [1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay
+
+}; \ No newline at end of file
diff --git a/keyboards/handwired/minorca/keymaps/default/readme.md b/keyboards/handwired/minorca/keymaps/default/readme.md
new file mode 100644
index 000000000..6ed31f82b
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# The Default Minorca Layout
+
+Copied from https://github.com/pancinteractive/qmk_firmware/blob/master/keyboard/minorca_mkV/keymaps/default/keymap.c
+
+It looks incomplete. \ No newline at end of file
diff --git a/keyboards/handwired/minorca/keymaps/readme.md b/keyboards/handwired/minorca/keymaps/readme.md
new file mode 100644
index 000000000..058923ba2
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/readme.md
@@ -0,0 +1,23 @@
+# How to add your own keymap
+
+Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`:
+
+ _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author]
+
+\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
+
+and contain the following files:
+
+* `keymap.c`
+* `readme.md` *recommended*
+* `config.h` *optional*, found automatically when compiling
+* `Makefile` *optional*, found automatically when compling
+
+When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format:
+
+ * **folder_name** description
+
+# List of Minorca keymaps
+
+* **default** default Minorca layout
+* **rgb** layout with WS2812b control
diff --git a/keyboards/handwired/minorca/keymaps/rgb/Makefile b/keyboards/handwired/minorca/keymaps/rgb/Makefile
new file mode 100644
index 000000000..2b2af1335
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/rgb/Makefile
@@ -0,0 +1,25 @@
+
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../../Makefile
+endif
diff --git a/keyboards/handwired/minorca/keymaps/rgb/config.h b/keyboards/handwired/minorca/keymaps/rgb/config.h
new file mode 100644
index 000000000..43b3c5911
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/rgb/config.h
@@ -0,0 +1,20 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/* bootmagic salt key */
+#define BOOTMAGIC_KEY_SALT KC_ESC
+
+/* skip bootmagic and eeconfig */
+#define BOOTMAGIC_KEY_SKIP KC_SPACE
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D5
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 13 // Number of LEDs
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
+
+#endif
diff --git a/keyboards/handwired/minorca/keymaps/rgb/keymap.c b/keyboards/handwired/minorca/keymaps/rgb/keymap.c
new file mode 100644
index 000000000..9002afbb8
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/rgb/keymap.c
@@ -0,0 +1,65 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "minorca.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _TB 3
+
+// Macro name shortcuts
+#define QWERTY M(_QWERTY)
+#define LOWER M(_LOWER)
+#define RAISE M(_RAISE)
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_QWERTY] = { /* Qwerty */
+ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
+ {FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT},
+ {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)},
+ {KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL}
+},
+
+[_RAISE] = {
+ {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)},
+ {KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT},
+ {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY}
+},
+
+[_LOWER] = {
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS},
+ {KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT},
+ {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END}
+},
+
+[_TB] = { /* Tab */
+ {KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS},
+ {KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT},
+ {BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT}
+}
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB),
+ [1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
+ [2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
+ [3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
+};
diff --git a/keyboards/handwired/minorca/keymaps/rgb/readme.md b/keyboards/handwired/minorca/keymaps/rgb/readme.md
new file mode 100644
index 000000000..ec3b4f00f
--- /dev/null
+++ b/keyboards/handwired/minorca/keymaps/rgb/readme.md
@@ -0,0 +1,25 @@
+#RGB backlight for MinOrca
+
+![wiring](https://i.imgur.com/jyYyiSS.jpg)
+
+Example of adding WS2812b LEDs to a MinOrca.
+
+http://www.40percent.club/2016/08/tiny-whale.html
+
+The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key.
+
+* Tab + Z Toggle on/off
+* Tab + X Mode
+* Tab + C Hue+
+* Tab + V Hue-
+* Tab + B Saturation+
+* Tab + N Saturation-
+* Tab + M Brightness+
+* Tab + , Brightness-
+
+Example wiring:
+
+WS2812 data pin is connected to D5
+
+![wiring](https://i.imgur.com/CFBf71F.jpg)
+![wiring closeup](https://i.imgur.com/VJogRoj.jpg)
diff --git a/keyboards/handwired/minorca/minorca.c b/keyboards/handwired/minorca/minorca.c
new file mode 100644
index 000000000..24e72c2a5
--- /dev/null
+++ b/keyboards/handwired/minorca/minorca.c
@@ -0,0 +1,6 @@
+#include "minorca.h"
+
+void matrix_init_kb(void) {
+
+ matrix_init_user();
+} \ No newline at end of file
diff --git a/keyboards/handwired/minorca/minorca.h b/keyboards/handwired/minorca/minorca.h
new file mode 100644
index 000000000..158e5b4c5
--- /dev/null
+++ b/keyboards/handwired/minorca/minorca.h
@@ -0,0 +1,6 @@
+#ifndef MINORCA_H
+#define MINORCA_H
+
+#include "quantum.h"
+
+#endif
diff --git a/keyboards/handwired/minorca/readme.md b/keyboards/handwired/minorca/readme.md
new file mode 100644
index 000000000..93c767954
--- /dev/null
+++ b/keyboards/handwired/minorca/readme.md
@@ -0,0 +1,33 @@
+minorca keyboard firmware
+======================
+Handwired 40% keyboard
+
+http://www.panc.co/blog/minorcasebright-information-page
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+```
+$ make KEYMAP=[default|jack|<name>]
+```
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
+
+### Notable forks (which some of the keymap files are from)
+- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck)
+- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c)
+- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck)
+- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid)
diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk
new file mode 100644
index 000000000..ce502b820
--- /dev/null
+++ b/keyboards/handwired/minorca/rules.mk
@@ -0,0 +1,67 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/Makefile b/keyboards/handwired/numpad20/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/numpad20/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h
new file mode 100644
index 000000000..847f2111f
--- /dev/null
+++ b/keyboards/handwired/numpad20/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xBB80
+#define PRODUCT_ID 0x0504
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Hexwire
+#define PRODUCT Numpad 20
+#define DESCRIPTION Handwired 4x5 numpad
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F6, B1, B3, B6, B5 }
+#define MATRIX_COL_PINS { D1, D0, F5, F4 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/numpad20/keymaps/default/keymap.c b/keyboards/handwired/numpad20/keymaps/default/keymap.c
new file mode 100644
index 000000000..37031206a
--- /dev/null
+++ b/keyboards/handwired/numpad20/keymaps/default/keymap.c
@@ -0,0 +1,16 @@
+#include "numpad20.h"
+
+#define KC_ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = COMPACT_KEYMAP(
+ LEFT,RGHT, UP ,DOWN, \
+ P7 , P8 , P9 ,PLUS, \
+ P4 , P5 , P6 ,MINS, \
+ P1 , P2 , P3 , ENT, \
+ P0 ,DOT ,RGHT, TAB \
+ )
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+};
diff --git a/keyboards/handwired/numpad20/numpad20.c b/keyboards/handwired/numpad20/numpad20.c
new file mode 100644
index 000000000..101cf2cb4
--- /dev/null
+++ b/keyboards/handwired/numpad20/numpad20.c
@@ -0,0 +1,8 @@
+#include "numpad20.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/numpad20/numpad20.h b/keyboards/handwired/numpad20/numpad20.h
new file mode 100644
index 000000000..191979be0
--- /dev/null
+++ b/keyboards/handwired/numpad20/numpad20.h
@@ -0,0 +1,20 @@
+#ifndef NUMPAD20_H
+#define NUMPAD20_H
+
+#include "quantum.h"
+
+#define COMPACT_KEYMAP( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, K13, \
+ K20, K21, K22, K23, \
+ K30, K31, K32, K33, \
+ K40, K41, K42, K43 \
+ ) { \
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03 }, \
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23 }, \
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33 }, \
+ { KC_##K40, KC_##K41, KC_##K42, KC_##K43 } \
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk
new file mode 100644
index 000000000..0e07bde40
--- /dev/null
+++ b/keyboards/handwired/numpad20/rules.mk
@@ -0,0 +1,83 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+avrdude: build
+ ls /dev/tty* > /tmp/1; \
+ echo "Reset your Pro Micro now"; \
+ while [[ -z $$USB ]]; do \
+ sleep 1; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/handwired/onekey/Makefile b/keyboards/handwired/onekey/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/onekey/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h
new file mode 100644
index 000000000..c0a6b5839
--- /dev/null
+++ b/keyboards/handwired/onekey/config.h
@@ -0,0 +1,75 @@
+/*
+Copyright 2015 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6464
+#define DEVICE_VER 0x0001
+#define MANUFACTURER none
+#define PRODUCT onekey
+#define DESCRIPTION test board for qmk
+
+/* key matrix size */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 1
+
+#define MATRIX_COL_PINS { B0 }
+#define MATRIX_ROW_PINS { D0 }
+#define UNUSED_PINS
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c
new file mode 100644
index 000000000..10c486718
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/default/keymap.c
@@ -0,0 +1,5 @@
+#include "onekey.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ {{ KC_A }}
+};
diff --git a/keyboards/handwired/onekey/onekey.c b/keyboards/handwired/onekey/onekey.c
new file mode 100644
index 000000000..c79e0120e
--- /dev/null
+++ b/keyboards/handwired/onekey/onekey.c
@@ -0,0 +1 @@
+#include "onekey.h" \ No newline at end of file
diff --git a/keyboards/handwired/onekey/onekey.h b/keyboards/handwired/onekey/onekey.h
new file mode 100644
index 000000000..7a4a4835e
--- /dev/null
+++ b/keyboards/handwired/onekey/onekey.h
@@ -0,0 +1 @@
+#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk
new file mode 100644
index 000000000..e5a953362
--- /dev/null
+++ b/keyboards/handwired/onekey/rules.mk
@@ -0,0 +1,65 @@
+
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/Makefile b/keyboards/handwired/ortho5x13/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h
new file mode 100644
index 000000000..f85159596
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xBB80
+#define PRODUCT_ID 0x050D
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Hexwire
+#define PRODUCT Ortho 5x13
+#define DESCRIPTION Handwired 5x13 ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 13
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 }
+#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
new file mode 100644
index 000000000..971099747
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
@@ -0,0 +1,289 @@
+#include "ortho5x13.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ LOWER,
+ RAISE,
+ BACKLIT
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+#define KC_L1 LOWER
+#define KC_L2 RAISE
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,------------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |
+ * |------+------+------+------+------+-------------+------+------+------+------+------+------|
+ * | ` | A | S | D | F | G | H | J | K | L | ; | ' | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | Up |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Bksp |Shift | Left | Down |Right |
+ * `------------------------------------------------------------------------------------------'
+ */
+[_QWERTY] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----+----+----+----+----+----+----+----.
+ ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,
+ //|----+----+----+----+----+----+----+----+----+----+----+----+----|
+ TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC,
+ //|----+----+----+----+----+----+----+----+----+----+----+----+----|
+ GRV , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,BSLS,
+ //|----+----+----+----+----+----+----+----+----+----+----+----+----|
+ LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENT , UP ,
+ //|----+----+----+----+----+---------+----+----+----+----+----+----|
+ HYPR,LCTL,LALT,LGUI, L1 , SPACE , L2 ,BSPC,RSFT,LEFT,RGHT,DOWN
+ //`----+----+----+----+----+---------+----+----+----+----+----+----'
+ ),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = {
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
+ {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL},
+ {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
+ {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+},
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = {
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
+ {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL},
+ {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
+ {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
+ {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
+ {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
+ {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Musoff|Mus on| | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+ {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, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
+ {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
+ {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+}
+
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_startup[][2] = {
+ {NOTE_B5, 20},
+ {NOTE_B6, 8},
+ {NOTE_DS6, 20},
+ {NOTE_B6, 8}
+};
+
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_dvorak[][2] = SONG(DVORAK_SOUND);
+float tone_colemak[][2] = SONG(COLEMAK_SOUND);
+
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+
+float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ return false;
+ break;
+ }
+ return true;
+};
+
+void matrix_init_user(void) {
+ #ifdef AUDIO_ENABLE
+ startup_user();
+ #endif
+}
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+ _delay_ms(20); // gets rid of tick
+ PLAY_NOTE_ARRAY(tone_startup, false, 0);
+}
+
+void shutdown_user()
+{
+ PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+ _delay_ms(150);
+ stop_all_notes();
+}
+
+void music_on_user(void)
+{
+ music_scale_user();
+}
+
+void music_scale_user(void)
+{
+ PLAY_NOTE_ARRAY(music_scale, false, 0);
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.c b/keyboards/handwired/ortho5x13/ortho5x13.c
new file mode 100644
index 000000000..cf8352cc4
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/ortho5x13.c
@@ -0,0 +1,8 @@
+#include "ortho5x13.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.h b/keyboards/handwired/ortho5x13/ortho5x13.h
new file mode 100644
index 000000000..d442212fe
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/ortho5x13.h
@@ -0,0 +1,36 @@
+#ifndef ORTHO5X13_H
+#define ORTHO5X13_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
+ k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \
+ { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b, k3c }, \
+ { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c } \
+}
+
+#define COMPACT_KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
+ k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
+) \
+{ \
+ { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, KC_##k0c }, \
+ { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, KC_##k1c }, \
+ { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, KC_##k2c }, \
+ { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c }, \
+ { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_NO, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c } \
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk
new file mode 100644
index 000000000..0e07bde40
--- /dev/null
+++ b/keyboards/handwired/ortho5x13/rules.mk
@@ -0,0 +1,83 @@
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+avrdude: build
+ ls /dev/tty* > /tmp/1; \
+ echo "Reset your Pro Micro now"; \
+ while [[ -z $$USB ]]; do \
+ sleep 1; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/handwired/pilcrow/Makefile b/keyboards/handwired/pilcrow/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/pilcrow/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h
new file mode 100644
index 000000000..d63eeba36
--- /dev/null
+++ b/keyboards/handwired/pilcrow/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER You
+#define PRODUCT pilcrow
+#define DESCRIPTION A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 10
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B4, F7, B1, B3 }
+#define MATRIX_COL_PINS { D4, C6, D7, E6, F5, F6, B6, B2, F4, B5}
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/pilcrow/keymaps/default/Makefile b/keyboards/handwired/pilcrow/keymaps/default/Makefile
new file mode 100644
index 000000000..f4671a9d1
--- /dev/null
+++ b/keyboards/handwired/pilcrow/keymaps/default/Makefile
@@ -0,0 +1,21 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/pilcrow/keymaps/default/config.h b/keyboards/handwired/pilcrow/keymaps/default/config.h
new file mode 100644
index 000000000..df06a2620
--- /dev/null
+++ b/keyboards/handwired/pilcrow/keymaps/default/config.h
@@ -0,0 +1,8 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/pilcrow/keymaps/default/keymap.c b/keyboards/handwired/pilcrow/keymaps/default/keymap.c
new file mode 100644
index 000000000..e382e4c6a
--- /dev/null
+++ b/keyboards/handwired/pilcrow/keymaps/default/keymap.c
@@ -0,0 +1,88 @@
+#include "pilcrow.h"
+#define _______ KC_TRNS
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = KEYMAP( \
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
+ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \
+ KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MT(MOD_LSFT, KC_SPC), MO(2), MO(3), KC_DEL, KC_ESC \
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[1] = KEYMAP( \
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_PIPE, S(KC_QUOT), \
+ _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_GRV \
+),
+[2] = KEYMAP( \
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
+ KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \
+ OSM(MOD_LSFT), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_BSLS, KC_QUOT, \
+ _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[3] = KEYMAP( \
+ RESET, KC_UP, _______, _______, _______, _______, _______, KC_MS_WH_DOWN, KC_MS_U, KC_MS_WH_UP, \
+ KC_LEFT, KC_DOWN, KC_RIGHT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_MS_L,KC_MS_D, KC_MS_R, \
+ RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, \
+ _______, _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, _______, _______, _______ \
+)
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+} \ No newline at end of file
diff --git a/keyboards/handwired/pilcrow/keymaps/default/readme.md b/keyboards/handwired/pilcrow/keymaps/default/readme.md
new file mode 100644
index 000000000..95472dfca
--- /dev/null
+++ b/keyboards/handwired/pilcrow/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for pilcrow \ No newline at end of file
diff --git a/keyboards/handwired/pilcrow/pilcrow.c b/keyboards/handwired/pilcrow/pilcrow.c
new file mode 100644
index 000000000..c8243df7b
--- /dev/null
+++ b/keyboards/handwired/pilcrow/pilcrow.c
@@ -0,0 +1,28 @@
+#include "pilcrow.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/handwired/pilcrow/pilcrow.h b/keyboards/handwired/pilcrow/pilcrow.h
new file mode 100644
index 000000000..7138ccb3f
--- /dev/null
+++ b/keyboards/handwired/pilcrow/pilcrow.h
@@ -0,0 +1,23 @@
+#ifndef PILCROW_H
+#define PILCROW_H
+
+#include "quantum.h"
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguements
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 } \
+}
+
+#endif
diff --git a/keyboards/handwired/pilcrow/readme.md b/keyboards/handwired/pilcrow/readme.md
new file mode 100644
index 000000000..7a7f6d2af
--- /dev/null
+++ b/keyboards/handwired/pilcrow/readme.md
@@ -0,0 +1,28 @@
+pilcrow keyboard firmware
+======================
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme](/).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/pilcrow folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+
+To build with the default keymap, simply run `make default`.
+
+### Other Keymaps
+
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
+```
+$ make [default|jack|<name>]
+```
+
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/pilcrow/rules.mk b/keyboards/handwired/pilcrow/rules.mk
new file mode 100644
index 000000000..67badc820
--- /dev/null
+++ b/keyboards/handwired/pilcrow/rules.mk
@@ -0,0 +1,67 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/handwired/promethium/Makefile b/keyboards/handwired/promethium/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/promethium/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/promethium/color.h b/keyboards/handwired/promethium/color.h
new file mode 100644
index 000000000..077242d5f
--- /dev/null
+++ b/keyboards/handwired/promethium/color.h
@@ -0,0 +1,15 @@
+#define COLOR_BLANK 0, 0, 0
+
+#define COLOR_BLACK 0, 0, 0
+#define COLOR_WHITE 15,15,15
+#define COLOR_GRAY 7, 7, 7
+
+#define COLOR_RED 15, 0, 0
+#define COLOR_GREEN 0,15, 0
+#define COLOR_BLUE 0, 0,15
+
+#define COLOR_YELLOW 15,15, 0
+#define COLOR_MAGENTA 15, 0,15
+#define COLOR_CYAN 0,15,15
+
+#define COLOR_ORANGE 15, 5, 0 \ No newline at end of file
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h
new file mode 100644
index 000000000..efb9ebdd7
--- /dev/null
+++ b/keyboards/handwired/promethium/config.h
@@ -0,0 +1,356 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+#define USB_VENDOR_ID_LENOVO 0x17ef
+#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009
+#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047
+#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048
+#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID USB_VENDOR_ID_LENOVO
+#define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Priyadi
+#define PRODUCT Promethium Keyboard
+#define DESCRIPTION
+
+/* key matrix size */
+#define MATRIX_COLS 6
+#define MATRIX_ROWS 9
+
+/* default pin-out */
+#define MATRIX_COL_PINS { F4, F1, F0, D6, D0, D1 }
+#define MATRIX_ROW_PINS { F5, F6, F7 }
+#define TRACKPOINT_PINS { B7, B6, D7 }
+#define UNUSED_PINS
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+// #define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+// #define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#define PS2_MOUSE_INIT_DELAY 2000
+#define BATTERY_PIN 9
+#define BATTERY_POLL 30000
+#define MAX_VOLTAGE 4.2
+#define MIN_VOLTAGE 3.2
+
+#define ___ KC_NO
+
+#define KEYMAP( \
+ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
+ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
+ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
+ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
+ tp1, tp2, tp3 \
+) \
+{ \
+ {k11, k12, k13, k14, k15, k16}, \
+ {k21, k22, k23, k24, k25, k26}, \
+ {k31, k32, k33, k34, k35, k36}, \
+ {k41, k42, k43, k44, k45, k46}, \
+ {k17, k18, k19, k1a, k1b, k1c}, \
+ {k27, k28, k29, k2a, k2b, k2c}, \
+ {k37, k38, k39, k3a, k3b, k3c}, \
+ {k47, k48, k49, k4a, k4b, k4c}, \
+ {tp1, tp2, tp3, ___, ___, ___} \
+}
+
+#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file
+enum led_sequence {
+ LED_IND_LINUX,
+ LED_IND_APPLE,
+ LED_IND_WINDOWS,
+ LED_IND_QWERTY,
+ LED_IND_ALT,
+ LED_IND_AUDIO,
+ LED_IND_BLUETOOTH,
+ LED_IND_USB,
+
+ LED_IND_BATTERY,
+ LED_IND_CAPSLOCK,
+ LED_IND_GUI,
+ LED_IND_FUN,
+ LED_IND_NUM,
+ LED_IND_PUNC,
+ LED_IND_EMOJI,
+ LED_IND_GREEK,
+
+ LED_BKSP,
+ LED_ENT,
+ LED_RSFT,
+ LED_RCTL,
+
+ LED_RALT,
+ LED_SLSH,
+ LED_SCLN,
+ LED_P,
+
+ LED_O,
+ LED_L,
+ LED_DOT,
+ LED_RGUI,
+
+ LED_GREEK,
+ LED_COMM,
+ LED_K,
+ LED_I,
+
+ LED_U,
+ LED_J,
+ LED_M,
+ LED_FUN,
+
+ LED_RSPC,
+ LED_N,
+ LED_HH,
+ LED_Y,
+
+ LED_TRACKPOINT3,
+ LED_TRACKPOINT2,
+ LED_TRACKPOINT1,
+
+ LED_T,
+ LED_G,
+ LED_B,
+ LED_LSPC,
+
+ LED_NUM,
+ LED_V,
+ LED_F,
+ LED_R,
+
+ LED_E,
+ LED_D,
+ LED_C,
+ LED_EMPTY,
+
+ LED_LGUI,
+ LED_X,
+ LED_S,
+ LED_W,
+
+ LED_Q,
+ LED_A,
+ LED_Z,
+ LED_LALT,
+
+ LED_LCTL,
+ LED_LSFT,
+ LED_ESC,
+ LED_TAB,
+
+ LED_TOTAL
+};
+
+#define RGB_DI_PIN B5
+#define RGBSPS_NUM LED_TOTAL
+#endif
+
+/* PS/2 mouse */
+#ifdef PS2_USE_BUSYWAIT
+# define PS2_CLOCK_PORT PORTD
+# define PS2_CLOCK_PIN PIND
+# define PS2_CLOCK_DDR DDRD
+# define PS2_CLOCK_BIT 3
+# define PS2_DATA_PORT PORTD
+# define PS2_DATA_PIN PIND
+# define PS2_DATA_DDR DDRD
+# define PS2_DATA_BIT 2
+#endif
+
+/* PS/2 mouse interrupt version */
+#ifdef PS2_USE_INT
+/* uses INT1 for clock line(ATMega32U4) */
+#define PS2_CLOCK_PORT PORTD
+#define PS2_CLOCK_PIN PIND
+#define PS2_CLOCK_DDR DDRD
+#define PS2_CLOCK_BIT 3
+#define PS2_DATA_PORT PORTD
+#define PS2_DATA_PIN PIND
+#define PS2_DATA_DDR DDRD
+#define PS2_DATA_BIT 2
+
+#define PS2_INT_INIT() do { \
+ EICRA |= ((1<<ISC31) | \
+ (0<<ISC30)); \
+} while (0)
+#define PS2_INT_ON() do { \
+ EIMSK |= (1<<INT3); \
+} while (0)
+#define PS2_INT_OFF() do { \
+ EIMSK &= ~(1<<INT3); \
+} while (0)
+#define PS2_INT_VECT INT3_vect
+#endif
+
+/* PS/2 mouse USART version */
+#ifdef PS2_USE_USART
+/* XCK for clock line and RXD for data line */
+#define PS2_CLOCK_PORT PORTD
+#define PS2_CLOCK_PIN PIND
+#define PS2_CLOCK_DDR DDRD
+#define PS2_CLOCK_BIT 5
+#define PS2_DATA_PORT PORTD
+#define PS2_DATA_PIN PIND
+#define PS2_DATA_DDR DDRD
+#define PS2_DATA_BIT 2
+
+/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
+/* set DDR of CLOCK as input to be slave */
+#define PS2_USART_INIT() do { \
+ PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
+ PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
+ UCSR1C = ((1 << UMSEL10) | \
+ (3 << UPM10) | \
+ (0 << USBS1) | \
+ (3 << UCSZ10) | \
+ (0 << UCPOL1)); \
+ UCSR1A = 0; \
+ UBRR1H = 0; \
+ UBRR1L = 0; \
+} while (0)
+#define PS2_USART_RX_INT_ON() do { \
+ UCSR1B = ((1 << RXCIE1) | \
+ (1 << RXEN1)); \
+} while (0)
+#define PS2_USART_RX_POLL_ON() do { \
+ UCSR1B = (1 << RXEN1); \
+} while (0)
+#define PS2_USART_OFF() do { \
+ UCSR1C = 0; \
+ UCSR1B &= ~((1 << RXEN1) | \
+ (1 << TXEN1)); \
+} while (0)
+#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
+#define PS2_USART_RX_DATA UDR1
+#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
+#define PS2_USART_RX_VECT USART1_RX_vect
+#endif
+
+
+#endif
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile
new file mode 100644
index 000000000..bd1a06734
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile
@@ -0,0 +1,31 @@
+
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+UNICODEMAP_ENABLE = yes
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+PS2_MOUSE_ENABLE = yes
+PS2_USE_INT = yes
+FAUXCLICKY_ENABLE = yes
+BLUETOOTH = AdafruitBLE
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../../Makefile
+endif
+
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md
new file mode 100644
index 000000000..48824b9f7
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md
@@ -0,0 +1,44 @@
+Priyadi Keymap for Planck-like Keyboards
+========================================
+
+Main layer modifications from default Planck layout:
+
+* Enter moved to quotes position
+* Quotes moved to semicolon position.
+* QWERTZ style colon & semicolon. shift-. = : shift-, = ; This is done in hardware, no layout switching needed in software.
+* < & > occupied precious real estate, and so they are moved down to punctuation layer.
+* Right-shift on Enter position.
+* Removed arrow keys, they are on another layer now.
+* Put Ctrl-Alt-Super and Super-AltGr-Ctrl in left & right corners.
+* Lower & Raise is now called Num and Fun.
+* OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet)
+
+On Promethium, Trackpoint is enabled on PD2 and PD3. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification).
+
+AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr.
+
+Supported layouts: QWERTY, DVORAK, Colemak, Workman, Norman. Switchable from SYS layer. In DVORAK, semicolon is replaced by /? key.
+
+Num activates NUM layer: hexkeypad on the right side and most punctuation on the left side. Hexkeypad is optimized for C-style hex, IPv6, HTML RGB triplets, etc.
+
+Fun activates FUN layer: arrow cluster on right home row, F-numbers on left side.
+
+Pressing Num+Fun activates PUNC layer: same punctuations as NUM layer on the left side, parens on the right side.
+
+Greek activates either GREEKU or GREEKL layer, depending whether shift is pressed or not. Shift state changes are also taken into account when the layer is active.
+
+Greek+Empty activates EMOJI layer. The whole keyboard now outputs emojis!
+
+Pressing both spacebars (spacekeys, actually) activates GUI layer. QWERTYUIOP switches to a virtual desktop. J & L switches virtual desktop to the left or right. S & F behaves like Alt-Tab and Alt-Shift-Tab. This works by sending Alt press when entering the layer, and Alt release when other than S or F keys are pressed.
+
+Pressing both Ctrls activates SYS layer for configuring the keyboard.
+
+On Promethium, USB or Bluetooth output is detected on startup. If USB is connected, then USB is used initially. SYS-U and SYS-B switch output to USB or Bluetooth at runtime. Current active output is indicated with LEDs.
+
+SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively.
+
+SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases.
+
+On Promethium there are 16 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 67 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes.
+
+On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h
new file mode 100644
index 000000000..fa86e2247
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define PRIYADI_PROMETHIUM
+
+/* bootmagic salt key */
+#define BOOTMAGIC_KEY_SALT KC_ESC
+
+/* skip bootmagic and eeconfig */
+#define BOOTMAGIC_KEY_SKIP KC_SPACE
+
+#define PREVENT_STUCK_MODIFIERS
+
+#define RGBSPS_ENABLE
+#define RGBSPS_DEMO_ENABLE
+
+#define UNICODE_TYPE_DELAY 0
+
+#define LAYOUT_DVORAK
+#define LAYOUT_COLEMAK
+#define LAYOUT_NORMAN
+#define LAYOUT_WORKMAN
+
+#define DOUBLESPACE_LAYER_ENABLE
+// #define TOLELOT_ENABLE
+
+#endif
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
new file mode 100755
index 000000000..14a3b4378
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+sleep 10
+avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
new file mode 100644
index 000000000..763fa5a27
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -0,0 +1,1368 @@
+/*
+Copyright 2017 Priyadi Iman Nurcahyo
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined(PRIYADI_PROMETHIUM)
+ #include "promethium.h"
+#elif defined(PRIYADI_PLANCK)
+ #include "planck.h"
+#else
+ #error "no keyboard defined"
+#endif
+
+#include "action_layer.h"
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+ #include "musical_notes.h"
+#endif
+#include "eeconfig.h"
+#include "process_unicode.h"
+#include "quantum.h"
+#ifdef RGBSPS_ENABLE
+#include "rgbsps.h"
+#include "rgbtheme.h"
+#endif
+#ifdef PS2_MOUSE_ENABLE
+#include "ps2_mouse.h"
+#include "ps2.h"
+#endif
+#ifdef FAUXCLICKY_ENABLE
+#include "fauxclicky.h"
+#ifdef RGBSPS_ENABLE
+#undef FAUXCLICKY_OFF
+#define FAUXCLICKY_OFF do { \
+ fauxclicky_enabled = false; \
+ rgbsps_set(LED_AUDIO, COLOR_BLANK); \
+ fauxclicky_stop(); \
+} while (0)
+#undef FAUXCLICKY_ON
+#define FAUXCLICKY_ON do { \
+ fauxclicky_enabled = true; \
+ rgbsps_set(LED_AUDIO, THEME_COLOR_AUDIO); \
+} while (0)
+#endif
+#endif
+#include "outputselect.h"
+#include "led.h"
+#define COUNT(x) (sizeof (x) / sizeof (*(x)))
+
+// Fillers to make layering clearer
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+#define G(x) LGUI(x)
+#define KC_WWWB KC_WWW_BACK
+#define KC_WWWF KC_WWW_FORWARD
+
+// hybrid right-alt & scroll lock (mapped to Compose in OS)
+#define C_RALT MT(MOD_RALT, KC_SLCK)
+
+// dual use right-shift & del key
+// #define C_RSFT MT(MOD_RSFT, KC_DEL)
+
+bool capslock = false;
+#ifdef DOUBLESPACE_LAYER_ENABLE
+bool lspace_active = false;
+bool rspace_active = false;
+bool lspace_emitted = false;
+bool rspace_emitted = false;
+bool space_layer_entered = false;
+#endif
+
+// glow
+enum glow_modes {
+ GLOW_NONE,
+ GLOW_MIN,
+ GLOW_FULL
+};
+uint8_t glow_mode = GLOW_MIN;
+
+void turn_off_capslock(void);
+extern keymap_config_t keymap_config;
+
+// layers, ordering is important!
+enum layers {
+ _QWERTY,
+ _DVORAK,
+ _COLEMAK,
+ _WORKMAN,
+ _NORMAN,
+ _DEFAULT_LAYER_MAX = _NORMAN,
+
+ _GREEKU,
+ _GREEKL,
+
+ _NUM,
+ _FUN,
+ _PUNC,
+
+ _EMPTY,
+ _EMOJI,
+ _GUI,
+ _SYS
+};
+
+// double-space layer
+#define _SPACE _GUI
+
+enum planck_keycodes {
+ // layouts
+ QWERTY = SAFE_RANGE,
+ DVORAK,
+ COLEMAK,
+ WORKMAN,
+ NORMAN,
+
+ // layer switchers
+ EMOJI,
+ GUI,
+ GREEK,
+
+ // os switchers
+ LINUX,
+ WIN,
+ OSX,
+
+ // others
+ LSPACE,
+ RSPACE,
+ GLOW,
+
+ // stub
+#ifndef FAUXCLICKY_ENABLE
+ FC_TOG,
+#endif
+#ifndef MODULE_ADAFRUIT_BLE
+ OUT_BT,
+#endif
+ RGBDEMO,
+ KEYCODE_END
+};
+
+#define EMPTY MO(_EMPTY)
+#define NUM MO(_NUM)
+#define FUN MO(_FUN)
+#define FUN0 LT(_FUN, KC_0)
+
+// unicode map
+
+enum unicode_name {
+ GRIN, // grinning face 😊
+ TJOY, // tears of joy 😂
+ SMILE, // grining face with smiling eyes 😁
+ HEART, // heart ❤
+ EYERT, // smiling face with heart shaped eyes 😍
+ CRY, // crying face 😭
+ SMEYE, // smiling face with smiling eyes 😊
+ UNAMU, // unamused 😒
+ KISS, // kiss 😘
+ HART2, // two hearts 💕
+ WEARY, // weary 😩
+ OKHND, // ok hand sign 👌
+ PENSV, // pensive 😔
+ SMIRK, // smirk 😏
+ RECYC, // recycle ♻
+ WINK, // wink 😉
+ THMUP, // thumb up 👍
+ THMDN, // thumb down 👎
+ PRAY, // pray 🙏
+ PHEW, // relieved 😌
+ MUSIC, // musical notes
+ FLUSH, // flushed 😳
+ CELEB, // celebration 🙌
+ CRY2, // crying face 😢
+ COOL, // smile with sunglasses 😎
+ NOEVS, // see no evil
+ NOEVH, // hear no evil
+ NOEVK, // speak no evil
+ POO, // pile of poo
+ EYES, // eyes
+ VIC, // victory hand
+ BHART, // broken heart
+ SLEEP, // sleeping face
+ SMIL2, // smiling face with open mouth & sweat
+ HUNRD, // 100
+ CONFU, // confused
+ TONGU, // face with tongue & winking eye
+ DISAP, // disappointed
+ YUMMY, // face savoring delicious food
+ CLAP, // hand clapping
+ FEAR, // face screaming in fear
+ HORNS, // smiling face with horns
+ HALO, // smiling face with halo
+ BYE, // waving hand
+ SUN, // sun
+ MOON, // moon
+ SKULL, // skull
+
+ // greek letters
+ UALPH,
+ UBETA,
+ UGAMM,
+ UDELT,
+ UEPSI,
+ UZETA,
+ UETA,
+ UTHET,
+ UIOTA,
+ UKAPP,
+ ULAMB,
+ UMU,
+ UNU,
+ UXI,
+ UOMIC,
+ UPI,
+ URHO,
+ USIGM,
+ UTAU,
+ UUPSI,
+ UPHI,
+ UCHI,
+ UPSI,
+ UOMEG,
+
+ LALPH,
+ LBETA,
+ LGAMM,
+ LDELT,
+ LEPSI,
+ LZETA,
+ LETA,
+ LTHET,
+ LIOTA,
+ LKAPP,
+ LLAMB,
+ LMU,
+ LNU,
+ LXI,
+ LOMIC,
+ LPI,
+ LRHO,
+ LSIGM,
+ LTAU,
+ LUPSI,
+ LPHI,
+ LCHI,
+ LPSI,
+ LOMEG,
+
+ FSIGM,
+
+ LTEQ,
+ GTEQ,
+ NOTEQ,
+ PLMIN,
+};
+
+const uint32_t PROGMEM unicode_map[] = {
+ [GRIN] = 0x1F600,
+ [TJOY] = 0x1F602,
+ [SMILE] = 0x1F601,
+ [HEART] = 0x2764,
+ [EYERT] = 0x1f60d,
+ [CRY] = 0x1f62d,
+ [SMEYE] = 0x1F60A,
+ [UNAMU] = 0x1F612,
+ [KISS] = 0x1F618,
+ [HART2] = 0x1F495,
+ [WEARY] = 0x1F629,
+ [OKHND] = 0x1F44C,
+ [PENSV] = 0x1F614,
+ [SMIRK] = 0x1F60F,
+ [RECYC] = 0x267B,
+ [WINK] = 0x1F609,
+ [THMUP] = 0x1F44D,
+ [THMDN] = 0x1F44E,
+ [PRAY] = 0x1F64F,
+ [PHEW] = 0x1F60C,
+ [MUSIC] = 0x1F3B6,
+ [FLUSH] = 0x1F633,
+ [CELEB] = 0x1F64C,
+ [CRY2] = 0x1F622,
+ [COOL] = 0x1F60E,
+ [NOEVS] = 0x1F648,
+ [NOEVH] = 0x1F649,
+ [NOEVK] = 0x1F64A,
+ [POO] = 0x1F4A9,
+ [EYES] = 0x1F440,
+ [VIC] = 0x270C,
+ [BHART] = 0x1F494,
+ [SLEEP] = 0x1F634,
+ [SMIL2] = 0x1F605,
+ [HUNRD] = 0x1F4AF,
+ [CONFU] = 0x1F615,
+ [TONGU] = 0x1F61C,
+ [DISAP] = 0x1F61E,
+ [YUMMY] = 0x1F60B,
+ [CLAP] = 0x1F44F,
+ [FEAR] = 0x1F631,
+ [HORNS] = 0x1F608,
+ [HALO] = 0x1F607,
+ [BYE] = 0x1F44B,
+ [SUN] = 0x2600,
+ [MOON] = 0x1F314,
+ [SKULL] = 0x1F480,
+
+ // greek letters
+ [UALPH] = 0x0391,
+ [UBETA] = 0x0392,
+ [UGAMM] = 0x0393,
+ [UDELT] = 0x0394,
+ [UEPSI] = 0x0395,
+ [UZETA] = 0x0396,
+ [UETA] = 0x0397,
+ [UTHET] = 0x0398,
+ [UIOTA] = 0x0399,
+ [UKAPP] = 0x039A,
+ [ULAMB] = 0x039B,
+ [UMU] = 0x039C,
+ [UNU] = 0x039D,
+ [UXI] = 0x039E,
+ [UOMIC] = 0x039F,
+ [UPI] = 0x03A0,
+ [URHO] = 0x03A1,
+ [USIGM] = 0x03A3,
+ [UTAU] = 0x03A4,
+ [UUPSI] = 0x03A5,
+ [UPHI] = 0x03A6,
+ [UCHI] = 0x03A7,
+ [UPSI] = 0x03A8,
+ [UOMEG] = 0x03A9,
+ [LALPH] = 0x03B1,
+ [LBETA] = 0x03B2,
+ [LGAMM] = 0x03B3,
+ [LDELT] = 0x03B4,
+ [LEPSI] = 0x03B5,
+ [LZETA] = 0x03B6,
+ [LETA] = 0x03B7,
+ [LTHET] = 0x03B8,
+ [LIOTA] = 0x03B9,
+ [LKAPP] = 0x03BA,
+ [LLAMB] = 0x03BB,
+ [LMU] = 0x03BC,
+ [LNU] = 0x03BD,
+ [LXI] = 0x03BE,
+ [LOMIC] = 0x03BF,
+ [LPI] = 0x03C0,
+ [LRHO] = 0x03C1,
+ [LSIGM] = 0x03C3,
+ [LTAU] = 0x03C4,
+ [LUPSI] = 0x03C5,
+ [LPHI] = 0x03C6,
+ [LCHI] = 0x03C7,
+ [LPSI] = 0x03C8,
+ [LOMEG] = 0x03C9,
+ [FSIGM] = 0x03C2,
+
+ // other
+ [LTEQ] = 0x2264, // less than or equal
+ [GTEQ] = 0x2265, // greater than or equal
+ [NOTEQ] = 0x2260, // not equal
+ [PLMIN] = 0xB1, // plus minus
+};
+
+// RGBSPS
+
+#ifdef RGBSPS_ENABLE
+const uint8_t PROGMEM LED_ALNUM[] = {
+ LED_Z,
+ LED_A,
+ LED_Q,
+ LED_W,
+ LED_S,
+ LED_X,
+ LED_C,
+ LED_D,
+ LED_E,
+ LED_R,
+ LED_F,
+ LED_V,
+ LED_B,
+ LED_G,
+ LED_T,
+ LED_N,
+ LED_HH,
+ LED_Y,
+ LED_U,
+ LED_J,
+ LED_M,
+ LED_COMM,
+ LED_K,
+ LED_I,
+ LED_O,
+ LED_L,
+ LED_DOT,
+ LED_SLSH,
+ LED_SCLN,
+ LED_P,
+ LED_LSPC,
+ LED_RSPC
+};
+
+const uint8_t PROGMEM LED_HOMING[] = {
+ LED_A,
+ LED_S,
+ LED_D,
+ LED_F,
+ LED_J,
+ LED_K,
+ LED_L,
+ LED_SCLN
+};
+
+const uint8_t PROGMEM LED_MODS[] = {
+ LED_TAB,
+ LED_ESC,
+ LED_LSFT,
+ LED_LCTL,
+ LED_LGUI,
+ LED_LALT,
+ LED_RALT,
+ LED_RGUI,
+ LED_BKSP,
+ LED_ENT,
+ LED_RSFT,
+ LED_RCTL
+};
+
+const uint8_t PROGMEM LED_FN[] = {
+ LED_EMPTY,
+ LED_NUM,
+ LED_FUN,
+ LED_GREEK
+};
+
+const uint8_t PROGMEM LED_INDICATORS[] = {
+ LED_IND_LINUX,
+ LED_IND_APPLE,
+ LED_IND_WINDOWS,
+ LED_IND_QWERTY,
+ LED_IND_ALT,
+ LED_IND_AUDIO,
+ LED_IND_BLUETOOTH,
+ LED_IND_USB,
+
+ LED_IND_BATTERY,
+ LED_IND_CAPSLOCK,
+ LED_IND_GUI,
+ LED_IND_FUN,
+ LED_IND_NUM,
+ LED_IND_PUNC,
+ LED_IND_EMOJI,
+ LED_IND_GREEK,
+};
+
+const uint8_t PROGMEM LED_TRACKPOINT[] = {
+ LED_TRACKPOINT1,
+ LED_TRACKPOINT2,
+ LED_TRACKPOINT3,
+};
+
+void led_turnoff_keys(void) {
+ for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
+ rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), COLOR_BLACK);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
+ rgbsps_set(pgm_read_byte(&LED_MODS[i]), COLOR_BLACK);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
+ rgbsps_set(pgm_read_byte(&LED_FN[i]), COLOR_BLACK);
+ }
+}
+
+#ifdef RGBSPS_DEMO_ENABLE
+void led_demo(void) {
+ rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX);
+ rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE);
+ rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS);
+ rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY);
+ rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT);
+ rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
+ rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH);
+ rgbsps_set(LED_IND_USB, THEME_COLOR_USB);
+ rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
+ rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI);
+ rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN);
+ rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM);
+ rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC);
+ rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK);
+ rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI);
+ rgbsps_send();
+}
+#endif
+
+void led_reset(void) {
+ switch (glow_mode) {
+ case GLOW_NONE:
+ led_turnoff_keys();
+ break;
+ case GLOW_MIN:
+ led_turnoff_keys();
+ for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
+ rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW1_HOME);
+ }
+ rgbsps_set(LED_F, THEME_COLOR_GLOW1_HOMING);
+ rgbsps_set(LED_J, THEME_COLOR_GLOW1_HOMING);
+ break;
+ case GLOW_FULL:
+ for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
+ rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), THEME_COLOR_GLOW2_ALPHA);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
+ rgbsps_set(pgm_read_byte(&LED_MODS[i]), THEME_COLOR_GLOW2_MODS);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
+ rgbsps_set(pgm_read_byte(&LED_FN[i]), THEME_COLOR_GLOW2_FN);
+ }
+ for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
+ rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW2_HOME);
+ }
+ rgbsps_set(LED_F, THEME_COLOR_GLOW2_HOMING);
+ rgbsps_set(LED_J, THEME_COLOR_GLOW2_HOMING);
+ break;
+ }
+}
+
+void led_set_default_layer_indicator(void) {
+ uint8_t default_layer = biton32(default_layer_state);
+ if (default_layer == _QWERTY) {
+ rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY);
+ rgbsps_set(LED_IND_ALT, COLOR_BLANK);
+ } else {
+ rgbsps_set(LED_IND_QWERTY, COLOR_BLANK);
+ rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT);
+ }
+ rgbsps_send();
+ return;
+}
+
+void led_set_layer_indicator(void) {
+ static uint8_t oldlayer = 255;
+
+ led_reset();
+
+ rgbsps_set(LED_IND_GUI, COLOR_BLANK);
+ rgbsps_set(LED_IND_FUN, COLOR_BLANK);
+ rgbsps_set(LED_IND_NUM, COLOR_BLANK);
+ rgbsps_set(LED_IND_PUNC, COLOR_BLANK);
+ rgbsps_set(LED_IND_GREEK, COLOR_BLANK);
+ rgbsps_set(LED_IND_EMOJI, COLOR_BLANK);
+
+ uint8_t layer = biton32(layer_state);
+ if (oldlayer == layer) {
+ return;
+ }
+
+ oldlayer = layer;
+
+ if (layer <= _DEFAULT_LAYER_MAX) {
+ rgbsps_send();
+ return;
+ }
+
+ switch(layer) {
+ case _GUI:
+ rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI);
+ break;
+ case _FUN:
+ rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN);
+ break;
+ case _NUM:
+ rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM);
+ break;
+ case _PUNC:
+ rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC);
+ break;
+ case _GREEKL:
+ case _GREEKU:
+ rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK);
+ break;
+ case _EMOJI:
+ rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI);
+ break;
+ default:
+ rgbsps_set(LED_IND_GUI, THEME_COLOR_OTHERLAYER);
+ rgbsps_set(LED_IND_FUN, THEME_COLOR_OTHERLAYER);
+ rgbsps_set(LED_IND_NUM, THEME_COLOR_OTHERLAYER);
+ rgbsps_set(LED_IND_PUNC, THEME_COLOR_OTHERLAYER);
+ rgbsps_set(LED_IND_GREEK, THEME_COLOR_OTHERLAYER);
+ rgbsps_set(LED_IND_EMOJI, THEME_COLOR_OTHERLAYER);
+ }
+
+ rgbsps_send();
+}
+
+void led_set_unicode_input_mode(void) {
+ rgbsps_set(LED_IND_LINUX, COLOR_BLANK);
+ rgbsps_set(LED_IND_APPLE, COLOR_BLANK);
+ rgbsps_set(LED_IND_WINDOWS, COLOR_BLANK);
+
+ switch (get_unicode_input_mode()) {
+ case UC_LNX:
+ rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX);
+ break;
+ case UC_OSX:
+ rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE);
+ break;
+ case UC_WIN:
+ case UC_WINC:
+ rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS);
+ break;
+ }
+ rgbsps_send();
+}
+
+void led_set_output_ble(void) {
+ rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH);
+ rgbsps_set(LED_IND_USB, COLOR_BLANK);
+ rgbsps_send();
+}
+
+void led_set_output_usb(void) {
+ rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK);
+ rgbsps_set(LED_IND_USB, THEME_COLOR_USB);
+ rgbsps_send();
+}
+
+void led_set_output_none(void) {
+ rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK);
+ rgbsps_set(LED_IND_USB, COLOR_BLANK);
+ rgbsps_send();
+}
+
+void led_init(void) {
+ // turn off all
+ rgbsps_turnoff();
+
+ // set trackpoint color
+ rgbsps_set(LED_TRACKPOINT1, THEME_COLOR_TP1);
+ rgbsps_set(LED_TRACKPOINT2, THEME_COLOR_TP2);
+ rgbsps_set(LED_TRACKPOINT3, THEME_COLOR_TP3);
+
+ // unicode input mode
+ led_set_unicode_input_mode();
+
+ // layer indicator
+ led_set_layer_indicator();
+ led_set_default_layer_indicator();
+
+ // clicky
+#ifdef FAUXCLICKY_ENABLE
+ if (fauxclicky_enabled) {
+ rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
+ } else {
+ rgbsps_set(LED_IND_AUDIO, COLOR_BLANK);
+ }
+#endif
+
+ rgbsps_send();
+}
+
+
+#endif // RGBSPS_ENABLE
+
+// keymaps
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = KEYMAP(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT ,
+ 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_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL,
+ _______, _______, _______
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
+ * `-----------------------------------------------------------------------------------'
+ */
+#ifdef LAYOUT_DVORAK
+[_DVORAK] = KEYMAP(
+ _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
+ _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______,
+ _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+#endif
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+#ifdef LAYOUT_COLEMAK
+[_COLEMAK] = KEYMAP(
+ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
+ _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+#endif
+
+/* Norman
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+#ifdef LAYOUT_NORMAN
+[_NORMAN] = KEYMAP(
+ _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______,
+ _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+#endif
+
+/* Workman
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+#ifdef LAYOUT_WORKMAN
+[_WORKMAN] = KEYMAP(
+ _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
+ _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
+ _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+#endif
+
+/* Punc
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ≤ | ≥ | ` |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | * | \ | - | = | / | ≠ | ( | ) | < | > | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | : | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_PUNC] = KEYMAP(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______,
+ KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______,
+ KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______,
+ _______, _______, _______
+),
+
+/* Num
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | x | | | | | 0 | , | . | : | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_NUM] = KEYMAP(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______,
+ KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
+ KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______,
+ _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______,
+ _______, _______, _______
+),
+
+/* Func
+ * ,-----------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Caps | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F9 | F10 | F11 | F12 |Pause | | | Home | End | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FUN] = KEYMAP(
+ XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL,
+ KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______,
+ _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+
+/* Uppercase Greek
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_GREEKU] = KEYMAP(
+ _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______,
+ _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______,
+ _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+
+/* Lowercase Greek
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_GREEKL] = KEYMAP(
+ _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______,
+ _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______,
+ _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+
+/* Empty
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_EMPTY] = KEYMAP(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______
+),
+
+/* Emoji
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_EMOJI] = KEYMAP(
+ X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW),
+ X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS),
+ X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH),
+ X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK),
+ _______, _______, _______
+),
+
+/* GUI
+ * ,-----------------------------------------------------------------------------------.
+ * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | | Btab | Esc | Tab | | | Prev | | Next | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | Prev | Play | Next | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_GUI] = KEYMAP(
+ XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX,
+ KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, _______, _______
+),
+
+/* Sys
+ * ,-----------------------------------------------------------------------------------.
+ * | |Qwerty| Win | |Reset | | | USB | | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | |Colmak| | BLE |Norman|MacOS | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_SYS] = KEYMAP(
+ DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO,
+ XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______
+),
+
+
+};
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+#ifdef RGBSPS_ENABLE
+ led_set_default_layer_indicator();
+#endif
+}
+
+#ifdef DOUBLESPACE_LAYER_ENABLE
+void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) {
+ if (pressed) {
+ *isactive = true;
+ if (*otheractive) {
+ layer_on(_SPACE);
+ register_code(KC_LALT); // sends alt and enter layer
+ space_layer_entered = true;
+ }
+ } else {
+ *isactive = false;
+ if (space_layer_entered) {
+ unregister_code(KC_LALT); // release alt and exit layer
+ layer_off(_SPACE);
+ if (!*otheractive) {
+ space_layer_entered = false;
+ }
+ } else {
+ if (!*isemitted) {
+ register_code(KC_SPC);
+ unregister_code(KC_SPC);
+ }
+ *isemitted = false;
+ }
+ }
+}
+#endif
+
+uint32_t layer_state_set_kb(uint32_t state)
+{
+ // turn on punc layer if both fun & num are on
+ if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) {
+ state |= (1UL<<_PUNC);
+ } else {
+ state &= ~(1UL<<_PUNC);
+ }
+
+ // turn on emoji layer if empty and greek layer are on
+ if (
+ (state & ((1UL<<_EMPTY) | (1UL<<_GREEKU))) == ((1UL<<_EMPTY) | (1UL<<_GREEKU))
+ || (state & ((1UL<<_EMPTY) | (1UL<<_GREEKL))) == ((1UL<<_EMPTY) | (1UL<<_GREEKL))
+ ) {
+ state |= (1UL<<_EMOJI);
+ } else {
+ state &= ~(1UL<<_EMOJI);
+ }
+ return state;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static bool lshift = false;
+ static bool rshift = false;
+ static uint8_t layer = 0;
+
+ lshift = keyboard_report->mods & MOD_BIT(KC_LSFT);
+ rshift = keyboard_report->mods & MOD_BIT(KC_RSFT);
+ layer = biton32(layer_state);
+
+#ifdef DOUBLESPACE_LAYER_ENABLE
+ // double-space: send space immediately if any other key depressed before space is released
+ if ((lspace_active ^ rspace_active)
+ && keycode != LSPACE
+ && keycode != RSPACE
+ && record->event.pressed)
+ {
+ if (lspace_active) {
+ if (!lspace_emitted) {
+ register_code(KC_SPC);
+ unregister_code(KC_SPC);
+ }
+ lspace_emitted = true;
+ }
+ if (rspace_active) {
+ if (!rspace_emitted) {
+ register_code(KC_SPC);
+ unregister_code(KC_SPC);
+ }
+ rspace_emitted = true;
+ }
+ }
+
+ if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) {
+ if (record->event.pressed) {
+ unregister_code(KC_LALT);
+ } else {
+ register_code(KC_LALT);
+ }
+ }
+#endif
+
+ switch (keycode) {
+
+#ifdef DOUBLESPACE_LAYER_ENABLE
+ // double-space enter space layer
+ case LSPACE:
+ process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted);
+ return false;
+ break;
+ case RSPACE:
+ process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted);
+ return false;
+ break;
+#endif
+
+ // handle greek layer shift
+ case KC_LSFT:
+ case KC_RSFT:
+ ;
+ if (layer == _GREEKU || layer == _GREEKL) {
+ if (record->event.pressed) {
+ layer_on(_GREEKU);
+ layer_off(_GREEKL);
+ } else {
+ if (lshift ^ rshift) { // if only one shift was pressed
+ layer_on(_GREEKL);
+ layer_off(_GREEKU);
+ }
+ }
+ }
+ return true;
+ break;
+
+ // press both ctrls to activate SYS layer
+ case KC_LCTL:
+ case KC_RCTL:
+ ;
+ bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL);
+ bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL);
+ if (record->event.pressed) {
+ if (lctrl ^ rctrl) { // if only one ctrl was pressed
+ layer_on(_SYS);
+ }
+ } else {
+ layer_off(_SYS);
+ }
+ return true;
+ break;
+
+ // QWERTZ style comma and dot: semicolon and colon when shifted
+ case KC_COMM:
+ if (record->event.pressed) {
+ if (lshift || rshift) {
+ if (lshift) unregister_code(KC_LSFT);
+ if (rshift) unregister_code(KC_RSFT);
+ register_code(KC_SCLN);
+ unregister_code(KC_SCLN);
+ if (lshift) register_code(KC_LSFT);
+ if (rshift) register_code(KC_RSFT);
+ } else {
+ register_code(KC_COMM);
+ unregister_code(KC_COMM);
+ }
+ }
+ return false;
+ break;
+ case KC_DOT:
+ if (record->event.pressed) {
+ if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) {
+ register_code(KC_SCLN);
+ unregister_code(KC_SCLN);
+ } else {
+ register_code(KC_DOT);
+ unregister_code(KC_DOT);
+ }
+ }
+ return false;
+ break;
+
+ // layout switchers
+ case QWERTY:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+#ifdef LAYOUT_DVORAK
+ case DVORAK:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_DVORAK);
+ }
+ return false;
+ break;
+#endif
+#ifdef LAYOUT_COLEMAK
+ case COLEMAK:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_COLEMAK);
+ }
+ return false;
+ break;
+#endif
+#ifdef LAYOUT_WORKMAN
+ case WORKMAN:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_WORKMAN);
+ }
+ return false;
+ break;
+#endif
+#ifdef LAYOUT_NORMAN
+ case NORMAN:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_NORMAN);
+ }
+ return false;
+ break;
+#endif
+
+ // only process Fnumber on key release, and only when layer switcher is still pressed.
+ // this is to avoid accidental presses on potentially destructive keys
+ case KC_F1 ... KC_F12:
+ case KC_PAUS:
+ case KC_PSCR:
+ case KC_INS:
+ if (!record->event.pressed && layer == _FUN) { // key released and still in FUN layer
+ register_code(keycode);
+ unregister_code(keycode);
+ }
+ return false;
+ break;
+
+ // layer switcher
+ //
+ case GREEK:
+ if (record->event.pressed) {
+ if (lshift || rshift) {
+ layer_on(_GREEKU);
+ layer_off(_GREEKL);
+ } else {
+ layer_on(_GREEKL);
+ layer_off(_GREEKU);
+ }
+ } else {
+ layer_off(_GREEKU);
+ layer_off(_GREEKL);
+ }
+ return false;
+ break;
+
+ // OS switchers
+ case LINUX:
+ set_unicode_input_mode(UC_LNX);
+#ifdef RGBSPS_ENABLE
+ led_set_unicode_input_mode();
+#endif
+ return false;
+ break;
+ case WIN:
+ set_unicode_input_mode(UC_WINC);
+#ifdef RGBSPS_ENABLE
+ led_set_unicode_input_mode();
+#endif
+ return false;
+ break;
+ case OSX:
+ set_unicode_input_mode(UC_OSX);
+#ifdef RGBSPS_ENABLE
+ led_set_unicode_input_mode();
+#endif
+ return false;
+ break;
+
+ // glow mode changer
+#ifdef RGBSPS_ENABLE
+ case GLOW:
+ if (record->event.pressed) {
+ glow_mode++;
+ if (glow_mode > GLOW_FULL) {
+ glow_mode = GLOW_NONE;
+ }
+ led_reset();
+ rgbsps_send();
+ }
+ return false;
+ break;
+#endif
+
+ // faux clicky indicator
+#ifdef FAUXCLICKY_ENABLE
+ case FC_TOG:
+#ifdef RGBSPS_ENABLE
+ if (fauxclicky_enabled) {
+ rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
+ } else {
+ rgbsps_set(LED_IND_AUDIO, COLOR_BLANK);
+ }
+ rgbsps_send();
+#endif
+ return true;
+ break;
+#endif
+
+#ifdef RGBSPS_DEMO_ENABLE
+ case RGBDEMO:
+ led_demo();
+ return false;
+ break;
+#endif
+ }
+ return true;
+}
+
+void set_output_user(uint8_t output) {
+#ifdef MODULE_ADAFRUIT_BLE
+ switch(output) {
+ case OUTPUT_USB:
+ led_set_output_usb();
+ break;
+ case OUTPUT_BLUETOOTH:
+ led_set_output_ble();
+ break;
+ default:
+ led_set_output_none();
+ }
+#endif
+}
+
+void matrix_init_user() {
+ _delay_ms(500); // give time for usb to initialize
+
+ set_unicode_input_mode(UC_LNX);
+
+#ifdef RGBSPS_ENABLE
+ led_init();
+#endif
+
+ // auto detect output on init
+#ifdef MODULE_ADAFRUIT_BLE
+ uint8_t output = auto_detect_output();
+ if (output == OUTPUT_USB) {
+ set_output(OUTPUT_USB);
+ } else {
+ set_output(OUTPUT_BLUETOOTH);
+ }
+#endif
+}
+
+void turn_off_capslock() {
+ if (capslock) {
+ register_code(KC_CAPS);
+ unregister_code(KC_CAPS);
+ }
+}
+
+#ifdef RGBSPS_ENABLE
+ void matrix_scan_user(void) {
+ led_set_layer_indicator();
+ }
+
+ void battery_poll(uint8_t level) {
+ rgbsps_sethsv(LED_IND_BATTERY, level * 120/255, 255, 15);
+ rgbsps_send();
+ }
+
+ void led_set_user(uint8_t usb_led) {
+ bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
+ if (new_capslock ^ capslock) { // capslock state is different
+ if ((capslock = new_capslock)) {
+ rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
+ } else {
+ rgbsps_set(LED_IND_CAPSLOCK, COLOR_BLANK);
+ }
+ rgbsps_send();
+ }
+ }
+#endif
+
+#ifdef PS2_MOUSE_ENABLE
+ void ps2_mouse_init_user() {
+ uint8_t rcv;
+
+ // set TrackPoint sensitivity
+ PS2_MOUSE_SEND(0xE2, "tpsens: 0xE2");
+ PS2_MOUSE_SEND(0x81, "tpsens: 0x81");
+ PS2_MOUSE_SEND(0x4A, "tpsens: 0x4A");
+ PS2_MOUSE_SEND(0x49, "tpsens: 0x59");
+
+ // set TrackPoint Negative Inertia factor
+ PS2_MOUSE_SEND(0xE2, "tpnegin: 0xE2");
+ PS2_MOUSE_SEND(0x81, "tpnegin: 0x81");
+ PS2_MOUSE_SEND(0x4D, "tpnegin: 0x4D");
+ PS2_MOUSE_SEND(0x06, "tpnegin: 0x06");
+
+ // set TrackPoint speed
+ // (transfer function upper plateau speed)
+ PS2_MOUSE_SEND(0xE2, "tpsp: 0xE2");
+ PS2_MOUSE_SEND(0x81, "tpsp: 0x81");
+ PS2_MOUSE_SEND(0x60, "tpsp: 0x60");
+ PS2_MOUSE_SEND(0x61, "tpsp: 0x61");
+
+ // inquire pts status
+ rcv = ps2_host_send(0xE2);
+ rcv = ps2_host_send(0x2C);
+ rcv = ps2_host_recv_response();
+ if ((rcv & 1) == 1) {
+ // if on, disable pts
+ rcv = ps2_host_send(0xE2);
+ rcv = ps2_host_send(0x47);
+ rcv = ps2_host_send(0x2C);
+ rcv = ps2_host_send(0x01);
+ }
+ }
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h
new file mode 100644
index 000000000..e60971035
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h
@@ -0,0 +1 @@
+#include "rgbtheme_default.h"
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h
new file mode 100644
index 000000000..8e0a98b09
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h
@@ -0,0 +1,36 @@
+#include "color.h"
+
+#define THEME_COLOR_LINUX COLOR_WHITE
+#define THEME_COLOR_APPLE COLOR_WHITE
+#define THEME_COLOR_WINDOWS COLOR_WHITE
+
+#define THEME_COLOR_QWERTY COLOR_RED
+#define THEME_COLOR_ALT COLOR_RED
+
+#define THEME_COLOR_AUDIO COLOR_GREEN
+
+#define THEME_COLOR_BLUETOOTH 7,7,15
+#define THEME_COLOR_USB COLOR_WHITE
+
+#define THEME_COLOR_CAPSLOCK COLOR_RED
+
+#define THEME_COLOR_GUI COLOR_MAGENTA
+#define THEME_COLOR_FUN COLOR_RED
+#define THEME_COLOR_NUM 7,7,15
+#define THEME_COLOR_PUNC COLOR_GREEN
+#define THEME_COLOR_GREEK COLOR_CYAN
+#define THEME_COLOR_EMOJI COLOR_YELLOW
+#define THEME_COLOR_OTHERLAYER COLOR_GRAY
+
+#define THEME_COLOR_GLOW1_HOME COLOR_ORANGE
+#define THEME_COLOR_GLOW1_HOMING COLOR_RED
+
+#define THEME_COLOR_GLOW2_ALPHA COLOR_ORANGE
+#define THEME_COLOR_GLOW2_MODS COLOR_ORANGE
+#define THEME_COLOR_GLOW2_FN COLOR_ORANGE
+#define THEME_COLOR_GLOW2_HOME COLOR_ORANGE
+#define THEME_COLOR_GLOW2_HOMING COLOR_RED
+
+#define THEME_COLOR_TP1 COLOR_ORANGE
+#define THEME_COLOR_TP2 COLOR_RED
+#define THEME_COLOR_TP3 COLOR_ORANGE \ No newline at end of file
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h
new file mode 100644
index 000000000..4c3fb1369
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h
@@ -0,0 +1,36 @@
+#include "color.h"
+
+#define THEME_COLOR_LINUX COLOR_WHITE
+#define THEME_COLOR_APPLE COLOR_WHITE
+#define THEME_COLOR_WINDOWS COLOR_WHITE
+
+#define THEME_COLOR_QWERTY COLOR_RED
+#define THEME_COLOR_ALT COLOR_RED
+
+#define THEME_COLOR_AUDIO COLOR_GREEN
+
+#define THEME_COLOR_BLUETOOTH COLOR_BLUE
+#define THEME_COLOR_USB COLOR_WHITE
+
+#define THEME_COLOR_CAPSLOCK COLOR_RED
+
+#define THEME_COLOR_GUI COLOR_MAGENTA
+#define THEME_COLOR_FUN COLOR_RED
+#define THEME_COLOR_NUM COLOR_BLUE
+#define THEME_COLOR_PUNC COLOR_GREEN
+#define THEME_COLOR_GREEK COLOR_CYAN
+#define THEME_COLOR_EMOJI COLOR_YELLOW
+#define THEME_COLOR_OTHERLAYER COLOR_GRAY
+
+#define THEME_COLOR_GLOW1_HOME COLOR_GRAY
+#define THEME_COLOR_GLOW1_HOMING COLOR_RED
+
+#define THEME_COLOR_GLOW2_ALPHA COLOR_GRAY
+#define THEME_COLOR_GLOW2_MODS COLOR_GREEN
+#define THEME_COLOR_GLOW2_FN COLOR_BLUE
+#define THEME_COLOR_GLOW2_HOME COLOR_RED
+#define THEME_COLOR_GLOW2_HOMING COLOR_YELLOW
+
+#define THEME_COLOR_TP1 COLOR_RED
+#define THEME_COLOR_TP2 COLOR_BLUE
+#define THEME_COLOR_TP3 COLOR_RED \ No newline at end of file
diff --git a/keyboards/handwired/promethium/keymaps/readme.md b/keyboards/handwired/promethium/keymaps/readme.md
new file mode 100644
index 000000000..527691389
--- /dev/null
+++ b/keyboards/handwired/promethium/keymaps/readme.md
@@ -0,0 +1,22 @@
+# How to add your own keymap
+
+Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`:
+
+ _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author]
+
+\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
+
+and contain the following files:
+
+* `keymap.c`
+* `readme.md` *recommended*
+* `config.h` *optional*, found automatically when compiling
+* `Makefile` *optional*, found automatically when compling
+
+When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format:
+
+ * **folder_name** description
+
+# List of Promethium keymaps
+
+
diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c
new file mode 100644
index 000000000..72dbe8d4d
--- /dev/null
+++ b/keyboards/handwired/promethium/matrix.c
@@ -0,0 +1,306 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2014 Jack Humbert
+Copyright 2017 Priyadi Iman Nurcahyo
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <stdint.h>
+#include <stdbool.h>
+#if defined(__AVR__)
+#include <avr/io.h>
+#endif
+#include "wait.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "timer.h"
+
+
+/* Set 0 if debouncing isn't needed */
+
+#ifndef DEBOUNCING_DELAY
+# define DEBOUNCING_DELAY 5
+#endif
+
+#if (DEBOUNCING_DELAY > 0)
+ static uint16_t debouncing_time;
+ static bool debouncing = false;
+#endif
+
+#if (MATRIX_COLS <= 8)
+# define print_matrix_header() print("\nr/c 01234567\n")
+# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop(matrix[i])
+# define ROW_SHIFTER ((uint8_t)1)
+#elif (MATRIX_COLS <= 16)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop16(matrix[i])
+# define ROW_SHIFTER ((uint16_t)1)
+#elif (MATRIX_COLS <= 32)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop32(matrix[i])
+# define ROW_SHIFTER ((uint32_t)1)
+#endif
+
+#ifdef MATRIX_MASKED
+ extern const matrix_row_t matrix_mask[];
+#endif
+
+static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const uint8_t tp_pins[3] = TRACKPOINT_PINS;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+static void init_cols(void);
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+static void unselect_row(uint8_t row);
+
+__attribute__ ((weak))
+void matrix_init_quantum(void) {
+ matrix_init_kb();
+}
+
+__attribute__ ((weak))
+void matrix_scan_quantum(void) {
+ matrix_scan_kb();
+}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+inline
+uint8_t matrix_rows(void) {
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void) {
+ return MATRIX_COLS;
+}
+
+void matrix_init(void) {
+
+ // To use PORTF disable JTAG with writing JTD bit twice within four cycles.
+ #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
+ MCUCR |= _BV(JTD);
+ MCUCR |= _BV(JTD);
+ #endif
+
+ // initialize row and col
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+
+ matrix_init_quantum();
+}
+
+uint8_t matrix_scan(void)
+{
+ // Set row, read cols
+ for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
+# if (DEBOUNCING_DELAY > 0)
+ bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
+
+ if (matrix_changed) {
+ debouncing = true;
+ debouncing_time = timer_read();
+ }
+
+# else
+ read_cols_on_row(matrix, current_row);
+# endif
+
+ }
+
+# if (DEBOUNCING_DELAY > 0)
+ if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = matrix_debouncing[i];
+ }
+ debouncing = false;
+ }
+# endif
+
+ matrix_scan_quantum();
+ return 1;
+}
+
+bool matrix_is_modified(void)
+{
+#if (DEBOUNCING_DELAY > 0)
+ if (debouncing) return false;
+#endif
+ return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+
+{
+ return (matrix[row] & ((matrix_row_t)1<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a
+ // switch blocker installed and the switch is always pressed.
+#ifdef MATRIX_MASKED
+ return matrix[row] & matrix_mask[row];
+#else
+ return matrix[row];
+#endif
+}
+
+void matrix_print(void)
+{
+ print_matrix_header();
+
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ print_matrix_row(row);
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += matrix_bitpop(i);
+ }
+ return count;
+}
+
+
+#define ROW_MASK 0b11100000
+
+static const uint8_t row_bit[MATRIX_ROWS] = {
+ // 76543210
+ 0b00000000,
+ 0b00100000,
+ 0b01000000,
+ 0b01100000,
+ 0b10000000,
+ 0b10100000,
+ 0b11000000,
+ 0b11100000,
+};
+
+static void init_cols(void)
+{
+ // columns
+ for(uint8_t x = 0; x < MATRIX_COLS; x++) {
+ uint8_t pin = col_pins[x];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+ }
+
+ // rows
+ DDRF |= ROW_MASK;
+ PORTF &= ~ROW_MASK;
+
+ // trackpoint
+ for(uint8_t x = 0; x < 3; x++) {
+ uint8_t pin = tp_pins[x];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+ }
+}
+
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
+ {
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[current_row];
+
+ // Clear data in matrix row
+ current_matrix[current_row] = 0;
+
+ // special case for trackpoint
+ if (current_row == 8) {
+ for(uint8_t tp_index = 0; tp_index < 3; tp_index++) {
+
+ // Select the TP pin to read (active low)
+ uint8_t pin = tp_pins[tp_index];
+ uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
+
+ // Populate the matrix row with the state of the col pin
+ current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << tp_index);
+ }
+ return (last_row_value != current_matrix[current_row]);
+ }
+
+ // Select row and wait for row selecton to stabilize
+ select_row(current_row);
+ _delay_us(5); // without this wait it won't read stable value.
+ // wait_us(50);
+
+ // For each col...
+ for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+
+ // Select the col pin to read (active low)
+ uint8_t pin = col_pins[col_index];
+ uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
+
+ // Populate the matrix row with the state of the col pin
+ current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
+ }
+
+ // Unselect row
+ unselect_row(current_row);
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+static void select_row(uint8_t row)
+{
+ PORTF = row_bit[row] | (PORTF & ~ROW_MASK);
+}
+
+static void unselect_row(uint8_t row)
+{
+}
+
+static void unselect_rows(void)
+{
+}
+
diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c
new file mode 100644
index 000000000..3cc0f5a8c
--- /dev/null
+++ b/keyboards/handwired/promethium/promethium.c
@@ -0,0 +1,47 @@
+#include "promethium.h"
+#include "analog.h"
+#include "timer.h"
+#include "matrix.h"
+#include "musical_notes.h"
+
+float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A4, 0.0625);
+float fauxclicky_released_note[2] = MUSICAL_NOTE(_A4, 0.0625);
+float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 0.25);
+
+// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100}
+
+uint8_t battery_level(void) {
+ float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024;
+ if (voltage < MIN_VOLTAGE) return 0;
+ if (voltage > MAX_VOLTAGE) return 255;
+ return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255;
+}
+
+__attribute__ ((weak))
+void battery_poll(uint8_t level) {
+}
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ static uint16_t counter = BATTERY_POLL;
+ counter++;
+
+ if (counter > BATTERY_POLL) {
+ counter = 0;
+ battery_poll(battery_level());
+ }
+
+ matrix_scan_user();
+}
+
+void led_set_kb(uint8_t usb_led) {
+ led_set_user(usb_led);
+}
+
+__attribute__ ((weak))
+void led_set_user(uint8_t usb_led) {
+}
+
diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h
new file mode 100644
index 000000000..260f140c5
--- /dev/null
+++ b/keyboards/handwired/promethium/promethium.h
@@ -0,0 +1,10 @@
+#ifndef PROMETHIUM_H
+#define PROMETHIUM_H
+
+#include "stdint.h"
+
+void battery_poll(uint8_t level);
+void led_set_kb(uint8_t usb_led);
+void led_set_user(uint8_t usb_led);
+
+#endif
diff --git a/keyboards/handwired/promethium/readme.md b/keyboards/handwired/promethium/readme.md
new file mode 100644
index 000000000..e63d2f1ad
--- /dev/null
+++ b/keyboards/handwired/promethium/readme.md
@@ -0,0 +1,13 @@
+Promethium Keyboard Firmware
+============================
+A handwired Planck based keyboard using the Adafruit Feather 32u4 Bluefruit LE controller.
+
+Features:
+
+* Single piece split form factor
+* Columnar stagger
+* Trackpoint
+* Bluetooth LE *TBD*
+* Battery
+* Per switch RGB LED
+* Proximity sensor for energy conservation *TBD* \ No newline at end of file
diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c
new file mode 100644
index 000000000..f30badd35
--- /dev/null
+++ b/keyboards/handwired/promethium/rgbsps.c
@@ -0,0 +1,73 @@
+#include "light_ws2812.h"
+#include "rgbsps.h"
+
+struct cRGB led[RGBSPS_NUM];
+
+void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) {
+ led[index].r = r;
+ led[index].g = g;
+ led[index].b = b;
+}
+
+void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b) {
+ for (uint16_t i = 0; i < RGBSPS_NUM; i++) {
+ rgbsps_set(i, r, g, b);
+ }
+}
+
+void rgbsps_turnoff(void) {
+ rgbsps_setall(0, 0, 0);
+}
+
+void rgbsps_send(void) {
+ ws2812_setleds(led, RGBSPS_NUM);
+}
+
+void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val) {
+ uint8_t r = 0, g = 0, b = 0, base, color;
+
+ if (sat == 0) { // Acromatic color (gray). Hue doesn't mind.
+ r = val;
+ g = val;
+ b = val;
+ } else {
+ base = ((255 - sat) * val) >> 8;
+ color = (val - base) * (hue % 60) / 60;
+
+ switch (hue / 60) {
+ case 0:
+ r = val;
+ g = base + color;
+ b = base;
+ break;
+ case 1:
+ r = val - color;
+ g = val;
+ b = base;
+ break;
+ case 2:
+ r = base;
+ g = val;
+ b = base + color;
+ break;
+ case 3:
+ r = base;
+ g = val - color;
+ b = val;
+ break;
+ case 4:
+ r = base + color;
+ g = base;
+ b = val;
+ break;
+ case 5:
+ r = val;
+ g = base;
+ b = val - color;
+ break;
+ }
+ }
+
+ rgbsps_set(index, r, g, b);
+}
+
diff --git a/keyboards/handwired/promethium/rgbsps.h b/keyboards/handwired/promethium/rgbsps.h
new file mode 100644
index 000000000..72612a7a8
--- /dev/null
+++ b/keyboards/handwired/promethium/rgbsps.h
@@ -0,0 +1,5 @@
+void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
+void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b);
+void rgbsps_turnoff(void);
+void rgbsps_send(void);
+void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val); \ No newline at end of file
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk
new file mode 100644
index 000000000..6fa45b42b
--- /dev/null
+++ b/keyboards/handwired/promethium/rules.mk
@@ -0,0 +1,78 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 8000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+UNICODEMAP_ENABLE = yes
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+PS2_MOUSE_ENABLE = yes
+PS2_USE_INT = yes
+API_SYSEX_ENABLE = no
+CUSTOM_MATRIX = yes
+BLUETOOTH = AdafruitBLE
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+SRC += $(QUANTUM_DIR)/light_ws2812.c
+SRC += rgbsps.c
+SRC += $(QUANTUM_DIR)/analog.c
+SRC += matrix.c
diff --git a/keyboards/handwired/reddot/Makefile b/keyboards/handwired/reddot/Makefile
new file mode 100755
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/reddot/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h
new file mode 100755
index 000000000..15f114297
--- /dev/null
+++ b/keyboards/handwired/reddot/config.h
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER upils
+#define PRODUCT reddot
+#define DESCRIPTION A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 19
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 }
+#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
+#define UNUSED_PINS
+
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c
new file mode 100755
index 000000000..44ee2ce51
--- /dev/null
+++ b/keyboards/handwired/reddot/keymaps/default/keymap.c
@@ -0,0 +1,29 @@
+#include "reddot.h"
+#include "../../../../../quantum/keymap_extras/keymap_french.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[0] = KEYMAP(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
+ KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\
+ KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\
+ KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\
+ FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
+
+ [1] = KEYMAP(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
+ KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\
+ KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\
+ KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\
+ FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ ACTION_LAYER_TOGGLE(1),
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+ return MACRO_NONE;
+};
+
diff --git a/keyboards/handwired/reddot/keymaps/default/readme.md b/keyboards/handwired/reddot/keymaps/default/readme.md
new file mode 100755
index 000000000..f04833c3e
--- /dev/null
+++ b/keyboards/handwired/reddot/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for handwired/reddot
diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md
new file mode 100755
index 000000000..11bcba54a
--- /dev/null
+++ b/keyboards/handwired/reddot/readme.md
@@ -0,0 +1,24 @@
+## RedDot Specific Info ##
+
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent README.md](/README.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboard/reddot folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+```
+$ make KEYMAP=[default|jack|<name>]
+```
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/reddot/reddot.c b/keyboards/handwired/reddot/reddot.c
new file mode 100755
index 000000000..4e1efc06c
--- /dev/null
+++ b/keyboards/handwired/reddot/reddot.c
@@ -0,0 +1,7 @@
+#include "reddot.h"
+
+void matrix_init_kb(void) {
+
+ matrix_init_user();
+}
+
diff --git a/keyboards/handwired/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h
new file mode 100755
index 000000000..f0c4be557
--- /dev/null
+++ b/keyboards/handwired/reddot/reddot.h
@@ -0,0 +1,20 @@
+#ifndef REDDOT_H
+#define REDDOT_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \
+ k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \
+ k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \
+ { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \
+ { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \
+}
+
+#endif
diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk
new file mode 100755
index 000000000..b00ee9e0e
--- /dev/null
+++ b/keyboards/handwired/reddot/rules.mk
@@ -0,0 +1,88 @@
+
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+# for avr upload
+USB = /dev/cu.usbmodem1421
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+
+ifdef TEENSY2
+ OPT_DEFS += -DATREUS_TEENSY2
+ ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
+else
+ OPT_DEFS += -DATREUS_ASTAR
+ OPT_DEFS += -DCATERINA_BOOTLOADER
+ ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+ avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+endif
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# MCU name
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+upload: build
+ $(ATREUS_UPLOAD_COMMAND)
+
diff --git a/keyboards/handwired/retro_refit/Makefile b/keyboards/handwired/retro_refit/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/retro_refit/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h
new file mode 100644
index 000000000..f2194e550
--- /dev/null
+++ b/keyboards/handwired/retro_refit/config.h
@@ -0,0 +1,123 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Nobody
+#define PRODUCT retro_refit
+#define DESCRIPTION Retro Refit
+
+/* key matrix size */
+#define MATRIX_ROWS 11
+#define MATRIX_COLS 8
+
+// See note in retro_refit.h for an explanation of how this matrix is wired up
+#define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 0
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+
+/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */
+#define FORCE_NKRO
+
+/*
+ * Magic key options
+ * These options allow the magic key functionality to be changed. This is useful
+ * if your keyboard/keypad is missing keys and you want magic key support.
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* remap magic keys */
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+#define MAGIC_KEY_LOCK BSLS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c
new file mode 100644
index 000000000..405402d5e
--- /dev/null
+++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c
@@ -0,0 +1,33 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "retro_refit.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] =
+ KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \
+ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \
+ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \
+ BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \
+ LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \
+ LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/handwired/retro_refit/readme.md b/keyboards/handwired/retro_refit/readme.md
new file mode 100644
index 000000000..9f10edf9f
--- /dev/null
+++ b/keyboards/handwired/retro_refit/readme.md
@@ -0,0 +1,60 @@
+retro_refit keyboard firmware
+======================
+
+## Keyboard Info
+
+The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop".
+
+http://imgur.com/a/08Fyj
+
+This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow".
+
+The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y.
+
+```
+#define KEYMAP( \
+ K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \
+ K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \
+ K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \
+ K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \
+ K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \
+ K10, K06, K25, K07, K86, K85, K95, K90, K93 \
+) { \
+{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \
+{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \
+{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \
+{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \
+{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \
+{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \
+{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \
+{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \
+{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \
+{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \
+{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \
+}
+```
+
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme.md](/readme.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make default`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
+```
+$ make [default|jack|<name>]
+```
+
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. \ No newline at end of file
diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c
new file mode 100644
index 000000000..3d610eba3
--- /dev/null
+++ b/keyboards/handwired/retro_refit/retro_refit.c
@@ -0,0 +1,47 @@
+#include "retro_refit.h"
+#include "led.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS)
+ DDRD |= (1<<6);
+ PORTD |= (1<<6);
+
+ matrix_init_user();
+};
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // output low
+ DDRD |= (1<<0);
+ PORTD &= ~(1<<0);
+ } else {
+ // Hi-Z
+ DDRD &= ~(1<<0);
+ PORTD &= ~(1<<0);
+ }
+ if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ // output low
+ DDRD |= (1<<1);
+ PORTD &= ~(1<<1);
+ } else {
+ // Hi-Z
+ DDRD &= ~(1<<1);
+ PORTD &= ~(1<<1);
+ }
+ if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
+ // output low
+ DDRC |= (1<<6);
+ PORTC &= ~(1<<6);
+ } else {
+ // Hi-Z
+ DDRC &= ~(1<<6);
+ PORTC &= ~(1<<6);
+ }
+
+ led_set_user(usb_led);
+}; \ No newline at end of file
diff --git a/keyboards/handwired/retro_refit/retro_refit.h b/keyboards/handwired/retro_refit/retro_refit.h
new file mode 100644
index 000000000..109acdc39
--- /dev/null
+++ b/keyboards/handwired/retro_refit/retro_refit.h
@@ -0,0 +1,38 @@
+#ifndef RETRO_REFIT_H
+#define RETRO_REFIT_H
+
+#include "quantum.h"
+
+// This macro is an example of using a non-standard row-column matrix. The
+// keyboard in question had 11 rows and 8 columns, but the rows were not all
+// horizontal, and the columns were not all vertical. For example, row 2
+// contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and
+// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B",
+// "Left Alt", "Up Arrow", and "Down Arrow".
+//
+// The macro makes programming the keys easier and in a more straight-forward
+// manner because it realigns the keys into a 6x15 sensible keyboard layout
+// instead of the obtuse 11x8 matrix.
+
+#define KEYMAP( \
+ K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \
+ K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \
+ K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \
+ K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \
+ K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \
+ K10, K06, K25, K07, K86, K85, K95, K90, K93 \
+) { \
+{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \
+{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \
+{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \
+{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \
+{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \
+{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \
+{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \
+{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \
+{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \
+{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \
+{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/handwired/retro_refit/rules.mk b/keyboards/handwired/retro_refit/rules.mk
new file mode 100644
index 000000000..98aa19e6b
--- /dev/null
+++ b/keyboards/handwired/retro_refit/rules.mk
@@ -0,0 +1,68 @@
+
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+# MIDI_ENABLE = YES # MIDI controls
+# UNICODE_ENABLE = YES # Unicode
+# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/handwired/rules.mk b/keyboards/handwired/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/handwired/rules.mk
diff --git a/keyboards/handwired/trackpoint/Makefile b/keyboards/handwired/trackpoint/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/trackpoint/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md
new file mode 100644
index 000000000..bbfcaab0c
--- /dev/null
+++ b/keyboards/handwired/trackpoint/README.md
@@ -0,0 +1,10 @@
+# IBM Trackpoint demonstration
+
+This is just a simple demo to show how to integrate IBM Trackpoint in QMK.
+
+Wiring used in the demonstration:
+![Wiring example](http://imgur.com/8ghG2U8)
+
+Some documentation:
+* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint)
+* [QMK documentation](https://docs.qmk.fm/)
diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h
new file mode 100644
index 000000000..7558c03bf
--- /dev/null
+++ b/keyboards/handwired/trackpoint/config.h
@@ -0,0 +1,75 @@
+#ifndef CONFIG_H
+ #define CONFIG_H
+
+ #include "config_common.h"
+
+ #define VENDOR_ID 0x1234
+ #define PRODUCT_ID 0x5678
+ #define DEVICE_VER 0x0001
+ #define MANUFACTURER QMK
+ #define PRODUCT TRACKPOINT-DEMO
+ #define DESCRIPTION Simple demonstration for IBM Trackpoint integration
+
+ #define MATRIX_ROWS 1
+ #define MATRIX_COLS 3
+
+ #ifdef PS2_USE_USART
+ #define PS2_CLOCK_PORT PORTD
+ #define PS2_CLOCK_PIN PIND
+ #define PS2_CLOCK_DDR DDRD
+ #define PS2_CLOCK_BIT 5
+ #define PS2_DATA_PORT PORTD
+ #define PS2_DATA_PIN PIND
+ #define PS2_DATA_DDR DDRD
+ #define PS2_DATA_BIT 2
+
+ /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
+ /* set DDR of CLOCK as input to be slave */
+ #define PS2_USART_INIT() do { \
+ PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
+ PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
+ UCSR1C = ((1 << UMSEL10) | \
+ (3 << UPM10) | \
+ (0 << USBS1) | \
+ (3 << UCSZ10) | \
+ (0 << UCPOL1)); \
+ UCSR1A = 0; \
+ UBRR1H = 0; \
+ UBRR1L = 0; \
+ } while (0)
+ #define PS2_USART_RX_INT_ON() do { \
+ UCSR1B = ((1 << RXCIE1) | \
+ (1 << RXEN1)); \
+ } while (0)
+ #define PS2_USART_RX_POLL_ON() do { \
+ UCSR1B = (1 << RXEN1); \
+ } while (0)
+ #define PS2_USART_OFF() do { \
+ UCSR1C = 0; \
+ UCSR1B &= ~((1 << RXEN1) | \
+ (1 << TXEN1)); \
+ } while (0)
+ #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
+ #define PS2_USART_RX_DATA UDR1
+ #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
+ #define PS2_USART_RX_VECT USART1_RX_vect
+ #endif
+
+ #define MATRIX_COL_PINS { F1, F4, F5 }
+ #define MATRIX_ROW_PINS { F0 }
+ #define UNUSED_PINS
+
+ /* COL2ROW or ROW2COL */
+ #define DIODE_DIRECTION COL2ROW
+
+ #define DEBOUNCING_DELAY 5
+
+ #define LOCKING_SUPPORT_ENABLE
+ #define LOCKING_RESYNC_ENABLE
+
+ /* key combination for command */
+ #define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+ )
+
+#endif
diff --git a/keyboards/handwired/trackpoint/keymaps/default/keymap.c b/keyboards/handwired/trackpoint/keymaps/default/keymap.c
new file mode 100644
index 000000000..22e46d98a
--- /dev/null
+++ b/keyboards/handwired/trackpoint/keymaps/default/keymap.c
@@ -0,0 +1,7 @@
+#include "trackpoint.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = KEYMAP(
+ KC_BTN1, KC_BTN3, KC_BTN2 \
+ )
+};
diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk
new file mode 100644
index 000000000..aaf630f10
--- /dev/null
+++ b/keyboards/handwired/trackpoint/rules.mk
@@ -0,0 +1,25 @@
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+
+PS2_MOUSE_ENABLE = yes
+PS2_USE_USART = yes
+
+ifndef QUANTUM_DIR
+ include ../../Makefile
+endif
diff --git a/keyboards/handwired/trackpoint/trackpoint.c b/keyboards/handwired/trackpoint/trackpoint.c
new file mode 100644
index 000000000..124995a64
--- /dev/null
+++ b/keyboards/handwired/trackpoint/trackpoint.c
@@ -0,0 +1,5 @@
+#include "trackpoint.h"
+
+void matrix_init_kb(void) {
+
+}
diff --git a/keyboards/handwired/trackpoint/trackpoint.h b/keyboards/handwired/trackpoint/trackpoint.h
new file mode 100644
index 000000000..b5d73d7db
--- /dev/null
+++ b/keyboards/handwired/trackpoint/trackpoint.h
@@ -0,0 +1,13 @@
+#ifndef TRACKPOINT_H
+#define TRACKPOINT_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ k00, k01, k02 \
+) \
+{ \
+ { k00, k01, k02} \
+}
+
+#endif
diff --git a/keyboards/handwired/traveller/Makefile b/keyboards/handwired/traveller/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/traveller/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h
new file mode 100644
index 000000000..2b82da447
--- /dev/null
+++ b/keyboards/handwired/traveller/config.h
@@ -0,0 +1,173 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER You
+#define PRODUCT traveller
+#define DESCRIPTION A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 13
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D0, D1, D3, D2 }
+ // no I can't say why this order seemed like a good idea
+#define MATRIX_COL_PINS { B5, D6, B7, B6, F6, B1, B3, F7, B4, E6, D7, C6, D4 }
+#define UNUSED_PINS
+
+// LED stuff
+#define RGB_DI_PIN B2
+//#define RBLIGHT_TIMER
+#define RGBLED_NUM 1 // Number of LEDs
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
+
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c
new file mode 100644
index 000000000..13d889ab8
--- /dev/null
+++ b/keyboards/handwired/traveller/keymaps/default/keymap.c
@@ -0,0 +1,305 @@
+#include "traveller.h"
+#include "mousekey.h"
+#include "action_layer.h"
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+#define _QW 0
+#define _LW 1
+#define _HI 2
+#define _NAV 4
+#define _CUR 5
+#define _FKEYS 6
+#define _TRNS 8
+
+// We do the same trick for functions
+#define RGBLED_TOGGLE 10
+#define _HIOUT 15
+#define _LWOUT 16
+// Macros
+#define MDL 4
+#define MDR 5
+#define MUR 6
+#define MUL 3
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Qwerty
+ * ,-----------------------------------------. .-----------------------------------------.
+ * | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | Q | S | D | F | G | | H | J | K | L | P | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------+------|
+ *|ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' |
+ * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
+ * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift |
+ * `------------------------------------------------------------------------------------------'
+ *
+ */
+[_QW] = KEYMAP(
+ F(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL,
+ KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS,
+ CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_DEL, KC_LGUI, MO(_LW), KC_BSPC, KC_ENTER, KC_SPC, MO(_HI), KC_RGUI, KC_RALT, KC_SLSH, KC_RSFT
+ ),
+
+/* LOW - numbers, missing or awkward programming keys
+ Doubled 1 key allows lazy reach with ring finger.
+ * ,-----------------------------------------. .-----------------------------------------.
+ * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del|
+ * |------+------+------+------+------+------| +------+------+------+------+------+------|
+ * | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------+------|
+ * | Caps | [ | | { | } | ` | /| # | { | } | | ] | |
+ * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
+ * | Shift| | | | Low | |/ | | Hi | | | |Shift |
+ * `------------------------------------------------------------------------------------------'
+ *
+ */
+
+[_LW] = KEYMAP(
+ F(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) ,
+ KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO,
+ KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO,
+ 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
+),
+
+/* HI - Punctuation, shell and
+url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$
+Right hand nav keys work pretty well chorded with the Right hand Hi Key
+ * ,-----------------------------------------. .-----------------------------------------.
+ * |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | ! | & | "|" | $ | % | | Vol+| Mute| | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------+------|
+ * | CAPS | ^ | : | . | * | - | /| Vol-| Play | PgUp | Home | Up | End |
+ * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
+ * | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right |
+ * `------------------------------------------------------------------------------------------'
+ *
+ */
+
+[_HI] = KEYMAP(
+ F(_FKEYS), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS,
+ KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END,
+ KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, F(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT
+),
+
+/* NAV - mouse & navigation
+//gui left and right are line home/end, or fore & back in browser
+// Mouse buttons are reversed for comfort - bigger stretch is to the right button.
+
+ * ,-----------------------------------------. .-----------------------------------------.
+* | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm|
+* |------+------+------+------+------+------| |------+------+------+------+------+--------|
+* | |Gui<- | Left | Down |Right | C^E | | BTN3 | MS_L |MS Up | MS_R | |Ms Fast |
+* |------+------+------+------+------+------|------|------+------+------+------+------+--------|
+* | | C^A | GUI X| GUI C| GUI_V| |Enter/| MWD | M_DL |MS Dwn|MS_DR | Up |Ms Slow |
+* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
+* | | GuiZ | | | Low | |/ButnR|ButnL | Hi | | Left | Down | Right |
+* `------------------------------------------------------------------------------------------'
+*/
+
+[_NAV] = KEYMAP(
+ F(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2,
+ KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1,
+ KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0,
+ KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT
+),
+
+/* FKEYS - Funtion keys & mac stuff
+ * ,-----------------------------------------. .-----------------------------------------.
+ * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt |
+ * |------+------+------+------+------+------|------+------+------+------+------+------+------|
+ * |Qwerty| | | | | | /| | | | | | Del |
+ * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
+ * | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | |
+ * `------------------------------------------------------------------------------------------'
+ *
+ */
+
+[_FKEYS] = KEYMAP(
+ F(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT ,
+ F(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
+ KC_TRNS, F(RGBLED_TOGGLE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+
+
+/* TRNS - skeleton for laters
+ * ,-----------------------------------------. .-----------------------------------------.
+ * | . | . | . | . | . | . | | ^ | & | * | ( | ) | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | . | . | . | . | . | . | | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------+------|
+ * | . | . | . | . | . | . | /| | | | . | ; | " |
+ * |------+------+------+------+------+------+ // +------+------+------+------+------+------|
+ * | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT |
+ * `------------------------------------------------------------------------------------------'
+ *
+ */
+
+[_TRNS] = {
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, 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_NO, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+ }
+
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+ [_QW] = ACTION_LAYER_ON(_QW,ON_RELEASE), // return to QWERTY layer
+ [_LW] = ACTION_LAYER_TAP_TOGGLE(_LW), // Turn on LW when holding, or tap 3 times to switch
+ [_HI] = ACTION_LAYER_TAP_TOGGLE(_HI), // Turn on LW when holding, or tap 3 times to switch
+ [_NAV] = ACTION_LAYER_TOGGLE(_NAV),
+ [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS),
+ [_LWOUT] = ACTION_LAYER_OFF(_LW,ON_RELEASE),
+ [_HIOUT] = ACTION_LAYER_OFF(_HI,ON_RELEASE),
+
+ // Functions
+ [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE),
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+
+ // from algernon's ErgoDox EZ layout,
+ case MUL:
+ if (record->event.pressed) {
+ mousekey_on(KC_MS_UP);
+ mousekey_on(KC_MS_LEFT);
+ } else {
+ mousekey_off(KC_MS_UP);
+ mousekey_off(KC_MS_LEFT);
+ }
+ mousekey_send();
+ break;
+
+ case MUR:
+ if (record->event.pressed) {
+ mousekey_on(KC_MS_UP);
+ mousekey_on(KC_MS_RIGHT);
+ } else {
+ mousekey_off(KC_MS_UP);
+ mousekey_off(KC_MS_RIGHT);
+ }
+ mousekey_send();
+ break;
+
+ case MDL:
+ if (record->event.pressed) {
+ mousekey_on(KC_MS_DOWN);
+ mousekey_on(KC_MS_LEFT);
+ } else {
+ mousekey_off(KC_MS_DOWN);
+ mousekey_off(KC_MS_LEFT);
+ }
+ mousekey_send();
+ break;
+
+ case MDR:
+ if (record->event.pressed) {
+ mousekey_on(KC_MS_DOWN);
+ mousekey_on(KC_MS_RIGHT);
+ } else {
+ mousekey_off(KC_MS_DOWN);
+ mousekey_off(KC_MS_RIGHT);
+ }
+ mousekey_send();
+ break;
+
+
+ }
+ return MACRO_NONE;
+};
+
+
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+ switch (id) {
+ case RGBLED_TOGGLE:
+ //led operations
+ if (record->event.pressed) {
+ rgblight_toggle();
+ }
+ break;
+ }
+}
+
+
+
+void LayerLEDSet(uint8_t layr) {
+
+ switch (layr) {
+ case _QW:
+ rgblight_setrgb(0,20, 0); // dim green
+ break;
+ case _LW:
+ // deep purple
+ rgblight_setrgb(20,0,35);
+ break;
+ case _HI:
+ // light blue
+ rgblight_setrgb(0,20,20);
+ break;
+ case _NAV:
+ // Yellowy orange
+ rgblight_setrgb(25,20,0); // brighter
+ break;
+ case _FKEYS:
+ // RED
+ rgblight_setrgb(20,0,0); // brighter
+ break;
+ default:
+ rgblight_setrgb(20,2,20);//error
+ break;
+ }
+
+ return;
+
+}
+
+void matrix_init_user(void) {
+}
+
+// Bleah globals need to be initialized.
+uint8_t old_layer=_QW;
+
+void matrix_scan_user(void) {
+ uint8_t layer = biton32(layer_state);
+ if (old_layer != layer) {
+ LayerLEDSet(layer);
+ old_layer=layer;
+ }
+}
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
+
+
diff --git a/keyboards/handwired/traveller/keymaps/default/readme.md b/keyboards/handwired/traveller/keymaps/default/readme.md
new file mode 100644
index 000000000..7ddc40b3c
--- /dev/null
+++ b/keyboards/handwired/traveller/keymaps/default/readme.md
@@ -0,0 +1,2 @@
+# The default keymap for handwired/traveller
+this is a kitchen sink build
diff --git a/keyboards/handwired/traveller/readme.md b/keyboards/handwired/traveller/readme.md
new file mode 100644
index 000000000..646844b1d
--- /dev/null
+++ b/keyboards/handwired/traveller/readme.md
@@ -0,0 +1,35 @@
+traveler keyboard firmware
+======================
+
+## Traveller Specific Info ##
+The traveller is a varient on the atreus keyboard.
+Like the Atreus, it is designed to be a good compromise between size and ergonomics.
+
+key differences are
+- an additional column for each pinky
+- an RGB LED in the center to show the current layer
+- more finger stagger, splay angle and contoured keycaps (F2 profile for space key).
+
+You can make your own traveller keyboard by using the openscad tools from the atreus repository, and adding a hole for the LED to shine through.
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent README.md](/README.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboard/traveler folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+```
+$ make KEYMAP=[default|jack|<name>]
+```
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk
new file mode 100644
index 000000000..a7f7fc230
--- /dev/null
+++ b/keyboards/handwired/traveller/rules.mk
@@ -0,0 +1,89 @@
+
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+# for avr upload
+USB = /dev/cu.usbmodem1421
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+
+ifdef TEENSY2
+ OPT_DEFS += -DATREUS_TEENSY2
+ ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
+else
+ OPT_DEFS += -DATREUS_ASTAR
+ OPT_DEFS += -DCATERINA_BOOTLOADER
+ ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+ avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+endif
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# MCU name
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+RGBLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif
+
+upload: build
+ $(ATREUS_UPLOAD_COMMAND)
+
diff --git a/keyboards/handwired/traveller/traveller.c b/keyboards/handwired/traveller/traveller.c
new file mode 100644
index 000000000..9d2534130
--- /dev/null
+++ b/keyboards/handwired/traveller/traveller.c
@@ -0,0 +1,61 @@
+#include "traveller.h"
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+ // leave this function blank - it can be defined in a keymap file
+};
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+ // leave this function blank - it can be defined in a keymap file
+}
+
+__attribute__ ((weak))
+void process_action_user(keyrecord_t *record) {
+ // leave this function blank - it can be defined in a keymap file
+}
+
+__attribute__ ((weak))
+void led_set_user(uint8_t usb_led) {
+ // leave this function blank - it can be defined in a keymap file
+}
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+#ifdef RGBLIGHT_ENABLE
+ rgblight_init();
+ rgblight_mode(1); // solid, no timer
+ rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW
+#endif
+
+// Turn status LED on
+ DDRC |= (1<<7);
+ PORTC |= (1<<7);
+
+ matrix_init_user();
+}
+
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
+
+
diff --git a/keyboards/handwired/traveller/traveller.h b/keyboards/handwired/traveller/traveller.h
new file mode 100644
index 000000000..972a1a94a
--- /dev/null
+++ b/keyboards/handwired/traveller/traveller.h
@@ -0,0 +1,32 @@
+#ifndef TRAVELLER_H
+#define TRAVELLER_H
+
+#include "quantum.h"
+#include "led.h"
+
+#ifdef RGBLIGHT_ENABLE
+ #include "rgblight.h"
+#endif
+#ifdef BACKLIGHT_ENABLE
+ #include "backlight.h"
+#endif
+
+
+
+// This a shortcut to help you visually see your layout.
+// The first section contains all of the arguements
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k07, k08, k09, k0a, k0b, k0c, \
+ k10, k11, k12, k13, k14, k15, k17, k18, k19, k1a, k1b, k1c, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0a, k0b, k0c }, \
+ { k10, k11, k12, k13, k14, k15, KC_NO, k17, k18, k19, k1a, k1b, k1c }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c } \
+}
+
+#endif