]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge branch 'master' of https://github.com/Dbroqua/qmk_firmware
authordbroqua <dbroqua@mousur.org>
Sat, 29 Apr 2017 13:04:01 +0000 (15:04 +0200)
committerdbroqua <dbroqua@mousur.org>
Sat, 29 Apr 2017 13:04:01 +0000 (15:04 +0200)
108 files changed:
Makefile
build_keyboard.mk
keyboards/M10A/M10A.c [new file with mode: 0644]
keyboards/M10A/M10A.h [new file with mode: 0644]
keyboards/M10A/Makefile [new file with mode: 0644]
keyboards/M10A/config.h [new file with mode: 0644]
keyboards/M10A/keymaps/default/Makefile [new file with mode: 0644]
keyboards/M10A/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/M10A/rules.mk [new file with mode: 0644]
keyboards/amjpad/amjpad.h
keyboards/amjpad/keymaps/max/keymap.c [new file with mode: 0644]
keyboards/amjpad/keymaps/ortho_left/keymap.c [new file with mode: 0644]
keyboards/amjpad/keymaps/ortho_right/keymap.c [new file with mode: 0644]
keyboards/clueboard/keymaps/serubin/Makefile [new file with mode: 0644]
keyboards/clueboard/keymaps/serubin/keymap.c [new file with mode: 0644]
keyboards/clueboard/keymaps/serubin/layout-base.png [new file with mode: 0644]
keyboards/clueboard/keymaps/serubin/layout-fn.png [new file with mode: 0644]
keyboards/clueboard/keymaps/serubin/layout-media.png [new file with mode: 0644]
keyboards/clueboard/keymaps/serubin/readme.md [new file with mode: 0644]
keyboards/clueboard/keymaps/shift_fn/keymap.c
keyboards/clueboard/keymaps/skully/keymap.c
keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h
keyboards/ergodox/infinity/matrix.c
keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
keyboards/ergodox/keymaps/ordinary/keymap.c
keyboards/ergodox/keymaps/siroken3/default.png [new file with mode: 0644]
keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png [new file with mode: 0644]
keyboards/ergodox/keymaps/siroken3/default_highres.png [new file with mode: 0644]
keyboards/ergodox/keymaps/siroken3/keymap.c [new file with mode: 0644]
keyboards/ergodox/keymaps/siroken3/readme.md [new file with mode: 0644]
keyboards/ergodox/keymaps/yoruian/keymap.c
keyboards/ergodox/keymaps/yoruian/yoruian.h
keyboards/frosty_flake/matrix.c
keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c [deleted file]
keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h [deleted file]
keyboards/handwired/MS-sculpt-mobile/Makefile [deleted file]
keyboards/handwired/MS-sculpt-mobile/babblePaste.c [deleted file]
keyboards/handwired/MS-sculpt-mobile/babblePaste.h [deleted file]
keyboards/handwired/MS-sculpt-mobile/babblePaste.txt [deleted file]
keyboards/handwired/MS-sculpt-mobile/config.h [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c [deleted file]
keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md [deleted file]
keyboards/handwired/MS-sculpt-mobile/readme.md [deleted file]
keyboards/handwired/MS-sculpt-mobile/rules.mk [deleted file]
keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/Makefile [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/babblePaste.c [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/babblePaste.h [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/babblePaste.txt [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/config.h [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/readme.md [new file with mode: 0644]
keyboards/handwired/MS_sculpt_mobile/rules.mk [new file with mode: 0644]
keyboards/handwired/atreus50/keymaps/default/keymap.c
keyboards/handwired/promethium/config.h
keyboards/handwired/promethium/keymaps/priyadi/Makefile
keyboards/handwired/promethium/keymaps/priyadi/README.md
keyboards/handwired/promethium/keymaps/priyadi/keymap.c
keyboards/handwired/promethium/matrix.c [new file with mode: 0644]
keyboards/handwired/promethium/promethium.c
keyboards/handwired/promethium/rules.mk
keyboards/hhkb/keymaps/smt/keymap.c [new file with mode: 0644]
keyboards/kitten_paw/keymaps/ickerwx/config.h
keyboards/kitten_paw/keymaps/ickerwx/keymap.c
keyboards/mitosis/Makefile [new file with mode: 0644]
keyboards/mitosis/config.h [new file with mode: 0644]
keyboards/mitosis/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/mitosis/matrix.c [new file with mode: 0644]
keyboards/mitosis/mitosis.c [new file with mode: 0644]
keyboards/mitosis/mitosis.h [new file with mode: 0644]
keyboards/mitosis/readme.md [new file with mode: 0644]
keyboards/mitosis/rules.mk [new file with mode: 0644]
keyboards/planck/keymaps/lae3/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/lae3/config.h [new file with mode: 0644]
keyboards/planck/keymaps/lae3/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/lae3/readme.md [new file with mode: 0644]
keyboards/planck/keymaps/lucas/keymap.c
keyboards/planck/keymaps/priyadi/config.h
keyboards/preonic/keymaps/CMD-Preonic/keymap.c
keyboards/tv44/keymaps/xyverz/keymap.c
quantum/fauxclicky.c
quantum/fauxclicky.h
quantum/keymap_common.c
quantum/keymap_extras/keymap_german_ch.h
quantum/process_keycode/process_printer.c
quantum/process_keycode/process_printer.h
quantum/process_keycode/process_printer_bb.c
quantum/process_keycode/process_unicode.c
quantum/process_keycode/process_unicode_common.c
quantum/visualizer/lcd_keyframes.c
tmk_core/common/action.c
tmk_core/common/avr/suspend.c
tmk_core/common/mousekey.h
tmk_core/rules.mk

index 9d9c9629d543a6992c960502e685fc7f29dc4b56..6a93692bf699a1dcb0f88c433e413cda5abc72f9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,8 @@ override SILENT := false
 
 ON_ERROR := error_occurred=1
 
+BREAK_ON_ERRORS = no
+
 STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
 ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
 ROOT_DIR := $(dir $(ROOT_MAKEFILE))
@@ -462,20 +464,25 @@ endef
 
 include $(ROOT_DIR)/message.mk
 
+ifeq ($(strip $(BREAK_ON_ERRORS)), yes)
+HANDLE_ERROR = exit 1
+else
+HANDLE_ERROR = echo $$error_occurred > $(ERROR_FILE)
+endif
+
 # The empty line is important here, as it will force a new shell to be created for each command
 # Otherwise the command line will become too long with a lot of keyboards and keymaps
 define RUN_COMMAND
 +error_occurred=0;\
 $(COMMAND_$(SILENT_MODE)_$(COMMAND))\
-if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi;
+if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
 
 
 endef
 define RUN_TEST
 +error_occurred=0;\
 $($(TEST)_COMMAND)\
-if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi;
-
+if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
 endef
 
 # Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
@@ -527,14 +534,22 @@ test: test-all
 .PHONY: test-clean
 test-clean: test-all-clean
 
+ifdef SKIP_VERSION
+SKIP_GIT := yes
+endif
+
 # Generate the version.h file
 ifndef SKIP_GIT
     GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
 else
     GIT_VERSION := NA
 endif
+ifndef SKIP_VERSION
 BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
 $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
 $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
+else
+BUILD_DATE := NA
+endif
 
 include $(ROOT_DIR)/testlist.mk
index 9da8277db946436d7e014a87d309f42a3541f0a4..9fa8c31263225f16333cc0c87e00ddd239a56389 100644 (file)
@@ -176,22 +176,26 @@ endif
 
 ifeq ($(strip $(UCIS_ENABLE)), yes)
     OPT_DEFS += -DUCIS_ENABLE
-    SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
+    UNICODE_COMMON = yes
     SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
 endif
 
 ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
     OPT_DEFS += -DUNICODEMAP_ENABLE
-    SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
+    UNICODE_COMMON = yes
     SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
 endif
 
 ifeq ($(strip $(UNICODE_ENABLE)), yes)
     OPT_DEFS += -DUNICODE_ENABLE
-    SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
+    UNICODE_COMMON = yes
     SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
 endif
 
+ifeq ($(strip $(UNICODE_COMMON)), yes)
+    SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
+endif
+
 ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
     OPT_DEFS += -DRGBLIGHT_ENABLE
     SRC += $(QUANTUM_DIR)/light_ws2812.c
diff --git a/keyboards/M10A/M10A.c b/keyboards/M10A/M10A.c
new file mode 100644 (file)
index 0000000..9a3bd15
--- /dev/null
@@ -0,0 +1,5 @@
+#include "M10A.h"
+
+void matrix_init_kb(void) {
+       matrix_init_user();
+}
\ No newline at end of file
diff --git a/keyboards/M10A/M10A.h b/keyboards/M10A/M10A.h
new file mode 100644 (file)
index 0000000..6ec334f
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef M10A_H
+#define M10A_H
+
+#include "quantum.h"
+
+#define M10A( \
+      k00, k01, k02, \
+      k10, k11, k12, \
+      k20, k21, k22, \
+      k30, k31, k32  \
+) \
+{ \
+    { k00, k01, k02 }, \
+    { k10, k11, k12 }, \
+    { k20, k21, k22 }, \
+    { k30, k31, k32 } \
+} 
+
+#endif
diff --git a/keyboards/M10A/Makefile b/keyboards/M10A/Makefile
new file mode 100644 (file)
index 0000000..4e2a6f0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/M10A/config.h b/keyboards/M10A/config.h
new file mode 100644 (file)
index 0000000..f052ab6
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+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      0x0007
+#define DEVICE_VER             0x0001
+#define MANUFACTURER    Machine Industries
+#define PRODUCT         M10-A
+#define DESCRIPTION     RAMA x Machine Industries M10-A
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 3
+
+/* Planck PCB default pin-out */
+#define MATRIX_ROW_PINS { B6, F7, F6, D6 }
+#define MATRIX_COL_PINS { F5, F1, F0 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 6
+
+/* 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/M10A/keymaps/default/Makefile b/keyboards/M10A/keymaps/default/Makefile
new file mode 100644 (file)
index 0000000..457a3d0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/M10A/keymaps/default/keymap.c b/keyboards/M10A/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..75abeb5
--- /dev/null
@@ -0,0 +1,49 @@
+// 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 "M10A.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.
+
+enum layers {
+  _LAYER0,
+  _LAYER1,
+  _LAYER2,
+  _LAYER3,
+  _LAYER4,
+  _LAYER5,
+  _LAYER6,
+  _LAYER7,
+  _LAYER8,
+  _LAYER9
+};
+
+// // Fillers to make layering more clear
+// #define _______ KC_TRNS
+// #define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER2] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER3] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER4] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER5] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER6] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER7] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER8] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER9] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}
+};
+
+void matrix_init_user(void) {
+  #ifdef BACKLIGHT_ENABLE
+    backlight_level(0);
+  #endif
+}
diff --git a/keyboards/M10A/rules.mk b/keyboards/M10A/rules.mk
new file mode 100644 (file)
index 0000000..f5a785d
--- /dev/null
@@ -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 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 ?= yes      # Enable keyboard backlight functionality
+MIDI_ENABLE ?= no            # MIDI controls
+AUDIO_ENABLE ?= no           # Audio output on port C6
+UNICODE_ENABLE ?= yes         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE ?= no        # Enable WS2812 RGB underlight.
+API_SYSEX_ENABLE = yes
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
index b9b4d3686a0b4baf4ec78bc895d99b162053a5a5..ffba1c9b949e4c76d0abb2b5e51cfe79dff308f3 100644 (file)
        {k40, k41, k42, k43}, \
        {k50, XXX, k52, XXX} \
 }
-
+#define MAXKEYMAP( \
+    k00, k01, k02, k03, \
+       k10, k11, k12, k13, \
+       k20, k21, k22, k23, \
+       k30, k31, k32, k33, \
+       k40, k41, k42, k43, \
+       k50, k51, k52, k53\
+) \
+{ \
+       {k00, k01, k02, k03}, \
+       {k10, k11, k12, k13}, \
+       {k20, k21, k22, k23}, \
+       {k30, k31, k32, k33}, \
+       {k40, k41, k42, k43}, \
+       {k50, k51, k52, k53} \
+}
 void matrix_init_user(void);
 void matrix_scan_user(void);
 
diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c
new file mode 100644 (file)
index 0000000..926a494
--- /dev/null
@@ -0,0 +1,102 @@
+#include "amjpad.h"
+
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.h"
+#endif
+
+// Used for SHIFT_ESC
+#define MODS_CTRL_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+
+// 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 _BL 0
+#define _FL 1
+
+#define _______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: (Base Layer) Default Layer
+   * ,-------------------.
+   * |Esc |Setp| -  | =  |
+   * |----|----|----|----|
+   * | F1 | F2 | F3 | F4 |
+   * |----|----|----|----|
+   * | 7  | 8  | 9  |  - |
+   * |----|----|----|----|
+   * | 4  | 5  | 6  | LF |
+   * |----|----|----|----|
+   * | 1  | 2  | 3  | \  |
+   * |----|----|----|----|
+   * |Left|Down| Up |Rght|
+   * `-------------------'
+   */
+
+[_BL] = MAXKEYMAP(
+
+  KC_ESC,  KC_TAB,  KC_MINS,KC_EQL,  \
+  KC_F1,   KC_F2,   KC_F3,  KC_F4,   \
+  KC_P7,   KC_P8,   KC_P9,  KC_PMNS, \
+  KC_P4,   KC_P5,   KC_P6,  KC_PENT, \
+  KC_P1,   KC_P2,   KC_P3,  KC_BSLS, \
+  KC_LEFT, KC_DOWN, KC_UP,  KC_RIGHT),
+
+  /* Keymap _FL: Function Layer
+   * ,-------------------.
+   * |Esc |TAB |BS  | =  |
+   * |----|----|----|----|
+   * | NL | /  | *  | -  |
+   * |----|----|----|----|
+   * | 7  | 8  | 9  |    |
+   * |----|----|----|RST |
+   * | 4  | 5  | 6  |    |
+   * |----|----|----|----|
+   * | 1  | 2  | 3  |    |
+   * |----|----|----| En |
+   * |   0     |./FN|    |
+   * `-------------------'
+   */
+[_FL] = MAXKEYMAP(
+
+  KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
+  KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
+  KC_P7, KC_P8, KC_P9, RESET,  \
+  KC_P4, KC_P5, KC_P6, KC_PENT, \
+  KC_P1, KC_P2, KC_P3, KC_PENT, \
+  KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
+};
+
+enum function_id {
+    SHIFT_ESC,
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+  [0]  = ACTION_FUNCTION(SHIFT_ESC),
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  static uint8_t shift_esc_shift_mask;
+  switch (id) {
+    case SHIFT_ESC:
+      shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
+      if (record->event.pressed) {
+        if (shift_esc_shift_mask) {
+          add_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          add_key(KC_ESC);
+          send_keyboard_report();
+        }
+      } else {
+        if (shift_esc_shift_mask) {
+          del_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          del_key(KC_ESC);
+          send_keyboard_report();
+        }
+      }
+      break;
+  }
+}
diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c
new file mode 100644 (file)
index 0000000..d3e4d99
--- /dev/null
@@ -0,0 +1,65 @@
+#include "amjpad.h"
+
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.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 _BL 0
+#define _FL 1
+
+#define _______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: (Base Layer) Default Layer
+   * ,-------------------.
+   * | T  | G  | B  |Spac|
+   * |----|----|----|----|
+   * | R  | F  | V  | Fn |
+   * |----|----|----|----|
+   * | E  | D  | C  | OS |
+   * |----|----|----|----|
+   * | W  | S  | X  | Alt|
+   * |----|----|----|----|
+   * | Q  | A  | Z  | Ctl|
+   * |----|----|----|----|
+   * | Esc| Tab|Shft| Fn2|
+   * `-------------------'
+   */
+
+[_BL] = MAXKEYMAP(
+
+  KC_T,   KC_G,   KC_B,      KC_SPACE,\
+  KC_R,   KC_F,   KC_V,      MO(1),    \
+  KC_E,   KC_D,   KC_C,      KC_LGUI, \
+  KC_W,   KC_S,   KC_X,      KC_LALT, \
+  KC_Q,   KC_A,   KC_Z,      KC_LCTL, \
+  KC_TAB, KC_ESC, KC_LSHIFT, MO(1)),
+
+  /* Keymap _FL: Function Layer
+   * ,-------------------.
+   * | 5  | F5 | F11|Spac|
+   * |----|----|----|----|
+   * | 4  | F4 | F10|    |
+   * |----|----|----|----|
+   * | 3  | F3 | F9 | OS |
+   * |----|----|----|----|
+   * | 2  | F2 | F8 | Alt|
+   * |----|----|----|----|
+   * | 1  | F1 | F7 | Ctl|
+   * |----|----|----|----|
+   * | `  | Del|Shft|    |
+   * `-------------------'
+   */
+[_FL] = MAXKEYMAP(
+
+  KC_5,  KC_F5,  KC_F11,  _______, \
+  KC_4,  KC_F4,  KC_F10,  _______, \
+  KC_3,  KC_F3,  KC_F9,   _______, \
+  KC_2,  KC_F2,  KC_F8,   _______, \
+  KC_1,  KC_F1,  KC_F7,   _______, \
+  KC_GRV,KC_DEL, _______, _______),
+};
diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c
new file mode 100644 (file)
index 0000000..33e599a
--- /dev/null
@@ -0,0 +1,65 @@
+#include "amjpad.h"
+
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.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 _BL 0
+#define _FL 1
+
+#define _______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: (Base Layer) Default Layer
+   * ,-------------------.
+   * |Spac| N  | H  | Y  |
+   * |----|----|----|----|
+   * | Fn | M  | J  | U  |
+   * |----|----|----|----|
+   * |Left| ,  | K  | I  |
+   * |----|----|----|----|
+   * |Down| .  | L  | O  |
+   * |----|----|----|----|
+   * | Up | /  | ;  | P  |
+   * |----|----|----|----|
+   * |Rght| Ret| "  |Bspc|
+   * `-------------------'
+   */
+
+[_BL] = MAXKEYMAP(
+
+  KC_SPACE, KC_N,     KC_H,      KC_Y, \
+  MO(1),    KC_M,     KC_J,      KC_U, \
+  KC_LEFT,  KC_COMM,  KC_K,      KC_I, \
+  KC_DOWN,  KC_DOT,   KC_L,      KC_O, \
+  KC_UP,    KC_SLASH, KC_SCLN,   KC_P, \
+  KC_RIGHT, KC_ENT,   KC_QUOT,   KC_BSPC),
+
+  /* Keymap _FL: Function Layer
+   * ,-------------------.
+   * |Esc | F12| F6 | 6  |
+   * |----|----|----|----|
+   * | NL | M  | -  | 7  |
+   * |----|----|----|----|
+   * |Left| ,  | =  | 8  |
+   * |----|----|----|----|
+   * |Down| .  | [  | 9  |
+   * |----|----|----|----|
+   * | Up | /  | ]  | 0  |
+   * |----|----|----|----|
+   * |Rght| Ret| \  | Del|
+   * `-------------------'
+   */
+[_FL] = MAXKEYMAP(
+
+  _______, KC_F12,  KC_F6,   KC_6, \
+  _______, _______, KC_MINS, KC_7, \
+  _______, _______, KC_EQL,  KC_8, \
+  _______, _______, KC_LBRC, KC_9, \
+  _______, _______, KC_RBRC, KC_0, \
+  _______, _______, KC_BSLS, KC_DEL),
+};
diff --git a/keyboards/clueboard/keymaps/serubin/Makefile b/keyboards/clueboard/keymaps/serubin/Makefile
new file mode 100644 (file)
index 0000000..ba997f8
--- /dev/null
@@ -0,0 +1,4 @@
+
+MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+
diff --git a/keyboards/clueboard/keymaps/serubin/keymap.c b/keyboards/clueboard/keymaps/serubin/keymap.c
new file mode 100644 (file)
index 0000000..18446eb
--- /dev/null
@@ -0,0 +1,103 @@
+#include "clueboard.h"
+
+// Helpful defines
+#define GRAVE_MODS  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
+#define _______ KC_TRNS
+
+// 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 _BL 0
+#define _FL 1
+#define _ME 2
+#define _CL 3
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: Base Layer (Default Layer)
+   */
+[_BL] = KEYMAP(
+  KC_GRV,    KC_1,    KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,     KC_MINS,  KC_EQL,   KC_GRV,  KC_BSPC,          KC_PGUP, \
+  KC_TAB,  KC_Q,    KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,     KC_LBRC,  KC_RBRC,  KC_BSLS,                   KC_PGDN, \
+  F(1), KC_A,    KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN,  KC_QUOT,  KC_NUHS,  KC_ENT,                             \
+  KC_LSFT, KC_NUBS, KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,   KC_SLSH,  KC_RO,    KC_RSFT,          KC_UP,            \
+  KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN,          KC_SPC,KC_SPC,                        KC_HENK,  KC_RGUI,  MO(_FL),  MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT),
+
+  /* Keymap _FL: Function Layer
+   */
+[_FL] = 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_DEL,           KC_HOME, \
+  _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS,  _______,  _______,  KC_PSCR,                KC_END,  \
+  _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                           \
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,          KC_PGUP,         \
+  _______, _______, _______, _______,        _______,_______,                        _______,  _______,  MO(_FL),  MO(_ME), KC_HOME, KC_PGDN, KC_END),
+
+/* Keymap _FL: Function Layer
+   */
+[_ME] = KEYMAP(
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______, _______,  _______,  KC_MUTE,          KC_VOLU, \
+  _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS,  _______,  _______,  _______,                   KC_VOLD, \
+  _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                           \
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______, _______ ,  _______,          _______,         \
+  _______, _______, _______, _______,        _______,_______,                        _______,  _______,  MO(_FL),  MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT),
+
+
+  /* Keymap _CL: Control layer
+   */
+[_CL] = KEYMAP(
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______, RGB_TOG,             RGB_VAI, \
+  _______, _______, _______,_______,RESET,  _______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                   RGB_VAD, \
+  _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                         \
+  MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  MO(_FL),  _______,          RGB_SAI,          \
+  _______, _______, _______,_______,        RGB_MOD,   RGB_MOD,                            _______,  _______,  _______,  _______, RGB_HUD,    RGB_SAD,    RGB_HUI),
+};
+
+/* This is a list of user defined functions. F(N) corresponds to item N
+   of this list.
+ */
+const uint16_t PROGMEM fn_actions[] = {
+  [0] = ACTION_FUNCTION(0),  // Calls action_function()
+  [1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  static uint8_t mods_pressed;
+  static bool mod_flag;
+
+  switch (id) {
+    case 0:
+      /* Handle the combined Grave/Esc key
+       */
+      mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
+
+      if (record->event.pressed) {
+        /* The key is being pressed.
+         */
+        if (mods_pressed) {
+          mod_flag = true;
+          add_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          add_key(KC_ESC);
+          send_keyboard_report();
+        }
+      } else {
+        /* The key is being released.
+         */
+        if (mod_flag) {
+          mod_flag = false;
+          del_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          del_key(KC_ESC);
+          send_keyboard_report();
+        }
+      }
+      break;
+    case 1:
+      if(record->event.pressed) {
+        del_key(KC_ESC);
+      }
+    break;
+  }
+}
diff --git a/keyboards/clueboard/keymaps/serubin/layout-base.png b/keyboards/clueboard/keymaps/serubin/layout-base.png
new file mode 100644 (file)
index 0000000..8dcdc06
Binary files /dev/null and b/keyboards/clueboard/keymaps/serubin/layout-base.png differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-fn.png b/keyboards/clueboard/keymaps/serubin/layout-fn.png
new file mode 100644 (file)
index 0000000..3cff46a
Binary files /dev/null and b/keyboards/clueboard/keymaps/serubin/layout-fn.png differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-media.png b/keyboards/clueboard/keymaps/serubin/layout-media.png
new file mode 100644 (file)
index 0000000..753cb64
Binary files /dev/null and b/keyboards/clueboard/keymaps/serubin/layout-media.png differ
diff --git a/keyboards/clueboard/keymaps/serubin/readme.md b/keyboards/clueboard/keymaps/serubin/readme.md
new file mode 100644 (file)
index 0000000..e39adbb
--- /dev/null
@@ -0,0 +1,23 @@
+```
+ ___     _____ _            _                         _     __    __ _   __
+|__ \   / ____| |          | |                       | |   / /   / /(_) / /
+ ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
+ |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
+ |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
+ (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
+```
+
+# Serubin's Clueboard Layout
+
+This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim. 
+
+#### Base Layer
+![Base Layout Image](layout-base.png)
+
+#### Fn Layer
+![Fn Layout Image](layout-fn.png)
+
+#### Media Layer
+![Media Layer Image](layout-media.png)
+
+
index c4fae03698299141c5e9d1774c01e5f9ddeec695..fdec37a5401b27ac8af5fa2cec59f1b72faaeaed 100644 (file)
@@ -19,8 +19,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   F(0),    KC_1,    KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,     KC_MINS,  KC_EQL,   KC_GRV,  KC_BSPC,          KC_PGUP, \
   KC_TAB,  KC_Q,    KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,     KC_LBRC,  KC_RBRC,  KC_BSLS,                   KC_PGDN, \
   KC_CAPS, KC_A,    KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN,  KC_QUOT,  KC_NUHS,  KC_ENT,                             \
-  KC_LSFT, KC_NUBS, KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,   KC_SLSH,  KC_RO,    KC_RSFT,          KC_UP,            \
-  KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN,          KC_SPC,KC_SPC,                        KC_HENK,  KC_RALT,  KC_RCTL,  MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
+  MO(_FL), KC_NUBS, KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,   KC_SLSH,  KC_RO,    KC_RSFT,          KC_UP,            \
+  KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN,          KC_SPC, KC_SPC,                        KC_HENK,  KC_RALT,  KC_RGUI,  KC_RCTL,  KC_LEFT, KC_DOWN, KC_RGHT),
 
   /* Keymap _FL: Function Layer
    */
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   S(KC_TAB), S(KC_Q),   S(KC_W),S(KC_E),S(KC_R),S(KC_T),  S(KC_Y),  S(KC_U),S(KC_I),S(KC_O),   S(KC_P),   S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),                  S(KC_PGDN), \
   S(KC_LCTL),S(KC_A),   MO(_CL),S(KC_D),S(KC_F),S(KC_G),  S(KC_H),  S(KC_J),S(KC_K),S(KC_L),   S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT),                               \
   MO(_FL),   S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V),  S(KC_B),  S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO),  KC_RSFT,           KC_PGUP,             \
