aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile28
-rw-r--r--keyboards/alps64/readme.md4
-rw-r--r--keyboards/clueboard/readme.md4
-rw-r--r--keyboards/cluepad/readme.md4
-rw-r--r--keyboards/ergodox_ez/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md2
-rw-r--r--keyboards/handwired/CMD60/CMD60.c8
-rw-r--r--keyboards/handwired/CMD60/CMD60.h20
-rw-r--r--keyboards/handwired/CMD60/Makefile73
-rw-r--r--keyboards/handwired/CMD60/README.md35
-rw-r--r--keyboards/handwired/CMD60/config.h162
-rw-r--r--keyboards/handwired/CMD60/keymaps/default/keymap.c66
-rw-r--r--keyboards/jd45/readme.md4
-rw-r--r--keyboards/phantom/readme.md4
-rw-r--r--keyboards/satan/Makefile2
-rw-r--r--keyboards/satan/keymaps/sethbc/Makefile21
-rw-r--r--keyboards/satan/readme.md4
-rw-r--r--quantum/keymap_extras/keymap_dvorak.h15
-rw-r--r--quantum/keymap_extras/keymap_fr_ch.h2
-rw-r--r--quantum/keymap_extras/keymap_french.h4
-rw-r--r--quantum/keymap_extras/keymap_german.h2
-rw-r--r--quantum/keymap_extras/keymap_german_ch.h2
-rw-r--r--quantum/keymap_extras/keymap_nordic.h2
-rw-r--r--quantum/keymap_extras/keymap_spanish.h2
-rw-r--r--quantum/keymap_extras/keymap_uk.h4
-rw-r--r--quantum/process_keycode/process_tap_dance.c52
-rw-r--r--quantum/process_keycode/process_tap_dance.h19
-rw-r--r--readme.md75
-rw-r--r--tmk_core/avr.mk4
-rw-r--r--tmk_core/protocol/lufa/descriptor.c4
29 files changed, 589 insertions, 39 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..96ace4ec6
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
1FROM debian:jessie
2MAINTAINER Erik Dasque <erik@frenchguys.com>
3
4RUN apt-get update
5RUN apt-get install --no-install-recommends -y build-essential \
6 gcc \
7 unzip \
8 wget \
9 zip \
10 gcc-avr \
11 binutils-avr \
12 avr-libc \
13 dfu-programmer \
14 dfu-util \
15 gcc-arm-none-eabi \
16 binutils-arm-none-eabi \
17 libnewlib-arm-none-eabi \
18 git
19
20RUN apt-get clean
21RUN rm -rf /var/lib/apt/lists/*
22
23ENV keyboard=ergodox_ez
24ENV keymap=default
25
26VOLUME /qmk
27WORKDIR /qmk
28CMD make clean ; make keyboard=${keyboard} keymap=${keymap} \ No newline at end of file
diff --git a/keyboards/alps64/readme.md b/keyboards/alps64/readme.md
new file mode 100644
index 000000000..1798b193a
--- /dev/null
+++ b/keyboards/alps64/readme.md
@@ -0,0 +1,4 @@
1Alps64 keyboard firmware
2======================
3
4TODO: to be updated.
diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md
new file mode 100644
index 000000000..aa301f020
--- /dev/null
+++ b/keyboards/clueboard/readme.md
@@ -0,0 +1,4 @@
1Clueboard keyboard firmware
2======================
3
4TODO: to be updated.
diff --git a/keyboards/cluepad/readme.md b/keyboards/cluepad/readme.md
new file mode 100644
index 000000000..8450340f2
--- /dev/null
+++ b/keyboards/cluepad/readme.md
@@ -0,0 +1,4 @@
1Cluepad number pad firmware
2======================
3
4TODO: to be updated.
diff --git a/keyboards/ergodox_ez/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md b/keyboards/ergodox_ez/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md
index 4188d2b50..16cebd091 100644
--- a/keyboards/ergodox_ez/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md
+++ b/keyboards/ergodox_ez/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md
@@ -10,7 +10,7 @@ There are four layers:
10Looking for IJKL arrows? [Here we 10Looking for IJKL arrows? [Here we
11go](../romanzolotarev-norman-plover-osx/). 11go](../romanzolotarev-norman-plover-osx/).
12 12
13[![keyboard-layout](romanzolotarev-norman-plover-osx-hjkl.png)](rttp://www.keyboard-layout-editor.com/#/gists/56ffedceb0668dda47c993e7271563e0) 13[![keyboard-layout](romanzolotarev-norman-plover-osx-hjkl.png)](http://www.keyboard-layout-editor.com/#/gists/56ffedceb0668dda47c993e7271563e0)
14 14
15## Switching 15## Switching
16 16
diff --git a/keyboards/handwired/CMD60/CMD60.c b/keyboards/handwired/CMD60/CMD60.c
new file mode 100644
index 000000000..799848e34
--- /dev/null
+++ b/keyboards/handwired/CMD60/CMD60.c
@@ -0,0 +1,8 @@
1#include "CMD60.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
diff --git a/keyboards/handwired/CMD60/CMD60.h b/keyboards/handwired/CMD60/CMD60.h
new file mode 100644
index 000000000..f90871fc7
--- /dev/null
+++ b/keyboards/handwired/CMD60/CMD60.h
@@ -0,0 +1,20 @@
1#ifndef CMD60_H
2#define CMD60_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
8 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
9 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
10 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
11 K40, K41, K42, K45, K4A, K4B, K4C, K4D \
12 ) { \
13 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
14 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
15 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
16 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
17 { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \
18}
19
20#endif \ No newline at end of file
diff --git a/keyboards/handwired/CMD60/Makefile b/keyboards/handwired/CMD60/Makefile
new file mode 100644
index 000000000..711759917
--- /dev/null
+++ b/keyboards/handwired/CMD60/Makefile
@@ -0,0 +1,73 @@
1
2# MCU name
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=512
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68
69ifndef QUANTUM_DIR
70 include ../../../Makefile
71endif
72
73
diff --git a/keyboards/handwired/CMD60/README.md b/keyboards/handwired/CMD60/README.md
new file mode 100644
index 000000000..83e371543
--- /dev/null
+++ b/keyboards/handwired/CMD60/README.md
@@ -0,0 +1,35 @@
1CMD60 keyboard firmware
2======================
3
4##CMD60
5
6This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work
7with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2
8and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to
9achieve a higher level of productivity if you take the time to learn its function layers.
10
11## Quantum MK Firmware
12
13For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
14
15## Building
16
17Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 folder.
18Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use
19the Teensy Loader to program your .hex file.
20
21Depending on which keymap you would like to use, you will have to compile slightly differently.
22
23### Default
24
25To build with the default keymap, simply run `make`.
26
27### Other Keymaps
28
29To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
30
31```
32$ make keymap=[default|jack|<name>]
33```
34
35Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
diff --git a/keyboards/handwired/CMD60/config.h b/keyboards/handwired/CMD60/config.h
new file mode 100644
index 000000000..27eb400b8
--- /dev/null
+++ b/keyboards/handwired/CMD60/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER cmd
28#define PRODUCT CMD60
29#define DESCRIPTION Advanced Programming Keeb Layout
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 14
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { F0, F4, F5, F6, F7 }
46#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 }
47#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/handwired/CMD60/keymaps/default/keymap.c b/keyboards/handwired/CMD60/keymaps/default/keymap.c
new file mode 100644
index 000000000..9f9cbcd66
--- /dev/null
+++ b/keyboards/handwired/CMD60/keymaps/default/keymap.c
@@ -0,0 +1,66 @@
1#include "CMD60.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = KEYMAP( /* CMD60 - QWERTY */
5 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
6 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
7 LT(3, KC_ENT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
8 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_NO, KC_RSFT, \
9 KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \
10 ),
11 [1] = KEYMAP( /* CMD60 - GameMode */
12 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
13 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
14 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
15 KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \
16 KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
17 ),
18 [2] = KEYMAP( /* CMD60 - Arrows */
19 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
20 KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \
21 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
22 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \
23 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
24 ),
25 [3] = KEYMAP( /* CMD60 - Functions */
26 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
27 KC_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \
28 KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \
29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
31 ),
32 [4] = KEYMAP( /* CMD60 - Mouse */
33 KC_SYSTEM_SLEEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
38 ),
39 [5] = KEYMAP( /* CMD60 - Media */
40 KC_SYSTEM_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
45 ),
46};
47
48const uint16_t PROGMEM fn_actions[] = {
49
50};
51
52
53const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
54{
55 // MACRODOWN only works in this function
56 switch(id) {
57 case 0:
58 if (record->event.pressed) {
59 register_code(KC_RSFT);
60 } else {
61 unregister_code(KC_RSFT);
62 }
63 break;
64 }
65 return MACRO_NONE;
66};
diff --git a/keyboards/jd45/readme.md b/keyboards/jd45/readme.md
new file mode 100644
index 000000000..2822666e8
--- /dev/null
+++ b/keyboards/jd45/readme.md
@@ -0,0 +1,4 @@
1JD45 keyboard firmware
2======================
3
4TODO: to be updated.
diff --git a/keyboards/phantom/readme.md b/keyboards/phantom/readme.md
new file mode 100644
index 000000000..190f738fa
--- /dev/null
+++ b/keyboards/phantom/readme.md
@@ -0,0 +1,4 @@
1Phantom keyboard firmware
2======================
3
4TODO: to be updated.
diff --git a/keyboards/satan/Makefile b/keyboards/satan/Makefile
index 184b5ac37..a0879fc9c 100644
--- a/keyboards/satan/Makefile
+++ b/keyboards/satan/Makefile
@@ -52,7 +52,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
52# Build Options 52# Build Options
53# comment out to disable the options. 53# comment out to disable the options.
54# 54#
55BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) 55BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
56MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) 56MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
57EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) 57EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
58CONSOLE_ENABLE ?= yes # Console for debug(+400) 58CONSOLE_ENABLE ?= yes # Console for debug(+400)
diff --git a/keyboards/satan/keymaps/sethbc/Makefile b/keyboards/satan/keymaps/sethbc/Makefile
new file mode 100644
index 000000000..2a7ff2779
--- /dev/null
+++ b/keyboards/satan/keymaps/sethbc/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md
new file mode 100644
index 000000000..aa301f020
--- /dev/null
+++ b/keyboards/satan/readme.md
@@ -0,0 +1,4 @@
1Clueboard keyboard firmware
2======================
3
4TODO: to be updated.
diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h
index e855056e8..17f205977 100644
--- a/quantum/keymap_extras/keymap_dvorak.h
+++ b/quantum/keymap_extras/keymap_dvorak.h
@@ -18,18 +18,19 @@
18#define DV_LBRC KC_MINS 18#define DV_LBRC KC_MINS
19#define DV_RBRC KC_EQL 19#define DV_RBRC KC_EQL
20 20
21#define DV_QUOT KC_Q 21#define DV_QUOT KC_Q
22#define DV_COMM KC_W 22#define DV_COMM KC_W
23#define DV_DOT KC_E 23#define DV_DOT KC_E
24#define DV_P KC_R 24#define DV_P KC_R
25#define DV_Y KC_T 25#define DV_Y KC_T
26#define DV_F KC_Y 26#define DV_F KC_Y
27#define DV_G KC_U 27#define DV_G KC_U
28#define DV_C KC_I 28#define DV_C KC_I
29#define DV_R KC_O 29#define DV_R KC_O
30#define DV_L KC_P 30#define DV_L KC_P
31#define DV_SLSH KC_LBRC 31#define DV_SLSH KC_LBRC
32#define DV_EQL KC_RBRC 32#define DV_EQL KC_RBRC
33#define DV_BSLS KC_BSLS
33 34
34#define DV_A KC_A 35#define DV_A KC_A
35#define DV_O KC_S 36#define DV_O KC_S
@@ -68,7 +69,13 @@
68#define DV_RPRN LSFT(DV_0) 69#define DV_RPRN LSFT(DV_0)
69#define DV_LCBR LSFT(DV_LBRC) 70#define DV_LCBR LSFT(DV_LBRC)
70#define DV_RCBR LSFT(DV_RBRC) 71#define DV_RCBR LSFT(DV_RBRC)
71#define DV_UNDS LSFT(DV_MINS) 72
72#define DV_PLUS LSFT(DV_EQL) 73#define DV_QUES LSFT(DV_SLSH)
74#define DV_PLUS LSFT(DV_EQL)
75#define DV_PIPE LSFT(DV_BSLS)
76
77#define DV_UNDS LSFT(DV_MINS)
78
79#define DV_COLN LSFT(DV_SCLN)
73 80
74#endif 81#endif
diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h
index 3fd971357..87d4bb24c 100644
--- a/quantum/keymap_extras/keymap_fr_ch.h
+++ b/quantum/keymap_extras/keymap_fr_ch.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define FR_CH_ALGR KC_RALT 8#define FR_CH_ALGR KC_RALT
9 9
10// normal characters 10// normal characters
diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h
index 2a44c80b1..834c69650 100644
--- a/quantum/keymap_extras/keymap_french.h
+++ b/quantum/keymap_extras/keymap_french.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
@@ -80,4 +80,4 @@
80#define FR_EURO ALGR(KC_E) 80#define FR_EURO ALGR(KC_E)
81#define FR_BULT ALGR(FR_DLR) 81#define FR_BULT ALGR(FR_DLR)
82 82
83#endif \ No newline at end of file 83#endif
diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h
index 3f9ae8bad..7e2e0ed44 100644
--- a/quantum/keymap_extras/keymap_german.h
+++ b/quantum/keymap_extras/keymap_german.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define DE_ALGR KC_RALT 8#define DE_ALGR KC_RALT
9 9
10// normal characters 10// normal characters
diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h
index 6a782bcd7..b66d582a4 100644
--- a/quantum/keymap_extras/keymap_german_ch.h
+++ b/quantum/keymap_extras/keymap_german_ch.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define CH_ALGR KC_RALT 8#define CH_ALGR KC_RALT
9 9
10// normal characters 10// normal characters
diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h
index 3acb8b698..f8cf4e2e4 100644
--- a/quantum/keymap_extras/keymap_nordic.h
+++ b/quantum/keymap_extras/keymap_nordic.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h
index af76e39fc..4ba568af2 100644
--- a/quantum/keymap_extras/keymap_spanish.h
+++ b/quantum/keymap_extras/keymap_spanish.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h
index 5c5d95179..00c87afc3 100644
--- a/quantum/keymap_extras/keymap_uk.h
+++ b/quantum/keymap_extras/keymap_uk.h
@@ -4,7 +4,7 @@
4#include "keymap.h" 4#include "keymap.h"
5 5
6// Alt gr 6// Alt gr
7#define ALGR(kc) kc | 0x1400 7#define ALGR(kc) RALT(kc)
8#define NO_ALGR KC_RALT 8#define NO_ALGR KC_RALT
9 9
10// Normal characters 10// Normal characters
@@ -33,4 +33,4 @@
33 33
34#define UK_AACT ALGR(KC_A) 34#define UK_AACT ALGR(KC_A)
35 35
36#endif \ No newline at end of file 36#endif
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 9b172e1b6..b9b836df2 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -22,10 +22,29 @@ static void _process_tap_dance_action_pair (qk_tap_dance_state_t *state,
22static void _process_tap_dance_action_fn (qk_tap_dance_state_t *state, 22static void _process_tap_dance_action_fn (qk_tap_dance_state_t *state,
23 qk_tap_dance_user_fn_t fn) 23 qk_tap_dance_user_fn_t fn)
24{ 24{
25 fn(state); 25 if (fn) {
26 fn(state);
27 }
28}
29
30void process_tap_dance_action_on_each_tap (uint16_t keycode)
31{
32 uint16_t idx = keycode - QK_TAP_DANCE;
33 qk_tap_dance_action_t action;
34
35 action = tap_dance_actions[idx];
36
37 switch (action.type) {
38 case QK_TAP_DANCE_TYPE_FN:
39 _process_tap_dance_action_fn (&qk_tap_dance_state, action.fn.on_each_tap);
40 break;
41
42 default:
43 break;
44 }
26} 45}
27 46
28void process_tap_dance_action (uint16_t keycode) 47void process_tap_dance_action_on_dance_finished (uint16_t keycode)
29{ 48{
30 uint16_t idx = keycode - QK_TAP_DANCE; 49 uint16_t idx = keycode - QK_TAP_DANCE;
31 qk_tap_dance_action_t action; 50 qk_tap_dance_action_t action;
@@ -38,7 +57,7 @@ void process_tap_dance_action (uint16_t keycode)
38 action.pair.kc1, action.pair.kc2); 57 action.pair.kc1, action.pair.kc2);
39 break; 58 break;
40 case QK_TAP_DANCE_TYPE_FN: 59 case QK_TAP_DANCE_TYPE_FN:
41 _process_tap_dance_action_fn (&qk_tap_dance_state, action.fn); 60 _process_tap_dance_action_fn (&qk_tap_dance_state, action.fn.on_dance_finished);
42 break; 61 break;
43 62
44 default: 63 default:
@@ -51,8 +70,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
51 70
52 switch(keycode) { 71 switch(keycode) {
53 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: 72 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
73 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
54 if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) { 74 if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) {
55 process_tap_dance_action (qk_tap_dance_state.keycode); 75 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
56 } else { 76 } else {
57 r = false; 77 r = false;
58 } 78 }
@@ -66,8 +86,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
66 86
67 default: 87 default:
68 if (qk_tap_dance_state.keycode) { 88 if (qk_tap_dance_state.keycode) {
69 process_tap_dance_action (qk_tap_dance_state.keycode); 89 // if we are here, the tap dance was interrupted by a different key
70 90 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
91 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
71 reset_tap_dance (&qk_tap_dance_state); 92 reset_tap_dance (&qk_tap_dance_state);
72 } 93 }
73 break; 94 break;
@@ -78,13 +99,28 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
78 99
79void matrix_scan_tap_dance () { 100void matrix_scan_tap_dance () {
80 if (qk_tap_dance_state.keycode && timer_elapsed (qk_tap_dance_state.timer) > TAPPING_TERM) { 101 if (qk_tap_dance_state.keycode && timer_elapsed (qk_tap_dance_state.timer) > TAPPING_TERM) {
81 process_tap_dance_action (qk_tap_dance_state.keycode); 102 // if we are here, the tap dance was timed out
82 103 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
83 reset_tap_dance (&qk_tap_dance_state); 104 reset_tap_dance (&qk_tap_dance_state);
84 } 105 }
85} 106}
86 107
87void reset_tap_dance (qk_tap_dance_state_t *state) { 108void reset_tap_dance (qk_tap_dance_state_t *state) {
109 uint16_t idx = state->keycode - QK_TAP_DANCE;
110 qk_tap_dance_action_t action;
111
112 action = tap_dance_actions[idx];
113 switch (action.type) {
114 case QK_TAP_DANCE_TYPE_FN:
115 if (action.fn.on_reset) {
116 action.fn.on_reset(state);
117 }
118 break;
119
120 default:
121 break;
122 }
123
88 state->keycode = 0; 124 state->keycode = 0;
89 state->count = 0; 125 state->count = 0;
90} 126}
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index b9d7c7fcf..7b820584a 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -31,18 +31,27 @@ typedef struct
31 uint16_t kc1; 31 uint16_t kc1;
32 uint16_t kc2; 32 uint16_t kc2;
33 } pair; 33 } pair;
34 qk_tap_dance_user_fn_t fn; 34 struct {
35 qk_tap_dance_user_fn_t on_each_tap;
36 qk_tap_dance_user_fn_t on_dance_finished;
37 qk_tap_dance_user_fn_t on_reset;
38 } fn;
35 }; 39 };
36} qk_tap_dance_action_t; 40} qk_tap_dance_action_t;
37 41
38#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ 42#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \
39 .type = QK_TAP_DANCE_TYPE_PAIR, \ 43 .type = QK_TAP_DANCE_TYPE_PAIR, \
40 .pair = { kc1, kc2 } \ 44 .pair = { kc1, kc2 } \
41 } 45 }
42 46
43#define ACTION_TAP_DANCE_FN(user_fn) { \ 47#define ACTION_TAP_DANCE_FN(user_fn) { \
44 .type = QK_TAP_DANCE_TYPE_FN, \ 48 .type = QK_TAP_DANCE_TYPE_FN, \
45 .fn = user_fn \ 49 .fn = { NULL, user_fn, NULL } \
50 }
51
52#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \
53 .type = QK_TAP_DANCE_TYPE_FN, \
54 .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \
46 } 55 }
47 56
48extern const qk_tap_dance_action_t tap_dance_actions[]; 57extern const qk_tap_dance_action_t tap_dance_actions[];
diff --git a/readme.md b/readme.md
index 8e005155b..ed3da43bd 100644
--- a/readme.md
+++ b/readme.md
@@ -35,7 +35,7 @@ This is not a tiny project. While this is the main readme, there are many other
35* The list of possible keycodes you can use in your keymap is actually spread out in a few different places: 35* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
36 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. 36 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
37 * [quantum/keymap.h](quantum/keymap.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap.h` is where they're actually defined. 37 * [quantum/keymap.h](quantum/keymap.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap.h` is where they're actually defined.
38* The [TMK documentation](doc/TMK_readme.md). QMK is based on TMK, and this explains how it works internally. 38* The [TMK documentation](doc/TMK_README.md). QMK is based on TMK, and this explains how it works internally.
39 39
40# Getting started 40# Getting started
41 41
@@ -75,8 +75,23 @@ Debian/Ubuntu example:
75 sudo apt-get update 75 sudo apt-get update
76 sudo apt-get install gcc-avr avr-libc dfu-programmer 76 sudo apt-get install gcc-avr avr-libc dfu-programmer
77 77
78### Docker
79
80If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
81
82```bash
83# You'll run this every time you want to build a keymap
84# modify the keymap and keyboard assigment to compile what you want
85# defaults are ergodox_ez/default
86
87docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
88
89```
90
91This will compile the targetted keyboard/keymap and leave it in your QMK directory for you to flash.
92
78### Vagrant 93### Vagrant
79If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). 94If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](doc/VAGRANT_GUIDE.md).
80 95
81## Verify Your Installation 96## Verify Your Installation
821. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 971. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
@@ -97,7 +112,7 @@ In every keymap folder, the following files are recommended:
97 112
98The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). You can run `make` from the root (`/`), your keyboard folder (`/keyboards/<keyboard>/`), or your keymap folder (`/keyboards/<keyboard>/keymaps/<keymap>/`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)). 113The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). You can run `make` from the root (`/`), your keyboard folder (`/keyboards/<keyboard>/`), or your keymap folder (`/keyboards/<keyboard>/keymaps/<keymap>/`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)).
99 114
100By default, this will generate a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests. Your .hex file will also be available on qmk.fm/keyboards/<keyboard>/keymaps/<keymap>/. 115By default, this will generate a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests.
101 116
102Below are some definitions that will be useful: 117Below are some definitions that will be useful:
103 118
@@ -372,10 +387,11 @@ But lets start with how to use it, first!
372 387
373First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. 388First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
374 389
375This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are two possible options: 390This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options:
376 391
377* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. 392* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise.
378* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the current state of the tap-dance action. 393* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
394* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
379 395
380The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. 396The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
381 397
@@ -399,7 +415,8 @@ In the end, let's see a full example!
399enum { 415enum {
400 CT_SE = 0, 416 CT_SE = 0,
401 CT_CLN, 417 CT_CLN,
402 CT_EGG 418 CT_EGG,
419 CT_FLSH,
403}; 420};
404 421
405/* Have the above three on the keymap, TD(CT_SE), etc... */ 422/* Have the above three on the keymap, TD(CT_SE), etc... */
@@ -424,10 +441,50 @@ void dance_egg (qk_tap_dance_state_t *state) {
424 } 441 }
425} 442}
426 443
444// on each tap, light up one led, from right to left
445// on the forth tap, turn them off from right to left
446void dance_flsh_each(qk_tap_dance_state_t *state) {
447 switch (state->count) {
448 case 1:
449 ergodox_right_led_3_on();
450 break;
451 case 2:
452 ergodox_right_led_2_on();
453 break;
454 case 3:
455 ergodox_right_led_1_on();
456 break;
457 case 4:
458 ergodox_right_led_3_off();
459 _delay_ms(50);
460 ergodox_right_led_2_off();
461 _delay_ms(50);
462 ergodox_right_led_1_off();
463 }
464}
465
466// on the fourth tap, set the keyboard on flash state
467void dance_flsh_finished(qk_tap_dance_state_t *state) {
468 if (state->count >= 4) {
469 reset_keyboard();
470 reset_tap_dance(state);
471 }
472}
473
474// if the flash state didnt happen, then turn off leds, left to right
475void dance_flsh_reset(qk_tap_dance_state_t *state) {
476 ergodox_right_led_1_off();
477 _delay_ms(50);
478 ergodox_right_led_2_off();
479 _delay_ms(50);
480 ergodox_right_led_3_off();
481}
482
427const qk_tap_dance_action_t tap_dance_actions[] = { 483const qk_tap_dance_action_t tap_dance_actions[] = {
428 [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) 484 [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
429 ,[CT_CLN] = ACTION_TAP_DANCE_FN (dance_cln) 485 ,[CT_CLN] = ACTION_TAP_DANCE_FN (dance_cln)
430 ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) 486 ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
487 ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
431}; 488};
432``` 489```
433 490
@@ -732,7 +789,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
732float goodbye[][2] = SONG(GOODBYE_SOUND); 789float goodbye[][2] = SONG(GOODBYE_SOUND);
733``` 790```
734 791
735Wherein we bind predefined songs (from [audio/song_list.h](/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives. 792Wherein we bind predefined songs (from [quantum/audio/song_list.h](/quantum/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives.
736 793
737So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this: 794So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this:
738 795
@@ -774,7 +831,7 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
774 831
775## RGB Under Glow Mod 832## RGB Under Glow Mod
776 833
777![Planck with RGB Underglow](https://raw.githubusercontent.com/yangliu/qmk_firmware/planck-rgb/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) 834![Planck with RGB Underglow](https://raw.githubusercontent.com/jackhumbert/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
778 835
779Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). 836Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
780 837
@@ -799,7 +856,7 @@ The firmware supports 5 different light effects, and the color (hue, saturation,
799 856
800### WS2812 Wiring 857### WS2812 Wiring
801 858
802![WS2812 Wiring](https://raw.githubusercontent.com/yangliu/qmk_firmware/planck-rgb/keyboards/planck/keymaps/yang/WS2812-wiring.jpg) 859![WS2812 Wiring](https://raw.githubusercontent.com/jackhumbert/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
803 860
804Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20. 861Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20.
805 862
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 3bf2b34f8..6c03e1650 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -107,6 +107,10 @@ flip: $(BUILD_DIR)/$(TARGET).hex
107 batchisp -hardware usb -device $(MCU) -operation start reset 0 107 batchisp -hardware usb -device $(MCU) -operation start reset 0
108 108
109dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter 109dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter
110 until dfu-programmer $(MCU) get bootloader-version; do\
111 echo "Error: Bootloader not found. Trying again in 5s." ;\
112 sleep 5 ;\
113 done
110ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) 114ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
111 dfu-programmer $(MCU) erase --force 115 dfu-programmer $(MCU) erase --force
112else 116else
diff --git a/tmk_core/protocol/lufa/descriptor.c b/tmk_core/protocol/lufa/descriptor.c
index 850a20fdb..539a58d66 100644
--- a/tmk_core/protocol/lufa/descriptor.c
+++ b/tmk_core/protocol/lufa/descriptor.c
@@ -140,9 +140,9 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM ExtrakeyReport[] =
140 HID_RI_USAGE(8, 0x80), /* System Control */ 140 HID_RI_USAGE(8, 0x80), /* System Control */
141 HID_RI_COLLECTION(8, 0x01), /* Application */ 141 HID_RI_COLLECTION(8, 0x01), /* Application */
142 HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM), 142 HID_RI_REPORT_ID(8, REPORT_ID_SYSTEM),
143 HID_RI_LOGICAL_MINIMUM(16, 0x0001), 143 HID_RI_LOGICAL_MINIMUM(16, 0x0081),
144 HID_RI_LOGICAL_MAXIMUM(16, 0x00B7), 144 HID_RI_LOGICAL_MAXIMUM(16, 0x00B7),
145 HID_RI_USAGE_MINIMUM(16, 0x0001), /* System Power Down */ 145 HID_RI_USAGE_MINIMUM(16, 0x0081), /* System Power Down */
146 HID_RI_USAGE_MAXIMUM(16, 0x00B7), /* System Display LCD Autoscale */ 146 HID_RI_USAGE_MAXIMUM(16, 0x00B7), /* System Display LCD Autoscale */
147 HID_RI_REPORT_SIZE(8, 16), 147 HID_RI_REPORT_SIZE(8, 16),
148 HID_RI_REPORT_COUNT(8, 1), 148 HID_RI_REPORT_COUNT(8, 1),