]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #1072 from nicinabox/improve-ls-avrdude-target
authorJack Humbert <jack.humb@gmail.com>
Tue, 7 Feb 2017 18:52:03 +0000 (13:52 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Feb 2017 18:52:03 +0000 (13:52 -0500)
Check for Pro Micro serial port automatically

58 files changed:
.travis.yml
keyboards/ergodox/keymaps/ordinary/keymap.c
keyboards/ergodox/keymaps/robot_test_layout/keymap.c
keyboards/handwired/onekey/keymaps/default/keymap.c
keyboards/handwired/reddot/Makefile [new file with mode: 0755]
keyboards/handwired/reddot/config.h [new file with mode: 0755]
keyboards/handwired/reddot/keymaps/default/keymap.c [new file with mode: 0755]
keyboards/handwired/reddot/keymaps/default/readme.md [new file with mode: 0755]
keyboards/handwired/reddot/readme.md [new file with mode: 0755]
keyboards/handwired/reddot/reddot.c [new file with mode: 0755]
keyboards/handwired/reddot/reddot.h [new file with mode: 0755]
keyboards/handwired/reddot/rules.mk [new file with mode: 0755]
keyboards/lets_split/config.h
keyboards/lets_split/keymaps/i2c/config.h
keyboards/lets_split/keymaps/serial/config.h
keyboards/lets_split/lets_split.h
keyboards/lets_split/rev2/rev2.h
keyboards/lets_split/rev2fliphalf/Makefile [new file with mode: 0644]
keyboards/lets_split/rev2fliphalf/config.h [new file with mode: 0644]
keyboards/lets_split/rev2fliphalf/rev2fliphalf.c [new file with mode: 0644]
keyboards/lets_split/rev2fliphalf/rev2fliphalf.h [new file with mode: 0644]
keyboards/lets_split/rev2fliphalf/rules.mk [new file with mode: 0644]
keyboards/planck/keymaps/callum/keymap.c
keyboards/planck/keymaps/callum/readme.md
keyboards/planck/keymaps/espynn/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/espynn/keyboard-layout.jpg [new file with mode: 0644]
keyboards/planck/keymaps/espynn/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/espynn/layout.json [new file with mode: 0644]
keyboards/planck/keymaps/espynn/readme.md [new file with mode: 0644]
keyboards/planck/keymaps/luke/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/luke/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/luke/readme.md [new file with mode: 0644]
keyboards/planck/keymaps/yale/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/yale/config.h [new file with mode: 0644]
keyboards/planck/keymaps/yale/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/yale/yale_layout_picture.jpg [new file with mode: 0644]
quantum/config_common.h
quantum/keymap_common.c
quantum/light_ws2812.c
quantum/matrix.c
quantum/quantum.c
quantum/quantum.h
quantum/quantum_keycodes.h
quantum/rgblight.c
quantum/rgblight.h
quantum/template/config.h
tmk_core/common/action_code.h
tmk_core/common/action_macro.h
tmk_core/common/keyboard.c
tmk_core/common/matrix.h
tmk_core/common/report.h
tmk_core/protocol/lufa.mk
tmk_core/protocol/lufa/lufa.c
tmk_core/protocol/lufa/outputselect.c [new file with mode: 0644]
tmk_core/protocol/lufa/outputselect.h [new file with mode: 0644]
tmk_core/protocol/vusb/vusb.c
util/travis_build.sh [new file with mode: 0644]
util/travis_compiled_push.sh

index 792f2cd05d053a387193350d4b2bb9eb7cb0f9a8..18ecde7e3cbc4b0c17d78d67e782ed9a728f35ce 100644 (file)
@@ -9,9 +9,6 @@ branches:
 env:
   global:
   - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
-  matrix:
-  - TARGET=all-keyboards AUTOGEN=true
-  - TARGET=test AUTOGEN=false
 before_install:
   - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
 install:
@@ -20,7 +17,8 @@ install:
 before_script:
   - avr-gcc --version
 script:
-- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi'
+- make test AUTOGEN=false
+- bash util/travis_build.sh
 addons:
   apt:
     packages:
@@ -31,6 +29,4 @@ addons:
     - libnewlib-arm-none-eabi
     - diffutils
 after_success: 
-  if [ "$AUTOGEN" == "true" ]; then
-    bash util/travis_compiled_push.sh;
-  fi
+  bash util/travis_compiled_push.sh
index 302c41cc8d4d1afbe7673f39e1fe6e6eb42359e6..5c01d967840b21b67fb0839ddb8cd9b6571aa314 100644 (file)
@@ -1,5 +1,6 @@
 #include "ergodox.h"
 #include "led.h"
+#include "mousekey.h"
 #include "debug.h"
 #include "action_layer.h"
 #include "action_util.h"
index 480be177f09f7f4bac3140f1372a629c543baa81..e9e2597d7e0868dbb9736f89fe9c2890a6839d06 100644 (file)
@@ -68,7 +68,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     case RGB_FF0000:
       if (record->event.pressed) {
         #ifdef RGBLIGHT_ENABLE
-          EZ_RGB(0xff0000);
+          EZ_RGB(0xff0000UL);
           register_code(KC_1); unregister_code(KC_1);
         #endif
       }
@@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     case RGB_00FF00:
       if (record->event.pressed) {
         #ifdef RGBLIGHT_ENABLE
-          EZ_RGB(0x00ff00);
+          EZ_RGB(0x00ff00UL);
           register_code(KC_2); unregister_code(KC_2);
         #endif
       }
@@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     case RGB_0000FF:
       if (record->event.pressed) {
         #ifdef RGBLIGHT_ENABLE
-          EZ_RGB(0x0000ff);
+          EZ_RGB(0x0000ffUL);
           register_code(KC_3); unregister_code(KC_3);
         #endif
       }
@@ -95,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     case RGB_FFFFFF:
       if (record->event.pressed) {
         #ifdef RGBLIGHT_ENABLE
-          EZ_RGB(0xffffff);
+          EZ_RGB(0xffffffUL);
           register_code(KC_4); unregister_code(KC_4);
         #endif
       }
index 756c4f51edf9ce25e6d67e46386567e902052e7c..10c486718d5f434f2b2184e6b8b937e8e3bd977c 100644 (file)
@@ -1,5 +1,5 @@
 #include "onekey.h"
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    { KC_A }
+    {{ KC_A }}
 };