-  KC_LCTL,   KC_LALT,   KC_LGUI,MO(_FL),        S(KC_SPC),S(KC_SPC),                           MO(_FL),   KC_RGUI,   KC_RALT,   KC_RCTL,   KC_HOME, KC_PGDN, KC_END),
+  KC_LCTL,   KC_LALT,   KC_LGUI,KC_MHEN,        S(KC_SPC),S(KC_SPC),                           KC_HENK,   KC_RGUI,   KC_RALT,   KC_RCTL,   KC_HOME, KC_PGDN, KC_END),
 
   /* Keymap _CL: Control layer
    */
index 077d214facc3f8ae1b4bf84da71bc8043498627f..df7757a92224080aabd9751e09ea72e61308286c 100644 (file)
@@ -16,33 +16,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   /* Keymap _BL: Base Layer (Default Layer)
    */
 [_BL] = KEYMAP(
-  F(0),   KC_1,   KC_2,   KC_3,   KC_4,  KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,     KC_MINS,  KC_EQL,   KC_GRV,  KC_BSPC,          KC_PGUP, \
-  KC_TAB, KC_Q,   KC_W,   KC_E,   KC_R,  KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,     KC_LBRC,  KC_RBRC,  KC_BSLS,                   KC_PGDN, \
-  KC_LCTL,KC_A,   KC_S,   KC_D,   KC_F,  KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN,  KC_QUOT,  KC_NUHS,  KC_ENT,                             \
-  KC_LSFT,KC_NUBS,KC_Z,   KC_X,   KC_C,  KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,   KC_SLSH,  KC_RO,    KC_RSFT,          KC_UP,            \
-  KC_LCTL,KC_LALT,KC_LGUI,MO(_FL),       KC_SPC, KC_SPC,                          MO(_FL),  KC_RGUI,  KC_RCTL,  MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
+  F(0),    KC_1,    KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,     KC_MINS,  KC_EQL,   KC_GRV,  KC_BSPC,          KC_PGUP, \
+  KC_TAB,  KC_Q,    KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,     KC_LBRC,  KC_RBRC,  KC_BSLS,                   KC_PGDN, \
+  KC_LCTL, KC_A,    KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN,  KC_QUOT,  KC_NUHS,  KC_ENT,                             \
+  MO(_FL), KC_NUBS, KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,   KC_SLSH,  KC_RO,    KC_RSFT,          KC_UP,            \
+  KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN,          KC_SPC, KC_SPC,                        KC_HENK,  KC_RGUI,  KC_RALT,  KC_RCTL,  KC_LEFT, KC_DOWN, KC_RGHT),
 
   /* Keymap _FL: Function Layer
    */
 [_FL] = KEYMAP(
-  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,         BL_STEP, \
-  _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______,                _______, \
-  _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,                         \
-  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,        KC_PGUP,         \
-  _______,_______,_______,MO(_FL),        _______,_______,                        MO(_FL),_______,_______,MO(_FL),KC_HOME,KC_PGDN,KC_END),
+  S(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,    S(KC_GRV), KC_DEL,           BL_STEP,    \
+  S(KC_TAB), S(KC_Q),   S(KC_W),S(KC_E),S(KC_R),S(KC_T),  S(KC_Y),  S(KC_U),S(KC_I),S(KC_O),   S(KC_P),   S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),                  S(KC_PGDN), \
+  S(KC_LCTL),S(KC_A),   MO(_CL),S(KC_D),S(KC_F),S(KC_G),  S(KC_H),  S(KC_J),S(KC_K),S(KC_L),   S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT),                               \
+  MO(_FL),   S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V),  S(KC_B),  S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO),  KC_RSFT,           KC_PGUP,             \
+  KC_LCTL,   KC_LALT,   KC_LGUI,KC_MHEN,        S(KC_SPC),S(KC_SPC),                           KC_HENK,   KC_RGUI,   KC_RALT,   KC_RCTL,   KC_HOME, KC_PGDN, KC_END),
 
   /* Keymap _CL: Control layer
    */
 [_CL] = KEYMAP(
-  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,          _______, \
-  _______,_______,_______,_______,RESET,  _______,_______,_______,_______,_______,_______,_______,_______,_______,                  _______, \
-  _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,                           \
-  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,         _______,          \
-  _______,_______,_______,_______,        _______,_______,                        _______,_______,_______,MO(_FL),_______, _______, _______),
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______, RGB_TOG,              RGB_VAI, \
+  _______, _______, _______,_______,RESET,  _______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                       RGB_VAD, \
+  _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                                \
+  MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  MO(_FL),               RGB_SAI,         \
+  _______, _______, _______,_______,        RGB_MOD,RGB_MOD,                            _______,  _______,  _______,  _______, RGB_HUD,RGB_SAD,RGB_HUI),
 };
 
