summaryrefslogtreecommitdiffstats
path: root/keyboards/jd45/keymaps/mjt/keymap.c
diff options
context:
space:
mode:
authorMichael Terhar <michael.terhar@pararray.com>2017-08-27 05:33:33 +0200
committerJack Humbert <jack.humb@gmail.com>2017-08-27 05:33:33 +0200
commit79603022422cec39ea44686c84a1050acd0c145e (patch)
tree48063d9470a007425500fb8d8c299701e20d63b4 /keyboards/jd45/keymaps/mjt/keymap.c
parentde315c54eb244821aef39e75c3f5d1c8e96d1273 (diff)
downloadqmk_firmware-79603022422cec39ea44686c84a1050acd0c145e.tar.gz
qmk_firmware-79603022422cec39ea44686c84a1050acd0c145e.tar.xz
Keymaps for several of my boards (#1641)
* copied mjt keymaps from archive * All mjt boards now compile * fixed jd45-mjt breathing * Updates to fix SpaceFN but not tested yet. * Still missing either spacebar or an adjacent keypress. * Debugging rigged up for use with hid_listen. * Reverted the default keymap to use tap_layer_key rather than custom. Moved custom approach to keymap_debug.c * Fixed the lower-left side of the keymap, which needed more spacers due to the matrix being directly put into the array rather than using the keymap function. * Cleaned up JD45 keymap that uses tapkey. * Redid minivan keymap with numsym rather than raise/lower. Untested. * Created my MJT keymap for HHKB Enabled dynamic macros and moved somoe of the shortcuts around. * Minor keymap fixes to make them compile without errors. * Added home/end to right arrow cluster on DYN layer. * Added more keys to fn and dyn layers. * It wasn't using my custom layer last time somehow...? Now it will. * Compiled and installed at end of day on 8/23 * Moved macros to FKEY layer because Adjust was too hard to get into and out of without some sort of feedback. * Fixed volume controls... were reversed and disabled. * Added F13-F15 back to fkeys layer in Minivan * Created new Planck Keymap that uses the NumSym and FKeys layer approach like the Minivan. * Removed DYN layer. * Fixed diagram in planck numsym. * Cleanup for pull request. * Roadkit flip phone warning. * Replaced PLAY_NOTES_ARRAY to PLAY_SONG * reset the submodules * checked out specific commits for submodules * Removed debugging from JD45 shared config.h * Moved custom rules.mk to apropriate keymap Reset the shared rules.mk file. * Trailing return issue in rules.mk Gotta make for a smooth pull request :-)
Diffstat (limited to 'keyboards/jd45/keymaps/mjt/keymap.c')
-rw-r--r--keyboards/jd45/keymaps/mjt/keymap.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c
new file mode 100644
index 000000000..1a7302216
--- /dev/null
+++ b/keyboards/jd45/keymaps/mjt/keymap.c
@@ -0,0 +1,80 @@
+#include "jd45.h"
+
+/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
+ */
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = KEYMAP(
+ TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS,
+ FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT,
+ FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
+ NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ),
+[1] = KEYMAP(
+GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
+TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
+TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
+TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ),
+[2] = KEYMAP(
+TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4,
+TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
+TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
+TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS )
+/* ,
+[3] = KEYMAP(
+TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
+TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
+TRNS, TRNS, TRNS, TRNS, TRNS, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
+TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/
+};
+
+enum macro_id {
+ M_LAYER1,
+ M_LAYER2
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT),
+ // [1] = ACTION_LAYER_TAP_TOGGLE(1),
+ [1] = ACTION_MACRO(M_LAYER1),
+ [2] = ACTION_LAYER_TAP_TOGGLE(2),
+ [3] = ACTION_BACKLIGHT_STEP(),
+ [4] = ACTION_BACKLIGHT_TOGGLE()
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case M_LAYER1:
+ // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality
+ // action_function_tap may also handle this...
+ if (record->event.pressed)
+ {
+ breathing_speed_set(3);
+ breathing_enable();
+ layer_on(1);
+ }
+ else
+ {
+ breathing_speed_set(1);
+ breathing_self_disable();
+ layer_off(1);
+ }
+ break;
+ case M_LAYER2:
+ if (record->event.pressed)
+ {
+ breathing_speed_set(2);
+ breathing_pulse();
+ layer_on(2);
+ }
+ else
+ {
+ breathing_speed_set(1);
+ breathing_self_disable();
+ layer_off(2);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};