diff --git a/keyboards/handwired/reddot/Makefile b/keyboards/handwired/reddot/Makefile
new file mode 100755 (executable)
index 0000000..191c6bb
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h
new file mode 100755 (executable)
index 0000000..15f1142
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x6060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    upils
+#define PRODUCT         reddot
+#define DESCRIPTION     A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 19
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 }
+#define MATRIX_COL_PINS { B7,  D0,  D1,  D2,  D3,  C6,  C7,  D5,  D4,  D7,  B4,  B5,  B6,  F7,  F6,  F5,  F4,  F1,  F0 }
+#define UNUSED_PINS
+
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+//#define MAGIC_KEY_BOOTLOADER     PAUSE
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c
new file mode 100755 (executable)
index 0000000..44ee2ce
--- /dev/null
@@ -0,0 +1,29 @@
+#include "reddot.h"
+#include "../../../../../quantum/keymap_extras/keymap_french.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[0] = KEYMAP(
+ KC_ESC,    KC_F1,    KC_F2,    KC_F3,     KC_F4,    KC_F5,   KC_TAB,  KC_CAPS,    KC_F6,    KC_F7,    KC_F8,    KC_F9,        KC_F10,  KC_F11,    KC_F12,   KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
+ KC_LALT,    FR_AMP, FR_EACU,  FR_QUOT, FR_APOS,    FR_LPRN,  KC_BSPACE,   KC_DELETE, FR_MINS,  FR_EGRV, FR_UNDS,  FR_CCED,       FR_AGRV,    FR_RPRN,  FR_EQL,       KC_INSERT,    KC_HOME,    KC_PGUP,\
+ KC_LGUI,    FR_A,     FR_Z,     KC_E,      KC_R,     KC_T,  KC_LSFT,   KC_ENT,     KC_Y,     KC_U,     KC_I,     KC_O,          KC_P,    FR_CIRC,      FR_DLR,       KC_DELETE,    KC_END,    KC_PGDOWN, KC_KP_PLUS,\
+ KC_LCTL,    FR_Q,     KC_S,     KC_D,      KC_F,     KC_G,   KC_ENT,            KC_H,     KC_J,     KC_K,     KC_L,          FR_M,  FR_UGRV,  FR_ASTR,       KC_KP_1,    KC_UP,    KC_KP_3,\
+ FR_LESS, FR_W,     KC_X,     KC_C,      KC_V,     KC_B,   KC_SPACE,          KC_SPACE,     KC_N, FR_COMM,   FR_SCLN,  FR_COLN,     FR_EXLM,  NO_ALGR,    KC_LEFT,    KC_DOWN, KC_RIGHT, KC_KP_ENTER),
+
+ [1] = KEYMAP(
+  KC_ESC,    KC_F1,    KC_F2,    KC_F3,     KC_F4,    KC_F5,   KC_TAB,  KC_CAPS,    KC_F6,    KC_F7,    KC_F8,    KC_F9,        KC_F10,  KC_F11,    KC_F12,   KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
+  KC_LALT,    FR_AMP, FR_EACU,  FR_QUOT, FR_APOS,    FR_LPRN,  KC_BSPACE,   KC_DELETE, FR_MINS,  FR_EGRV, FR_UNDS,  FR_CCED,       FR_AGRV,    FR_RPRN,  FR_EQL,       KC_7,    KC_8,    KC_9,\
+  KC_LGUI,    FR_A,     FR_Z,     KC_E,      KC_R,     KC_T,  KC_LSFT,   KC_ENT,     KC_Y,     KC_U,     KC_I,     KC_O,          KC_P,    FR_CIRC,      FR_DLR,       KC_4,    KC_5,    KC_6, KC_KP_PLUS,\
+  KC_LCTL,    FR_Q,     KC_S,     KC_D,      KC_F,     KC_G,   KC_ENT,            KC_H,     KC_J,     KC_K,     KC_L,          FR_M,  FR_UGRV,  FR_ASTR,       KC_1,    KC_2,    KC_3,\
+  FR_LESS, FR_W,     KC_X,     KC_C,      KC_V,     KC_B,   KC_SPACE,          KC_SPACE,     KC_N, FR_COMM,   FR_SCLN,  FR_COLN,     FR_EXLM,  NO_ALGR,    KC_LEFT,    KC_DOWN, KC_RIGHT, KC_KP_ENTER),
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+  ACTION_LAYER_TOGGLE(1),
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  return MACRO_NONE;
+};
+
diff --git a/keyboards/handwired/reddot/keymaps/default/readme.md b/keyboards/handwired/reddot/keymaps/default/readme.md
new file mode 100755 (executable)
index 0000000..f04833c
--- /dev/null
@@ -0,0 +1 @@
+# The default keymap for handwired/reddot
diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md
new file mode 100755 (executable)
index 0000000..11bcba5
--- /dev/null
@@ -0,0 +1,24 @@
+## RedDot Specific Info ##
+
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent README.md](/README.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboard/reddot folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
+```
+$ make KEYMAP=[default|jack|<name>]
+```
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/reddot/reddot.c b/keyboards/handwired/reddot/reddot.c
new file mode 100755 (executable)
index 0000000..4e1efc0
--- /dev/null
@@ -0,0 +1,7 @@
+#include "reddot.h"
+
+void matrix_init_kb(void) {
+
+        matrix_init_user();
+}
+
diff --git a/keyboards/handwired/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h
new file mode 100755 (executable)
index 0000000..f0c4be5
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef REDDOT_H
+#define REDDOT_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E,   k10, k11, k12, k13, \
+    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E,   k30, k31, k32, \
+    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E,   k50, k51, k52, k53, \
+    k60, k61, k62, k63, k64, k65, k66,      k68, k69, k6A, k6B, k6C, k6D, k6E,   k70, k71, k72, \
+    k80, k81, k82, k83, k84, k85, k86,      k88, k89, k8A, k8B, k8C, k8D, k8E,   k90, k91, k92, k93\
+) { \
+    { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \
+    { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32,    KC_NO }, \
+    { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \
+    { k60, k61, k62, k63, k64, k65, k66,    KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72,    KC_NO }, \
+    { k80, k81, k82, k83, k84, k85, k86,    KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \
+}
+
+#endif
diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk
new file mode 100755 (executable)
index 0000000..9a4409f
--- /dev/null
@@ -0,0 +1,88 @@
+
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+# for avr upload
+USB ?= /dev/cu.usbmodem1421
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+
+ifdef TEENSY2
+    OPT_DEFS += -DATREUS_TEENSY2
+    ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
+else
+    OPT_DEFS += -DATREUS_ASTAR
+    OPT_DEFS += -DCATERINA_BOOTLOADER
+    ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+                            avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+endif
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# MCU name
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= no      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no        # Console for debug(+400)
+COMMAND_ENABLE ?= no        # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
+
+upload: build
+       $(ATREUS_UPLOAD_COMMAND)
+
index 7df0c5752745a41900b856bfc054a7d65a3a17ca..008fb09789f42e79893a65806246f71906946ec2 100644 (file)
@@ -26,4 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifdef SUBPROJECT_rev2
     #include "rev2/config.h"
 #endif
+#ifdef SUBPROJECT_rev2fliphalf
+       #include "../../rev2fliphalf/config.h"
+#endif
 #endif
index efe8bb0f2b7b86111dc5a91881c9f85e5637f430..332c990fc5eb35bc342d15905c487a225909b285 100644 (file)
@@ -24,4 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #endif
 #ifdef SUBPROJECT_rev2
     #include "../../rev2/config.h"
+#endif
+#ifdef SUBPROJECT_rev2fliphalf
+       #include "../../rev2fliphalf/config.h"
 #endif
\ No newline at end of file
index cd766cc4f1478e88f70880bc61b2917b9f4bc6bb..0e59b191b87e377938de156522c3179f7686da78 100644 (file)
@@ -26,4 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #endif
 #ifdef SUBPROJECT_rev2
     #include "../../rev2/config.h"
+#endif
+#ifdef SUBPROJECT_rev2fliphalf
+       #include "../../rev2fliphalf/config.h"
 #endif
\ No newline at end of file
index 2cdfb061f2db332e82faed77b6d6d85a2615c2d2..0de308c7a9deb565ba8ae46c6c4b6bf5637bbcf2 100644 (file)
@@ -7,6 +7,9 @@
 #ifdef SUBPROJECT_rev2
     #include "rev2.h"
 #endif
+#ifdef SUBPROJECT_rev2fliphalf
+       #include "rev2fliphalf.h"
+#endif
 
 #include "quantum.h"
 
index 7c397912f59b141935bef78f1988b037e8168a5d..990976de2bca3dad26196b93fdb7bb5513dd875d 100644 (file)
@@ -9,10 +9,10 @@
 //void promicro_bootloader_jmp(bool program);
 
 #define KEYMAP( \
-       k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
-       k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
-       k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
-       k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
+       k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
+       k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
+       k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
+       k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
        ) \
        { \
                { k00, k01, k02, k03, k04, k05 }, \
diff --git a/keyboards/lets_split/rev2fliphalf/Makefile b/keyboards/lets_split/rev2fliphalf/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/lets_split/rev2fliphalf/config.h b/keyboards/lets_split/rev2fliphalf/config.h
new file mode 100644 (file)
index 0000000..1c45cf1
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+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      0x3060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    Wootpatoot
+#define PRODUCT         Lets Split v2
+#define DESCRIPTION     A split keyboard for the cheap makers
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
+//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
+#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
+
+//#define CATERINA_BOOTLOADER
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 12    // Number of LEDs
+#define ws2812_PORTREG  PORTD
+#define ws2812_DDRREG   DDRD
+
+/*
+ * 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
\ No newline at end of file
diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c
new file mode 100644 (file)
index 0000000..c505d3a
--- /dev/null
@@ -0,0 +1,32 @@
+#include "lets_split.h"
+
+#ifdef AUDIO_ENABLE
+    float tone_startup[][2] = SONG(STARTUP_SOUND);
+    float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+#endif
+
+void matrix_init_kb(void) {
+
+    #ifdef AUDIO_ENABLE
+        _delay_ms(20); // gets rid of tick
+        PLAY_NOTE_ARRAY(tone_startup, false, 0);
+    #endif
+
+    // // green led on
+    // DDRD |= (1<<5);
+    // PORTD &= ~(1<<5);
+
+    // // orange led on
+    // DDRB |= (1<<0);
+    // PORTB &= ~(1<<0);
+
+       matrix_init_user();
+};
+
+void shutdown_user(void) {
+    #ifdef AUDIO_ENABLE
+        PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+       _delay_ms(150);
+       stop_all_notes();
+    #endif
+}
diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h
new file mode 100644 (file)
index 0000000..7dc8e5b
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef REV2FLIPHALF_H
+#define REV2FLIPHALF_H
+
+#include "../lets_split.h"
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+//void promicro_bootloader_jmp(bool program);
+
+#define KEYMAP( \
+       k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
+       k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
+       k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
+       k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
+       ) \
+       { \
+               { k00, k01, k02, k03, k04, k05 }, \
+               { k10, k11, k12, k13, k14, k15 }, \
+               { k20, k21, k22, k23, k24, k25 }, \
+               { k30, k31, k32, k33, k34, k35 }, \
+               { k40, k41, k42, k43, k44, k45 }, \
+               { k50, k51, k52, k53, k54, k55 }, \
+               { k60, k61, k62, k63, k64, k65 }, \
+               { k70, k71, k72, k73, k74, k75 } \
+       }
+
+#endif
\ No newline at end of file
diff --git a/keyboards/lets_split/rev2fliphalf/rules.mk b/keyboards/lets_split/rev2fliphalf/rules.mk
new file mode 100644 (file)
index 0000000..80a942d
--- /dev/null
@@ -0,0 +1,5 @@
+BACKLIGHT_ENABLE = no
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
index a1254d975589f2574b5ef40db83ef9dc5fd7f24f..2acd988ea61da8b60847f0db51e8aa06aa4ffc4a 100644 (file)
@@ -12,8 +12,6 @@ extern keymap_config_t keymap_config;
 #define _SYMB 2
 #define _MOUSE 3
 #define _FUNC 4
-#define CMDLEFT LGUI(KC_LEFT)
-#define CMDRGHT LGUI(KC_RGHT)
 #define ENDASH LALT(KC_MINS)
 #define POUND LALT(KC_3)
 
@@ -50,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 /* MOVE
  * ,-----------------------------------------------------------------------------------.
- * |  Esc |      | Cmd-L|  Up  | Cmd-R|      |      | Cmd-L|  Up  | Cmd-R|      |  Esc |
+ * |  Esc |      | Home |  Up  |  End |      |      | Home |  Up  |  End |      |  Esc |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * |  Del | Caps | Left | Down | Right|      |      | Left | Down | Right| Caps |  Del |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------'
  */
 [_MOVE] = {
-  {KC_ESC,  XXXXXXX, CMDLEFT, KC_UP,   CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP,   CMDRGHT, XXXXXXX, KC_ESC },
+  {KC_ESC,  XXXXXXX, KC_HOME, KC_UP,   KC_END,  XXXXXXX, XXXXXXX, KC_HOME, KC_UP,   KC_END,  XXXXXXX, KC_ESC },
   {KC_DEL,  KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
   {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
   {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
index f970cd974d5b5115d82b736edfb6a0e2c9b3345a..71e200b9d70f472d6580a4efd06c4b8052f9d336 100644 (file)
@@ -23,7 +23,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
 
 /* MOVE
  * ,-----------------------------------------------------------------------------------.
- * |  Esc |      | Cmd-L|  Up  | Cmd-R|      |      | Cmd-L|  Up  | Cmd-R|      |  Esc |
+ * |  Esc |      | Home |  Up  |  End |      |      | Home |  Up  |  End |      |  Esc |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * |  Del | Caps | Left | Down | Right|      |      | Left | Down | Right| Caps |  Del |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
diff --git a/keyboards/planck/keymaps/espynn/Makefile b/keyboards/planck/keymaps/espynn/Makefile
new file mode 100644 (file)
index 0000000..44a030b
--- /dev/null
@@ -0,0 +1,63 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device.
+#                Please customize your programmer settings(PROGRAM_CMD)
+#
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+#               (must have teensy_loader_cli installed).
+#
+# make dfu = Download the hex file to the device, using dfu-programmer (must
+#            have dfu-programmer installed).
+#
+# make flip = Download the hex file to the device, using Atmel FLIP (must
+#             have Atmel FLIP installed).
+#
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
+#               (must have dfu-programmer installed).
+#
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
+#                (must have Atmel FLIP installed).
+#
+# make debug = Start either simulavr or avarice as specified for debugging,
+#              with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+#                   bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+# Build Options
+#   change to "no" to disable the options, or define them in the makefile.mk 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 = yes      # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg
new file mode 100644 (file)
index 0000000..55e5396
Binary files /dev/null and b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg differ
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c
new file mode 100644 (file)
index 0000000..4a3fe32
--- /dev/null
@@ -0,0 +1,151 @@
+#include "planck.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef BACKLIGHT_ENABLE
+  #include "backlight.h"
+#endif
+#define PREVENT_STUCK_MODIFIERS
+extern keymap_config_t keymap_config;
+
+// Symbolic names for macro IDs.
+#define _QWERTY  0  // QUERTY layer
+#define _LOWER   1  // Lower layer
+#define _RAISE   2  // Raise layer
+#define _CUSTOM  3  // Custom layer (LOWER + RAISE)
+#define _BL      4  // Backlight
+#define _CUS0    5  // Mobile#
+#define _CUS1    6  // signature
+#define _CUS2    7  // macro 2
+#define _CUS3    8  // macro 3
+#define _CUS4    9  // macro 4
+#define _CUS5    10 // email
+#define _COPY    11 // copy
+#define _PASTE   12 // paste
+#define _CUT     13 // cut
+
+// Macro shortcuts.
+#define QWERTY  M(_LOWER)
+#define LOWER   M(_LOWER)
+#define RAISE   M(_RAISE)
+#define CUSTOM  M(_CUSTOM)
+#define BL      M(_BL)
+#define CUS0    M(_CUS0)
+#define CUS1    M(_CUS1)
+#define CUS2    M(_CUS2)
+#define CUS3    M(_CUS3)
+#define CUS4    M(_CUS4)
+#define CUS5    M(_CUS5)
+#define COPY    M(_COPY)
+#define PASTE   M(_PASTE)
+#define CUT     M(_CUT)
+
+// Func macro definitions.
+#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER
+#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE
+#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK)
+#define SFT_ENT  FUNC(3) // Tap for Enter, hold for Shift
+#define ZM_NRM   FUNC(4) // Zoom normal
+#define ZM_IN    FUNC(5) // Zoom out
+#define ZM_OUT   FUNC(6) // Zoom in
+
+// Enable these functions using FUNC(n) macro.
+const uint16_t PROGMEM fn_actions[] = {
+    [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN),
+    [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP),
+    [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS),
+    [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
+    [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0),
+    [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS),
+    [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS),
+    [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS),
+ };
+
+// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_QWERTY] = { /* 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_DEL,  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, SFT_ENT},
+    {KC_LCTL, KC_ESC,  KC_LGUI, KC_LALT, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+[_LOWER] = { /* LOWER */
+    {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, ZM_NRM,  ZM_IN,   ZM_OUT,  KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+},
+[_RAISE] = { /* RAISE */
+    {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV,  KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+[_CUSTOM] = { /* CUSTOM */
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4,    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0,    CUS3,    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, CUT,     COPY,    PASTE,   CUS1,    CUS5,    CUS2,    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {BL,      RESET,   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+}
+};
+
+// Set a layer persistantly.
+void persistant_default_layer_set(uint16_t default_layer) {
+  eeconfig_update_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
+// Macro actions for each corresponding ID.
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+    switch(id) {
+    case _RAISE: // Raised layer.
+       if (record->event.pressed) {
+           layer_on(_RAISE);
+           update_tri_layer(_LOWER, _RAISE, _CUSTOM);
+       } else {
+           layer_off(_RAISE);
+           update_tri_layer(_LOWER, _RAISE, _CUSTOM);
+       }
+       break;
+    case _LOWER: // Lowered layer.
+       if (record->event.pressed) {
+           layer_on(_LOWER);
+           update_tri_layer(_LOWER, _RAISE, _CUSTOM);
+       } else {
+           layer_off(_LOWER);
+           update_tri_layer(_LOWER, _RAISE, _CUSTOM);
+       }
+       break;
+    case _BL: // Backlight
+       if (record->event.pressed) {
+           register_code(KC_RSFT);
+#ifdef BACKLIGHT_ENABLE
+           backlight_step();
+#endif
+       } else {
+           unregister_code(KC_RSFT);
+       }
+       break;
+    case _CUS0: // enter your mobile# here
+           return MACRODOWN(T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(9),END);
+    case _CUS1: // signature line for email
+           return MACRODOWN(T(ENT), T(ENT), T(MINS), T(J), T(W), END);
+    case _CUS2: // Custom macro 2
+           return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_L), UP(KC_LSFT), END );
+    case _CUS3: // custom macro 3
+           return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_F), UP(KC_LSFT), END );
+    case _CUS4: // custom macro 4
+           return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END );
+    case _CUS5: // Enter your email here
+           return MACRODOWN( TYPE(KC_F),
+        DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT), 
+        TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END );
+    case _CUT: //cut macro
+           return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END );
+    case _COPY: // copy macro
+           return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END );
+    case _PASTE: // paste macro
+           return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END ); 
+    };
+    return MACRO_NONE;
+}
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json
new file mode 100644 (file)
index 0000000..38ccc34
--- /dev/null
@@ -0,0 +1,271 @@
+[
+  {
+    "backcolor": "#858585",
+    "name": "Planck 40%",
+    "author": "James Folkert",
+    "background": {
+      "name": "Aluminium brushed",
+      "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');"
+    },
+    "switchMount": "cherry",
+    "switchBrand": "cherry",
+    "switchType": "MX1A-A1xx",
+    "pcb": true,
+    "plate": true
+  },
+  [
+    {
+      "fa": [
+        2,
+        2,
+        0,
+        2
+      ]
+    },
+    "F1\n1\n\n!\n\n\n\n\n\n<i class='kb kb-Tab-2'></i>",
+    "F2\n2\n\n@\n\n\n\n\n\nQ",
+    "F3\n3\n\n#\n\n\n\n\n\nW",
+    "F4\n4\n\n$\n\n\n\n\n\nE",
+    "F5\n5\n\n%\n\n\n\n\n\nR",
+    "F6\n6\n\n^\n\n\n\n\n\nT",
+    "F7\n6\n\n&\n\n\n\n\n\nY",
+    "F8\n8\n\n*\nMacro4\n\n\n\n\nU",
+    "F9\n9\n\n(\n\n\n\n\n\nI",
+    {
+      "fa": [
+        0,
+        0,
+        0,
+        2
+      ]
+    },
+    "F10\n0\n\n)\n\n\n\n\n\nO",
+    {
+      "fa": [
+        2,
+        2,
+        0,
+        2
+      ]
+    },
+    "F11\n-\n\n_\n\n\n\n\n\nP",
+    "F12\n=\n\n+\n\n\n\n\n\n<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>"
+  ],
+  [
+    {
+      "a": 7,
+      "f": 3
+    },
+    "<i class='mss mss-Unicode-DeleteRight-Big-2'></i>",
+    {
+      "f": 3
+    },
+    "A",
+    {
+      "f": 3
+    },
+    "S",
+    {
+      "f": 3
+    },
+    "D",
+    {
+      "t": "#ff0000",
+      "a": 4,
+      "f": 3
+    },
+    "\n(\n\n\n\n\n\n\n\nF",
+    {
+      "t": "#000000",
+      "f": 3
+    },
+    "\n)\n\n\n\n\n\n\n\nG",
+    {
+      "f": 3
+    },
+    "\n{\n\n\nMacro0\n\n\n\n\nH",
+    {
+      "t": "#ff0000",
+      "f": 3
+    },
+    "\n}\n\n\nMacro3\n\n\n\n\nJ",
+    {
+      "t": "#000000",
+      "f": 3
+    },
+    "{\n\n\n\n\n\n\n\n\nK",
+    {
+      "f": 3
+    },
+    "{\n\n\n\n\n\n\n\n\nL",
+    {
+      "fa": [
+        2,
+        2,
+        2,
+        2,
+        0,
+        0,
+        0,
+        2
+      ]
+    },
+    "\\\n\n|\n\n\n\n\n:\n\n;",
+    {
+      "a": 7,
+      "fa": [
+        9
+      ]
+    },
+    "<i class='mss mss-Unicode-Enter-3'></i>"
+  ],
+  [
+    {
+      "f": 3
+    },
+    "Shift",
+    {
+      "f": 3
+    },
+    "Z",
+    {
+      "f": 3
+    },
+    "X\n\n\n\nCut",
+    {
+      "f": 3
+    },
+    "C\n\n\n\nCopy",
+    {
+      "a": 4,
+      "fa": [
+        2,
+        2,
+        2,
+        2
+      ]
+    },
+    "\\\n[\n|\n{\nPaste\n\n\n\n\nV",
+    "|\n]\n\n}\nMacro1\n\n\n\n\nB",
+    "`\n'\n~\n\"\nMacro5\n\n\n\n\nN",
+    "~\n\"\n\n\nMacro2\n\n\n\n\nM",
+    {
+      "fa": [
+        2,
+        2,
+        2,
+        2,
+        0,
+        0,
+        0,
+        1
+      ]
+    },
+    "[\n\n{\n\n\n\n\n<\n\n,",
+    "[\n\n{\n\n\n\n\n\n\n.",
+    {
+      "a": 6
+    },
+    "\n\n?\n\n\n\n\n\n/",
+    {
+      "a": 4,
+      "fa": [
+        2,
+        2,
+        2,
+        0,
+        0,
+        0,
+        0,
+        1,
+        9,
+        0
+      ]
+    },
+    "\n\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift\n\n\n\n\n<i class='mss mss-Unicode-Enter-3'></i>\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift"
+  ],
+  [
+    {
+      "a": 7,
+      "f": 3
+    },
+    "Ctrl\n\n\n\nBLight",
+    {
+      "a": 4,
+      "fa": [
+        2,
+        1,
+        2,
+        0,
+        0,
+        0,
+        0,
+        1,
+        9,
+        9
+      ]
+    },
+    "\nZNorm\n\n\nRESET\n\n\n\n\n<i class='mss mss-Unicode-Escape-3'></i>",
+    {
+      "fa": [
+        2,
+        1,
+        2,
+        0,
+        0,
+        0,
+        0,
+        1,
+        9,
+        6
+      ]
+    },
+    "\nZIn\n\n\n\n\n\n\n\n<i class='kb kb-logo-windows-8'></i>",
+    {
+      "fa": [
+        2,
+        1,
+        2,
+        0,
+        0,
+        0,
+        0,
+        1,
+        9,
+        9
+      ]
+    },
+    "\nZOut\n\n\n\n\n\n\n\n<i class='kb kb-Unicode-Alternate-1'></i>",
+    {
+      "a": 7,
+      "fa": [
+        9
+      ]
+    },
+    "&dArr;",
+    {
+      "a": 4,
+      "fa": [
+        9,
+        5,
+        5
+      ],
+      "w": 2
+    },
+    "\n<i class='kb kb-Unicode-Page-Down-3'></i>\n<i class='kb kb-Unicode-Page-Up-3'></i>",
+    {
+      "a": 7
+    },
+    "&uArr;",
+    {
+      "a": 4,
+      "fa": [
+        2
+      ]
+    },
+    "<i class='kb kb-Multimedia-FastForward-End'></i>\n\n\n\n\n\n\n\n\n&larr;",
+    "<i class='kb kb-Multimedia-Volume-Down-1'></i>\n\n\n\n\n\n\n\n\n&darr;",
+    "<i class='kb kb-Multimedia-Volume-Up-1'></i>\n\n\n\n\n\n\n\n\n&uarr;",
+    "<i class='kb kb-Multimedia-Play-Pause'></i>\n\n\n\n\n\n\n\n\n&rarr;"
+  ]
+]
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md
new file mode 100644 (file)
index 0000000..8882f46
--- /dev/null
@@ -0,0 +1,18 @@
+# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard
+Created by James Folkert: https://twitter.com/trekloFsemaJ
+Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c
+
+![Layout](keyboard-layout.png "Practical Keymap")
+
+
+* Online keyboard layout editor: http://www.keyboard-layout-editor.com/
+* [JSON of raw layout] (layout.json "JSON of raw layout")
+
+# Notes
+* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here
+* I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4
+* add your mobile and email to the keymap before make
+* RAISE and LOWER also acts as PgUp and PgDn when tapped.
+* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works)
+* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience.
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/luke/Makefile b/keyboards/planck/keymaps/luke/Makefile
new file mode 100644 (file)
index 0000000..8476868
--- /dev/null
@@ -0,0 +1,25 @@
+
+
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = 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.  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/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c
new file mode 100644 (file)
index 0000000..26dcb45
--- /dev/null
@@ -0,0 +1,355 @@
+/*
+ * A keyboard layout for the gridded planck.
+ * 
+ * Copyright (C) 2017 Luke Silva
+ * 
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * ,-----------------------------------------------------------------------------------.
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ *
+ * This layout uses colemak by default, and is designed for programming, with easy access to symbols
+ * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters
+ * Eg: compare colemak 'this' to '(){\n}' on the symbol layer.
+ *
+ * The layout also supports a range of multilingual characters, covering those 
+ * needed for French, German, Swedish and likely some other European Languages.
+ * In the future full support for Colemak's multilingual deadkeys may be introduced.
+ *
+ * The multilingual characters are inputted through QMK's unicode engine, using
+ * the Linux input method by default, however this can be changed at runtime.
+ *
+ */
+
+
+#include "planck.h"
+
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+
+// Layers
+#define _COLEMAK 0
+#define _QWERTY 1
+#define _SYM 2
+#define _NUM 3
+#define _GR  4
+#define _GR_S 5
+#define _ADJ 6
+#define _NAV 7
+#define _PLOVER 8
+
+// Macro ID numbers
+#define M_ALT_HASH 1
+#define M_GR_DASH  2
+#define M_SYM_LPRN 3 
+#define M_NAV_UNDS 4 
+#define M_NUM_RPRN 5 
+#define M_CTRL_DLR 6 
+#define M_LCBR_ENT 7
+#define M_PLOVER   8
+#define M_EXT_PLV  9
+#define M_WINDOWS 10
+#define M_LINUX   11
+#define M_OSX     12
+#define M_FUNCTION 13
+#define M_THEN     14
+#define M_CATCH    15
+
+// Macro keys
+#define ALT_HASH MACROTAP(M_ALT_HASH)   // tap for #, hold for Alt 
+#define GR_DASH  MACROTAP(M_GR_DASH)    // tap for -, hold for GR layer            a-class-name
+#define SYM_LPRN MACROTAP(M_SYM_LPRN)   // tap for (, hold for symbols layer       if()
+#define NAV_UNDS MACROTAP(M_NAV_UNDS)   // tap for _, hold for navigation layer    snake_case_variable
+#define NUM_RPRN MACROTAP(M_NUM_RPRN)   // tap for ), hold for numbers layer       else if()
+#define CTRL_DLR MACROTAP(M_CTRL_DLR)   // tap for $, hold for ctrl                $php_is_really_weird
+#define LCBR_ENT M(M_LCBR_ENT)          // {\n                                     easier code formatting
+#define PLOVER   M(M_PLOVER)            // PHROPB (plover) or ERFVIK(qwerty)       starts plover
+#define EXT_PLV  M(M_EXT_PLV)           // PHRO*F (plover) or ERFVYU(qwerty)       stops plover
+#define WINDOWS  M(M_WINDOWS)           // Sets Unicode handler to windows
+#define LINUX    M(M_LINUX)             // Sets Unicode handler to linux
+#define OSX      M(M_OSX)               // Sets Unicode handler to OSX
+#define FUNCTION M(M_FUNCTION)
+#define THEN     M(M_THEN)
+#define CATCH    M(M_CATCH)
+
+
+// Renames of QMK keys... (would have otherwise been a macro)
+#define QWERTY DF(_QWERTY)
+#define COLEMAK DF(_COLEMAK)
+
+
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |  ;:  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Bksp |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |  '"  |
+ * |------+------+------+------+------+------+------+------+------+------+------+------`---.
+ * |Shift=|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |  ,<  |  .>  |  /?  |Shift/Ent |
+ * |------+------+------+------+------+------+------+------+------+------+------+----------|
+ * |CtCaps|GUIF4 | Alt# | Gr-  | Sym( | Nav_ |Space | Num) |Ctrl$ | F11  | F12  |Nav toggle|
+ * `---------------------------------------------------------------------------------------'
+ */
+
+[_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_BSPC,        KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
+  {SFT_T(KC_EQL),  KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, SFT_T(KC_ENT) },
+  {CTL_T(KC_CAPS), KC_LGUI,  ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS,  KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)}
+},
+
+
+/* QWERTY
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Bksp |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |  ;:  |  '"  |
+ * |------+------+------+------+------+------+------+------+------+------+------+------`---.
+ * |Shift=|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |  ,<  |  .>  |  /?  |Shift/Ent |
+ * |------+------+------+------+------+------+------+------+------+------+------+----------|
+ * |CtCaps|GUIF4 | Alt# | Gr-  | Sym( | Nav_ |Space | Num) |Ctrl$ | F11  | F12  |Nav toggle|
+ * `---------------------------------------------------------------------------------------'
+ */
+
+[_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_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, SFT_T(KC_ENT) },
+  {CTL_T(KC_CAPS),    KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC,  KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
+},
+
+
+/* Symbols
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |  `   |  @   |  /   |  *   |  ^   |  %   |  :   |  +   |  -   | Del  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |  [   |  ;   |  }   |  (   |  "   |  '   |  )   | {\n  |  !   |  ]   |  \   |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Shift |  .   |  {   |  <   |  >   |  ~   |  X2  |  =   |  &   |  |   |  ?   |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      | Sym  |  _   |Space | NUM  |  X2  |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_SYM] = {
+  {KC_TAB,  KC_GRV,  KC_AT,   KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL,  KC_BSPC},
+  {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT,  KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS},
+  {KC_LSFT, KC_DOT,  KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL,  KC_AMPR, KC_PIPE, KC_QUES, KC_ENT },
+  {THEN,    CATCH,   XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______}
+},
+
+
+/* Numbers
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |  1   |  2   |  3   |  4   |  5   |  6   |  7   |  8   |  9   |  0   | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Bksp |  x   |  D   |  E   |  F   |  +   |  -   |  4   |  5   |  6   |  0   |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Shift |  (   |  A   |  B   |  C   |  *   |  /   |  1   |  2   |  3   |  )   |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |  GR  | SYM  |  _   |Space | NUM  |  0   |  .   |  f   |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_NUM] = {
+  {KC_TAB,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
+  {KC_BSPC, KC_X,    S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4,    KC_5,    KC_6,    KC_0,    KC_ENT },
+  {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1,    KC_2,    KC_3,    KC_RPRN, KC_ENT },
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_0,    KC_DOT,  KC_F,    _______}
+},
+
+
+/* Gr layer / international keys
+ * ,-----------------------------------------------------------------------------------.
+ * |      |  Ã¤   |  Ã¥   |      |  Â¢Â£  |  â‚¬Â¥  |      |  Ã«   |  Ãª   |  Ã¼   |  Ã¹   |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |  Ã¢   |  Ã    |  ÃŸ   |      |      |      |  Ã¨   |  Ã©   |  Ã¯   |  Ã¶   |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |  Ã¦   |  Ã´   |  Ã§   |  Å“   |      |      |  Ã»   |  Â«   |  Â»   |  Ã®   |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_GR] = {
+  {_______,  UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______},
+  {_______,  UC(0xE2),UC(0xE0),UC(0xDF), _______, _______,   _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______},
+  {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______,   _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)},
+  {_______,  _______, _______, _______, _______,  _______,   _______, _______, _______, _______, _______, _______}
+},
+
+// Shifted layer of the above
+[_GR_S] = {
+  {_______,  UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______},
+  {_______,  UC(0xC2),UC(0xC0), UC(0xDF),_______,  _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______},
+  {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)},
+  {_______,  _______, _______, _______, _______,   _______, _______, _______, _______, _______, _______, _______}
+},
+
+
+/* Adjust Layer (Gr + Num)
+ * ,-----------------------------------------------------------------------------------.
+ * |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |  F7  |  F8  |  F9  | F10  | F11  | F12  |
+ * |------+-------------+------+------+------+------+------+------+------+------+------|
+ * |      |     |Prntscr| ESC  |VOLUP | PLAY | PREV |QWERTY|COLEMAK|PLOVER|     |      |
+ * |------+-------------+------+------+------+------+------+------+------+------+------|
+ * |      |     |BACKLIT| INS  |VOLDWN| MUTE | NEXT | WIND |LINUX | OSX  |      |      |
+ * |------+-------------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJ] = {
+  {KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12 },
+  {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC,  KC_VOLU, KC_MPLY, KC_MPRV, QWERTY,  COLEMAK, PLOVER,  XXXXXXX, XXXXXXX},
+  {XXXXXXX, XXXXXXX, BL_STEP, KC_INS,  KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX,   OSX,     XXXXXXX, XXXXXXX},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+},
+
+
+/* Navigation
+ * ,-----------------------------------------------------------------------------------.
+ * |      |      | BTN3 | BTN2 | BTN1 |      | ACL0 | HOME | PGDN | PGUP | END  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |MSLEFT| MSDN | MSUP |MSRGHT|      | ACL1 | LEFT | DOWN | UP   | RGHT |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |WHLEFT| WHDN | WHUP |WHRGHT|      | ACL2 |C-LEFT|C-PGDN|C-PGUP|C-RGHT|Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |  _   |Space | ACL0 | ACL1 | ACL2 |      |TGLNAV|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_NAV] = {
+  {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END,  KC_BSPC},
+  {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP,   KC_RIGHT,KC_ENT },
+  {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT },
+  {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______}
+},
+
+/* Plover Layer
+ * ,-----------------------------------------------------------------------------------.
+ * |      |   S  |   T  |   P  |   H  |   *  |   *  |   F  |   P  |   L  |   T  |   D  |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |TogOut|   S  |   K  |   W  |   R  |   *  |   *  |   R  |   B  |   G  |   S  |   Z  |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |   #  |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit |      |      |   #  |   A  |   O  |   E  |   U  |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+[_PLOVER] = {
+  {XXXXXXX, KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC},
+  {XXXXXXX, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
+  {KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1,    KC_1   },
+  {EXT_PLV, XXXXXXX, XXXXXXX, KC_1,    KC_C,    KC_V,    KC_N,    KC_M,    XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
+}
+
+
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+};
+
+
+void matrix_init_user(){
+  set_unicode_input_mode(UC_LNX);
+}
+
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  switch(id) {
+    case M_ALT_HASH:
+      return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 3, LALT);
+    case M_GR_DASH:
+      {
+        const macro_t* macro = MACRO_TAP_HOLD_LAYER(record, MACRO(T(MINS)), _GR);
+        update_tri_layer(_NUM, _GR, _ADJ);
+        return macro;
+      }
+    case M_SYM_LPRN:
+      return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 9, _SYM);
+    case M_NAV_UNDS:
+      return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, MINS, _NAV);
+    case M_NUM_RPRN:
+      {
+        const macro_t* macro = MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 0, _NUM);
+        update_tri_layer(_NUM, _GR, _ADJ);
+        return macro;
+      }
+    case M_CTRL_DLR:
+      return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 4, LCTL);
+    case M_LCBR_ENT:
+      return MACRODOWN(I(10), D(LSFT), T(LBRC), U(LSFT), T(ENT), END);
+    case M_PLOVER:
+      if (record->event.pressed) {
+        layer_and(0);
+        layer_on(_PLOVER);
+        default_layer_set(_PLOVER);
+        
+        // Starts plover
+        return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END);
+      }
+      break;    
+    case M_EXT_PLV:
+      if (!record->event.pressed) {
+        layer_off(_PLOVER);
+        default_layer_set(_COLEMAK);
+        
+        //Pauses plover
+        return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END);
+      }
+      break;
+    case M_WINDOWS:
+      set_unicode_input_mode(UC_WIN);
+      break;
+    case M_LINUX:
+      set_unicode_input_mode(UC_LNX);
+      break;
+    case M_OSX:
+      set_unicode_input_mode(UC_OSX);
+      break;
+    case M_FUNCTION:
+      if (record->event.pressed) {
+        SEND_STRING("function");
+      }
+      break;
+    case M_THEN:
+      if (record->event.pressed) {
+        SEND_STRING("then");
+      }
+      break;
+    case M_CATCH:
+      if (record->event.pressed) {
+        SEND_STRING("catch");
+      }
+      break;
+  }
+  return MACRO_NONE;
+};
diff --git a/keyboards/planck/keymaps/luke/readme.md b/keyboards/planck/keymaps/luke/readme.md
new file mode 100644 (file)
index 0000000..3a4824b
--- /dev/null
@@ -0,0 +1,2 @@
+# A more basic Planck Layout for copying
+
diff --git a/keyboards/planck/keymaps/yale/Makefile b/keyboards/planck/keymaps/yale/Makefile
new file mode 100644 (file)
index 0000000..581e08c
--- /dev/null
@@ -0,0 +1,25 @@
+
+
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = 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 = 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
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/yale/config.h b/keyboards/planck/keymaps/yale/config.h
new file mode 100644 (file)
index 0000000..8a916bb
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define PREVENT_STUCK_MODIFIERS
+
+#endif
+
+
+
diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c
new file mode 100644 (file)
index 0000000..f228077
--- /dev/null
@@ -0,0 +1,108 @@
+// 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 "planck.h"
+#ifdef BACKLIGHT_ENABLE
+       #include "backlight.h"
+#endif
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _NUM 5
+#define _FUNC 6
+#define _NAV 7
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* _QWERTY
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |Ctrl/Tab| A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt  | GUI  | GUI  |  Num |    Space    |  FN  |  GUI |  Alt | Ctrl | Enter|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_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},
+       {CTL_T(KC_TAB), 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,        KC_LGUI,        KC_LGUI,        MO(_NUM),       KC_SPC,         KC_SPC,         MO(_FUNC),      KC_RGUI,        KC_RALT,        KC_RCTL,        KC_ENT}
+},
+
+/* _NUM
+ * ,-----------------------------------------------------------------------------------.
+ * |  ___ |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | ____ |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl |   `  |  [   |  {   |  (   |  /   |  \   |   )  |   }  |   ]  |   -  |  =   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | ____ |   !  |  @   |  #   |  $   |  %   |  ^   |  &   |  *   |   _  |   +  | ____ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ____ | ___  | ___  | ___  | XXXX |    ______   | ____ | ____ | ____ |  __  | ____ |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_NUM] = {
+       {_______,       KC_1,           KC_2,           KC_3,           KC_4,           KC_5,           KC_6,           KC_7,           KC_8,           KC_9,           KC_0,           _______},
+       {KC_LCTL,       KC_GRV,         KC_LBRC,        KC_LCBR,        KC_LPRN,        KC_SLSH,        KC_BSLS,        KC_RPRN,        KC_RCBR,        KC_RBRC,        KC_MINS,        KC_EQL},
+       {_______,       KC_EXLM,        KC_AT,          KC_HASH,        KC_DLR,         KC_PERC,        KC_CIRC,        KC_AMPR,        KC_ASTR,        KC_UNDS,        KC_PLUS,        _______},
+       {_______,       _______,        _______,        _______,        _______,        _______,        _______,        MO(_NAV),       _______,        _______,        _______,        _______}
+},
+
+/* _FUNC
+ * ,-----------------------------------------------------------------------------------.
+ * | ____ |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | ____ |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | ____ |Shift | Ctrl |  Alt |  GUI | ____ | Left | Down |  Up  |Right | Del  | ____ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | ____ |Light | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | ____ | ____ | ____ | ____ | ____ |    _____    | XXXX | ____ | ____ | ____ | ____ |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FUNC] = {
+       {_______,       KC_1,           KC_2,           KC_3,           KC_4,           KC_5,           KC_6,           KC_7,           KC_8,           KC_9,           KC_0,           _______},
+       {_______,       KC_LSFT,        KC_LCTL,        KC_LALT,        KC_LGUI,        _______,        KC_LEFT,        KC_DOWN,        KC_UP,          KC_RGHT,        KC_DEL,         _______},
+       {_______,       M(0),           _______,        KC_VOLD,        KC_MPRV,        KC_MPLY,        KC_MUTE,        KC_MNXT,        KC_VOLU,        _______,        _______,        _______},
+       {_______,       _______,        _______,        _______,        MO(_NAV),       _______,        _______,        _______,        _______,        _______,        _______,        _______}
+},
+
+[_NAV] = {
+       {KC_MS_ACCEL2,  KC_FN1,         KC_FN2,         KC_FN3,         KC_FN4,         XXXXXXX,        XXXXXXX,                KC_WH_D,                KC_WH_U,        XXXXXXX,                XXXXXXX,        XXXXXXX},
+       {KC_MS_ACCEL1,  KC_MS_BTN4,     KC_MS_BTN3,     KC_MS_BTN2,     KC_MS_BTN1,     XXXXXXX,        KC_MS_LEFT,             KC_MS_DOWN,             KC_MS_UP,       KC_MS_RIGHT,    XXXXXXX,        XXXXXXX},
+       {KC_MS_ACCEL0,  KC_FN9,         KC_FN10,        KC_FN11,        KC_FN12,        XXXXXXX,        XXXXXXX,                XXXXXXX,                XXXXXXX,        XXXXXXX,                XXXXXXX,        XXXXXXX},
+       {XXXXXXX,               XXXXXXX,        XXXXXXX,        XXXXXXX,        XXXXXXX,        XXXXXXX,        XXXXXXX,                XXXXXXX,                XXXXXXX,        XXXXXXX,                XXXXXXX,        XXXXXXX}
+},
+
+};
+
+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);
+                                               #ifdef BACKLIGHT_ENABLE
+                                                       backlight_step();
+                                               #endif
+                                       } else {
+                                               unregister_code(KC_RSFT);
+                                       }
+                               break;
+                       }
+               return MACRO_NONE;
+};
diff --git a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg
new file mode 100644 (file)
index 0000000..ab9c6b4
Binary files /dev/null and b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg differ
index 4bdb2065d9449ef7ff6ead93a59e6ba4e6b0c37c..28f68b9c7001739770068c7348fc67fe4b1a5bcf 100644 (file)
@@ -2,8 +2,10 @@
 #define CONFIG_DEFINITIONS_H
 
 /* diode directions */
