summaryrefslogtreecommitdiffstats
path: root/keyboards/tv44/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tv44/keymaps')
-rw-r--r--keyboards/tv44/keymaps/mjt/Makefile21
-rw-r--r--keyboards/tv44/keymaps/mjt/config.h14
-rw-r--r--keyboards/tv44/keymaps/mjt/keymap.c199
-rw-r--r--keyboards/tv44/keymaps/mjt/readme.md26
4 files changed, 260 insertions, 0 deletions
diff --git a/keyboards/tv44/keymaps/mjt/Makefile b/keyboards/tv44/keymaps/mjt/Makefile
new file mode 100644
index 0000000000..41afd9a551
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/Makefile
@@ -0,0 +1,21 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # 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.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
diff --git a/keyboards/tv44/keymaps/mjt/config.h b/keyboards/tv44/keymaps/mjt/config.h
new file mode 100644
index 0000000000..e89a3ea125
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/config.h
@@ -0,0 +1,14 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+#ifdef BACKLIGHT_ENABLE
+ #define BACKLIGHT_PIN B2
+ #define BACKLIGHT_LEVELS 7
+#endif
+
+#define USB_MAX_POWER_CONSUMPTION 50
+
+#endif
diff --git a/keyboards/tv44/keymaps/mjt/keymap.c b/keyboards/tv44/keymaps/mjt/keymap.c
new file mode 100644
index 0000000000..25f8cfc52a
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/keymap.c
@@ -0,0 +1,199 @@
+//Author: mike terhar
+
+#include "tv44.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef BACKLIGHT_ENABLE
+ #include "backlight.h"
+#endif
+
+enum minivan_layers {
+ _QWERTY,
+ _NUMSYM,
+ _FKEYS,
+ _FKEYGRV,
+ _PLOVER,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ QWERTY = SAFE_RANGE,
+ DYNKEY,
+ DYNAMIC_MACRO_RANGE,
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define FKEYS F(_FKEYS)
+#define NUMSYM F(_NUMSYM)
+#define FKEYGRV F(_FKEYGRV)
+#define MACSLEEP M(5)
+#define PLOVER M(6)
+#define LAYERRESET M(7)
+#define BACKLIT M(8)
+#define ADJUST M(9)
+#define XXXXXXX KC_NO
+
+#include "dynamic_macro.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_QWERTY] = {
+ {FKEYS, 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,SFT_T(KC_ENT) },
+ {KC_LCTL,KC_LALT,KC_LGUI, KC_SPC,XXXXXXX,XXXXXXX,XXXXXXX,NUMSYM,KC_LEFT,KC_DOWN,KC_UP ,KC_RIGHT}
+},
+[_NUMSYM] = {
+ {FKEYGRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
+ {KC_DEL,KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, ADJUST },
+ { _______, KC_UNDS,KC_PLUS, KC_LCBR,KC_RCBR,KC_PIPE , KC_MINS,KC_EQL,KC_LBRC, KC_RBRC, KC_BSLS, _______},
+ {_______,_______,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,_______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
+},
+[_FKEYS] ={
+ {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______},
+ {KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2 },
+ {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,_______,DYN_REC_STOP},
+ {_______,_______,_______,LAYERRESET,XXXXXXX,XXXXXXX,XXXXXXX,LAYERRESET, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+[_PLOVER] = {
+ {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
+ {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},
+ {LAYERRESET, XXXXXXX, KC_C, KC_V, XXXXXXX , XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
+},
+[_ADJUST] = {
+ {_______ , RESET, _______, _______, _______, _______, _______, _______, KC_SLCK, KC_PAUS, KC_PSCR, KC_DEL },
+ {_______ , _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
+ {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {BACKLIT, _______, _______, LAYERRESET, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______}
+}
+};
+
+#ifdef AUDIO_ENABLE
+
+float tone_startup[][2] = SONG(STARTUP_SOUND);
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
+float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
+float tone_plover[][2] = SONG(PLOVER_SOUND);
+float tone_adjust[][2] = SONG(PLOVER_GOODBYE_SOUND);
+float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
+
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+#endif
+
+void persistant_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+const uint16_t PROGMEM fn_actions[] = {
+ [_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB),
+ [_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV),
+ [_NUMSYM] = ACTION_LAYER_TAP_TOGGLE(_NUMSYM),
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ switch(id) {
+ case 5: // MACSLEEP
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ register_code(KC_RCTL);
+ register_code(KC_POWER);
+ unregister_code(KC_POWER);
+ unregister_code(KC_RCTL);
+ unregister_code(KC_RSFT);
+ }
+ break;
+ case 6: // PLOVER
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_NOTE_ARRAY(tone_plover, false, 0);
+ #endif
+ layer_off(_NUMSYM);
+ layer_off(_FKEYS);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ }
+ break;
+ case 7: // LAYERRESET
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ #endif
+ layer_off(_NUMSYM);
+ layer_off(_FKEYS);
+ layer_off(_PLOVER);
+ layer_off(_ADJUST);
+ }
+ break;
+ case 8: // BACKLIT
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ case 9: // ADJUST
+ if(record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ PLAY_NOTE_ARRAY(tone_adjust, false, 0);
+ #endif
+ layer_off(_NUMSYM);
+ layer_off(_FKEYS);
+ layer_off(_PLOVER);
+ layer_on(_ADJUST);
+ }
+ }
+ return MACRO_NONE;
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ uint16_t macro_kc = keycode;
+ if (keycode == FKEYS || keycode == ADJUST || keycode == FKEYGRV ){
+ macro_kc = DYN_REC_STOP;
+ }
+ if (!process_record_dynamic_macro(macro_kc, record)) {
+ return false;
+ }
+
+ return true;
+}
+
+void matrix_init_user(void) {
+ #ifdef AUDIO_ENABLE
+ startup_user();
+ #endif
+}
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+ _delay_ms(20); // gets rid of tick
+ PLAY_NOTE_ARRAY(tone_startup, false, 0);
+}
+
+void shutdown_user()
+{
+ PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+ _delay_ms(150);
+ stop_all_notes();
+}
+
+void music_on_user(void)
+{
+ music_scale_user();
+}
+
+void music_scale_user(void)
+{
+ PLAY_NOTE_ARRAY(music_scale, false, 0);
+}
+#endif
diff --git a/keyboards/tv44/keymaps/mjt/readme.md b/keyboards/tv44/keymaps/mjt/readme.md
new file mode 100644
index 0000000000..c86985f6cb
--- /dev/null
+++ b/keyboards/tv44/keymaps/mjt/readme.md
@@ -0,0 +1,26 @@
+# Mike's Minivan
+
+- Arrow Layout (45key)
+- Dynamic Macros
+- Media Keys
+- Works with iPhone Camera Adapter
+
+## Layers
+
+Qwerty for letters and mods.
+
+Numsym for all numbers and symbols used in typing. Follows a similar approach to
+planck but puts both on the same layer eschewing the F-keys.
+
+Fkeys layer is for the seldom used stuff like F-keys and some additional features
+such as dynamic macros, media keys, and a sleep shortcut for OS X.
+
+Adjust layer is tough to get to so it is only for keyboard configuration stuff.
+
+## Dynamic Macros
+
+Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
+
+When you are done recording, press TAB again.
+
+For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.