+/* This is a list of user defined functions. F(N) corresponds to item N
+   of this list.
+ */
 const uint16_t PROGMEM fn_actions[] = {
-  [0]  = ACTION_FUNCTION(0),
+  [0] = ACTION_FUNCTION(0),  // Calls action_function()
 };
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
index e8c17e6e336c0a89cff12624170d25cf4213209e..9650ffb4405f6273a553dcecaef4a37a3d45a736 100644 (file)
@@ -75,7 +75,7 @@ static GFXINLINE void init_board(GDisplay *g) {
     palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
     palSetPadModeRaw(MOSI, ST7565_SPI_MODE);
     palSetPadModeRaw(SLCK, ST7565_SPI_MODE);
-    palSetPadModeRaw(SS, PAL_MODE_OUTPUT_PUSHPULL);
+    palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL);
 
     spiInit();
     spiStart(&SPID1, &spi1config);
index 1fda904849aa7c97e3d05ecc651d0bdea9760b8d..3364f8c905d7314c67184dab3c5180c736558875 100644 (file)
@@ -24,6 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "print.h"
 #include "debug.h"
 #include "matrix.h"
+#include "serial_link/system/serial_link.h"
 
 
 /*
index ae4fd444d15d4684f36c14f219a94a204568b7ce..d299d02c34a6528f34a063eb5eb042760fb4ccb9 100644 (file)
@@ -311,12 +311,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
         break;        
         case SWITCH_NDS:
              if (record->event.pressed) {
-                return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END); 
+                return MACRO( D(LSFT), T(F11), U(LSFT), W(255), D(LALT), T(TAB), U(LALT), END);
             }                                
         break;        
         case OPEN_CLOSE_PAREN:
             if (record->event.pressed) {
-                return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END);
+                return MACRO( D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END);
             }
         break;
         case OPEN_CLOSE_BRACKET:
@@ -326,7 +326,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
         break;        
         case OPEN_CLOSE_CURLY:
             if (record->event.pressed) {
-                return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END);
+                return MACRO( D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END);
             }
         break;                
         case OPEN_CLOSE_SINGLE_QUOTE:
index 1dfdf7e62411ea8858418d190f74fb168333cf10..ac84df57014ace6c12c85fe57c830b5cdffaae49 100644 (file)
@@ -392,7 +392,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 
         case NotEq:
         if (record->event.pressed) {
-            return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END  ); // !=
+            return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END  ); // !=
         }
         break;
 
diff --git a/keyboards/ergodox/keymaps/siroken3/default.png b/keyboards/ergodox/keymaps/siroken3/default.png
new file mode 100644 (file)
index 0000000..6575f7b
Binary files /dev/null and b/keyboards/ergodox/keymaps/siroken3/default.png differ
diff --git a/keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png b/keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png
new file mode 100644 (file)
index 0000000..e3c321c
Binary files /dev/null and b/keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png differ
diff --git a/keyboards/ergodox/keymaps/siroken3/default_highres.png b/keyboards/ergodox/keymaps/siroken3/default_highres.png
new file mode 100644 (file)
index 0000000..7d9f045
Binary files /dev/null and b/keyboards/ergodox/keymaps/siroken3/default_highres.png differ
diff --git a/keyboards/ergodox/keymaps/siroken3/keymap.c b/keyboards/ergodox/keymaps/siroken3/keymap.c
new file mode 100644 (file)
index 0000000..258f122
--- /dev/null
@@ -0,0 +1,187 @@
+// Netable differences vs. the default firmware for the ErgoDox EZ:
+// 1. The Cmd key is now on the right side, making Cmd+Space easier.
+// 2. The media keys work on OSX (But not on Windows).
+#include "ergodox.h"
+#include "debug.h"
+#include "action_layer.h"
+
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define MDIA 2 // media keys
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |   =    |   1  |   2  |   3  |   4  |   5  | LEFT |           | RIGHT|   6  |   7  |   8  |   9  |   0  |   -    |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * | Tab    |   Q  |   W  |   E  |   R  |   T  |  L1  |           |  L1  |   Y  |   U  |   I  |   O  |   P  |   \    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * | LCtl   |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L2|  LGui  |
+ * |--------+------+------+------+------+------| BkSp |           | Meh  |------+------+------+------+------+--------|
+ * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |Grv/L1|  '"  |AltShf| Left | Right|                                       |  Up  | Down |   [  |   ]  | ~L1  |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,---------------.
+ *                                        | BkSp | LGui |       | Alt  |Ctrl/Esc|
+ *                                 ,------|------|------|       |------+--------+------.
+ *                                 |      |      | Home |       | PgUp |        |      |
+ *                                 | Space|LANG1 |------|       |------|LANG2   |Enter |
+ *                                 | /LGui|      | End  |       | PgDn |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+// If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[BASE] = KEYMAP(  // layer 0 : default
+        // left hand
+        KC_EQL,         KC_1,         KC_2,   KC_3,   KC_4,   KC_5,   KC_LEFT,
+        KC_TAB,         KC_Q,         KC_W,   KC_E,   KC_R,   KC_T,   TG(SYMB),
+        KC_LCTRL,       KC_A,         KC_S,   KC_D,   KC_F,   KC_G,
+        KC_LSFT,        CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,   KC_B,   KC_BSPC,
+        LT(SYMB,KC_GRV),KC_QUOT,      LALT(KC_LSFT),  KC_LEFT,KC_RGHT,
+                                                    KC_BSPC,  KC_LGUI,
+                                                              KC_HOME,
+                                 MT(MOD_LGUI, KC_SPC),KC_LANG1,KC_END,
+        // right hand
+             KC_RGHT,     KC_6,   KC_7,   KC_8,   KC_9,   KC_0,             KC_MINS,
+             TG(SYMB),       KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,             KC_BSLS,
+                          KC_H,   KC_J,   KC_K,   KC_L,   LT(MDIA, KC_SCLN),KC_LGUI,
+             MEH_T(KC_NO),KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),   KC_RSFT,
+                                  KC_UP,  KC_DOWN,KC_LBRC,KC_RBRC,          KC_FN1,
+             KC_LALT,        CTL_T(KC_ESC),
+             KC_PGUP,
+             KC_PGDN,KC_LANG2, KC_ENT
+    ),
+/* Keymap 1: Symbol Layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   !  |   @  |   {  |   }  |   |  |      |           |      |   Up |   7  |   8  |   9  |   *  |   F12  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   #  |   $  |   (  |   )  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |    . |   0  |   =  |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// SYMBOLS
+[SYMB] = KEYMAP(
+       // left hand
+       KC_TRNS,KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_TRNS,
+       KC_TRNS,KC_EXLM,KC_AT,  KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
+       KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
+       KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
+       KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+                                       KC_TRNS,KC_TRNS,
+                                               KC_TRNS,
+                               KC_TRNS,KC_TRNS,KC_TRNS,
+       // right hand
+       KC_TRNS, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  KC_F11,
+       KC_TRNS, KC_UP,   KC_7,   KC_8,    KC_9,    KC_ASTR, KC_F12,
+                KC_DOWN, KC_4,   KC_5,    KC_6,    KC_PLUS, KC_TRNS,
+       KC_TRNS, KC_AMPR, KC_1,   KC_2,    KC_3,    KC_BSLS, KC_TRNS,
+                         KC_TRNS,KC_DOT,  KC_0,    KC_EQL,  KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+),
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |  Play  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      | Lclk | Rclk |                                       |VolUp |VolDn | Mute |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |Brwser|
+ *                                 |      |      |------|       |------|      |Back  |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = KEYMAP(
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
+                                           KC_TRNS, KC_TRNS,
+                                                    KC_TRNS,
+                                  KC_TRNS, KC_TRNS, KC_TRNS,
+    // right hand
+       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_MPLY,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
+                          KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_WBAK
+),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
+};
+
+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;
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+
+    uint8_t layer = biton32(layer_state);
+
+    ergodox_board_led_off();
+    ergodox_right_led_1_off();
+    ergodox_right_led_2_off();
+    ergodox_right_led_3_off();
+    switch (layer) {
+      // TODO: Make this relevant to the ErgoDox EZ.
+        case 1:
+            ergodox_right_led_1_on();
+            break;
+        case 2:
+            ergodox_right_led_2_on();
+            break;
+        default:
+            // none
+            break;
+    }
+
+};
diff --git a/keyboards/ergodox/keymaps/siroken3/readme.md b/keyboards/ergodox/keymaps/siroken3/readme.md
new file mode 100644 (file)
index 0000000..979ce0f
--- /dev/null
@@ -0,0 +1,15 @@
+# ErgoDox EZ Default Configuration
+
+## Changelog
+
+* Dec 2016:
+  * Added LED keys
+  * Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
+* Sep 22, 2016:
+  * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
+* Feb 2, 2016 (V1.1): 
+  * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
+
+This is what we ship with out of the factory. :) The image says it all:
+
+![Default](default_firmware_v1.2-2.png)
index d3635ddf3f65abdde1921c8ede279b4bfa7a9c74..41dfda3c6df773e845d6ec16d8a7c9b41a49094d 100644 (file)
@@ -17,7 +17,7 @@
 #include "yoruian.h"
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = KEYMAP\
+[0] = KEYMAP_YORUIAN\
 (9,  7,    5,    3,    1,    GRV,  MINS, EQL,  LBRC, 0,    2,    4,    6,    8,
  ES, RBRC, Y,    O,    R,    BSLS, P3,   P3,   J,    V,    D,    F,    W,    Q,
  LC, U,    I,    A,    N,    SCLN,             M,    H,    T,    S,    C,    RC,
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
                              BSPC, RALT, P2,   TAB,
                                    NO,   NO,
                        E,    LSFT, NO,   NO,   ENT,  SPC),
-[1] = KEYMAP\
+[1] = KEYMAP_YORUIAN\
 (TR, TR,   TR,   TR,   TR,   TR,   TR,   TR,   TR,   F5,   F6,   F7,   F8,   F9,
  TR, TR,   TR,   TR,   TR,   TR,   TR,   TR,   TR,   F1,   F2,   F3,   F4,   FT,
  TR, TR,   TR,   TR,   TR,   TR,               PAUS, LEFT, DOWN, UP,   RGHT, FE,
index 1adcb7fd3fe78d8a58765471420667fcef0242ed..b5aaf74b1a67861b5ddae982413ee1f1bcd377d7 100644 (file)
 #include "debug.h"
 #include "action_layer.h"
 
-#undef KEYMAP
-#define KEYMAP\
-(                                                                      \
- /* Spacial positions. */                                              \
- 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,           k28, k29, k2A, k2B, k2C, k2D, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
- k40, k41, k42, k43, k44,                     k49, k4A, k4B, k4C, k4D, \
-                          k55, k56, k57, k58,                           \
-                               k54, k59,                                \
-                     k53, k52, k51, k5C, k5B, k5A)                      \
-                                                                       \
- /* Matrix positions. */                                               \
- {                                                                     \
-   { KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO    },     \
-   { KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 },      \
-   { KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 },      \
-   { KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 },      \
-   { KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 },      \
-   { KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO,    KC_##k55 },      \
-   { KC_##k06, KC_##k16, KC_NO,    KC_##k36, KC_NO,    KC_##k56 },      \
-   { KC_##k07, KC_##k17, KC_NO,    KC_##k37, KC_NO,    KC_##k57 },      \
-   { KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO,    KC_##k58 },      \
-   { KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 },      \
-   { KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A },      \
-   { KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B },      \
-   { KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C },      \
-   { KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO    }       \
- }
+#define KEYMAP_YORUIAN(                                                        \
+ /* Spacial positions. */                                                      \
+ 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,           k28, k29, k2A, k2B, k2C, k2D,         \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D,         \
+ k40, k41, k42, k43, k44,                     k49, k4A, k4B, k4C, k4D,         \
+                          k55, k56, k57, k58,                                  \
+                               k54, k59,                                       \
+                     k53, k52, k51, k5C, k5B, k5A)                             \
+  KEYMAP(KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, \
+         KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, \
+         KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25,           \
+         KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, \
+         KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44,                     \
+                                                           KC_##k55, KC_##k56, \
+                                                                     KC_##k54, \
+                                                 KC_##k53, KC_##k52, KC_##k51, \
+         KC_##k07, KC_##k08, KC_##k09, KC_##k0A, KC_##k0B, KC_##k0C, KC_##k0D, \
+         KC_##k17, KC_##k18, KC_##k19, KC_##k1A, KC_##k1B, KC_##k1C, KC_##k1D, \
+                   KC_##k28, KC_##k29, KC_##k2A, KC_##k2B, KC_##k2C, KC_##k2D, \
+         KC_##k37, KC_##k38, KC_##k39, KC_##k3A, KC_##k3B, KC_##k3C, KC_##k3D, \
+                             KC_##k49, KC_##k4A, KC_##k4B, KC_##k4C, KC_##k4D, \
+         KC_##k57, KC_##k58,                                                   \
+         KC_##k59,                                                             \
+         KC_##k5C, KC_##k5B, KC_##k5A)
 
 #define KC_ES  KC_ESC
 #define KC_LC  KC_LCTL
index 05dffdb643b4eb3d4e44db852a71fd81bdd8b875..cde7f63b95ba54d81c3dff6c47fd31710301d6f4 100644 (file)
@@ -115,6 +115,7 @@ inline matrix_row_t matrix_get_row(uint8_t row) {
 }
 
 void matrix_print(void) {
+#ifndef NO_PRINT
     print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
     for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
         matrix_row_t matrix_row = matrix_get_row(row);
@@ -125,6 +126,7 @@ void matrix_print(void) {
         }
         print("\n");
     }
+#endif
 }
 
 uint8_t matrix_key_count(void) {
@@ -132,4 +134,4 @@ uint8_t matrix_key_count(void) {
     for (uint8_t row = 0; row < MATRIX_ROWS; row++)
         count += bitpop32(matrix[row]);
     return count;
-}
\ No newline at end of file
+}
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
deleted file mode 100644 (file)
index 4c735a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#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
deleted file mode 100644 (file)
index 1583dea..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#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
deleted file mode 100644 (file)
index bd09e58..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ifndef MAKEFILE_INCLUDED
-       include ../../../Makefile
-endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS-sculpt-mobile/babblePaste.c
deleted file mode 100644 (file)
index 3a9b869..0000000
+++ /dev/null
@@ -1,459 +0,0 @@
-/*  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 "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
\ No newline at end of file
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
deleted file mode 100644 (file)
index 3067c85..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*  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 "action_layer.h"
-#include "quantum_keycodes.h"
-#include "config.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
deleted file mode 100644 (file)
index cf75e15..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
- 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
deleted file mode 100644 (file)
index f895142..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-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
deleted file mode 100644 (file)
index 8b82921..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
deleted file mode 100644 (file)
index 8893d12..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../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
deleted file mode 100644 (file)
index ab09dcd..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#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
deleted file mode 100644 (file)
index e67ddc6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# 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
deleted file mode 100644 (file)
index 1209ad7..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
deleted file mode 100644 (file)
index 8cf4202..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../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
deleted file mode 100644 (file)
index 395a9fb..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-#include "MS-sculpt-mobile.h"
-#include "action_layer.h"
-#include "action_util.h"
-#include "babblePaste.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
deleted file mode 100644 (file)
index 96ee0e7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# 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
deleted file mode 100644 (file)
index d435b44..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-
-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
deleted file mode 100644 (file)
index 680389c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-## 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/MS_sculpt_mobile/MS_sculpt_mobile.c b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c
new file mode 100644 (file)
index 0000000..64982fb
--- /dev/null
@@ -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 (file)
index 0000000..1583dea
--- /dev/null
@@ -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 (file)
index 0000000..bd09e58
--- /dev/null
@@ -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 (file)
index 0000000..22394cc
--- /dev/null
@@ -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 (file)
index 0000000..cedd7d9
--- /dev/null
@@ -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 (file)
index 0000000..cf75e15
--- /dev/null
@@ -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 (file)
index 0000000..f895142
--- /dev/null
@@ -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 (file)
index 0000000..8b82921
--- /dev/null
@@ -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 (file)
index 0000000..4f3a425
--- /dev/null
@@ -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 (file)
index 0000000..a8802c9
--- /dev/null
@@ -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 (file)
index 0000000..e67ddc6
--- /dev/null
@@ -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 (file)
index 0000000..1209ad7
--- /dev/null
@@ -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 (file)
index 0000000..5c04f64
--- /dev/null
@@ -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 (file)
index 0000000..c9a8ccd
--- /dev/null
@@ -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 (file)
index 0000000..96ee0e7
--- /dev/null
@@ -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 (file)
index 0000000..d435b44
--- /dev/null
@@ -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 (file)
index 0000000..680389c
--- /dev/null
@@ -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)
index 415405ec23399f8e27b95248a9fd00666434e95e..77cf942c3a249c6d3bd2fab955d3b71e5deea5c8 100644 (file)
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   //,----+----+----+----+----+----.         ,----+----+----+----+----+----.
      TAB ,QUOT,COMM,DOT , P  , Y  ,           F  , G  , C  , R  , L  ,MINS,
   //|----+----+----+----+----+----|         |----+----+----+----+----+----|
-      X0 , A  , O  , E  , U  , I  ,           D  , H  , R  , N  , S  ,SLSH,
+      X0 , A  , O  , E  , U  , I  ,           D  , H  , T  , N  , S  ,SLSH,
   //|----+----+----+----+----+----|         |----+----+----+----+----+----|
      LSFT,SCLN, Q  , J  , K  , X  ,           B  , M  , W  , V  , Z  , X4 ,
   //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
index 24f02993fb389b33eedfa5b32108f2274e8c53b1..a13406b0ddde28188a3e4d4262b927ebab3cf95c 100644 (file)
@@ -35,12 +35,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define DESCRIPTION
 
 /* key matrix size */
-#define MATRIX_ROWS 8
 #define MATRIX_COLS 6
+#define MATRIX_ROWS 9
 
 /* default pin-out */
-#define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 }
-#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 }
+#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
 
 /*
@@ -152,17 +153,20 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //#define NO_ACTION_MACRO
 //#define NO_ACTION_FUNCTION
 
-#define PS2_INIT_DELAY 2000
+#define PS2_INIT_DELAY 3000
 #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 \
+    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}, \
@@ -172,18 +176,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     {k17, k18, k19, k1a, k1b, k1c}, \
     {k27, k28, k29, k2a, k2b, k2c}, \
     {k37, k38, k39, k3a, k3b, k3c}, \
-    {k47, k48, k49, k4a, k4b, k4c} \
+    {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_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,
@@ -261,7 +276,7 @@ enum led_sequence {
 #   define PS2_CLOCK_PORT  PORTD
 #   define PS2_CLOCK_PIN   PIND
 #   define PS2_CLOCK_DDR   DDRD
-#   define PS2_CLOCK_BIT   1
+#   define PS2_CLOCK_BIT   3
 #   define PS2_DATA_PORT   PORTD
 #   define PS2_DATA_PIN    PIND
 #   define PS2_DATA_DDR    DDRD
index 46fdfa011834124538afa2fac5aee98a1a7ac290..bd1a06734c34922d8098dbc48f90466c723c8a13 100644 (file)
@@ -19,6 +19,8 @@ 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
index ddeaed939e27696dcb11df37a0f989f08c85e477..48824b9f73bf7823a07de552374d53a948803b49 100644 (file)
@@ -37,8 +37,8 @@ On Promethium, USB or Bluetooth output is detected on startup. If USB is connect
 
 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.
 
-On Planck, SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases.
+SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases.
 
-On Promethium there are 6 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 57 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes.
+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
index cf7c67339d474e3e59dab5cd5e43acd4fc7b39c0..efa5d9756e7457144d561a722102b86dd92a789d 100644 (file)
@@ -38,6 +38,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #endif
 #ifdef FAUXCLICKY_ENABLE
 #include "fauxclicky.h"
+#ifdef RGBSPS_ENABLE
+#undef FAUXCLICKY_OFF
+#define FAUXCLICKY_OFF do { \
+    fauxclicky_enabled = false; \
+    rgbsps_set(LED_AUDIO, 0, 0, 0); \
+    fauxclicky_stop(); \
+} while (0)
+#undef FAUXCLICKY_ON
+#define FAUXCLICKY_ON do { \
+    fauxclicky_enabled = true; \
+    rgbsps_set(LED_AUDIO, 8, 0, 8); \
+} while (0)
+#endif
 #endif
 #include "outputselect.h"
 #include "led.h"
@@ -128,8 +141,8 @@ enum planck_keycodes {
 #ifndef FAUXCLICKY_ENABLE
   FC_TOG,
 #endif
-#ifndef ADAFRUIT_BLE_ENABLE
-  OUT_BLE,
+#ifndef MODULE_ADAFRUIT_BLE
+  OUT_BT,
 #endif
   KEYCODE_END
 };
@@ -428,12 +441,23 @@ const uint8_t PROGMEM LED_FN[] = {
 };
 
 const uint8_t PROGMEM LED_INDICATORS[] = {
-  LED_IND_EMOJI,
-  LED_IND_NUM,
-  LED_IND_FUN,
-  LED_IND_BATTERY,
-  LED_IND_USB,
+  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[] = {
@@ -486,15 +510,31 @@ void led_reset(void) {
   }
 }
 
+void led_set_default_layer_indicator(void) {
+  uint8_t default_layer = biton32(default_layer_state);
+  if (default_layer == _QWERTY) {
+    rgbsps_set(LED_IND_QWERTY, 15, 10, 0);
+    rgbsps_set(LED_IND_ALT, 0, 0, 0);
+  } else {
+    rgbsps_set(LED_IND_QWERTY, 0, 0, 0);
+    rgbsps_set(LED_IND_ALT, 15, 10, 0);
+  }
+  rgbsps_send();
+  return;
+}
+
 void led_set_layer_indicator(void) {
   static uint8_t oldlayer = 255;
 
+  led_reset();
+
+  rgbsps_set(LED_IND_GUI, 0, 0, 0);
   rgbsps_set(LED_IND_FUN, 0, 0, 0);
-  // rgbsps_set(LED_IND_NUM, 0, 0, 0);
+  rgbsps_set(LED_IND_NUM, 0, 0, 0);
+  rgbsps_set(LED_IND_PUNC, 0, 0, 0);
+  rgbsps_set(LED_IND_GREEK, 0, 0, 0);
   rgbsps_set(LED_IND_EMOJI, 0, 0, 0);
 
-  led_reset();
-
   uint8_t layer = biton32(layer_state);
   if (oldlayer == layer) {
     return;
@@ -508,24 +548,57 @@ void led_set_layer_indicator(void) {
   }
 
   switch(layer) {
+    case _GUI:
+      rgbsps_set(LED_IND_GUI, 15, 0, 15);
+      break;
     case _FUN:
       rgbsps_set(LED_IND_FUN, 15, 0, 0);
       break;
-    // case _NUM:
-    //   rgbsps_set(LED_IND_NUM, 0, 0, 15);
-    //   break;
+    case _NUM:
+      rgbsps_set(LED_IND_NUM, 0, 0, 15);
+      break;
+    case _PUNC:
+      rgbsps_set(LED_IND_PUNC, 0, 15, 0);
+      break;
+    case _GREEKL:
+    case _GREEKU:
+      rgbsps_set(LED_IND_GREEK, 0, 15, 15);
+      break;
     case _EMOJI:
       rgbsps_set(LED_IND_EMOJI, 15, 15, 0);
       break;
     default:
+      rgbsps_set(LED_IND_GUI, 3, 3, 3);
       rgbsps_set(LED_IND_FUN, 3, 3, 3);
-      // rgbsps_set(LED_IND_NUM, 3, 3, 3);
+      rgbsps_set(LED_IND_NUM, 3, 3, 3);
+      rgbsps_set(LED_IND_PUNC, 3, 3, 3);
+      rgbsps_set(LED_IND_GREEK, 3, 3, 3);
       rgbsps_set(LED_IND_EMOJI, 3, 3, 3);
   }
 
   rgbsps_send();
 }
 
+void led_set_unicode_input_mode(void) {
+  rgbsps_set(LED_IND_LINUX, 0, 0, 0);
+  rgbsps_set(LED_IND_APPLE, 0, 0, 0);
+  rgbsps_set(LED_IND_WINDOWS, 0, 0, 0);
+
+  switch (get_unicode_input_mode()) {
+    case UC_LNX:
+      rgbsps_set(LED_IND_LINUX, 15, 15, 15);
+      break;
+    case UC_OSX:
+      rgbsps_set(LED_IND_APPLE, 15, 15, 15);
+      break;
+    case UC_WIN:
+    case UC_WINC:
+      rgbsps_set(LED_IND_WINDOWS, 15, 15, 15);
+      break;
+  }
+  rgbsps_send();
+}
+
 void led_set_output_ble(void) {
   rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15);
   rgbsps_set(LED_IND_USB, 0, 0, 0);
@@ -552,7 +625,16 @@ void led_init(void) {
   rgbsps_set(LED_TRACKPOINT1, 15, 0, 0);
   rgbsps_set(LED_TRACKPOINT2, 0, 0, 15);
   rgbsps_set(LED_TRACKPOINT3, 15, 0, 0);
+
+  // unicode input mode
+  led_set_unicode_input_mode();
+
+  // layer indicator
+  led_set_layer_indicator();
+  led_set_default_layer_indicator();
 }
+
+
 #endif // RGBSPS_ENABLE
 
 // keymaps
@@ -574,7 +656,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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
+  KC_LCTL, KC_LALT, KC_LGUI, EMPTY,   NUM,     LSPACE,  RSPACE,  FUN,     GREEK,   KC_RGUI, C_RALT,  KC_RCTL,
+                                           _______, _______, _______
 ),
 
 /* Dvorak
@@ -593,7 +676,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   _______, 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
 
@@ -614,7 +698,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   _______, 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
 
@@ -635,7 +720,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   _______, 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
 
@@ -656,7 +742,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   _______, 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
 
@@ -675,7 +762,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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, _______
+  _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______,
+                                           _______, _______, _______
 ),
 
 /* Num
@@ -690,10 +778,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------'
  */
 [_NUM] = KEYMAP(
-  KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, S(KC_A),  KC_7,    KC_8,    KC_9,   S(KC_D), _______,
+  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_1,    KC_2,    KC_3,   S(KC_F), _______,
-  _______, _______, KC_X,    _______, _______, _______, _______,  FUN0 ,   KC_COMM, KC_DOT, KC_COLN, _______
+  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
@@ -711,7 +800,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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
@@ -729,7 +819,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   _______, 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
@@ -747,7 +838,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   _______, 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
@@ -765,7 +857,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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
@@ -783,7 +876,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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)
+    X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK),
+                                           _______, _______, _______
 ),
 
 /* GUI
@@ -801,7 +895,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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
+  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+                                           _______, _______, _______
 ),
 
 /* Sys
@@ -816,10 +911,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------'
  */
 [_SYS] = KEYMAP(
-  XXXXXXX, QWERTY,  WIN,     XXXXXXX, RESET,   XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+  DEBUG,   QWERTY,  WIN,     XXXXXXX, RESET,   XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
   XXXXXXX, FC_TOG,  XXXXXXX, DVORAK,  XXXXXXX, GLOW,    XXXXXXX, XXXXXXX, WORKMAN, LINUX,   XXXXXXX, XXXXXXX,
-  XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN,  OSX,     XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
-  _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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, _______,
+                                           _______, _______, _______
 ),
 
 
@@ -828,6 +924,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 void persistant_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
@@ -1072,14 +1171,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     // 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;
 
@@ -1101,6 +1209,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     // faux clicky indicator
 #ifdef FAUXCLICKY_ENABLE
     case FC_TOG:
+#ifdef RGBSPS_ENABLE
+      if (fauxclicky_enabled) {
+        rgbsps_set(LED_IND_AUDIO, 0, 0, 0);
+      } else {
+        rgbsps_set(LED_IND_AUDIO, 5, 11, 13);
+      }
+      rgbsps_send();
+#endif
       return true;
       break;
 #endif
@@ -1109,12 +1225,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 }
 
 void set_output_user(uint8_t output) {
-#ifdef ADAFRUIT_BLE_ENABLE
+#ifdef MODULE_ADAFRUIT_BLE
   switch(output) {
     case OUTPUT_USB:
       led_set_output_usb();
       break;
-    case OUTPUT_ADAFRUIT_BLE:
+    case OUTPUT_BLUETOOTH:
       led_set_output_ble();
       break;
     default:
@@ -1133,12 +1249,12 @@ void matrix_init_user() {
 #endif
 
   // auto detect output on init
-#ifdef ADAFRUIT_BLE_ENABLE
+#ifdef MODULE_ADAFRUIT_BLE
   uint8_t output = auto_detect_output();
   if (output == OUTPUT_USB) {
     set_output(OUTPUT_USB);
   } else {
-    set_output(OUTPUT_ADAFRUIT_BLE);
+    set_output(OUTPUT_BLUETOOTH);
   }
 #endif
 }
@@ -1164,9 +1280,9 @@ void turn_off_capslock() {
     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_NUM, 15, 0, 0);
+        rgbsps_set(LED_IND_CAPSLOCK, 15, 0, 0);
       } else {
-        rgbsps_set(LED_IND_NUM, 0, 0, 0);
+        rgbsps_set(LED_IND_CAPSLOCK, 0, 0, 0);
       }
       rgbsps_send();
     }
diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c
new file mode 100644 (file)
index 0000000..2b7ce2b
--- /dev/null
@@ -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)
+{
+}
+
index 4943f8c9fc6b1d0edb1efc521c325da235ea7c46..8b1a0c71f2c2d63f8b4ec4af9a03c267d0ef2525 100644 (file)
@@ -2,6 +2,11 @@
 #include "analog.h"
 #include "timer.h"
 #include "matrix.h"
+#include "musical_notes.h"
+
+float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, .03125);
+float fauxclicky_released_note[2] = MUSICAL_NOTE(_C3, .03125);
+float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, .03125);
 
 // 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}
 
index e75cf4dde430e30f01f8fc09598d0e57e63bbaa3..a6dd43b85927c85efafb887e6af754cd58002f26 100644 (file)
@@ -65,12 +65,14 @@ 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
-ADAFRUIT_BLE_ENABLE ?= 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
\ No newline at end of file
+SRC += $(QUANTUM_DIR)/analog.c
+SRC += matrix.c
diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/keymaps/smt/keymap.c
new file mode 100644 (file)
index 0000000..a7ea54d
--- /dev/null
@@ -0,0 +1,176 @@
+/*  -*-  eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include "hhkb.h"
+
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _HHKB 3
+
+enum planck_keycodes {
+  QWERTY = SAFE_RANGE,
+  COLEMAK,
+  DVORAK,
+  HHKB
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+// Custom macros
+#define CTL_ESC     CTL_T(KC_ESC)               // Tap for Esc, hold for Ctrl
+#define SFT_ENT     SFT_T(KC_ENT)               // Tap for Enter, hold for Shift
+#define HPR_TAB     ALL_T(KC_TAB)               // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
+#define MEH_GRV     MEH_T(KC_GRV)               // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+    /* Layer QWERTY: Qwerty Layer
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Esc   | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -     | =   | \     | ` |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Tab   | Q | W | E | R | T | Y | U | I | O | P | [     | ]   | Backs |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Cont  | A | S | D | F | G | H | J | K | L | ; | '     | Ent |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn  |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+            |------+------+-----------------------+------+------|
+            | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+            |------+------+-----------------------+------+------|
+    */
+
+  [_QWERTY] = KEYMAP(  //  Qwerty layer
+  KC_ESC,   KC_1,  KC_2,  KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,    KC_0,     KC_MINS,  KC_EQL,    KC_BSLS,  MEH_GRV, \
+  HPR_TAB,  KC_Q,  KC_W,  KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,    KC_P,     KC_LBRC,  KC_RBRC,   KC_BSPC,           \
+  CTL_ESC,  KC_A,  KC_S,  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     KC_L,    KC_SCLN,  KC_QUOT,  SFT_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,  MO(_HHKB),                    \
+                    KC_LALT,  KC_LGUI,  /*        */ KC_SPC,      KC_RGUI,  KC_RALT),
+
+
+
+    /* Layer COLEMAK: Colemak Layer
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Esc   | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -     | =   | \     | ` |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Tab   | Q | W | F | P | G | J | L | U | Y | ; | [     | ]   | Backs |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Cont  | A | R | S | T | D | H | N | E | I | O | '     | Ent |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Shift | Z | X | C | V | B | K | M | , | . | / | Shift | Fn  |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+            |------+------+-----------------------+------+------|
+            | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+            |------+------+-----------------------+------+------|
+    */
+
+  [_COLEMAK] = KEYMAP(  //  Colemak layer
+  KC_ESC,   KC_1,  KC_2,  KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,    KC_0,     KC_MINS,  KC_EQL,    KC_BSLS,  MEH_GRV, \
+  HPR_TAB,  KC_Q,  KC_W,  KC_F,  KC_P,  KC_G,  KC_J,  KC_L,  KC_U,     KC_Y,    KC_SCLN,  KC_LBRC,  KC_RBRC,   KC_BSPC,           \
+  CTL_ESC,  KC_A,  KC_R,  KC_S,  KC_T,  KC_D,  KC_H,  KC_N,  KC_E,     KC_I,    KC_O,     KC_QUOT,  SFT_ENT,                      \
+  KC_LSFT,  KC_Z,  KC_X,  KC_C,  KC_V,  KC_B,  KC_K,  KC_M,  KC_COMM,  KC_DOT,  KC_SLSH,  KC_RSFT,  MO(_HHKB),                    \
+                    KC_LALT,  KC_LGUI,  /*        */ KC_SPC,      KC_RGUI,  KC_RALT),
+
+
+
+    /* Layer DVORAK: Dvorak Layer
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Esc   | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [     | ]   | \     | ` |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Tab   | ' | , | . | P | Y | F | G | C | R | L | /     | =   | Backs |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Cont  | A | O | E | U | I | D | H | T | N | S | -     | Ent |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn  |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+            |------+------+-----------------------+------+------|
+            | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+            |------+------+-----------------------+------+------|
+    */
+
+  [_DVORAK] = KEYMAP(  //  Dvorak layer
+  KC_ESC,   KC_1,     KC_2,     KC_3,    KC_4,  KC_5,  KC_6,  KC_7,  KC_8,  KC_9,  KC_0,  KC_LBRC,  KC_RBRC,  KC_BSLS,  MEH_GRV, \
+  HPR_TAB,  KC_QUOT,  KC_COMM,  KC_DOT,  KC_P,  KC_Y,  KC_F,  KC_G,  KC_C,  KC_R,  KC_L,  KC_SLSH,  KC_EQL,   KC_BSPC,           \
+  CTL_ESC,  KC_A,     KC_O,     KC_E,    KC_U,  KC_I,  KC_D,  KC_H,  KC_T,  KC_N,  KC_S,  KC_MINS,  SFT_ENT,                     \
+  KC_LSFT,  KC_SCLN,  KC_Q,     KC_J,    KC_K,  KC_X,  KC_B,  KC_M,  KC_W,  KC_V,  KC_Z,  KC_RSFT,  MO(_HHKB),                   \
+                    KC_LALT,  KC_LGUI,  /*        */ KC_SPC,      KC_RGUI,  KC_RALT),
+
+
+
+    /* Layer HHKB: HHKB mode (HHKB Fn)
+      |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+      | Pwr  | F1  | F2  | F3  | F4  | F5  | F6  | F7  | F8  | F9  | F10 | F11 | F12   | Ins   | Del |
+      |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+      | Caps |     |     |     |     |     |     |     | Psc | Slk | Pus | Up  |       | Backs |     |
+      |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+      |      | VoD | VoU | Mut |     |     | *   | /   | Hom | PgU | Lef | Rig | Enter |       |     |
+      |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+      |      |     | Qwt | Cmk | Dvk |     | +   | -   | End | PgD | Dow |     |       |       |     |
+      |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+
+                 |------+------+----------------------+------+------+
+                 | **** | **** | ******************** | **** | **** |
+                 |------+------+----------------------+------+------+
+
+     */
+
+  [_HHKB] = KEYMAP(
+  KC_PWR,   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_INS,   KC_DEL, \
+  KC_CAPS,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    _______,  KC_BSPC,          \
+  _______,  KC_VOLD,  KC_VOLU,  KC_MUTE,  _______,  _______,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_PENT,                    \
+  _______,  _______,  QWERTY,   COLEMAK,  DVORAK,   _______,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  _______,  _______,                    \
+                      _______,  _______,            _______,            _______,  _______)};
+
+
+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 persistant_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) {
+        persistant_default_layer_set(1UL<<_QWERTY);
+      }
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        persistant_default_layer_set(1UL<<_COLEMAK);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        persistant_default_layer_set(1UL<<_DVORAK);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
index 04a2d253c79770a47642c24085bdb28101ae24cb..142aba89094c2df6ddcb4d045fbf9cdbaee9cb0e 100644 (file)
@@ -22,7 +22,7 @@
 #undef MOUSEKEY_WHEEL_MAX_SPEED
 #define MOUSEKEY_WHEEL_MAX_SPEED 3
 #undef MOUSEKEY_WHEEL_TIME_TO_MAX