-#define COL2ROW 0
-#define ROW2COL 1
+#define COL2ROW       0
+#define ROW2COL       1
+#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
+
 /* I/O pins */
 #ifndef F0
     #define B0 0x30
index eced3d2bba29918578f638491720a199b5cbb807..5190f24e87cff7b6f8e884253696746536a7f477 100644 (file)
@@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key)
             action.code = keymap_function_id_to_action( (int)keycode & 0xFFF );
             break;
         case QK_MACRO ... QK_MACRO_MAX:
-            action.code = ACTION_MACRO(keycode & 0xFF);
+            if (keycode & 0x800) // tap macros have upper bit set
+                action.code = ACTION_MACRO_TAP(keycode & 0xFF);
+            else
+                action.code = ACTION_MACRO(keycode & 0xFF);
             break;
         case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
             action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
index a883b1388487130f5c783bd6b1f5df603718000b..55bdd9cd81929dffea09310730243c91d49f77c2 100755 (executable)
@@ -70,7 +70,7 @@ void I2C_WriteBit(unsigned char c)
 
 // Inits bitbanging port, must be called before using the functions below
 //
-void I2C_Init()
+void I2C_Init(void)
 {
     I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
 
@@ -82,7 +82,7 @@ void I2C_Init()
 
 // Send a START Condition
 //
-void I2C_Start()
+void I2C_Start(void)
 {
     // set both to high at the same time
     I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
@@ -97,7 +97,7 @@ void I2C_Start()
 
 // Send a STOP Condition
 //
-void I2C_Stop()
+void I2C_Stop(void)
 {
     I2C_CLOCK_HI();
     _delay_us(I2C_DELAY);
index 07eb87bc362ed1bfa876ecff2d6676e2b8ed4bf6..ac523482ad101e635b6b432942d768a058bb384f 100644 (file)
@@ -60,13 +60,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     extern const matrix_row_t matrix_mask[];
 #endif
 
+#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
 static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
 static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+#endif
 
 /* matrix state(1:on, 0:off) */
 static matrix_row_t matrix[MATRIX_ROWS];
 
-static matrix_row_t matrix_raw[MATRIX_ROWS];
 static matrix_row_t matrix_debouncing[MATRIX_ROWS];
 
 
@@ -76,7 +77,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
     static void unselect_rows(void);
     static void select_row(uint8_t row);
     static void unselect_row(uint8_t row);
-#else // ROW2COL
+#elif (DIODE_DIRECTION == ROW2COL)
     static void init_rows(void);
     static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
     static void unselect_cols(void);
@@ -133,7 +134,7 @@ uint8_t matrix_cols(void) {
 //         /* PORTxn */
 //         _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF);
 //     }
-// #else
+// #elif (DIODE_DIRECTION == ROW2COL)
 //     for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
 //         /* DDRxn */
 //         _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF);
@@ -158,7 +159,7 @@ void matrix_init(void) {
 #if (DIODE_DIRECTION == COL2ROW)
     unselect_rows();
     init_cols();
-#else // ROW2COL
+#elif (DIODE_DIRECTION == ROW2COL)
     unselect_cols();
     init_rows();
 #endif
@@ -166,7 +167,6 @@ void matrix_init(void) {
     // initialize matrix state: all keys off
     for (uint8_t i=0; i < MATRIX_ROWS; i++) {
         matrix[i] = 0;
-        matrix_raw[i] = 0;
         matrix_debouncing[i] = 0;
     }
 
@@ -194,7 +194,7 @@ uint8_t matrix_scan(void)
 
     }
 
-#else // ROW2COL
+#elif (DIODE_DIRECTION == ROW2COL)
 
     // Set col, read rows
     for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
@@ -336,7 +336,7 @@ static void unselect_rows(void)
     }
 }
 
-#else // ROW2COL
+#elif (DIODE_DIRECTION == ROW2COL)
 
 static void init_rows(void)
 {
index b83ae433e3659cdf6df1da1c9a6222ef89c6d34d..d3905decf2d1f76eaf6f05715aae0b0663a350e7 100644 (file)
@@ -1,4 +1,7 @@
 #include "quantum.h"
+#ifdef PROTOCOL_LUFA
+#include "outputselect.h"
+#endif
 
 #ifndef TAPPING_TERM
 #define TAPPING_TERM 200
@@ -243,6 +246,36 @@ bool process_record_quantum(keyrecord_t *record) {
          return false;
       break;
        #endif
+    #ifdef PROTOCOL_LUFA
+    case OUT_AUTO:
+      if (record->event.pressed) {
+        set_output(OUTPUT_AUTO);
+      }
+      return false;
+      break;
+    case OUT_USB:
+      if (record->event.pressed) {
+        set_output(OUTPUT_USB);
+      }
+      return false;
+      break;
+    #ifdef BLUETOOTH_ENABLE
+    case OUT_BT:
+      if (record->event.pressed) {
+        set_output(OUTPUT_BLUETOOTH);
+      }
+      return false;
+      break;
+    #endif
+    #ifdef ADAFRUIT_BLE_ENABLE
+    case OUT_BLE:
+      if (record->event.pressed) {
+        set_output(OUTPUT_ADAFRUIT_BLE);
+      }
+      return false;
+      break;
+    #endif
+    #endif
     case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO:
       if (record->event.pressed) {
         // MAGIC actions (BOOTMAGIC without the boot)
index 8614c053abc51b11239844b52e70a2a79c9376cd..18f072189d7b5f5a3ff3bdd9be325e6e8d322ebb 100644 (file)
@@ -15,7 +15,6 @@
 #ifdef RGBLIGHT_ENABLE
   #include "rgblight.h"
 #endif
-
 #include "action_layer.h"
 #include "eeconfig.h"
 #include <stddef.h>
index 91324be35d909823426e224d4b748d04fe1e5872..8a78a58c9fb355efa75f36db03531c11372a98b8 100644 (file)
@@ -141,6 +141,16 @@ enum quantum_keycodes {
     PRINT_ON,
     PRINT_OFF,
 
+    // output selection
+    OUT_AUTO,
+    OUT_USB,
+#ifdef BLUETOOTH_ENABLE
+    OUT_BT,
+#endif
+#ifdef ADAFRUIT_BLE_ENABLE
+    OUT_BLE,
+#endif
+
     // always leave at the end
     SAFE_RANGE
 };
@@ -246,8 +256,10 @@ enum quantum_keycodes {
 
 #define M(kc) (kc | QK_MACRO)
 
+#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8)
 #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
 
+
 // L-ayer, T-ap - 256 keycode max, 16 layer max
 #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8))
 
index 52a09817a1e46a48697bb1f6329ba64166b586ea..dd1b91c63c852a7aa352baddda452b62aef6cf8c 100644 (file)
@@ -66,6 +66,8 @@ __attribute__ ((weak))
 const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
 __attribute__ ((weak))
 const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20};
+__attribute__ ((weak))
+const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
 
 rgblight_config_t rgblight_config;
 rgblight_config_t inmem_config;
@@ -219,6 +221,14 @@ void rgblight_step(void) {
   }
   rgblight_mode(mode);
 }
+void rgblight_step_reverse(void) {
+  uint8_t mode = 0;
+  mode = rgblight_config.mode - 1;
+  if (mode < 1) {
+    mode = RGBLIGHT_MODES;
+  }
+  rgblight_mode(mode);
+}
 
 void rgblight_mode(uint8_t mode) {
   if (!rgblight_config.enable) {
@@ -237,7 +247,7 @@ void rgblight_mode(uint8_t mode) {
     #ifdef RGBLIGHT_ANIMATIONS
       rgblight_timer_disable();
     #endif
-  } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) {
+  } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) {
     // MODE 2-5, breathing
     // MODE 6-8, rainbow mood
     // MODE 9-14, rainbow swirl
@@ -247,6 +257,12 @@ void rgblight_mode(uint8_t mode) {
     #ifdef RGBLIGHT_ANIMATIONS
       rgblight_timer_enable();
     #endif
+  } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) {
+    // MODE 25-34, static gradient
+
+    #ifdef RGBLIGHT_ANIMATIONS
+      rgblight_timer_disable();
+    #endif
   }
   rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
 }
@@ -350,6 +366,17 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
       } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) {
         // rainbow mood and rainbow swirl, ignore the change of hue
         hue = rgblight_config.hue;
+      } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) {
+        // static gradient
+        uint16_t _hue;
+        int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1;
+        uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]);
+        for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+          _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360;
+          dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range);
+          sethsv(_hue, sat, val, (LED_TYPE *)&led[i]);
+        }
+        rgblight_set();
       }
     }
     rgblight_config.hue = hue;
