summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-01-20 00:15:29 -0500
committerJack Humbert <jack.humb@gmail.com>2016-01-20 00:15:29 -0500
commita820533ab770e1919f190c102a091c1060f6302e (patch)
tree51b2a4b7dcbc16ecd8175a06c95490df3acf5264
parent2dcdbb8f67b6aad27beb31cda0b21a4a34ce5903 (diff)
keymap.c changes, disable grep stuff
-rw-r--r--keyboard/planck/Makefile10
-rw-r--r--keyboard/planck/keymaps/default/README.md34
-rw-r--r--keyboard/planck/keymaps/default/keymap.c (renamed from keyboard/planck/keymaps/default.c)0
-rw-r--r--keyboard/planck/keymaps/jack.c50
-rw-r--r--keyboard/planck/keymaps/lock/README.md3
-rw-r--r--keyboard/planck/keymaps/lock/keymap.c (renamed from keyboard/planck/keymaps/lock.c)0
-rw-r--r--keyboard/planck/keymaps/test/README.md3
-rw-r--r--keyboard/planck/keymaps/test/default.c85
-rw-r--r--quantum/quantum.mk28
9 files changed, 58 insertions, 155 deletions
diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile
index ff68ea0fb3..16d462b699 100644
--- a/keyboard/planck/Makefile
+++ b/keyboard/planck/Makefile
@@ -53,12 +53,16 @@ TARGET_DIR = .
SRC = planck.c \
backlight.c
+ifdef keymap
+ KEYMAP = $(keymap)
+endif
+
ifdef KEYMAP
ifneq ("$(wildcard keymaps/$(KEYMAP).c)","")
KEYMAP_FILE = keymaps/$(KEYMAP).c
else
-ifneq ("$(wildcard keymaps/$(KEYMAP)/default.c)","")
- KEYMAP_FILE = keymaps/$(KEYMAP)/default.c
+ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","")
+ KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c
else
$(error Keymap file does not exist)
endif
@@ -67,7 +71,7 @@ else
ifneq ("$(wildcard keymaps/default.c)","")
KEYMAP_FILE = keymaps/default.c
else
- KEYMAP_FILE = keymaps/default/default.c
+ KEYMAP_FILE = keymaps/default/keymap.c
endif
endif
SRC := $(KEYMAP_FILE) $(SRC)
diff --git a/keyboard/planck/keymaps/default/README.md b/keyboard/planck/keymaps/default/README.md
new file mode 100644
index 0000000000..d2f43bbdb8
--- /dev/null
+++ b/keyboard/planck/keymaps/default/README.md
@@ -0,0 +1,34 @@
+# The Default Planck Layout
+
+ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = { /* Qwerty */
+ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
+ {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
+ {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ },
+ [_CM] = { /* Colemak */
+ {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
+ {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
+ {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ },
+ [_DV] = { /* Dvorak */
+ {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
+ {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
+ {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
+ {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ },
+ [_RS] = { /* RAISE */
+ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
+ {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
+ {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+ },
+ [_LW] = { /* LOWER */
+ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+ {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+ {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
+ {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+ }
+ }; \ No newline at end of file
diff --git a/keyboard/planck/keymaps/default.c b/keyboard/planck/keymaps/default/keymap.c
index 49670dafd3..49670dafd3 100644
--- a/keyboard/planck/keymaps/default.c
+++ b/keyboard/planck/keymaps/default/keymap.c
diff --git a/keyboard/planck/keymaps/jack.c b/keyboard/planck/keymaps/jack.c
deleted file mode 100644
index 0b93bba33f..0000000000
--- a/keyboard/planck/keymaps/jack.c
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "keymap_common.h"
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Jack soft-coded colemak */
- {KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_BSPC},
- {KC_ESC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT},
- {KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_ENT},
- {BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- // Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Jack hard-coded colemak */
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* Jack RAISE */
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* Jack LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-}
-};
-
-
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay
- [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay
-
- [3] = ACTION_DEFAULT_LAYER_SET(0),
- [4] = ACTION_DEFAULT_LAYER_SET(1),
-
-};
-
-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:
- return MACRODOWN(T(CM_T), END);
- break;
- }
- return MACRO_NONE;
-};
diff --git a/keyboard/planck/keymaps/lock/README.md b/keyboard/planck/keymaps/lock/README.md
new file mode 100644
index 0000000000..d21cb990b0
--- /dev/null
+++ b/keyboard/planck/keymaps/lock/README.md
@@ -0,0 +1,3 @@
+# Lock layout
+
+This layout is designed for having a lock switch in the lower-left-hand corner, and for experimenting with MIDI/audio features. It's constantly in development, so don't expect anything to work/be documented correctly! \ No newline at end of file
diff --git a/keyboard/planck/keymaps/lock.c b/keyboard/planck/keymaps/lock/keymap.c
index bc81adcf97..bc81adcf97 100644
--- a/keyboard/planck/keymaps/lock.c
+++ b/keyboard/planck/keymaps/lock/keymap.c
diff --git a/keyboard/planck/keymaps/test/README.md b/keyboard/planck/keymaps/test/README.md
deleted file mode 100644
index c555d2ddc9..0000000000
--- a/keyboard/planck/keymaps/test/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing out this!
-
-This folder will probably get deleted before merging. \ No newline at end of file
diff --git a/keyboard/planck/keymaps/test/default.c b/keyboard/planck/keymaps/test/default.c
deleted file mode 100644
index 71bd6c91e5..0000000000
--- a/keyboard/planck/keymaps/test/default.c
+++ /dev/null
@@ -1,85 +0,0 @@
-// USING_MIDI
-// USING_BACKLIGHT
-#include "keymap_common.h"
-#include "backlight.h"
-#include "action_layer.h"
-#include "keymap_midi.h"
-#include <avr/boot.h>
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {M(0), KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- // Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Colemak */
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* RAISE */
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[4] = { /* TENKEY */
- {KC_TAB, N_C5, N_D5, N_E5, N_F5, N_G5, N_A5, KC_KP_7, KC_KP_8, KC_KP_9, KC_P, KC_BSPC},
- {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_KP_4, KC_KP_5, KC_KP_6, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_KP_1, KC_KP_2, KC_KP_3, KC_SLSH, KC_ENT},
- {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_SPC, KC_SPC, KC_KP_0, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[5] = {
- { MIDI12 },
- { MIDI12 },
- { MIDI12 },
- {M(0), KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_SPC, KC_SPC, FUNC(1), MIDI, MIDI, MIDI, MIDI}
-}
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE
- [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER
-
- [3] = ACTION_DEFAULT_LAYER_SET(0),
- [4] = ACTION_DEFAULT_LAYER_SET(1),
-
-};
-
-uint16_t hextokeycode(int hex) {
- if (hex == 0x0) {
- return KC_0;
- } else if (hex < 0xA) {
- return KC_1 + (hex - 0x1);
- } else {
- return KC_A + (hex - 0xA);
- }
-}
-
-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) {
- backlight_set(BACKLIGHT_LEVELS);
- default_layer_and(0);
- default_layer_or((1<<5));
- } else {
- backlight_set(0);
- default_layer_and(0);
- default_layer_or(0);
- }
- break;
- }
- return MACRO_NONE;
-};
diff --git a/quantum/quantum.mk b/quantum/quantum.mk
index 3a968a1459..a2b7d8db56 100644
--- a/quantum/quantum.mk
+++ b/quantum/quantum.mk
@@ -4,20 +4,20 @@ QUANTUM_DIR = quantum
SRC += $(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/led.c
-ifdef KEYMAP_FILE
-ifneq (,$(shell grep USING_MIDI '$(KEYMAP_FILE)'))
-MIDI_ENABLE=yes
-$(info * Overriding MIDI_ENABLE setting - $(KEYMAP_FILE) requires it)
-endif
-ifneq (,$(shell grep USING_UNICODE '$(KEYMAP_FILE)'))
-UNICODE_ENABLE=yes
-$(info * Overriding UNICODE_ENABLE setting - $(KEYMAP_FILE) requires it)
-endif
-ifneq (,$(shell grep USING_BACKLIGHT '$(KEYMAP_FILE)'))
-BACKLIGHT_ENABLE=yes
-$(info * Overriding BACKLIGHT_ENABLE setting - $(KEYMAP_FILE) requires it)
-endif
-endif
+# ifdef KEYMAP_FILE
+# ifneq (,$(shell grep USING_MIDI '$(KEYMAP_FILE)'))
+# MIDI_ENABLE=yes
+# $(info * Overriding MIDI_ENABLE setting - $(KEYMAP_FILE) requires it)
+# endif
+# ifneq (,$(shell grep USING_UNICODE '$(KEYMAP_FILE)'))
+# UNICODE_ENABLE=yes
+# $(info * Overriding UNICODE_ENABLE setting - $(KEYMAP_FILE) requires it)
+# endif
+# ifneq (,$(shell grep USING_BACKLIGHT '$(KEYMAP_FILE)'))
+# BACKLIGHT_ENABLE=yes
+# $(info * Overriding BACKLIGHT_ENABLE setting - $(KEYMAP_FILE) requires it)
+# endif
+# endif
ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c