-#define MOUSEKEY_WHEEL_TIME_TO_MAX 1000
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 255
 #undef ONESHOT_TIMEOUT
 #define ONESHOT_TIMEOUT 500
 #undef TAPPING_TOGGLE
index 9a00c80dc8158bf5af758e19040a70717f523288..9dffbb272c0dbb7dfcb60e0d09b6829a2d7bec83 100644 (file)
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
          _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS),        _______,           _______,          _______,_______,_______,_______, \
          _______,_______,_______,                        _______,                        _______,_______,_______,_______,   _______,_______,_______,  _______,_______),
     /* Layer 3: media layer */
-  [MEDIA] = KEYMAP(\ 
+  [MEDIA] = KEYMAP(\
           KC_PWR,KC_SLEP,KC_WAKE,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,   KC_MPRV,KC_MPLY,KC_MNXT,  XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \
          XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,   KC_VOLD,KC_MUTE,KC_VOLU,  XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \
diff --git a/keyboards/mitosis/Makefile b/keyboards/mitosis/Makefile
new file mode 100644 (file)
index 0000000..4e2a6f0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h
new file mode 100644 (file)
index 0000000..cb6378a
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+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    unknown
+#define PRODUCT         Mitosis
+#define DESCRIPTION     q.m.k. keyboard firmware for Mitosis
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 10
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+//#define BACKLIGHT_LEVELS 3
+
+#define ONESHOT_TIMEOUT 500
+
+
+/* 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.
+ */
+
+#define PREVENT_STUCK_MODIFIERS
+
+/* 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
+
+//UART settings for communication with the RF microcontroller
+#define SERIAL_UART_BAUD 1000000
+#define SERIAL_UART_DATA UDR1
+#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
+#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
+#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
+#define SERIAL_UART_INIT() do { \
+       /* baud rate */ \
+       UBRR1L = SERIAL_UART_UBRR; \
+       /* baud rate */ \
+       UBRR1H = SERIAL_UART_UBRR >> 8; \
+       /* enable TX and RX */ \
+       UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
+       /* 8-bit data */ \
+       UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
+       } while(0)
+
+#endif
diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..320d33d
--- /dev/null
@@ -0,0 +1,221 @@
+// this is the style you want to emulate.
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+
+#include "mitosis.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum mitosis_layers
+{
+       _MALT,
+       _SHIFTED,
+       _FUNCTION,
+       _FUNCSHIFT
+};
+
+enum mitosis_keycodes 
+{
+  FNKEY = SAFE_RANGE,
+  SHIFT
+};
+
+
+// Macro definitions for readability
+enum mitosis_macros
+{
+       VOLU,
+       VOLD,
+       ESCM
+};
+
+#define LONGPRESS_DELAY 150
+#define LAYER_TOGGLE_DELAY 300
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_MALT] = { /* Malt Layout, customised for reduced columns (ex: quote and shift locations) */
+  {KC_Q,    KC_P,    KC_Y,    KC_C,    KC_B,           KC_V,    KC_M,    KC_U,    KC_Z,    KC_L    },
+  {KC_A,    KC_N,    KC_I,    KC_S,    KC_F,           KC_D,    KC_T,    KC_H,    KC_O,    KC_R    },
+  {KC_COMM, KC_DOT,  KC_J,    KC_G,    KC_SLSH,        KC_SCLN, KC_W,    KC_K,    KC_QUOT, KC_X    },
+  {XXXXXXX, M(VOLU), M(ESCM), KC_TAB,  KC_LCTL,        KC_LALT, KC_ENT,  KC_DEL,  KC_PGUP, XXXXXXX },
+  {XXXXXXX, M(VOLD), KC_LGUI, KC_E,    FNKEY,          SHIFT,   KC_SPC,  KC_BSPC, KC_PGDN, XXXXXXX }
+},
+
+
+[_SHIFTED] = { /* Shifted Layer, layered so that tri_layer can be used, or selectively
+                                 able to modify individual key's shifted behaviour */
+  {_______, _______, _______, _______, _______,       _______, _______, _______, _______, _______ },
+  {_______, _______, _______, _______, _______,       _______, _______, _______, _______, _______ },
+  {_______, _______, _______, _______, _______,       _______, _______, _______, _______, _______ },
+  {XXXXXXX, _______, _______, _______, _______,       _______, _______, _______, _______, XXXXXXX },
+  {XXXXXXX, _______, _______, _______, _______,       _______, _______, _______, _______, XXXXXXX }
+},
+
+
+
+[_FUNCTION] = { /* Function Layer, primary alternative layer featuring numpad on right hand,
+                                   cursor keys on left hand, and all symbols*/
+  {KC_AMPR, KC_PERC, KC_UP,   KC_CIRC, KC_PIPE,       KC_LBRC, KC_7,    KC_8,    KC_9,    KC_MINS },
+  {KC_AT,   KC_LEFT, KC_DOWN, KC_RGHT, KC_HASH,       KC_LPRN, KC_4,    KC_5,    KC_6,    KC_PLUS },
+  {KC_ASTR, KC_UNDS, KC_EXLM, KC_DLR,  KC_BSLS,       KC_LCBR, KC_1,    KC_2,    KC_3,    KC_ENT  },
+  {XXXXXXX, KC_HOME, KC_GRV,  KC_PWR,  _______,       _______, KC_EQL,  KC_TILD, KC_DOT,  XXXXXXX },
+  {XXXXXXX, KC_END,  _______, _______, _______,       _______, KC_0,    _______, KC_PSCR, XXXXXXX }
+},
+
+
+[_FUNCSHIFT] = { /* Function Shifted Layer, secondary alternative layer with closing brackets,
+                                            and F-keys under their numpad equivalents*/
+  {_______, _______, _______, _______, _______,       KC_RBRC, KC_F7,   KC_F8,   KC_F9,   KC_F10  },
+  {_______, _______, _______, _______, _______,       KC_RPRN, KC_F4,   KC_F5,   KC_F6,   KC_F11  },
+  {_______, _______, _______, _______, _______,       KC_RCBR, KC_F1,   KC_F2,   KC_F3,   KC_F12  },
+  {XXXXXXX, _______, _______, _______, _______,       _______, _______, _______, _______, XXXXXXX },
+  {XXXXXXX, _______, _______, _______, _______,       _______, _______, _______, _______, XXXXXXX }
+}
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+static uint16_t key_timer;
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+    switch(id) {
+
+       //switch multiplexing for media, short tap for volume up, long press for play/pause
+        case VOLU:
+            if (record->event.pressed) {
+               key_timer = timer_read(); // if the key is being pressed, we start the timer.
+               } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
+               if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap.
+                  return MACRO(T(MPLY), END);
+                } else {
+                  return MACRO(T(VOLU), END);
+                }
+               }
+               break;
+
+               //switch multiplexing for media, short tap for volume down, long press for next track
+        case VOLD:
+            if (record->event.pressed) {
+               key_timer = timer_read();
+               } else {
+               if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
+                  return MACRO(T(MNXT), END);
+                } else {
+                  return MACRO(T(VOLD), END);
+                }
+               }
+               break;
+
+        //switch multiplexing for escape, short tap for escape, long press for context menu
+        case ESCM:
+            if (record->event.pressed) {
+               key_timer = timer_read();
+               } else {
+               if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
+                  return MACRO(T(APP), END);
+                } else {
+                  return MACRO(T(ESC), END);
+                }
+               }
+               break;     
+
+        break;
+    }
+    return MACRO_NONE;
+};
+
+static bool singular_key = false;
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+       uint8_t layer;
+  layer = biton32(layer_state);  // get the current layer
+
+  //custom layer handling for tri_layer,
+  switch (keycode) {
+  case FNKEY:
+       if (record->event.pressed) {
+      key_timer = timer_read();
+      singular_key = true;
+       layer_on(_FUNCTION);
+       } else {
+      if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
+        layer_off(_FUNCTION);
+      }
+       }
+    update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT);
+       return false;
+       break;
+  //SHIFT is handled as LSHIFT in the general case
+  case SHIFT:
+       if (record->event.pressed) {
+      key_timer = timer_read();
+      singular_key = true;
+       layer_on(_SHIFTED);
+       register_code(KC_LSFT);
+       } else {
+       if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
+        layer_off(_SHIFTED);
+         unregister_code(KC_LSFT);
+      }
+    }
+    update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT);
+       return false;
+       break;
+
+  //If any other key was pressed during the layer mod hold period,
+  //then the layer mod was used momentarily, and should block latching
+  default:
+    singular_key = false;
+    break;
+  }
+
+  //FUNCSHIFT has been shifted by the SHIFT handling, some keys need to be excluded
+  if (layer == _FUNCSHIFT) {
+       //F1-F12 should be sent as unshifted keycodes, 
+       //and ] needs to be unshifted or it is sent as }
+       if ( (keycode >= KC_F1 && keycode <= KC_F12)
+          || keycode == KC_RBRC ) {
+               if (record->event.pressed) {
+              unregister_mods(MOD_LSFT);
+          } else {
+              register_mods(MOD_LSFT);
+          }
+       }
+  }
+
+  return true;
+};
+
+void matrix_scan_user(void) {
+    uint8_t layer = biton32(layer_state);
+    
+    switch (layer) {
+       case _MALT:
+               set_led_off;
+               break;
+        case _FUNCTION:
+            set_led_blue;
+            break;
+        case _SHIFTED:
+            set_led_red;
+            break;
+        case _FUNCSHIFT:
+               set_led_green;
+               break;
+        default:
+            break;
+    }
+};
+
diff --git a/keyboards/mitosis/matrix.c b/keyboards/mitosis/matrix.c
new file mode 100644 (file)
index 0000000..0d04633
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2014 Jack Humbert
+
+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"
+
+#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
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+
+__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) {
+
+    matrix_init_quantum();
+}
+
+uint8_t matrix_scan(void)
+{
+    SERIAL_UART_INIT();
+
+    uint32_t timeout = 0;
+
+    //the s character requests the RF slave to send the matrix
+    SERIAL_UART_DATA = 's';
+
+    //trust the external keystates entirely, erase the last data
+    uint8_t uart_data[11] = {0};
+
+    //there are 10 bytes corresponding to 10 columns, and an end byte
+    for (uint8_t i = 0; i < 11; i++) {
+        //wait for the serial data, timeout if it's been too long
+        //this only happened in testing with a loose wire, but does no
+        //harm to leave it in here
+        while(!SERIAL_UART_RXD_PRESENT){
+            timeout++;
+            if (timeout > 10000){
+                break;
+            }
+        } 
+        uart_data[i] = SERIAL_UART_DATA;
+    }
+
+    //check for the end packet, the key state bytes use the LSBs, so 0xE0
+    //will only show up here if the correct bytes were recieved
+    if (uart_data[10] == 0xE0)
+    {
+        //shifting and transferring the keystates to the QMK matrix variable
+        for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+            matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5;
+        }
+    }
+
+
+    matrix_scan_quantum();
+    return 1;
+}
+
+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_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;
+}
diff --git a/keyboards/mitosis/mitosis.c b/keyboards/mitosis/mitosis.c
new file mode 100644 (file)
index 0000000..24de827
--- /dev/null
@@ -0,0 +1,31 @@
+#include "mitosis.h"
+
+void uart_init(void) {
+       SERIAL_UART_INIT();
+}
+
+void led_init(void) {
+       DDRD  |= (1<<1);
+       PORTD |= (1<<1);
+       DDRF  |= (1<<4) | (1<<5);
+       PORTF |= (1<<4) | (1<<5);
+}
+
+
+void matrix_init_kb(void) {
+       // put your keyboard start-up code here
+       // runs once when the firmware starts up
+       matrix_init_user();
+       uart_init();
+       led_init();
+}
+
+void matrix_scan_kb(void) {
+       // put your looping keyboard code here
+       // runs every cycle (a lot)
+       matrix_scan_user();
+}
+
+void led_set_kb(uint8_t usb_led) {
+
+}
\ No newline at end of file
diff --git a/keyboards/mitosis/mitosis.h b/keyboards/mitosis/mitosis.h
new file mode 100644 (file)
index 0000000..1b04600
--- /dev/null
@@ -0,0 +1,67 @@
+#ifndef MITOSIS_H
+#define MITOSIS_H
+
+#include "quantum.h"
+#include "matrix.h"
+#include "backlight.h"
+#include <stddef.h>
+
+#define red_led_off   PORTF |= (1<<5)
+#define red_led_on    PORTF &= ~(1<<5)
+#define blu_led_off   PORTF |= (1<<4)
+#define blu_led_on    PORTF &= ~(1<<4)
+#define grn_led_off   PORTD |= (1<<1)
+#define grn_led_on    PORTD &= ~(1<<1)
+
+#define set_led_off     red_led_off; grn_led_off; blu_led_off
+#define set_led_red     red_led_on;  grn_led_off; blu_led_off
+#define set_led_blue    red_led_off; grn_led_off; blu_led_on
+#define set_led_green   red_led_off; grn_led_on;  blu_led_off
+#define set_led_yellow  red_led_on;  grn_led_on;  blu_led_off
+#define set_led_magenta red_led_on;  grn_led_off; blu_led_on
+#define set_led_cyan    red_led_off; grn_led_on;  blu_led_on
+#define set_led_white   red_led_on;  grn_led_on;  blu_led_on
+
+/*
+#define LED_B 5
+#define LED_R 6
+#define LED_G 7
+
+#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
+
+#define red_led_on   PORTF |= (1<<LED_R)
+#define red_led_off  PORTF &= ~(1<<LED_R)
+#define grn_led_on   PORTF |= (1<<LED_G)
+#define grn_led_off  PORTF &= ~(1<<LED_G)
+#define blu_led_on   PORTF |= (1<<LED_B)
+#define blu_led_off  PORTF &= ~(1<<LED_B)
+
+#define set_led_off     PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
+#define set_led_red     PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
+#define set_led_blue    PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
+#define set_led_green   PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
+#define set_led_yellow  PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
+#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
+#define set_led_cyan    PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
+#define set_led_white   PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
+*/
+
+// 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, k06, k07, k08, k09, \
+  k10, k11, k12, k13, k14,      k15, k16, k17, k18, k19, \
+  k20, k21, k22, k23, k24,      k25, k26, k27, k28, k29, \
+       k31, k32, k33, k34,      k35, k36, k37, k38,      \
+       k41, k42, k43, k44,      k45, k46, k47, k48       \
+) \
+{ \
+       { 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   }, \
+       { KC_NO, k31, k32, k33, k34,      k35, k36, k37, k38, KC_NO }  \
+       { KC_NO, k41, k42, k43, k44,      k45, k46, k47, k48, KC_NO }, \
+}
+
+#endif
diff --git a/keyboards/mitosis/readme.md b/keyboards/mitosis/readme.md
new file mode 100644 (file)
index 0000000..70755e3
--- /dev/null
@@ -0,0 +1,33 @@
+Mitosis Keyboard Firmware
+======================
+
+These configuration files were based off the Atreus keyboard. It assumes a Pro Micro is being used, however retains the 'make upload' feature from the Atreus branch. This keyboard uses a completely different 'matrix scan' system to other keyboards, it relies on an external nRF51822 microcontroller maintaining a matrix of keystates received from the keyboard halves. The matrix.c file contains the code to poll the external microcontroller for the key matrix. As long as this file is not changed, all other QMK features are supported.
+
+Build log of the keyboard can be found [here](https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/)
+
+Hardware design files can be found [here](https://github.com/reversebias/mitosis-hardware)
+
+Firmware for the nordic MCUs can be found [here](https://github.com/reversebias/mitosis)
+
+## 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/atreus 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 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.
diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk
new file mode 100644 (file)
index 0000000..4e4eba8
--- /dev/null
@@ -0,0 +1,81 @@
+
+OPT_DEFS += -DMITOSIS_PROMICRO
+OPT_DEFS += -DCATERINA_BOOTLOADER
+MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+                         avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+
+# # project specific files
+SRC = matrix.c
+
+
+# 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
+#   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
+CUSTOM_MATRIX ?= yes    # Remote matrix from the wireless bridge
+# 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 - not yet supported in LUFA
+# 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
+
+USB ?= /dev/ttyACM0
+
+upload: build
+       $(MITOSIS_UPLOAD_COMMAND)
diff --git a/keyboards/planck/keymaps/lae3/Makefile b/keyboards/planck/keymaps/lae3/Makefile
new file mode 100644 (file)
index 0000000..595803e
--- /dev/null
@@ -0,0 +1,23 @@
+# 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 = yes       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = yes           # 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/planck/keymaps/lae3/config.h b/keyboards/planck/keymaps/lae3/config.h
new file mode 100644 (file)
index 0000000..a28634e
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef LAE3_KEYMAP_H
+#define LAE3_KEYMAP_H
+
+#include "../../config.h"
+
+#define PREVENT_STUCK_MODIFIERS
+
+#endif
diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c
new file mode 100644 (file)
index 0000000..4127a3a
--- /dev/null
@@ -0,0 +1,262 @@
+#include "planck.h"
+#include "action_layer.h"
+#ifdef AUDIO_ENABLE
+#include "audio.h"
+#endif
+#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.
+enum planck_layers {
+    _QWERTY,
+    _ARROW,
+    _NUMPAD,
+    _MOVEMENT,
+    _LOWER,
+    _RAISE,
+    _ADJUST
+};
+
+#define _MV _MOVEMENT
+
+enum planck_keycodes {
+    QWERTY = SAFE_RANGE,
+    ARROW,
+    NUMPAD,
+    LOWER,
+    RAISE,
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+#define KC_MUP KC_MS_UP
+#define KC_MDN KC_MS_DOWN
+#define KC_MLFT KC_MS_LEFT
+#define KC_MRGT KC_MS_RIGHT
+#define KC_MB1 KC_MS_BTN1
+#define KC_MB2 KC_MS_BTN2
+#define KC_MB3 KC_MS_BTN3
+#define KC_MB4 KC_MS_BTN4
+#define KC_MB5 KC_MS_BTN5
+#define KC_MWUP KC_MS_WH_UP
+#define KC_MWDN KC_MS_WH_DOWN
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+    /* Qwerty
+     * ,-----------------------------------------------------------------------------------.
+     * | Esc  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * | Tab  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |Enter |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |Shift |   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Shift |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * | Ctrl | GUI  | Alt  | Move |Lower |    Space    |Raise | Move | Alt  | GUI  | Ctrl |
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_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},
+        {KC_TAB,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, 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_LGUI, KC_LALT, MO(_MV), LOWER,   KC_SPC,  KC_SPC,  RAISE,   MO(_MV), KC_RALT, KC_RGUI, KC_RCTL}
+    },
+
+    /* Arrow
+     * ,-----------------------------------------------------------------------------------.
+     * |      |      |      |      |      |      |      |      |      |      |      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |      |      |      |      |      |      |      |      |      |      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |      |      |      |      |      |      |      |      |      |  Up  |      |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * |      |      |      |      |      |             |      |      | Left | Down | Right|
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_ARROW] = {
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP,   _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT}
+    },
+
+    /* Numpad
+     * ,-----------------------------------------------------------------------------------.
+     * |      |      |      |      |      |      |NumLck|   7  |   8  |   9  |   /  |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |      |      |      |      |      |Enter |   4  |   5  |   6  |   *  |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |      |      |      |      |      |      |   3  |   2  |   1  |   -  |      |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * |      |      |      |      |      |             |      |   0  |   .  |   +  |      |
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_NUMPAD] = {
+        {_______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7,   KC_P8,   KC_P9,   KC_PSLS, _______},
+        {_______, _______, _______, _______, _______, _______, KC_PENT, KC_P4,   KC_P5,   KC_P6,   KC_PAST, _______},
+        {_______, _______, _______, _______, _______, _______, _______, KC_P1,   KC_P2,   KC_P3,   KC_PMNS, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, KC_P0,   KC_PDOT, KC_PPLS, _______}
+    },
+
+    /* Movement
+     * ,-----------------------------------------------------------------------------------.
+     * |      |MsBut2|Ms Up |MsBut1|MsWhUp|      | Home | PgDn | PgUp |  End |      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |Ms Lft|Ms Dn |Ms Rgt|MsWhDn|      | Left | Down |  Up  | Right|      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |      |      |      |      |      |      |      |      |      |      |      |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * |      |      |      |      |      |             |      |      |      |      |      |
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_MOVEMENT] = {
+        {_______, KC_MB2,  KC_MUP,  KC_MB1,  KC_MWUP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END,  _______, _______},
+        {_______, KC_MLFT, KC_MDN,  KC_MRGT, KC_MWDN, _______, KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT, _______, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+    },
+
+    /* Lower
+     * ,-----------------------------------------------------------------------------------.
+     * |   `  |   1  |   2  |   3  |   4  |   5  |   -  |   =  |  Del | End  | PgDn |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * | Caps |   6  |   7  |   8  |   9  |   0  |   [  |   ]  |   \  |   '  |      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |  F1  |  F2  |  F3  |  F4  |      |      |  F5  |  F6  |  F7  |  F8  |      |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * |      |      |      |      |      |             |      |      |      |      |      |
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_LOWER] = {
+        {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_MINS, KC_EQL,  KC_DEL,  KC_END,  KC_PGDN, _______},
+        {KC_CAPS, KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, XXXXXXX, _______},
+        {_______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   XXXXXXX, XXXXXXX, KC_F5,   KC_F6,   KC_F7,   KC_F8,   _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+    },
+
+    /* Raise
+     * ,-----------------------------------------------------------------------------------.
+     * |   ~  |   !  |   @  |   #  |   $  |   %  |   _  |   +  |  Ins | Home | PgUp |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * | Caps |   ^  |   &  |   *  |   (  |   )  |   {  |   }  |   |  |   "  |      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |  F9  |  F10 |  F11 |  F12 |      |      |      |      |      |      |      |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * |      |      |      |      |      |             |      |      |      |      |      |
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_RAISE] = {
+        {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_UNDS, KC_PLUS, KC_INS,  KC_HOME, KC_PGUP, _______},
+        {KC_CAPS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, XXXXXXX, _______},
+        {_______, KC_F9,   KC_F10,  KC_F11,  KC_F12,  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+    },
+
+    /* Adjust (Lower + Raise)
+     * ,-----------------------------------------------------------------------------------.
+     * |Reset |      |      |      |      |      |      |      |      |      |      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |Bcklgt| Mute |Vol Dn|Vol Up|      |      |Qwerty|Arrow |Numpad|      |      |
+     * |------+------+------+------+------+------+------+------+------+------+------+------|
+     * |      |      |      |      |      |      |      |      |      |      |      |      |
+     * |------+------+------+------+------+-------------+------+------+------+------+------|
+     * |      |      |      |      |      |             |      |      |      |      |      |
+     * `-----------------------------------------------------------------------------------'
+     */
+    [_ADJUST] = {
+        {RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+        {_______, BL_STEP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QWERTY,  ARROW,   NUMPAD,  _______, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+    }
+
+};
+
+#ifdef AUDIO_ENABLE
+
+float tone_startup[][2]    = SONG(STARTUP_SOUND);
+float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
+
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+    switch (keycode) {
+        case LOWER:
+            if (record->event.pressed) {
+                layer_on(_LOWER);
+            } else {
+                layer_off(_LOWER);
+            }
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+            return false;
+        case RAISE:
+            if (record->event.pressed) {
+                layer_on(_RAISE);
+            } else {
+                layer_off(_RAISE);
+            }
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+            return false;
+        case QWERTY:
+            if (record->event.pressed) {
+                layer_off(_ARROW);
+                layer_off(_NUMPAD);
+            }
+            return false;
+        case ARROW:
+            if (record->event.pressed) {
+                layer_off(_NUMPAD);
+                layer_on(_ARROW);
+            }
+            return false;
+        case NUMPAD:
+            if (record->event.pressed) {
+                layer_off(_ARROW);
+                layer_on(_NUMPAD);
+            }
+            return false;
+    }
+    return true;
+}
+
+void matrix_init_user(void)
+{
+#ifdef AUDIO_ENABLE
+    startup_user();
+#endif
+}
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+    _delay_ms(100); // 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/planck/keymaps/lae3/readme.md b/keyboards/planck/keymaps/lae3/readme.md
new file mode 100644 (file)
index 0000000..57a2f38
--- /dev/null
@@ -0,0 +1,111 @@
+# Lae3
+_Keymap based around mode-switching for extended functionality_
+
+## Base Layout
+
+    ┌-----------------------------------------------------------------------------------┐
+    | Esc  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    | Tab  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |Enter |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |Shift |   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Shift |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    | Ctrl | GUI  | Alt  | Move |Lower |    Space    |Raise | Move | Alt  | GUI  | Ctrl |
+    └-----------------------------------------------------------------------------------┘
+
+This is more similar to a standard keyboard layout than the standard planck
+layout, but I have found that this is better for programming, especially for
+editor shortcuts.
+
+## Lower Layer
+
+    ┌-----------------------------------------------------------------------------------┐
+    |   `  |   1  |   2  |   3  |   4  |   5  |   -  |   =  |  Del | End  | PgDn |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    | Caps |   6  |   7  |   8  |   9  |   0  |   [  |   ]  |   \  |   '  |      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |  F1  |  F2  |  F3  |  F4  |      |      |  F5  |  F6  |  F7  |  F8  |      |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    |      |      |      |      |      |             |      |      |      |      |      |
+    └-----------------------------------------------------------------------------------┘
+
+All the numbers are on one hand so that they can all be easily accessed when
+playing games. The punctuation was placed in a way that is as similar as
+possible the qwerty punctuation layout on a standard keyboard.
+
+## Raise Layer
+
+    ┌-----------------------------------------------------------------------------------┐
+    |   ~  |   !  |   @  |   #  |   $  |   %  |   _  |   +  |  Ins | Home | PgUp |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    | Caps |   ^  |   &  |   *  |   (  |   )  |   {  |   }  |   |  |   "  |      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |  F9  |  F10 |  F11 |  F12 |      |      |      |      |      |      |      |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    |      |      |      |      |      |             |      |      |      |      |      |
+    └-----------------------------------------------------------------------------------┘
+
+This layer with the exception of the function and control keys is effectively
+the lower layer in combination with the shift key, like on the standard planck
+layout.
+
+## Movement Layer
+
+    ┌-----------------------------------------------------------------------------------┐
+    |      |MsBut2|Ms Up |MsBut1|MsWhUp|      | Home | PgDn | PgUp |  End |      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |Ms Lft|Ms Dn |Ms Rgt|MsWhDn|      | Left | Down |  Up  | Right|      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |      |      |      |      |      |      |      |      |      |      |      |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    |      |      |      |      |      |             |      |      |      |      |      |
+    └-----------------------------------------------------------------------------------┘
+
+Layer for simplifying movement.
+
+## Meta Layer
+
+    ┌-----------------------------------------------------------------------------------┐
+    |Reset |      |      |      |      |      |      |      |      |      |      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |Bcklgt| Mute |Vol Dn|Vol Up|      |      |Qwerty|Arrow |Numpad|      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |      |      |      |      |      |      |      |      |      |      |      |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    |      |      |      |      |      |             |      |      |      |      |      |
+    └-----------------------------------------------------------------------------------┘
+
+This Layer is activated when pressing both the Lower and Raise keys. The Arrow
+and Numpad keys each activate a layer between the base layer and the Movement
+layer. The Qwerty key disables both of the layers leaving just the base layer
+active.
+
+## Arrow Layer
+
+    ┌-----------------------------------------------------------------------------------┐
+    |      |      |      |      |      |      |      |      |      |      |      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |      |      |      |      |      |      |      |      |      |      |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |      |      |      |      |      |      |      |      |      |  Up  |      |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    |      |      |      |      |      |             |      |      | Left | Down | Right|
+    └-----------------------------------------------------------------------------------┘
+
+Replaces the bottom right of the keyboard with arrow keys for games like The
+Binding of Isaac.
+
+## Numpad Layer
+
+    ┌-----------------------------------------------------------------------------------┐
+    |      |      |      |      |      |      |NumLck|   7  |   8  |   9  |   /  |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |      |      |      |      |      |Enter |   4  |   5  |   6  |   *  |      |
+    |------+------+------+------+------+------+------+------+------+------+------+------|
+    |      |      |      |      |      |      |      |   3  |   2  |   1  |   -  |      |
+    |------+------+------+------+------+-------------+------+------+------+------+------|
+    |      |      |      |      |      |             |      |   0  |   .  |   +  |      |
+    └-----------------------------------------------------------------------------------┘
+
+Replaces the majority of the right side of the keyboard with a numpad because
+why not?
index 2208780b18277ecb3bbb8b8d69abc34eee7461cf..491cd1d07d54656368a2375b4812ea16080f36bb 100644 (file)
@@ -153,12 +153,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
     case 1: // M(1)
         if (record->event.pressed) {
             unregister_code(KC_LSFT);
-            register_code(DE_MORE);
+            register_code(DE_LESS);
         } else {
-            unregister_code(DE_MORE);
+            unregister_code(DE_LESS);
         }
         break;    
   }
   return MACRO_NONE;
 
-};          
\ No newline at end of file
+};          
index 82e4a25c606024f598749012760ecf852517555a..adc1c69aa5522b126126742d9e2940803b2f23c5 100644 (file)
@@ -27,7 +27,8 @@
     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 \
+    k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
+    tp1, tp2, tp3 \
 ) \
 { \
     {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c}, \
index 5d217e261520e3d43cb4807046fcc731104b6b31..a500a36494132b380ca594abff6f66e553170507 100644 (file)
@@ -212,10 +212,10 @@ const uint16_t PROGMEM fn_actions[] = {
 
 #ifdef AUDIO_ENABLE
 float start_up[][2] = {
-  {440.0*pow(2.0,(14)/12.0), 20},
-  {440.0*pow(2.0,(26)/12.0), 8},
-  {440.0*pow(2.0,(18)/12.0), 20},
-  {440.0*pow(2.0,(26)/12.0), 8}
+   MUSICAL_NOTE(_B5, 20),
+   MUSICAL_NOTE(_B6, 8),
+   MUSICAL_NOTE(_DS6, 20),
+   MUSICAL_NOTE(_B6, 8),
 };
 
 float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
@@ -323,7 +323,7 @@ void matrix_init_user(void) {
 
 #ifdef AUDIO_ENABLE
 
-void play_goodbye_tone()
+void play_goodbye_tone(void)
 {
   PLAY_NOTE_ARRAY(goodbye, false, 0);
   _delay_ms(150);
index 00347b01906a5cec48fada00b3e635dd50684e47..3ff16de35f091d10e02e40637c2fdf7b3d110e44 100644 (file)
@@ -4,16 +4,23 @@
 
 extern keymap_config_t keymap_config;
 
-#define _DV 0
-#define _QW 1
-#define _CM 2
-#define _L1 3
-#define _L2 4
+enum planck_layers {
+  _QWERTY,
+  _COLEMAK,
+  _DVORAK,
+  _LOWER,
+  _RAISE,
+  _ADJUST
+};
 
-// Macro name shortcuts
-#define DVORAK M(_DV)
-#define QWERTY M(_QW)
-#define COLEMAK M(_CM)
+enum planck_keycodes {
+  DVORAK = SAFE_RANGE,
+  QWERTY,
+  COLEMAK,
+  LOWER,
+  RAISE,
+  ADJUST
+};
 
 // Fillers to make layering more clear
 #define _______ KC_TRNS
@@ -21,45 +28,47 @@ extern keymap_config_t keymap_config;
 
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-  [_DV] = { /* 0: Dvorak */
-    {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_SLSH },
-    {MO(_L1), KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    LT(_L2, KC_MINS)},
-    {KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_RSFT },
-    {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC,  KC_BSLS, KC_EQL,  XXXXXXX, KC_ENT  }
+  [_DVORAK] = { /* 0: Dvorak */
+    {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_SLSH},
+    {KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_MINS},
+    {KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_RSFT},
+    {KC_LCTL, KC_LALT, LOWER,   KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC,  RAISE,   KC_LGUI, XXXXXXX, KC_ENT }
   },
 
-  [_QW] = { /* 1: Qwerty */
-    {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC },
-    {MO(_L1), KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, LT(_L2, KC_QUOT)},
-    {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, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC,  KC_SLSH, KC_MINS, XXXXXXX, KC_ENT  }
+  [_QWERTY] = { /* 1: Qwerty */
+    {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_SCLN, KC_QUOT},
+    {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, LOWER,   KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC,  RAISE,   KC_LGUI, XXXXXXX, KC_ENT }
   },
 
-  [_CM] = { /* 2: Colemak */
-    {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC },
-    {MO(_L1), KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    LT(_L2, 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_RSFT },
-    {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC,  KC_SLSH, KC_MINS, XXXXXXX, KC_ENT  }
+  [_COLEMAK] = { /* 2: Colemak */
+    {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
+    {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_RSFT},
+    {KC_LCTL, KC_LALT, LOWER,   KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC,  RAISE,   KC_LGUI, XXXXXXX, KC_ENT }
   },
 
-  [_L1] = {/* 1: FN 1 */
-    {KC_GRV,  KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL  },
-    {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_DOWN, KC_UP,   KC_LEFT, KC_RGHT, _______ },
-    {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT },
-    {KC_ESC,  KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_EQL,  _______, _______ }
+  [_LOWER] = {/* 1: FN 1 */
+    {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE},
+    {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+    {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______},
+    {KC_LEFT, KC_RGHT, _______, KC_DEL,  XXXXXXX, XXXXXXX, XXXXXXX, KC_INS,  _______, KC_UP,   XXXXXXX, KC_DOWN}
   },
 
-  [_L2] = { /* 2: FN 2 */
-    {KC_TILD, KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_ESC  },
-    {_______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   _______, KC_HOME, KC_PGUP, KC_VOLU, _______ },
-    {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, KC_END,  KC_PGDN, KC_VOLD, _______ },
-    {QWERTY,  DVORAK,  COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PLUS, _______, _______ }
-  }
-
-};
-
-const uint16_t PROGMEM fn_actions[] = {
+  [_RAISE] = { /* 2: FN 2 */
+    {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSLS},
+    {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
+    {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______},
+    {KC_LEFT, KC_RGHT, _______, KC_DEL,  XXXXXXX, XXXXXXX, XXXXXXX, KC_INS,  _______, KC_UP,   XXXXXXX, KC_DOWN}
+  },
 
+  [_ADJUST] = {
+    {KC_F11,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F12 },
+    {_______, RESET,   _______, _______, _______, _______, _______, QWERTY,  COLEMAK, DVORAK,  _______, _______},
+    {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+    {KC_HOME, KC_END,  _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PGUP, XXXXXXX, KC_PGDN}
+  }
 };
 
 void persistant_default_layer_set(uint16_t default_layer) {
@@ -67,26 +76,46 @@ void persistant_default_layer_set(uint16_t default_layer) {
   default_layer_set(default_layer);
 }
 
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-      switch(id) {
-        case _DV:
-          if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DV);
-          }
-          break;
-        case _QW:
-          if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QW);
-          }
-          break;
-        case _CM:
-          if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_CM);
-          }
-          break;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        persistant_default_layer_set(1UL<<_QWERTY);
       }
-    return MACRO_NONE;
-};
-
-
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        persistant_default_layer_set(1UL<<_COLEMAK);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        persistant_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;
+  }
+  return true;
+}
index 13273e7058e70ee880a145959ca2a7b6109df91e..c3341ca3326bbf948de997028bd2cbaf81f7a5aa 100644 (file)
@@ -20,13 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <stdbool.h>
 #include <musical_notes.h>
 
-__attribute__ ((weak))
-float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, 2);
-__attribute__ ((weak))
-float fauxclicky_released_note[2] = MUSICAL_NOTE(_A3, 2);
-__attribute__ ((weak))
-float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, 2);
-
 bool fauxclicky_enabled = true;
 uint16_t note_start = 0;
 bool note_playing = false;
@@ -48,13 +41,13 @@ void fauxclicky_stop()
     note_playing = false;
 }
 
-void fauxclicky_play(float note[2]) {
+void fauxclicky_play(float note[]) {
     if (!fauxclicky_enabled) return;
     if (note_playing) fauxclicky_stop();
-    FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER));
-    FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)) / 2);
+    FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * (float)FAUXCLICKY_CPU_PRESCALER));
+    FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * (float)FAUXCLICKY_CPU_PRESCALER)) / (float)2);
     note_playing = true;
-    note_period = (note[1] / 16) * (60 / (float)FAUXCLICKY_TEMPO) * 100;   // check this
+    note_period = (note[1] / (float)16) * ((float)60 / (float)FAUXCLICKY_TEMPO) * 1000;
     note_start = timer_read();
     FAUXCLICKY_ENABLE_OUTPUT;
 }
index 109bd0d83eb83621f297b1210571c12038e2cbb8..1a8e188dd5304428b9987ecc9f475f00b90ac5ae 100644 (file)
@@ -21,11 +21,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "stdbool.h"
 
 __attribute__ ((weak))
-float fauxclicky_pressed_note[2];
+float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_D4, 0.25);
 __attribute__ ((weak))
-float fauxclicky_released_note[2];
+float fauxclicky_released_note[2] = MUSICAL_NOTE(_C4, 0.125);
 __attribute__ ((weak))
-float fauxclicky_beep_note[2];
+float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C4, 0.25);
 
 bool fauxclicky_enabled;
 
@@ -73,11 +73,11 @@ bool fauxclicky_enabled;
 #endif
 
 #ifndef FAUXCLICKY_ENABLE_OUTPUT
-#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1);
+#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1)
 #endif
 
 #ifndef FAUXCLICKY_DISABLE_OUTPUT
-#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0));
+#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0))
 #endif
 
 #ifndef FAUXCLICKY_TIMER_PERIOD
index 6cf4f031fffd450eb0e9e73aee7e18fbe95e50ef..9dafc8b5165ff37c6d244c3ce872f6c03cf387d5 100644 (file)
@@ -179,5 +179,12 @@ uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
 __attribute__ ((weak))
 uint16_t keymap_function_id_to_action( uint16_t function_id )
 {
+    // The compiler sees the empty (weak) fn_actions and generates a warning
+    // This function should not be called in that case, so the warning is too strict
+    // If this function is called however, the keymap should have overridden fn_actions, and then the compile
+    // is comparing against the wrong array
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Warray-bounds"
        return pgm_read_word(&fn_actions[function_id]);
+    #pragma GCC diagnostic pop
 }
index 8332e00af3bbb67100149cd583f7112398762b1c..67350d66022914acf21c5b93e60432aba8b59aaa 100644 (file)
 #define CH_E KC_E
 #define CH_F KC_F
 #define CH_G KC_G
+#ifdef CH_H
+// The ChibiOS ch.h file defines this...
+#undef CH_H
+#endif
 #define CH_H KC_H
 #define CH_I KC_I
 #define CH_J KC_J
index 807f7a0b91a82d41473deedc0727361fc297d55c..613af70183b9cd677bff8ed102d97f499dd052e2 100644 (file)
 bool printing_enabled = false;
 uint8_t character_shift = 0;
 
-void enabled_printing() {
+void enable_printing(void) {
        printing_enabled = true;
        serial_init();
 }
 
-void disable_printing() {
+void disable_printing(void) {
        printing_enabled = false;
 }
 
@@ -41,9 +41,14 @@ void print_char(char c) {
        USB_Init();
 }
 
-void print_box_string(uint8_t text[]) {
-       uint8_t len = strlen(text);
-       uint8_t out[len * 3 + 8];
+void print_string(char c[]) {
+       for(uint8_t i = 0; i < strlen(c); i++)
+               print_char(c[i]);
+}
+
+void print_box_string(const char text[]) {
+       size_t len = strlen(text);
+       char out[len * 3 + 8];
        out[0] = 0xDA;
        for (uint8_t i = 0; i < len; i++) {
                out[i+1] = 0xC4;
@@ -69,14 +74,9 @@ void print_box_string(uint8_t text[]) {
        print_string(out); 
 }
 
-void print_string(char c[]) {
-       for(uint8_t i = 0; i < strlen(c); i++)
-               print_char(c[i]);
-}
-
 bool process_printer(uint16_t keycode, keyrecord_t *record) {
        if (keycode == PRINT_ON) {
-               enabled_printing();
+               enable_printing();
                return false;
        }
        if (keycode == PRINT_OFF) {
index aa494ac8a7f53c9e1a4ce53261094b6235eaf3bb..71d3a4b56a67521d6b3d83856add855b4b5d022a 100644 (file)
@@ -21,4 +21,6 @@
 
 #include "protocol/serial.h"
 
+bool process_printer(uint16_t keycode, keyrecord_t *record);
+
 #endif
index 55d3b552b2fbc4fc20eebf5c5cd77275407bb7cb..3a00f169d8b4d656b0f24ce626cdfce9ea047e4e 100644 (file)
@@ -46,7 +46,7 @@ void serial_output(void) {
 }
 
 
-void enabled_printing() {
+void enable_printing() {
        printing_enabled = true;
        serial_output();
        serial_high();
@@ -82,7 +82,7 @@ void print_string(char c[]) {
 
 bool process_printer(uint16_t keycode, keyrecord_t *record) {
        if (keycode == PRINT_ON) {
-               enabled_printing();
+               enable_printing();
                return false;
        }
        if (keycode == PRINT_OFF) {
index 678a15234d9a2a32d3534d3a792afbdc3f250800..fd008eca127a609673fabd9278f79e6b3e19b83e 100644 (file)
@@ -15,6 +15,7 @@
  */
 #include "process_unicode.h"
 #include "action_util.h"
+#include "eeprom.h"
 
 static uint8_t first_flag = 0;
 
index 1dbdec3e7148b7f51d3d303d6c307871c8d0a4cf..84b5d673dd48ce473531d9549bf2f9f9dec12fb2 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include "process_unicode_common.h"
+#include "eeprom.h"
 
 static uint8_t input_mode;
 uint8_t mods;
index df11861ddc96256da0086c54852ca2c8cff8d4d5..82e4184d2ca2f38b924e39512cdfe5a0510ab8b1 100644 (file)
@@ -125,8 +125,8 @@ static void get_led_state_string(char* output, visualizer_state_t* state) {
        pos += 5;
     }
     if (state->status.leds & (1u << USB_LED_KANA)) {
-       memcpy(output + pos, "KANA ", 5);
-       pos += 5;
+       memcpy(output + pos, "KANA", 4);
+       pos += 4;
     }
     output[pos] = 0;
 }
index 94de36918d23f9244b1ea399aca753db86590bc6..4ba1cc251a78f828cf2d5424c24bea2ec20e59f5 100644 (file)
@@ -140,7 +140,6 @@ void process_record(keyrecord_t *record)
 
 void process_action(keyrecord_t *record, action_t action)
 {
-    bool do_release_oneshot = false;
     keyevent_t event = record->event;
 #ifndef NO_ACTION_TAPPING
     uint8_t tap_count = record->tap.count;
@@ -152,6 +151,7 @@ void process_action(keyrecord_t *record, action_t action)
     }
 
 #ifndef NO_ACTION_ONESHOT
+    bool do_release_oneshot = false;
     // notice we only clear the one shot layer if the pressed key is not a modifier.
     if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) {
         clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
index 0c81e8361213af2221c93883801e649ea364a5a7..1c7618ff51dd9ea0b8a5a5c24bb3352b51169eff 100644 (file)
@@ -9,6 +9,7 @@
 #include "suspend.h"
 #include "timer.h"
 #include "led.h"
+#include "host.h"
 
 #ifdef PROTOCOL_LUFA
        #include "lufa.h"
index 6eede06b442eccdcb2d5ff21002ac3410e4fc2e2..9338d0af7799de060c1f67312ad5dae862eae6be 100644 (file)
@@ -23,8 +23,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 /* max value on report descriptor */
-#define MOUSEKEY_MOVE_MAX       127
-#define MOUSEKEY_WHEEL_MAX      127
+#ifndef MOUSEKEY_MOVE_MAX
+    #define MOUSEKEY_MOVE_MAX       127
+#elif MOUSEKEY_MOVE_MAX > 127
+    #error MOUSEKEY_MOVE_MAX needs to be smaller than 127
+#endif
+
+#ifndef MOUSEKEY_WHEEL_MAX
+    #define MOUSEKEY_WHEEL_MAX      127
+#elif MOUSEKEY_WHEEL_MAX > 127
+    #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127
+#endif
 
 #ifndef MOUSEKEY_MOVE_DELTA
 #define MOUSEKEY_MOVE_DELTA     5
index e4c8aecb2cfa5a89213c324d44d1476f6503c3fe..b7cb0a559aa0bba40d2750abfcb89801c6d3f99e 100644 (file)
@@ -92,6 +92,9 @@ endif
 endif
 CFLAGS += -Wall
 CFLAGS += -Wstrict-prototypes
+ifneq ($(strip $(ALLOW_WARNINGS)), yes)
+    CFLAGS += -Werror
+endif
 #CFLAGS += -mshort-calls
 #CFLAGS += -fno-unit-at-a-time
 #CFLAGS += -Wundef
@@ -115,6 +118,9 @@ CPPFLAGS += -O$(OPT)
 CPPFLAGS += -w
 CPPFLAGS += -Wall
 CPPFLAGS += -Wundef
+ifneq ($(strip $(ALLOW_WARNINGS)), yes)
+    CPPFLAGS += -Werror
+endif
 #CPPFLAGS += -mshort-calls
 #CPPFLAGS += -fno-unit-at-a-time
 #CPPFLAGS += -Wstrict-prototypes