@@ -450,7 +477,7 @@ void rgblight_task(void) {
     } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) {
       // mode = 21 to 23, knight mode
       rgblight_effect_knight(rgblight_config.mode - 21);
-    } else {
+    } else if (rgblight_config.mode == 24) {
       // mode = 24, christmas mode
       rgblight_effect_christmas();
     }
@@ -604,13 +631,13 @@ void rgblight_effect_christmas(void) {
   static uint16_t last_timer = 0;
   uint16_t hue;
   uint8_t i;
-  if (timer_elapsed(last_timer) < 1000) {
+  if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) {
     return;
   }
   last_timer = timer_read();
   current_offset = (current_offset + 1) % 2;
   for (i = 0; i < RGBLED_NUM; i++) {
-    hue = 0 + ((RGBLED_NUM * (i + current_offset)) % 2) * 80;
+    hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120;
     sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
   }
   rgblight_set();
index 726b8de72e4ca637cfebc887425b6389f32a3ac8..2b3e791bf8a6372bfa49485f0c0df4c3b61c348f 100644 (file)
@@ -2,7 +2,7 @@
 #define RGBLIGHT_H
 
 #ifdef RGBLIGHT_ANIMATIONS
-       #define RGBLIGHT_MODES 24
+       #define RGBLIGHT_MODES 34
 #else
        #define RGBLIGHT_MODES 1
 #endif
 #define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4
 #endif
 
+#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
+#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000
+#endif
+
+#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
+#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
+#endif
+
 #ifndef RGBLIGHT_HUE_STEP
 #define RGBLIGHT_HUE_STEP 10
 #endif
@@ -65,6 +73,7 @@ void rgblight_decrease(void);
 void rgblight_toggle(void);
 void rgblight_enable(void);
 void rgblight_step(void);
+void rgblight_step_reverse(void);
 void rgblight_mode(uint8_t mode);
 void rgblight_set(void);
 void rgblight_update_dword(uint32_t dword);
index b02f0c7ebc844fa5fa99188e01e9ced42c2f26ed..c61c4a618129944b3b0d6820407769ba0037b1d0 100644 (file)
@@ -46,7 +46,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define MATRIX_COL_PINS { F1, F0, B0 }
 #define UNUSED_PINS
 
-/* COL2ROW or ROW2COL */
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
 #define DIODE_DIRECTION COL2ROW
  
 // #define BACKLIGHT_PIN B7
index 33da35f35f85d59f6ef5e0d605ca950eb0776fc6..b15aaa0eb34afb952c4aa5fa517b9e18a48d0b8b 100644 (file)
@@ -47,10 +47,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * 0100|10| usage(10)     (reserved)
  * 0100|11| usage(10)     (reserved)
  *
- * ACT_MOUSEKEY(0110): TODO: Not needed?
+ *
+ * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space?
  * 0101|xxxx| keycode     Mouse key
  *
- * 011x|xxxx xxxx xxxx    (reseved)
+ * ACT_SWAP_HANDS(0110):
+ * 0110|xxxx| keycode     Swap hands (keycode on tap, or options)
+ *
+ *
+ * 0111|xxxx xxxx xxxx    (reserved)
  *
  *
  * Layer Actions(10xx)
@@ -67,7 +72,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *   ee:    on event(01:press, 10:release, 11:both)
  *
  * 1001|xxxx|xxxx xxxx   (reserved)
- * 1001|oopp|BBBB BBBB   8-bit Bitwise Operation???
  *
  * ACT_LAYER_TAP(101x):
  * 101E|LLLL| keycode    On/Off with tap key    (0x00-DF)[TAP]
index aedc32ec6b2c428e53cd24d3d5c105eb1f1143eb..f373f5068e57a709a88ca752616fb7cb1b7a137a 100644 (file)
@@ -20,11 +20,33 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "progmem.h"
 
 
-#define MACRO_NONE      0
+
+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)
 
-typedef uint8_t macro_t;
+// Sends press when the macro key is pressed, release when release, or tap_macro when the key has been tapped
+#define MACRO_TAP_HOLD(record, press, release, tap_macro) ( ((record)->event.pressed) ? \
+     ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? (press) : MACRO_NONE ) : \
+     ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (tap_macro) : (release) ) )
+
+// Holds down the modifier mod when the macro key is held, or sends macro instead when tapped
+#define MACRO_TAP_HOLD_MOD(record, macro, mod) MACRO_TAP_HOLD(record, (MACRO(D(mod), END)), MACRO(U(mod), END), macro)
+
+// Holds down the modifier mod when the macro key is held, or pressed a shifted key when tapped (eg: shift+3 for #)
+#define MACRO_TAP_SHFT_KEY_HOLD_MOD(record, key, mod) MACRO_TAP_HOLD_MOD(record, (MACRO(I(10), D(LSFT), T(key), U(LSFT), END)), mod)
+
+
+// Momentary switch layer when held, sends macro if tapped
+#define MACRO_TAP_HOLD_LAYER(record, macro, layer) ( ((record)->event.pressed) ? \
+     ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? ({layer_on((layer)); MACRO_NONE; }) : MACRO_NONE ) : \
+     ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : ({layer_off((layer)); MACRO_NONE; }) ) )
+
+// Momentary switch layer when held, presses a shifted key when tapped (eg: shift+3 for #)
+#define MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, key, layer) MACRO_TAP_HOLD_LAYER(record, MACRO(I(10), D(LSFT), T(key), U(LSFT), END), layer)
+     
 
 
 #ifndef NO_ACTION_MACRO
index 7653507928bcc57d0cebed49015f8f86275182bc..3aa82231b0801090efc2989628e9022c81ac6d0a 100644 (file)
@@ -14,6 +14,7 @@ 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 "keyboard.h"
 #include "matrix.h"
index cee3593eee4e656504fe82abea111165b40f1517..2543f5abce79af9cb7f8eef8ac99096a401fd030 100644 (file)
@@ -50,7 +50,7 @@ void matrix_init(void);
 uint8_t matrix_scan(void);
 /* whether modified from previous scan. used after matrix_scan. */
 bool matrix_is_modified(void) __attribute__ ((deprecated));
-/* whether a swtich is on */
+/* whether a switch is on */
 bool matrix_is_on(uint8_t row, uint8_t col);
 /* matrix state on row */
 matrix_row_t matrix_get_row(uint8_t row);
index 0c799eca39af5581cb22912f24ea749524afc11a..8fb28b6ce350b47faf9a5199eddae6a217565686 100644 (file)
@@ -134,13 +134,6 @@ typedef union {
     } nkro;
 #endif
 } __attribute__ ((packed)) report_keyboard_t;
-/*
-typedef struct {
-    uint8_t mods;
-    uint8_t reserved;
-    uint8_t keys[REPORT_KEYS];
-} __attribute__ ((packed)) report_keyboard_t;
-*/
 
 typedef struct {
     uint8_t buttons;
index 151d26cbc80a16fe78f5ddb6e5406704b633f0b7..de0cc795f68a5011cbc9e63263b020f2b79d58d6 100644 (file)
@@ -8,13 +8,14 @@ LUFA_PATH ?= $(LUFA_DIR)/LUFA-git
 ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
     # New build system from 20120730
     LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
-    include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk 
+    include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk
 else
     include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile
 endif
 
 LUFA_SRC = lufa.c \
           descriptor.c \
+          outputselect.c \
           $(LUFA_SRC_USB)
 
 ifeq ($(strip $(MIDI_ENABLE)), yes)
index 6dd5959dc4acb0b989fb281fb0492d7fe68642c3..ba49284c9ba2b10bf621565263a62eaef7374fb1 100644 (file)
@@ -53,6 +53,7 @@
 #include "lufa.h"
 #include "quantum.h"
 #include <util/atomic.h>
+#include "outputselect.h"
 
 #ifdef NKRO_ENABLE
   #include "keycode_config.h"
@@ -589,59 +590,33 @@ void EVENT_USB_Device_ControlRequest(void)
 
 /*******************************************************************************
  * Host driver
-p
  ******************************************************************************/
 static uint8_t keyboard_leds(void)
 {
     return keyboard_led_stats;
 }
 
-#define SendToUSB 1
-#define SendToBT  2
-#define SendToBLE 4
-
-static inline uint8_t where_to_send(void) {
-#ifdef ADAFRUIT_BLE_ENABLE
-#if 0
-  if (adafruit_ble_is_connected()) {
-    // For testing, send to BLE as a priority
-    return SendToBLE;
-  }
-#endif
-
-  // This is the real policy
-  if (USB_DeviceState != DEVICE_STATE_Configured) {
-    if (adafruit_ble_is_connected()) {
-      return SendToBLE;
-    }
-  }
-#endif
-  return ((USB_DeviceState == DEVICE_STATE_Configured) ? SendToUSB : 0)
-#ifdef BLUETOOTH_ENABLE
-    || SendToBT
-#endif
-    ;
-}
-
 static void send_keyboard(report_keyboard_t *report)
 {
+    uint8_t timeout = 255;
+    uint8_t where = where_to_send();
+
 #ifdef BLUETOOTH_ENABLE
-    bluefruit_serial_send(0xFD);
-    for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) {
-        bluefruit_serial_send(report->raw[i]);
+    if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
+        bluefruit_serial_send(0xFD);
+        for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) {
+            bluefruit_serial_send(report->raw[i]);
+        }
     }
 #endif
 
-    uint8_t timeout = 255;
-    uint8_t where = where_to_send();
-
 #ifdef ADAFRUIT_BLE_ENABLE
-    if (where & SendToBLE) {
+    if (where == OUTPUT_ADAFRUIT_BLE) {
       adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys));
     }
 #endif
 
-    if (!(where & SendToUSB)) {
+    if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
       return;
     }
 
@@ -681,30 +656,31 @@ static void send_keyboard(report_keyboard_t *report)
 static void send_mouse(report_mouse_t *report)
 {
 #ifdef MOUSE_ENABLE
+    uint8_t timeout = 255;
+    uint8_t where = where_to_send();
 
 #ifdef BLUETOOTH_ENABLE
-    bluefruit_serial_send(0xFD);
-    bluefruit_serial_send(0x00);
-    bluefruit_serial_send(0x03);
-    bluefruit_serial_send(report->buttons);
-    bluefruit_serial_send(report->x);
-    bluefruit_serial_send(report->y);
-    bluefruit_serial_send(report->v); // should try sending the wheel v here
-    bluefruit_serial_send(report->h); // should try sending the wheel h here
-    bluefruit_serial_send(0x00);
+    if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
+        bluefruit_serial_send(0xFD);
+        bluefruit_serial_send(0x00);
+        bluefruit_serial_send(0x03);
+        bluefruit_serial_send(report->buttons);
+        bluefruit_serial_send(report->x);
+        bluefruit_serial_send(report->y);
+        bluefruit_serial_send(report->v); // should try sending the wheel v here
+        bluefruit_serial_send(report->h); // should try sending the wheel h here
+        bluefruit_serial_send(0x00);
+    }
 #endif
 
-    uint8_t timeout = 255;
-
-    uint8_t where = where_to_send();
-
 #ifdef ADAFRUIT_BLE_ENABLE
-    if (where & SendToBLE) {
+    if (where == OUTPUT_ADAFRUIT_BLE) {
       // FIXME: mouse buttons
       adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h);
     }
 #endif
-    if (!(where & SendToUSB)) {
+
+    if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
       return;
     }
 
@@ -746,32 +722,34 @@ static void send_system(uint16_t data)
 
 static void send_consumer(uint16_t data)
 {
+    uint8_t timeout = 255;
+    uint8_t where = where_to_send();
 
 #ifdef BLUETOOTH_ENABLE
-    static uint16_t last_data = 0;
-    if (data == last_data) return;
-    last_data = data;
-    uint16_t bitmap = CONSUMER2BLUEFRUIT(data);
-    bluefruit_serial_send(0xFD);
-    bluefruit_serial_send(0x00);
-    bluefruit_serial_send(0x02);
-    bluefruit_serial_send((bitmap>>8)&0xFF);
-    bluefruit_serial_send(bitmap&0xFF);
-    bluefruit_serial_send(0x00);
-    bluefruit_serial_send(0x00);
-    bluefruit_serial_send(0x00);
-    bluefruit_serial_send(0x00);
+    if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
+        static uint16_t last_data = 0;
+        if (data == last_data) return;
+        last_data = data;
+        uint16_t bitmap = CONSUMER2BLUEFRUIT(data);
+        bluefruit_serial_send(0xFD);
+        bluefruit_serial_send(0x00);
+        bluefruit_serial_send(0x02);
+        bluefruit_serial_send((bitmap>>8)&0xFF);
+        bluefruit_serial_send(bitmap&0xFF);
+        bluefruit_serial_send(0x00);
+        bluefruit_serial_send(0x00);
+        bluefruit_serial_send(0x00);
+        bluefruit_serial_send(0x00);
+    }
 #endif
 
-    uint8_t timeout = 255;
-    uint8_t where = where_to_send();
-
 #ifdef ADAFRUIT_BLE_ENABLE
-    if (where & SendToBLE) {
+    if (where == OUTPUT_ADAFRUIT_BLE) {
       adafruit_ble_send_consumer_key(data, 0);
     }
 #endif
-    if (!(where & SendToUSB)) {
+
+    if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
       return;
     }
 
diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c
new file mode 100644 (file)
index 0000000..5d2457b
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+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 "lufa.h"
+#include "outputselect.h"
+#ifdef ADAFRUIT_BLE_ENABLE
+    #include "adafruit_ble.h"
+#endif
+
+uint8_t desired_output = OUTPUT_DEFAULT;
+
+void set_output(uint8_t output) {
+    set_output_user(output);
+    desired_output = output;
+}
+
+__attribute__((weak))
+void set_output_user(uint8_t output) {
+}
+
+uint8_t auto_detect_output(void) {
+    if (USB_DeviceState == DEVICE_STATE_Configured) {
+        return OUTPUT_USB;
+    }
+
+#ifdef ADAFRUIT_BLE_ENABLE
+    if (adafruit_ble_is_connected()) {
+        return OUTPUT_ADAFRUIT_BLE;
+    }
+#endif
+
+#ifdef BLUETOOTH_ENABLE
+    return OUTPUT_BLUETOOTH; // should check if BT is connected here
+#endif
+
+    return OUTPUT_NONE;
+}
+
+uint8_t where_to_send(void) {
+    if (desired_output == OUTPUT_AUTO) {
+        return auto_detect_output();
+    }
+    return desired_output;
+}
+
diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h
new file mode 100644 (file)
index 0000000..79b4dd3
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+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/>.
+*/
+
+enum outputs {
+    OUTPUT_AUTO,
+
+    OUTPUT_NONE,
+    OUTPUT_USB,
+    OUTPUT_BLUETOOTH,
+    OUTPUT_ADAFRUIT_BLE,
+
+    // backward compatibility
+    OUTPUT_USB_AND_BT
+};
+
+/**
+ * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default
+ */
+#ifndef OUTPUT_DEFAULT
+    #ifdef BLUETOOTH_ENABLE
+        #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT
+    #else
+        #define OUTPUT_DEFAULT OUTPUT_AUTO
+    #endif
+#endif
+
+void set_output(uint8_t output);
+void set_output_user(uint8_t output);
+uint8_t auto_detect_output(void);
+uint8_t where_to_send(void);
\ No newline at end of file
index a8c13b928ae1312a1a17d54610097352401189a3..022ac6f6bd057144e5c7cbd9f7a84a3ffb354864 100644 (file)
@@ -280,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = {
     0x95, 0x06,          //   Report Count (6),
     0x75, 0x08,          //   Report Size (8),
     0x15, 0x00,          //   Logical Minimum (0),
-    0x25, 0xFF, 0x00,    //   Logical Maximum(255),
+    0x26, 0xFF, 0x00,    //   Logical Maximum(255),
     0x05, 0x07,          //   Usage Page (Key Codes),
     0x19, 0x00,          //   Usage Minimum (0),
     0x29, 0xFF,          //   Usage Maximum (255),
@@ -350,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = {
     0xa1, 0x01,                    // COLLECTION (Application)
     0x85, REPORT_ID_SYSTEM,        //   REPORT_ID (2)
     0x15, 0x01,                    //   LOGICAL_MINIMUM (0x1)
-    0x25, 0xb7, 0x00,              //   LOGICAL_MAXIMUM (0xb7)
+    0x26, 0xb7, 0x00,              //   LOGICAL_MAXIMUM (0xb7)
     0x19, 0x01,                    //   USAGE_MINIMUM (0x1)
     0x29, 0xb7,                    //   USAGE_MAXIMUM (0xb7)
     0x75, 0x10,                    //   REPORT_SIZE (16)
diff --git a/util/travis_build.sh b/util/travis_build.sh
new file mode 100644 (file)
index 0000000..794b0d3
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}"
+TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
+
+if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then 
+       exit_code=0
+       NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l)
+       if [[ $NEFM -gt 0 ]] ; then
+               echo "Making all keymaps for all keyboards"
+               make all-keyboards AUTOGEN="true"
+               : $((exit_code = $exit_code + $?))
+       else
+               MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u)
+               for KB in $MKB ; do
+                       echo "Making all keymaps for $KB"
+                       make "$KB" AUTOGEN=true
+                       : $((exit_code = $exit_code + $?))
+               done
+       fi
+       exit $exit_code
+fi
index 3751da1e53afd5bd4ef1993dc075004ac7f1726b..de2481ce54625f3867c7882ec42005c03747ab5d 100644 (file)
@@ -38,10 +38,10 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
        git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git
        cd qmk.fm
        git submodule update --init --recursive
-       rm -rf keyboard
-       rm -rf keyboards
-       cp -r ../qmk_firmware/keyboards .
-       mkdir keyboards/ergodox_ez/
+       #rm -rf keyboard
+       #rm -rf keyboards
+       yes | cp -rf ../qmk_firmware/keyboards .
+       #mkdir keyboards/ergodox_ez/
        cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
        cp ../qmk_firmware/readme.md qmk_readme.md
        ./generate.sh