From 91b1aa0994ad2296d03148d9bec8c455ef105fcb Mon Sep 17 00:00:00 2001 From: Xyverz Date: Tue, 18 Oct 2016 16:34:42 -0700 Subject: Add files via upload Minor layout changes--- keyboards/preonic/keymaps/xyverz/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c index adc7392e5..bc4692f3e 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_LGUI, KC_ENT } }, /* Lower @@ -339,4 +339,4 @@ void play_goodbye_tone() _delay_ms(150); } -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From c07ef5c6abd7875c19c4bcbe3bcaecd123862fd3 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 12:26:56 -0800 Subject: Adding my (zach) keymaps for planck and preonic --- keyboards/planck/keymaps/zach/Makefile | 29 ++ keyboards/planck/keymaps/zach/config.h | 91 ++++ keyboards/planck/keymaps/zach/keymap.c | 48 ++ .../planck/keymaps/zach/zach_common_functions.c | 538 +++++++++++++++++++++ keyboards/preonic/keymaps/zach/Makefile | 29 ++ keyboards/preonic/keymaps/zach/config.h | 95 ++++ keyboards/preonic/keymaps/zach/keymap.c | 54 +++ .../preonic/keymaps/zach/zach_common_functions.c | 538 +++++++++++++++++++++ 8 files changed, 1422 insertions(+) create mode 100644 keyboards/planck/keymaps/zach/Makefile create mode 100644 keyboards/planck/keymaps/zach/config.h create mode 100644 keyboards/planck/keymaps/zach/keymap.c create mode 100644 keyboards/planck/keymaps/zach/zach_common_functions.c create mode 100644 keyboards/preonic/keymaps/zach/Makefile create mode 100644 keyboards/preonic/keymaps/zach/config.h create mode 100644 keyboards/preonic/keymaps/zach/keymap.c create mode 100644 keyboards/preonic/keymaps/zach/zach_common_functions.c (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile new file mode 100644 index 000000000..b0009147a --- /dev/null +++ b/keyboards/planck/keymaps/zach/Makefile @@ -0,0 +1,29 @@ +# Zach Planck Makefile +# Max .hex size is about 28636 bytes + +# 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 +# +TAP_DANCE_ENABLE = yes # Enable TapDance functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # 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 +USB_6KRO_ENABLE = no # 6key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +VARIABLE_TRACE = no # Debug changes to variable values +UNICODE_ENABLE = yes # Unicode +UNICODEMAP_ENABLE = yes # Enable extended 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/zach/config.h b/keyboards/planck/keymaps/zach/config.h new file mode 100644 index 000000000..1be800545 --- /dev/null +++ b/keyboards/planck/keymaps/zach/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +//#define BACKLIGHT_BREATHING // LED breathing +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 5 + +/* 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)) \ +) + +/* + * 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 +#define PREVENT_STUCK_MODIFIERS +//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality +//#define SPACE_CADET // Parenthesis on L/R shift + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c new file mode 100644 index 000000000..d3cde5bb9 --- /dev/null +++ b/keyboards/planck/keymaps/zach/keymap.c @@ -0,0 +1,48 @@ +// Zach Nielsen Custom Planck Keyboard layout +#include "planck.h" +#define PLANCK_YES // This is the Planck +#include "zach_common_functions.c" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_COLEMAK] = { /* Base Layer */ + {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, 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_ENT}, + {SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +[_SWCOLE] = { /* Software Colemak */ + {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______}, + {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______}, + {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +[_RAISE] = { /* RAISE - Numpad and Unicode symbols */ + {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______}, + {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR}, + {_______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS}, + {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL} +}, + +[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */ + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, + {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP}, + {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN}, + {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______} +}, + +[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ + {UNIWIN, Sil_Usr, Sil_Pas, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + {UNILIN, UltiU, UltiP, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, + {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, + {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ + {_______, TFLIP, XXXXXXX, FINGER, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, TappyL, TappyR, _______}, + {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, + {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} +} +}; diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c new file mode 100644 index 000000000..f01929f5d --- /dev/null +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -0,0 +1,538 @@ +#ifndef ZACH_COMMON_FUNCTIONS +#define ZACH_COMMON_FUNCTIONS +#include "eeconfig.h" +#include "action_layer.h" +#include "keymap_colemak.h" +#include "extra_functions.c" +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define C(n) RCTL(n) +#define CADKEY RCTL(RALT(KC_DEL)) + +void tap(uint16_t keycode){ + register_code(keycode); + unregister_code(keycode); +}; + +void persistant_default_layer_set(uint16_t default_layer){ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +// Automatic number generation of important keywords +enum my_keycodes{ + // Layer numbers + _COLEMAK = 0, + _SWCOLE, + _RAISE, + _LOWER, + _ADJUST, + _UNICODES, + // These use process_record_user() + COLEMAK = SAFE_RANGE, + SWCOLE, + LOWER, + RAISE, + SHFT_CAP, + CTRLB, + CPYPST, + FACE, + UNIWIN, + UNILIN, + DISFACE, + TFLIP, + TPUT, + SHRUG, + PENIS, + BOOBS, + Sil_Pas, + Sil_Usr, + UltiU, + UltiP, + TappyR, + TappyL, + RANDIG, + FINGER, + // Tap_Dance nums + RAI = 0, + LOW, + SUP +}; + +#ifdef AUDIO_ENABLE +#include "audio.h" +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_swcole[][2] = SONG(QWERTY_SOUND); +float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +float tone_ctrl_mod[][2] = SONG(COIN_SOUND); +float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); +float uniwin[][2] = SONG(UNICODE_WINDOWS); +float unilin[][2] = SONG(UNICODE_LINUX); +#endif + +#ifdef TAP_DANCE_ENABLE +#define TAPPING_TERM 200 + +uint8_t Lstate = 0, Rstate = 0; +uint32_t Ltimer = 0, Rtimer = 0; +uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) +void rhythm_parse(void){ + int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time + int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; + if(abs(R-L) > 10){ + tap(KC_N); tap(KC_O); + return; + } else { + L = (L / 3)*100; // Average time per tap * 100 + R = (R / 4); + if(abs(abs(L/R)-133) > 1){ + tap(KC_N); tap(KC_O); + tap(KC_P); tap(KC_E); + return; + } else { + tap(KC_O); tap(KC_K); + return; + } + } +}; + +void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap + switch(state->count){ // Only turn the layer on once + case 1: + layer_off(_UNICODES); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap + switch(state->count){ + case 1: // Turn on lower + layer_off(_UNICODES); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + case 2: // Turn on _UNICODES layer + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_on(_UNICODES); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down + if(state->count == 1){ + register_code(KC_LGUI); + } +} +void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout + switch(state->count){ + case 2: + register_code(KC_LGUI); + tap(KC_L); + unregister_code(KC_LGUI); + break; + } +} +void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up + unregister_code(KC_LGUI); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift), + [LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift), + [SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift) +}; +#endif + +#ifdef UNICODE_ENABLE +// Unicode shortcuts +#define IBANG UC(0x203D) +#define RAROW UC(0x2192) +#define LAROW UC(0x2190) +#define DEGREE UC(0x00B0) +#define OMEGA UC(0x03A9) +#define WOMEGA UC(0x03C9) +#define MICRO UC(0x00B5) +#define PLUMIN UC(0x00B1) +#define SUPA2 UC(0x00B2) +#define ROMAN1 UC(0x2160) +#define ROMAN2 UC(0x2161) +#define ROMAN3 UC(0x2162) +#define ROMAN4 UC(0x2163) +#define ROMAN5 UC(0x2164) +#define ROMAN6 UC(0x2165) +#define ROMAN7 UC(0x2166) +#define roman1 UC(0x2170) +#define roman2 UC(0x2171) +#define roman3 UC(0x2172) +#define roman4 UC(0x2173) +#define roman5 UC(0x2174) +#define roman6 UC(0x2175) +#define roman7 UC(0x2176) + +#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() +enum Ext_Unicode{ + PENGUIN = 0, + BOAR, + MONKEY, + DRAGON, + CHICK, + TUMBLER +}; +const uint32_t PROGMEM unicode_map[] = { + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [DRAGON] = 0x1F409, + [CHICK] = 0x1F425, + [TUMBLER] = 0x1F943 +}; +#define PENGY X(PENGUIN) +#define BOARY X(BOAR) +#define MNKY X(MONKEY) +#define DRGN X(DRAGON) +#define DUCK X(CHICK) +#define TMBL X(TUMBLER) +#endif + +#endif + +static uint16_t key_timer; +static uint8_t caps_status = 0; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_COLEMAK); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + } + return false; + break; + case SWCOLE: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_SWCOLE); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_swcole, false, 0); + #endif + } + return false; + break; + #ifndef TAP_DANCE_ENABLE + case RAISE: + if(record->event.pressed){ + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case LOWER: + if(record->event.pressed){ + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + #endif + case SHFT_CAP: + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LSHIFT); + } else { // this means the key was just released (tap or "held down") + if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_CAPS); + if(caps_status == 0){ + caps_status = 1; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_on, false, 0); + #endif + } else { + caps_status = 0; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_off, false, 0); + #endif + } + } + unregister_code(KC_LSHIFT); + } + return false; + break; + case CTRLB: // Control-B on tap (bold) + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LCTL); + } else { // this means the key was just released (tap or "held down") + if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_B); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + #ifdef BACKLIGHT_BREATHING + breathing_speed_set(2); + breathing_pulse(); + #endif + } + unregister_code(KC_LCTL); + } + return false; + break; + case CPYPST: // One key copy/paste + if(record->event.pressed){ + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) > 152) { // Hold, copy + register_code(KC_LCTL); + tap(KC_C); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_copy, false, 0); + #endif + } else { // Tap, paste + register_code(KC_LCTL); + tap(KC_V); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_paste, false, 0); + #endif + } + } + return false; + break; + #ifdef UNICODE_ENABLE + case UNIWIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(uniwin, false, 0); + #endif + } + return false; + break; + case UNILIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_LNX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(unilin, false, 0); + #endif + } + return false; + break; + case DISFACE: // ಠ_ಠ + if(record->event.pressed){ + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_MINS); + unregister_code(KC_RSFT); + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + } + return false; + break; + case TFLIP: // (╯°□°)╯ ︵ ┻━┻ + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + process_unicode((0x00B0|QK_UNICODE), record); // Eye + process_unicode((0x25A1|QK_UNICODE), record); // Mouth + process_unicode((0x00B0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361|QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B|QK_UNICODE), record); // Table + process_unicode((0x2501|QK_UNICODE), record); // Table + process_unicode((0x253B|QK_UNICODE), record); // Table + } + return false; + break; + case TPUT: // ┬──┬ ノ( ゜-゜ノ) + if(record->event.pressed){ + process_unicode((0x252C|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x252C|QK_UNICODE), record); // Table + tap(KC_SPC); + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + tap(KC_SPC); + process_unicode((0x309C|QK_UNICODE), record); // Eye + tap(KC_MINS); + process_unicode((0x309C|QK_UNICODE), record); // Eye + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + } + return false; + break; + case SHRUG: // ¯\_(ツ)_/¯ + if(record->event.pressed){ + process_unicode((0x00AF|QK_UNICODE), record); // Hand + tap(KC_BSLS); // Arm + register_code(KC_RSFT); + tap(KC_UNDS); // Arm + tap(KC_LPRN); // Head + unregister_code(KC_RSFT); + process_unicode((0x30C4|QK_UNICODE), record); // Face + register_code(KC_RSFT); + tap(KC_RPRN); // Head + tap(KC_UNDS); // Arm + unregister_code(KC_RSFT); + tap(KC_SLSH); // Arm + process_unicode((0x00AF|QK_UNICODE), record); // Hand + } + return false; + break; + #endif + case FACE: // (o_O) + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_LPRN); + unregister_code(KC_RSFT); + tap(KC_O); + register_code(KC_RSFT); + tap(KC_UNDS); + tap(KC_O); + tap(KC_RPRN); + unregister_code(KC_RSFT); + } + return false; + break; + #ifdef TAP_DANCE_ENABLE + case TappyR: + if(record->event.pressed){ + if(timer_elapsed32(Rtimer) > 1052){ + Rstate = 0; + } + switch(Rstate){ + case 0: + Rtimer = timer_read32(); + Rstate++; + break; + case 1: + Rtimes[0] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 2: + Rtimes[1] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 3: + Rtimes[2] = timer_elapsed32(Rtimer); + Rstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + case TappyL: + if(record->event.pressed){ + if(timer_elapsed32(Ltimer) > 1052){ + Lstate = 0; + } + switch(Lstate){ + case 0: + Ltimer = timer_read32(); + Lstate++; + break; + case 1: + Ltimes[0] = timer_elapsed32(Ltimer); + Ltimer = timer_read32(); + Lstate++; + break; + case 2: + Ltimes[1] = timer_elapsed32(Ltimer); + Lstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + #endif + #endif + case RANDIG: + if (record->event.pressed) { + tap_random_base64(); + } + return false; + break; + } + return true; +}; + +#ifdef AUDIO_ENABLE +void matrix_init_user(void){ // Run once at startup + #ifdef AUDIO_ENABLE + _delay_ms(50); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif +} + +void play_goodbye_tone(void){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); +} + +void shutdown_user(){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void){ // Run when the music layer is turned on + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void music_off_user(void){ // Run when music is turned off + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); +} +#endif + +#endif diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile new file mode 100644 index 000000000..bd49d142c --- /dev/null +++ b/keyboards/preonic/keymaps/zach/Makefile @@ -0,0 +1,29 @@ +# Zach Preonic Makefile +# Max .hex size is about 28636 bytes + +# 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 +# +TAP_DANCE_ENABLE = yes # Enable TapDance functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # 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 +USB_6KRO_ENABLE = no # 6key Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +VARIABLE_TRACE = no # Debug changes to variable values +UNICODE_ENABLE = yes # Unicode +UNICODEMAP_ENABLE = no # Enable extended 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/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h new file mode 100644 index 000000000..59959524f --- /dev/null +++ b/keyboards/preonic/keymaps/zach/config.h @@ -0,0 +1,95 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Preonic Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +#define BACKLIGHT_BREATHING // LED breathing +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 5 + +/* 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 D1 +//#define RGBLIGHT_TIMER +//#define RGBLED_NUM 28 // Number of LEDs +//#define RGBLIGHT_HUE_STEP 10 +//#define RGBLIGHT_SAT_STEP 17 +//#define RGBLIGHT_VAL_STEP 17 + +/* + * 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 +#define PREVENT_STUCK_MODIFIERS +//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality +//#define SPACE_CADET // Parenthesis on L/R shift + + +#endif diff --git a/keyboards/preonic/keymaps/zach/keymap.c b/keyboards/preonic/keymaps/zach/keymap.c new file mode 100644 index 000000000..423ca4b86 --- /dev/null +++ b/keyboards/preonic/keymaps/zach/keymap.c @@ -0,0 +1,54 @@ +// Zach Nielsen Custom Preonic Keyboard layout +#include "preonic.h" +#define PREONIC_YES // This is the Preonic +#include "zach_common_functions.c" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_COLEMAK] = { /* Base Layer */ + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_ENT}, + {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT}, + {SHFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +[_SWCOLE] = { /* Software Colemak */ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______}, + {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______}, + {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +[_RAISE] = { /* RAISE - Numpad and Unicode symbols */ + {KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______}, + {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, XXXXXXX, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR}, + {_______, KC_COLN, TFLIP, LAROW, RAROW, XXXXXXX, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS}, + {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL} +}, + +[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */ + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, + {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP}, + {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN}, + {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______} +}, + +[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ + {UNIWIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_TOG, MU_TOG}, + {UNILIN, SUPA2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + {XXXXXXX, DEGREE, IBANG, LAROW, RAROW, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, BL_INC}, + {_______, CADKEY, MICRO, WOMEGA, OMEGA, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, BL_DEC}, + {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, MUV_DE, MUV_IN, BL_TOGG} +}, + +[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ + {_______, XXXXXXX, XXXXXXX, FINGER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, + {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, + {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} +} +}; diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c new file mode 100644 index 000000000..f01929f5d --- /dev/null +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -0,0 +1,538 @@ +#ifndef ZACH_COMMON_FUNCTIONS +#define ZACH_COMMON_FUNCTIONS +#include "eeconfig.h" +#include "action_layer.h" +#include "keymap_colemak.h" +#include "extra_functions.c" +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define C(n) RCTL(n) +#define CADKEY RCTL(RALT(KC_DEL)) + +void tap(uint16_t keycode){ + register_code(keycode); + unregister_code(keycode); +}; + +void persistant_default_layer_set(uint16_t default_layer){ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +// Automatic number generation of important keywords +enum my_keycodes{ + // Layer numbers + _COLEMAK = 0, + _SWCOLE, + _RAISE, + _LOWER, + _ADJUST, + _UNICODES, + // These use process_record_user() + COLEMAK = SAFE_RANGE, + SWCOLE, + LOWER, + RAISE, + SHFT_CAP, + CTRLB, + CPYPST, + FACE, + UNIWIN, + UNILIN, + DISFACE, + TFLIP, + TPUT, + SHRUG, + PENIS, + BOOBS, + Sil_Pas, + Sil_Usr, + UltiU, + UltiP, + TappyR, + TappyL, + RANDIG, + FINGER, + // Tap_Dance nums + RAI = 0, + LOW, + SUP +}; + +#ifdef AUDIO_ENABLE +#include "audio.h" +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_swcole[][2] = SONG(QWERTY_SOUND); +float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +float tone_ctrl_mod[][2] = SONG(COIN_SOUND); +float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); +float uniwin[][2] = SONG(UNICODE_WINDOWS); +float unilin[][2] = SONG(UNICODE_LINUX); +#endif + +#ifdef TAP_DANCE_ENABLE +#define TAPPING_TERM 200 + +uint8_t Lstate = 0, Rstate = 0; +uint32_t Ltimer = 0, Rtimer = 0; +uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) +void rhythm_parse(void){ + int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time + int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; + if(abs(R-L) > 10){ + tap(KC_N); tap(KC_O); + return; + } else { + L = (L / 3)*100; // Average time per tap * 100 + R = (R / 4); + if(abs(abs(L/R)-133) > 1){ + tap(KC_N); tap(KC_O); + tap(KC_P); tap(KC_E); + return; + } else { + tap(KC_O); tap(KC_K); + return; + } + } +}; + +void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap + switch(state->count){ // Only turn the layer on once + case 1: + layer_off(_UNICODES); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap + switch(state->count){ + case 1: // Turn on lower + layer_off(_UNICODES); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + } +}; +void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release + switch(state->count){ + case 1: // Normal action. Turn off layers + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_off(_UNICODES); + break; + case 2: // Turn on _UNICODES layer + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + layer_on(_UNICODES); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + break; + } +}; +///////////////////////////////////////////////////////////////////// +void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down + if(state->count == 1){ + register_code(KC_LGUI); + } +} +void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout + switch(state->count){ + case 2: + register_code(KC_LGUI); + tap(KC_L); + unregister_code(KC_LGUI); + break; + } +} +void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up + unregister_code(KC_LGUI); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift), + [LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift), + [SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift) +}; +#endif + +#ifdef UNICODE_ENABLE +// Unicode shortcuts +#define IBANG UC(0x203D) +#define RAROW UC(0x2192) +#define LAROW UC(0x2190) +#define DEGREE UC(0x00B0) +#define OMEGA UC(0x03A9) +#define WOMEGA UC(0x03C9) +#define MICRO UC(0x00B5) +#define PLUMIN UC(0x00B1) +#define SUPA2 UC(0x00B2) +#define ROMAN1 UC(0x2160) +#define ROMAN2 UC(0x2161) +#define ROMAN3 UC(0x2162) +#define ROMAN4 UC(0x2163) +#define ROMAN5 UC(0x2164) +#define ROMAN6 UC(0x2165) +#define ROMAN7 UC(0x2166) +#define roman1 UC(0x2170) +#define roman2 UC(0x2171) +#define roman3 UC(0x2172) +#define roman4 UC(0x2173) +#define roman5 UC(0x2174) +#define roman6 UC(0x2175) +#define roman7 UC(0x2176) + +#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() +enum Ext_Unicode{ + PENGUIN = 0, + BOAR, + MONKEY, + DRAGON, + CHICK, + TUMBLER +}; +const uint32_t PROGMEM unicode_map[] = { + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [DRAGON] = 0x1F409, + [CHICK] = 0x1F425, + [TUMBLER] = 0x1F943 +}; +#define PENGY X(PENGUIN) +#define BOARY X(BOAR) +#define MNKY X(MONKEY) +#define DRGN X(DRAGON) +#define DUCK X(CHICK) +#define TMBL X(TUMBLER) +#endif + +#endif + +static uint16_t key_timer; +static uint8_t caps_status = 0; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_COLEMAK); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + } + return false; + break; + case SWCOLE: + if(record->event.pressed){ + persistant_default_layer_set(1UL<<_SWCOLE); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_swcole, false, 0); + #endif + } + return false; + break; + #ifndef TAP_DANCE_ENABLE + case RAISE: + if(record->event.pressed){ + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case LOWER: + if(record->event.pressed){ + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + #endif + case SHFT_CAP: + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LSHIFT); + } else { // this means the key was just released (tap or "held down") + if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_CAPS); + if(caps_status == 0){ + caps_status = 1; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_on, false, 0); + #endif + } else { + caps_status = 0; + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_capslock_off, false, 0); + #endif + } + } + unregister_code(KC_LSHIFT); + } + return false; + break; + case CTRLB: // Control-B on tap (bold) + if(record->event.pressed){ + key_timer = timer_read(); // if the key is being pressed, we start the timer. + register_code(KC_LCTL); + } else { // this means the key was just released (tap or "held down") + if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap. + tap(KC_B); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + #endif + #ifdef BACKLIGHT_BREATHING + breathing_speed_set(2); + breathing_pulse(); + #endif + } + unregister_code(KC_LCTL); + } + return false; + break; + case CPYPST: // One key copy/paste + if(record->event.pressed){ + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) > 152) { // Hold, copy + register_code(KC_LCTL); + tap(KC_C); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_copy, false, 0); + #endif + } else { // Tap, paste + register_code(KC_LCTL); + tap(KC_V); + unregister_code(KC_LCTL); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_paste, false, 0); + #endif + } + } + return false; + break; + #ifdef UNICODE_ENABLE + case UNIWIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(uniwin, false, 0); + #endif + } + return false; + break; + case UNILIN: + if(record->event.pressed){ + set_unicode_input_mode(UC_LNX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(unilin, false, 0); + #endif + } + return false; + break; + case DISFACE: // ಠ_ಠ + if(record->event.pressed){ + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_MINS); + unregister_code(KC_RSFT); + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + } + return false; + break; + case TFLIP: // (╯°□°)╯ ︵ ┻━┻ + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + process_unicode((0x00B0|QK_UNICODE), record); // Eye + process_unicode((0x25A1|QK_UNICODE), record); // Mouth + process_unicode((0x00B0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361|QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B|QK_UNICODE), record); // Table + process_unicode((0x2501|QK_UNICODE), record); // Table + process_unicode((0x253B|QK_UNICODE), record); // Table + } + return false; + break; + case TPUT: // ┬──┬ ノ( ゜-゜ノ) + if(record->event.pressed){ + process_unicode((0x252C|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x252C|QK_UNICODE), record); // Table + tap(KC_SPC); + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + tap(KC_SPC); + process_unicode((0x309C|QK_UNICODE), record); // Eye + tap(KC_MINS); + process_unicode((0x309C|QK_UNICODE), record); // Eye + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + } + return false; + break; + case SHRUG: // ¯\_(ツ)_/¯ + if(record->event.pressed){ + process_unicode((0x00AF|QK_UNICODE), record); // Hand + tap(KC_BSLS); // Arm + register_code(KC_RSFT); + tap(KC_UNDS); // Arm + tap(KC_LPRN); // Head + unregister_code(KC_RSFT); + process_unicode((0x30C4|QK_UNICODE), record); // Face + register_code(KC_RSFT); + tap(KC_RPRN); // Head + tap(KC_UNDS); // Arm + unregister_code(KC_RSFT); + tap(KC_SLSH); // Arm + process_unicode((0x00AF|QK_UNICODE), record); // Hand + } + return false; + break; + #endif + case FACE: // (o_O) + if(record->event.pressed){ + register_code(KC_RSFT); + tap(KC_LPRN); + unregister_code(KC_RSFT); + tap(KC_O); + register_code(KC_RSFT); + tap(KC_UNDS); + tap(KC_O); + tap(KC_RPRN); + unregister_code(KC_RSFT); + } + return false; + break; + #ifdef TAP_DANCE_ENABLE + case TappyR: + if(record->event.pressed){ + if(timer_elapsed32(Rtimer) > 1052){ + Rstate = 0; + } + switch(Rstate){ + case 0: + Rtimer = timer_read32(); + Rstate++; + break; + case 1: + Rtimes[0] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 2: + Rtimes[1] = timer_elapsed32(Rtimer); + Rtimer = timer_read32(); + Rstate++; + break; + case 3: + Rtimes[2] = timer_elapsed32(Rtimer); + Rstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + case TappyL: + if(record->event.pressed){ + if(timer_elapsed32(Ltimer) > 1052){ + Lstate = 0; + } + switch(Lstate){ + case 0: + Ltimer = timer_read32(); + Lstate++; + break; + case 1: + Ltimes[0] = timer_elapsed32(Ltimer); + Ltimer = timer_read32(); + Lstate++; + break; + case 2: + Ltimes[1] = timer_elapsed32(Ltimer); + Lstate = 0; + break; + } + if(Rstate == 0 && Lstate == 0) rhythm_parse(); + } + return false; + break; + #endif + #endif + case RANDIG: + if (record->event.pressed) { + tap_random_base64(); + } + return false; + break; + } + return true; +}; + +#ifdef AUDIO_ENABLE +void matrix_init_user(void){ // Run once at startup + #ifdef AUDIO_ENABLE + _delay_ms(50); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif +} + +void play_goodbye_tone(void){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); +} + +void shutdown_user(){ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void){ // Run when the music layer is turned on + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void music_off_user(void){ // Run when music is turned off + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); +} +#endif + +#endif -- cgit v1.2.3 From 4c0aa02b2e476a8f939586a0da2f28f2a44c83c3 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 12:59:55 -0800 Subject: Missed some stuff. Added a song (stole it from reddit). --- keyboards/planck/keymaps/zach/Makefile | 2 +- keyboards/planck/keymaps/zach/config.h | 3 ++ .../planck/keymaps/zach/zach_common_functions.c | 61 +--------------------- keyboards/preonic/keymaps/zach/Makefile | 2 +- .../preonic/keymaps/zach/zach_common_functions.c | 61 +--------------------- quantum/audio/song_list.h | 12 +++++ 6 files changed, 19 insertions(+), 122 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile index b0009147a..977f1a901 100644 --- a/keyboards/planck/keymaps/zach/Makefile +++ b/keyboards/planck/keymaps/zach/Makefile @@ -16,7 +16,7 @@ USB_6KRO_ENABLE = no # 6key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 -VARIABLE_TRACE = no # Debug changes to variable values +#VARIABLE_TRACE = no # Debug changes to variable values UNICODE_ENABLE = yes # Unicode UNICODEMAP_ENABLE = yes # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h index 1be800545..7deb9ebfe 100644 --- a/keyboards/planck/keymaps/zach/config.h +++ b/keyboards/planck/keymaps/zach/config.h @@ -53,8 +53,10 @@ along with this program. If not, see . /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE +#undef LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ //#define LOCKING_RESYNC_ENABLE +#undef LOCKING_RESYNC_ENABLE /* key combination for command */ #define IS_COMMAND() ( \ @@ -70,6 +72,7 @@ along with this program. If not, see . //#define NO_DEBUG /* disable print */ //#define NO_PRINT +#undef NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index f01929f5d..7d14dcf3f 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -3,7 +3,6 @@ #include "eeconfig.h" #include "action_layer.h" #include "keymap_colemak.h" -#include "extra_functions.c" extern keymap_config_t keymap_config; // Fillers to make layering more clear @@ -249,7 +248,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifndef TAP_DANCE_ENABLE case RAISE: if(record->event.pressed){ layer_on(_RAISE); @@ -270,7 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #endif case SHFT_CAP: if(record->event.pressed){ key_timer = timer_read(); // if the key is being pressed, we start the timer. @@ -441,62 +438,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifdef TAP_DANCE_ENABLE - case TappyR: - if(record->event.pressed){ - if(timer_elapsed32(Rtimer) > 1052){ - Rstate = 0; - } - switch(Rstate){ - case 0: - Rtimer = timer_read32(); - Rstate++; - break; - case 1: - Rtimes[0] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 2: - Rtimes[1] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 3: - Rtimes[2] = timer_elapsed32(Rtimer); - Rstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - case TappyL: - if(record->event.pressed){ - if(timer_elapsed32(Ltimer) > 1052){ - Lstate = 0; - } - switch(Lstate){ - case 0: - Ltimer = timer_read32(); - Lstate++; - break; - case 1: - Ltimes[0] = timer_elapsed32(Ltimer); - Ltimer = timer_read32(); - Lstate++; - break; - case 2: - Ltimes[1] = timer_elapsed32(Ltimer); - Lstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - #endif - #endif case RANDIG: if (record->event.pressed) { tap_random_base64(); @@ -507,7 +448,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef AUDIO_ENABLE void matrix_init_user(void){ // Run once at startup #ifdef AUDIO_ENABLE _delay_ms(50); // gets rid of tick @@ -515,6 +455,7 @@ void matrix_init_user(void){ // Run once at startup #endif } +#ifdef AUDIO_ENABLE void play_goodbye_tone(void){ PLAY_NOTE_ARRAY(tone_goodbye, false, 0); _delay_ms(150); diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile index bd49d142c..f0a84abac 100644 --- a/keyboards/preonic/keymaps/zach/Makefile +++ b/keyboards/preonic/keymaps/zach/Makefile @@ -16,7 +16,7 @@ USB_6KRO_ENABLE = no # 6key Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 -VARIABLE_TRACE = no # Debug changes to variable values +#VARIABLE_TRACE = no # Debug changes to variable values UNICODE_ENABLE = yes # Unicode UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index f01929f5d..7d14dcf3f 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -3,7 +3,6 @@ #include "eeconfig.h" #include "action_layer.h" #include "keymap_colemak.h" -#include "extra_functions.c" extern keymap_config_t keymap_config; // Fillers to make layering more clear @@ -249,7 +248,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifndef TAP_DANCE_ENABLE case RAISE: if(record->event.pressed){ layer_on(_RAISE); @@ -270,7 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #endif case SHFT_CAP: if(record->event.pressed){ key_timer = timer_read(); // if the key is being pressed, we start the timer. @@ -441,62 +438,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - #ifdef TAP_DANCE_ENABLE - case TappyR: - if(record->event.pressed){ - if(timer_elapsed32(Rtimer) > 1052){ - Rstate = 0; - } - switch(Rstate){ - case 0: - Rtimer = timer_read32(); - Rstate++; - break; - case 1: - Rtimes[0] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 2: - Rtimes[1] = timer_elapsed32(Rtimer); - Rtimer = timer_read32(); - Rstate++; - break; - case 3: - Rtimes[2] = timer_elapsed32(Rtimer); - Rstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - case TappyL: - if(record->event.pressed){ - if(timer_elapsed32(Ltimer) > 1052){ - Lstate = 0; - } - switch(Lstate){ - case 0: - Ltimer = timer_read32(); - Lstate++; - break; - case 1: - Ltimes[0] = timer_elapsed32(Ltimer); - Ltimer = timer_read32(); - Lstate++; - break; - case 2: - Ltimes[1] = timer_elapsed32(Ltimer); - Lstate = 0; - break; - } - if(Rstate == 0 && Lstate == 0) rhythm_parse(); - } - return false; - break; - #endif - #endif case RANDIG: if (record->event.pressed) { tap_random_base64(); @@ -507,7 +448,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef AUDIO_ENABLE void matrix_init_user(void){ // Run once at startup #ifdef AUDIO_ENABLE _delay_ms(50); // gets rid of tick @@ -515,6 +455,7 @@ void matrix_init_user(void){ // Run once at startup #endif } +#ifdef AUDIO_ENABLE void play_goodbye_tone(void){ PLAY_NOTE_ARRAY(tone_goodbye, false, 0); _delay_ms(150); diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 8022ca672..623f24f32 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -3,6 +3,10 @@ #ifndef SONG_LIST_H #define SONG_LIST_H +#define COIN_SOUND \ + E__NOTE(_A5 ),\ + HD_NOTE(_E6 ), + #define ODE_TO_JOY \ Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \ @@ -122,4 +126,12 @@ E__NOTE(_E5), \ E__NOTE(_D5), +#define UNICODE_WINDOWS \ + E__NOTE(_B5), \ + S__NOTE(_E6), + +#define UNICODE_LINUX \ + E__NOTE(_E6), \ + S__NOTE(_B5), + #endif -- cgit v1.2.3 From f388bb5bdacb39a5309ca7594940184bbf35e84b Mon Sep 17 00:00:00 2001 From: nielsenz Date: Thu, 10 Nov 2016 13:39:46 -0800 Subject: Removed some common functions from my keymap --- keyboards/planck/keymaps/zach/keymap.c | 8 ++++---- keyboards/planck/keymaps/zach/zach_common_functions.c | 9 --------- keyboards/preonic/keymaps/zach/keymap.c | 4 ++-- keyboards/preonic/keymaps/zach/zach_common_functions.c | 9 --------- 4 files changed, 6 insertions(+), 24 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c index d3cde5bb9..710477df5 100644 --- a/keyboards/planck/keymaps/zach/keymap.c +++ b/keyboards/planck/keymaps/zach/keymap.c @@ -33,16 +33,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ - {UNIWIN, Sil_Usr, Sil_Pas, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, - {UNILIN, UltiU, UltiP, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, + {UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + {UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, [_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ - {_______, TFLIP, XXXXXXX, FINGER, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, TappyL, TappyR, _______}, + {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, - {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} } }; diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 7d14dcf3f..1f907e6cb 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -45,16 +45,7 @@ enum my_keycodes{ TFLIP, TPUT, SHRUG, - PENIS, - BOOBS, - Sil_Pas, - Sil_Usr, - UltiU, - UltiP, - TappyR, - TappyL, RANDIG, - FINGER, // Tap_Dance nums RAI = 0, LOW, diff --git a/keyboards/preonic/keymaps/zach/keymap.c b/keyboards/preonic/keymaps/zach/keymap.c index 423ca4b86..6ce37840b 100644 --- a/keyboards/preonic/keymaps/zach/keymap.c +++ b/keyboards/preonic/keymaps/zach/keymap.c @@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ - {_______, XXXXXXX, XXXXXXX, FINGER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, - {XXXXXXX, PENIS, BOOBS, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} } }; diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 7d14dcf3f..1f907e6cb 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -45,16 +45,7 @@ enum my_keycodes{ TFLIP, TPUT, SHRUG, - PENIS, - BOOBS, - Sil_Pas, - Sil_Usr, - UltiU, - UltiP, - TappyR, - TappyL, RANDIG, - FINGER, // Tap_Dance nums RAI = 0, LOW, -- cgit v1.2.3 From 80c5ada3394c5ad8087df00ef878eb2cbcd87d70 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Thu, 10 Nov 2016 13:47:07 -0800 Subject: Missed removing a function --- .../planck/keymaps/zach/zach_common_functions.c | 23 ---------------------- .../preonic/keymaps/zach/zach_common_functions.c | 23 ---------------------- 2 files changed, 46 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 1f907e6cb..b77f2b241 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -70,29 +70,6 @@ float unilin[][2] = SONG(UNICODE_LINUX); #ifdef TAP_DANCE_ENABLE #define TAPPING_TERM 200 -uint8_t Lstate = 0, Rstate = 0; -uint32_t Ltimer = 0, Rtimer = 0; -uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) -void rhythm_parse(void){ - int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time - int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; - if(abs(R-L) > 10){ - tap(KC_N); tap(KC_O); - return; - } else { - L = (L / 3)*100; // Average time per tap * 100 - R = (R / 4); - if(abs(abs(L/R)-133) > 1){ - tap(KC_N); tap(KC_O); - tap(KC_P); tap(KC_E); - return; - } else { - tap(KC_O); tap(KC_K); - return; - } - } -}; - void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap switch(state->count){ // Only turn the layer on once case 1: diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 1f907e6cb..b77f2b241 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -70,29 +70,6 @@ float unilin[][2] = SONG(UNICODE_LINUX); #ifdef TAP_DANCE_ENABLE #define TAPPING_TERM 200 -uint8_t Lstate = 0, Rstate = 0; -uint32_t Ltimer = 0, Rtimer = 0; -uint32_t Ltimes[3], Rtimes[4]; // Ratio of tap times should be about 1.335 (L/R) -void rhythm_parse(void){ - int L = Ltimes[0] + Ltimes[1] + Ltimes[2]; // Start to end time - int R = Rtimes[0] + Rtimes[1] + Rtimes[2] + Rtimes[3]; - if(abs(R-L) > 10){ - tap(KC_N); tap(KC_O); - return; - } else { - L = (L / 3)*100; // Average time per tap * 100 - R = (R / 4); - if(abs(abs(L/R)-133) > 1){ - tap(KC_N); tap(KC_O); - tap(KC_P); tap(KC_E); - return; - } else { - tap(KC_O); tap(KC_K); - return; - } - } -}; - void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap switch(state->count){ // Only turn the layer on once case 1: -- cgit v1.2.3 From 592b90dd221d3847d359b9a4dbd258b9ceb2b3ce Mon Sep 17 00:00:00 2001 From: xyverz Date: Tue, 13 Dec 2016 18:05:45 -0800 Subject: Changes --- keyboards/planck/keymaps/xyverz/keymap.c | 10 +- keyboards/preonic/keymaps/xyverz/keymap.c | 192 +++++++++------------------ keyboards/preonic/keymaps/xyverz/makefile.mk | 1 - 3 files changed, 70 insertions(+), 133 deletions(-) delete mode 100644 keyboards/preonic/keymaps/xyverz/makefile.mk (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c index bbb83faf1..94ace2af5 100644 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ b/keyboards/planck/keymaps/xyverz/keymap.c @@ -44,14 +44,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_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_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, /* Colemak @@ -62,14 +62,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_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_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, /* Dvorak @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, /* Lower diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c index bc4692f3e..b22401460 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -14,22 +14,16 @@ #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _MUSIC 5 #define _ADJUST 16 -// Macro name shortcuts -#define QWERTY M(_QWERTY) -#define COLEMAK M(_COLEMAK) -#define DVORAK M(_DVORAK) -#define LOWER M(_LOWER) -#define RAISE M(_RAISE) -#define M_BL 5 -#define AUD_OFF M(6) -#define AUD_ON M(7) -#define MUS_OFF M(8) -#define MUS_ON M(9) -#define VC_IN M(10) -#define VC_DE M(11) +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; // Fillers to make layering more clear #define _______ KC_TRNS @@ -47,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { @@ -55,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, {KC_MINS, 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_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, /* Colemak @@ -66,17 +60,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = { {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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL}, {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(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, /* Dvorak @@ -89,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { @@ -97,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_LGUI, KC_ENT } + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, /* Lower @@ -110,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ [_LOWER] = { @@ -118,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {M(M_BL), _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} + {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} }, /* Raise @@ -131,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ [_RAISE] = { @@ -139,18 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, - {M(M_BL), _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, - -/* Music (reserved for process_action_user) - * - */ -[_MUSIC] = { - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} + {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} }, /* Adjust (Lower + Raise) @@ -169,32 +152,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } -}; - -const uint16_t PROGMEM fn_actions[] = { - }; #ifdef AUDIO_ENABLE -float start_up[][2] = { - {440.0*pow(2.0,(14)/12.0), 20}, - {440.0*pow(2.0,(26)/12.0), 8}, - {440.0*pow(2.0,(18)/12.0), 20}, - {440.0*pow(2.0,(26)/12.0), 8} +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} }; float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -202,34 +182,36 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case _QWERTY: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif persistant_default_layer_set(1UL<<_QWERTY); } + return false; break; - case _COLEMAK: + case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE PLAY_NOTE_ARRAY(tone_colemak, false, 0); #endif persistant_default_layer_set(1UL<<_COLEMAK); } + return false; break; - case _DVORAK: + case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE PLAY_NOTE_ARRAY(tone_dvorak, false, 0); #endif persistant_default_layer_set(1UL<<_DVORAK); } + return false; break; - case _LOWER: + case LOWER: if (record->event.pressed) { layer_on(_LOWER); update_tri_layer(_LOWER, _RAISE, _ADJUST); @@ -237,8 +219,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) layer_off(_LOWER); update_tri_layer(_LOWER, _RAISE, _ADJUST); } + return false; break; - case _RAISE: + case RAISE: if (record->event.pressed) { layer_on(_RAISE); update_tri_layer(_LOWER, _RAISE, _ADJUST); @@ -246,8 +229,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) layer_off(_RAISE); update_tri_layer(_LOWER, _RAISE, _ADJUST); } + return false; break; - case M_BL: + case BACKLIT: if (record->event.pressed) { register_code(KC_RSFT); #ifdef BACKLIGHT_ENABLE @@ -256,87 +240,41 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } else { unregister_code(KC_RSFT); } - break; - case 6: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - audio_off(); - #endif - } - break; - case 7: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - audio_on(); - PLAY_NOTE_ARRAY(start_up, false, 0); - #endif - } - break; - case 8: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - layer_off(_MUSIC); - stop_all_notes(); - #endif - } - break; - case 9: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(music_scale, false, 0); - layer_on(_MUSIC); - #endif - } - break; - case 10: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - voice_iterate(); - PLAY_NOTE_ARRAY(music_scale, false, 0); - #endif - } - break; - case 11: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - voice_deiterate(); - PLAY_NOTE_ARRAY(music_scale, false, 0); - #endif - } - break; + return false; + break; } - return MACRO_NONE; + return true; }; - void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(start_up, false, 0); - #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif } #ifdef AUDIO_ENABLE -uint8_t starting_note = 0x0C; -int offset = 7; - -void process_action_user(keyrecord_t *record) { +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} - if (IS_LAYER_ON(_MUSIC)) { - if (record->event.pressed) { - play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); - } else { - stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); - } - } +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 play_goodbye_tone() +void music_scale_user(void) { - PLAY_NOTE_ARRAY(goodbye, false, 0); - _delay_ms(150); + PLAY_NOTE_ARRAY(music_scale, false, 0); } #endif diff --git a/keyboards/preonic/keymaps/xyverz/makefile.mk b/keyboards/preonic/keymaps/xyverz/makefile.mk deleted file mode 100644 index 628167ff6..000000000 --- a/keyboards/preonic/keymaps/xyverz/makefile.mk +++ /dev/null @@ -1 +0,0 @@ -AUDIO_ENABLE = yes \ No newline at end of file -- cgit v1.2.3 From 79343f1c6cde28c454eac0a577d0d7dbf3aa2f17 Mon Sep 17 00:00:00 2001 From: xyverz Date: Sun, 8 Jan 2017 21:44:31 -0800 Subject: Usaility changes to keymap, tidying up a bit. --- keyboards/preonic/keymaps/xyverz/keymap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c index b22401460..b4d18f9a2 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -54,11 +54,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * | Bksp | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = { - {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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL}, - {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_BSPC, 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_RSFT}, {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } }, @@ -98,9 +98,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -109,8 +109,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = { {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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE}, + {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} }, @@ -119,9 +119,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | \ | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -130,8 +130,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS}, + {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} }, -- cgit v1.2.3 From b3cf96ec2e0fee322ac6314730fa6e3e43d76cb2 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:25:17 -0500 Subject: Add smt keymap for Preonic --- keyboards/preonic/keymaps/smt/Makefile | 3 + keyboards/preonic/keymaps/smt/keymap.c | 248 ++++++++++++++++++++++++++++++++ keyboards/preonic/keymaps/smt/readme.md | 1 + 3 files changed, 252 insertions(+) create mode 100644 keyboards/preonic/keymaps/smt/Makefile create mode 100644 keyboards/preonic/keymaps/smt/keymap.c create mode 100644 keyboards/preonic/keymaps/smt/readme.md (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/smt/Makefile b/keyboards/preonic/keymaps/smt/Makefile new file mode 100644 index 000000000..3d4659ceb --- /dev/null +++ b/keyboards/preonic/keymaps/smt/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c new file mode 100644 index 000000000..4ef22bb97 --- /dev/null +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -0,0 +1,248 @@ +#include "preonic.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.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 _DVORAK 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +enum preonic_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + 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/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md new file mode 100644 index 000000000..e911968dd --- /dev/null +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file -- cgit v1.2.3 From 51fe4f0d3429387ee512c22c5c1daffe63e2db9a Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:55:40 -0500 Subject: Update readme for smt Preonic keymap --- keyboards/preonic/keymaps/smt/readme.md | 86 ++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index e911968dd..b2052b37c 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -1 +1,85 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file +# smt's Preonic keymap + +This keymap is primarily based on the default Preonic keymap, which in turn is derived from Planck's default. + +Notable differences from the default are: + +1. **Dvorak by default** + + I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + +2. **Right Shift** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +## Dvorak (default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | / | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Qwerty (same as default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Lower + +This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +## Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. + +I haven't completely filled this layer, which leaves room for future mappings and macros. + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3 From 938422ce9901b7e15c738d6abaa78e0076ebdc84 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 25 Jan 2017 10:02:01 -0500 Subject: layer defines to enum --- keyboards/planck/keymaps/default/keymap.c | 17 ++++++++++------- keyboards/preonic/keymaps/default/keymap.c | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index ddbe4d7b2..1b1b998b2 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -14,13 +14,16 @@ extern keymap_config_t keymap_config; // 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _PLOVER 5 -#define _ADJUST 16 + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; enum planck_keycodes { QWERTY = SAFE_RANGE, diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 78b4997a8..3313af945 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -9,12 +9,15 @@ // 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 _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; enum preonic_keycodes { QWERTY = SAFE_RANGE, -- cgit v1.2.3 From 6546dddddb883b76243fd4088a5c7b38bd050c0d Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 10:57:42 -0500 Subject: Remove COLEMAK from preonic_keycodes enum --- keyboards/preonic/keymaps/smt/keymap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 4ef22bb97..5465d543a 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -18,7 +18,6 @@ enum preonic_keycodes { DVORAK = SAFE_RANGE, QWERTY, - COLEMAK, LOWER, RAISE, BACKLIT -- cgit v1.2.3 From c9ca36800884f63cf67d55565824bad0cb6d9be3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 26 Jan 2017 01:52:43 -0500 Subject: replace jackhumbert with qmk --- doc/BUILD_GUIDE.md | 4 ++-- doc/CYGWIN_GUIDE.md | 2 +- doc/HAND_WIRE.md | 6 +++--- doc/PCB_GUIDE.md | 6 +++--- keyboards/atreus/readme.md | 2 +- keyboards/ergodox/keymaps/ab/readme.md | 2 +- keyboards/ergodox/keymaps/algernon/readme.md | 4 ++-- keyboards/ergodox/keymaps/german-kinergo/readme.md | 2 +- keyboards/ergodox/keymaps/mclennon_osx/README.md | 2 +- keyboards/ergodox/keymaps/pvinis/Readme.md | 2 +- keyboards/ergodox/keymaps/supercoder/readme.md | 2 +- keyboards/ergodox/keymaps/win10_writers-block/readme.md | 2 +- keyboards/ergodox/readme.md | 2 +- keyboards/hhkb/readme.md | 2 +- keyboards/preonic/keymaps/smt/readme.md | 2 +- keyboards/s60-x/readme.md | 2 +- 16 files changed, 22 insertions(+), 22 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/doc/BUILD_GUIDE.md b/doc/BUILD_GUIDE.md index 70a4e10fa..175019183 100644 --- a/doc/BUILD_GUIDE.md +++ b/doc/BUILD_GUIDE.md @@ -6,7 +6,7 @@ 1. If you have ever installed WinAVR, uninstall it. 2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! 7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell". @@ -38,7 +38,7 @@ Debian/Ubuntu example: If 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). ## Verify Your Installation -1. 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. +1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/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. 2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. 4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. diff --git a/doc/CYGWIN_GUIDE.md b/doc/CYGWIN_GUIDE.md index 05e7a55f7..05d71961a 100755 --- a/doc/CYGWIN_GUIDE.md +++ b/doc/CYGWIN_GUIDE.md @@ -234,7 +234,7 @@ If you did everything else right. This part should be a snap! Grab the latest so ###Build Planck and Load the Firmware ``` $ cd ~/src -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/planck $ make ``` diff --git a/doc/HAND_WIRE.md b/doc/HAND_WIRE.md index 18cb7011f..17ef3116f 100644 --- a/doc/HAND_WIRE.md +++ b/doc/HAND_WIRE.md @@ -183,7 +183,7 @@ As you move along, be sure that the Teensy is staying in place - recutting and s From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. -To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). +To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: @@ -276,7 +276,7 @@ This can be accomplished by using the following `keymaps` definition: ), }; -Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. +Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. @@ -306,7 +306,7 @@ If you've done all of these things, keep in mind that sometimes you might have h Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) +There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) ## Trouble-shooting compiling diff --git a/doc/PCB_GUIDE.md b/doc/PCB_GUIDE.md index 3fad41dfb..16de71114 100644 --- a/doc/PCB_GUIDE.md +++ b/doc/PCB_GUIDE.md @@ -5,7 +5,7 @@ ### Windows 1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! @@ -32,7 +32,7 @@ Note that, since it will be directly accessing USB hardware, the `dfu-programmer` program needs to be run as root. ## Verify Your Installation -1. Clone the following repository: https://github.com/jackhumbert/qmk_firmware +1. Clone the following repository: https://github.com/qmk/qmk_firmware 2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck` 3. Run `make`. This should output a lot of information about the build process. @@ -80,7 +80,7 @@ when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to ### Keymap -Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h). +Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h). You can use modifiers with keycodes like this: diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 8baa581f0..476d1bce3 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -88,7 +88,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md index 6b1ac2be3..62e08e162 100644 --- a/keyboards/ergodox/keymaps/ab/readme.md +++ b/keyboards/ergodox/keymaps/ab/readme.md @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get * Easy on beginners. It has everything you need for your day to day usage. #### Cons -* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) +* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) * While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. #### Notes diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 015bd7cd3..3783eadf1 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -121,10 +121,10 @@ There is a very small tool in `tools/layer-notify`, that listens to the HID cons To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: [algernon:ez-layout]: https://github.com/algernon/ergodox-layout - [qmk]: https://github.com/jackhumbert/qmk_firmware + [qmk]: https://github.com/qmk/qmk_firmware ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware $ git clone https://github.com/algernon/ergodox-layout.git \ keyboards/ergodox/keymaps/algernon-master diff --git a/keyboards/ergodox/keymaps/german-kinergo/readme.md b/keyboards/ergodox/keymaps/german-kinergo/readme.md index 557d85a8a..beb74cf75 100644 --- a/keyboards/ergodox/keymaps/german-kinergo/readme.md +++ b/keyboards/ergodox/keymaps/german-kinergo/readme.md @@ -2,7 +2,7 @@ This layout is inspired by the "kinesis-qwerty-mod" from benblazak's [ergodox-firmware](https://github.com/benblazak/ergodox-firmware), as well as by the "german" layout from the -[qmk_firmware](https://github.com/jackhumbert/qmk_firmware). +[qmk_firmware](https://github.com/qmk/qmk_firmware). The goal was to have a layout that is pretty close to an ordinary German keyboard, so I don't have to make adjustments on the operating system level and I keep some of the muscle memory to use a regular keyboard. diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md index 60980d043..28cdb7c10 100644 --- a/keyboards/ergodox/keymaps/mclennon_osx/README.md +++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md @@ -2,4 +2,4 @@ This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. -If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). +If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/). diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md index 2a4a0c8f3..af2721054 100644 --- a/keyboards/ergodox/keymaps/pvinis/Readme.md +++ b/keyboards/ergodox/keymaps/pvinis/Readme.md @@ -59,7 +59,7 @@ I have two commented out layers that are just templates, so I can easily create # Building ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis $ make ``` diff --git a/keyboards/ergodox/keymaps/supercoder/readme.md b/keyboards/ergodox/keymaps/supercoder/readme.md index 8ef96eddf..df39ac7a9 100644 --- a/keyboards/ergodox/keymaps/supercoder/readme.md +++ b/keyboards/ergodox/keymaps/supercoder/readme.md @@ -22,7 +22,7 @@ your own: [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox $ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder $ make KEYMAP=supercoder diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md index e51e3c48f..83f91bce2 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -90,7 +90,7 @@ Your LEDs will change to indicate your layer. You'll know you are in the base la To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/` -[qmk]: https://github.com/jackhumbert/qmk_firmware +[qmk]: https://github.com/qmk/qmk_firmware ``` $ make keyboard=ergodox keymap=win10_writers-block diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index ca3eeba59..45b3354c1 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -25,7 +25,7 @@ If none of the existing keymaps suit you, you can create your own custom keymap. This will require some experience with coding. Follow these steps to customize a keymap: - - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + - Read the [qmk firmware README](https://github.com/qmk/qmk_firmware) from top to bottom. Then come back here. :) - Clone the qmk_firmware repository diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index 367c0a08f..ee7d11121 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -82,7 +82,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index b2052b37c..2dcc1927f 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,7 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! ## Dvorak (default) diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md index 94ce82922..408ad13ac 100644 --- a/keyboards/s60-x/readme.md +++ b/keyboards/s60-x/readme.md @@ -13,7 +13,7 @@ You only need to flash them onto your keyboard, which is explained below, there' ## Flashing your keyboard The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). -[QMK Firmware Flasher](https://github.com/jackhumbert/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. +[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. [Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. -- cgit v1.2.3 From 7c24ecf580471f7b0d360dd115d6730adf6e59d8 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 01:38:58 -0500 Subject: Carry over Planck updates to my Preonic keymap --- keyboards/preonic/keymaps/smt/keymap.c | 30 +++++++++++------------ keyboards/preonic/keymaps/smt/readme.md | 42 +++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 22 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 5465d543a..ba05d9ad5 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -1,9 +1,9 @@ #include "preonic.h" #include "action_layer.h" -#include "eeconfig.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif +#include "eeconfig.h" // 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. @@ -33,39 +33,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | O | E | U | I | D | H | T | N | S | - | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {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_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_MINS}, + {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Qwerty * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______}, {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} @@ -98,9 +98,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | _ | + | { | } | | | + * | | | | | | | _ | ? | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | - | = | [ | ] | \ | + * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 2dcc1927f..393d9d3e3 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,17 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +3. Escape + + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + +4. Backtick + + I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + + So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. ## Dvorak (default) @@ -20,13 +30,13 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | / | +| Tab | " | , | . | P | Y | F | G | C | R | L | Bkps | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | O | E | U | I | D | H | T | N | S | - | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -36,13 +46,13 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | S | D | F | G | H | J | K | L | ; | " | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -76,10 +86,28 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+-------------+------+------+------+------+------| | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | | | | | | | _ | + | { | } | | | +| | | | | | | _ | ? | + | { | } | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | | | | | | | - | = | [ | ] | \ | +| | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' ``` + +## Adjust (Lower + Raise) + +Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. + +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Reset| | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3 From 1d9e0b0120d0467b6f7ff146911f01b7c701fb93 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 20:54:34 -0500 Subject: s/Bkps/Bksp --- keyboards/preonic/keymaps/smt/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 393d9d3e3..016da7b01 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -30,7 +30,7 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | Bkps | +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | O | E | U | I | D | H | T | N | S | - | |------+------+------+------+------+------|------+------+------+------+------+------| -- cgit v1.2.3 From 4d7105c2cf47c7604b54cdf488b4eb9d08c1f1cf Mon Sep 17 00:00:00 2001 From: Xyverz Date: Fri, 10 Feb 2017 23:30:08 -0800 Subject: Added RGB Underglow to my Preonic --- keyboards/preonic/keymaps/xyverz/Makefile | 23 +++++++++++++++++++++++ keyboards/preonic/keymaps/xyverz/config.h | 21 +++++++++++++++++++++ keyboards/preonic/keymaps/xyverz/keymap.c | 30 +++++++++++++++--------------- 3 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 keyboards/preonic/keymaps/xyverz/Makefile create mode 100644 keyboards/preonic/keymaps/xyverz/config.h (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/preonic/keymaps/xyverz/Makefile b/keyboards/preonic/keymaps/xyverz/Makefile new file mode 100644 index 000000000..ea5f6c164 --- /dev/null +++ b/keyboards/preonic/keymaps/xyverz/Makefile @@ -0,0 +1,23 @@ +# 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 = no # 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 = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # 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/preonic/keymaps/xyverz/config.h b/keyboards/preonic/keymaps/xyverz/config.h new file mode 100644 index 000000000..4e12921fe --- /dev/null +++ b/keyboards/preonic/keymaps/xyverz/config.h @@ -0,0 +1,21 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// Number of backlight levels +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 3 + +/* ws2812 RGB LED */ +#undef RGB_DI_PIN +#define RGB_DI_PIN B3 +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 11 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c index b4d18f9a2..c8457cda1 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = { {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL }, {KC_MINS, 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_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAK] = { {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL}, + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL }, {KC_BSPC, 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_RSFT}, {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | " | , | . | P | Y | F | G | C | R | L | / | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS}, {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, @@ -96,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE}, {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Raise * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | \ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -129,7 +129,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS}, {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, @@ -140,20 +140,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | + * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } -- cgit v1.2.3 From a64ae1066250d3aafb6e9670bf617237ec4338e7 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 20:41:13 -0800 Subject: Update existing keymaps Update existing keymaps to enable MIDI_BASIC functionality. Also added an option MIDI_ENABLE_STRICT to be strict about keycode use (which also reduces memory footprint at runtime) --- keyboards/planck/keymaps/dbroqua/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/default/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/experimental/config.h | 23 ++++++++++++++++++ keyboards/planck/keymaps/impossible/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/jeebak/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/jhenahan/config.h | 23 ++++++++++++++++++ keyboards/planck/keymaps/premek/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/sgoodwin/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/smt/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/thermal_printer/config.h | 23 ++++++++++++++++++ keyboards/planck/keymaps/unicode/config.h | 29 +++++++++++++++++++++++ keyboards/planck/keymaps/xyverz/config.h | 29 +++++++++++++++++++++++ keyboards/preonic/keymaps/CMD-Preonic/config.h | 29 +++++++++++++++++++++++ keyboards/preonic/keymaps/default/config.h | 29 +++++++++++++++++++++++ keyboards/preonic/keymaps/smt/config.h | 29 +++++++++++++++++++++++ keyboards/satan/keymaps/midi/config.h | 3 +++ keyboards/subatomic/keymaps/default/config.h | 29 +++++++++++++++++++++++ quantum/process_keycode/process_audio.c | 4 ++-- quantum/process_keycode/process_music.c | 2 +- quantum/process_keycode/process_music.h | 1 + quantum/quantum.c | 4 ++-- quantum/quantum_keycodes.h | 28 +++++++++++----------- quantum/template/config.h | 3 +++ 23 files changed, 472 insertions(+), 19 deletions(-) create mode 100644 keyboards/planck/keymaps/dbroqua/config.h create mode 100644 keyboards/planck/keymaps/default/config.h create mode 100644 keyboards/planck/keymaps/impossible/config.h create mode 100644 keyboards/planck/keymaps/jeebak/config.h create mode 100644 keyboards/planck/keymaps/premek/config.h create mode 100644 keyboards/planck/keymaps/sgoodwin/config.h create mode 100644 keyboards/planck/keymaps/smt/config.h create mode 100644 keyboards/planck/keymaps/unicode/config.h create mode 100644 keyboards/planck/keymaps/xyverz/config.h create mode 100644 keyboards/preonic/keymaps/CMD-Preonic/config.h create mode 100644 keyboards/preonic/keymaps/default/config.h create mode 100644 keyboards/preonic/keymaps/smt/config.h create mode 100644 keyboards/subatomic/keymaps/default/config.h (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/dbroqua/config.h b/keyboards/planck/keymaps/dbroqua/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/dbroqua/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h index cc093bee4..492490ca1 100644 --- a/keyboards/planck/keymaps/experimental/config.h +++ b/keyboards/planck/keymaps/experimental/config.h @@ -14,4 +14,27 @@ #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + #endif diff --git a/keyboards/planck/keymaps/impossible/config.h b/keyboards/planck/keymaps/impossible/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jeebak/config.h b/keyboards/planck/keymaps/jeebak/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/jeebak/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jhenahan/config.h b/keyboards/planck/keymaps/jhenahan/config.h index cd3adc41c..1e42b92b9 100644 --- a/keyboards/planck/keymaps/jhenahan/config.h +++ b/keyboards/planck/keymaps/jhenahan/config.h @@ -6,4 +6,27 @@ #define FORCE_NKRO #define WORKMAN_SOUND COLEMAK_SOUND +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + #endif diff --git a/keyboards/planck/keymaps/premek/config.h b/keyboards/planck/keymaps/premek/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/premek/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/sgoodwin/config.h b/keyboards/planck/keymaps/sgoodwin/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/smt/config.h b/keyboards/planck/keymaps/smt/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/smt/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/thermal_printer/config.h b/keyboards/planck/keymaps/thermal_printer/config.h index 430b6493c..bcd098930 100644 --- a/keyboards/planck/keymaps/thermal_printer/config.h +++ b/keyboards/planck/keymaps/thermal_printer/config.h @@ -20,4 +20,27 @@ sei(); \ } while(0) +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + #endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/unicode/config.h b/keyboards/planck/keymaps/unicode/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/unicode/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/xyverz/config.h b/keyboards/planck/keymaps/xyverz/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/planck/keymaps/xyverz/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/CMD-Preonic/config.h b/keyboards/preonic/keymaps/CMD-Preonic/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/preonic/keymaps/CMD-Preonic/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/preonic/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/config.h b/keyboards/preonic/keymaps/smt/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/preonic/keymaps/smt/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index 59250b49e..8e10b04ec 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -7,6 +7,9 @@ * MIDI options */ +/* Prevent use of disabled MIDI features in the keymap */ +#define MIDI_ENABLE_STRICT 1 + /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h new file mode 100644 index 000000000..4c6158199 --- /dev/null +++ b/keyboards/subatomic/keymaps/default/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index d45242c9e..71c0297ee 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -1,5 +1,5 @@ -#include "process_audio.h" #include "audio.h" +#include "process_audio.h" static float compute_freq_for_midi_note(uint8_t note) { @@ -43,7 +43,7 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) { return false; } - return true + return true; } void process_audio_noteon(uint8_t note) { diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 43bcf973e..4b86b91f0 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -42,7 +42,7 @@ static void music_noteoff(uint8_t note) { #endif } -static void music_all_notes_off(void) { +void music_all_notes_off(void) { #ifdef AUDIO_ENABLE process_audio_stop_all_notes(); #endif diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 69913b276..a36514a44 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -14,6 +14,7 @@ void music_off(void); void music_on_user(void); void music_scale_user(void); +void music_all_notes_off(void); void matrix_scan_music(void); diff --git a/quantum/quantum.c b/quantum/quantum.c index 7a27a568a..a4a12061b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -95,8 +95,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void reset_keyboard(void) { clear_keyboard(); -#ifdef AUDIO_ENABLE - stop_all_notes(); +#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_ENABLE_BASIC)) + music_all_notes_off(); shutdown_user(); #endif wait_ms(250); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 3b82b7208..56228f276 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -1,8 +1,11 @@ - #ifndef QUANTUM_KEYCODES_H #define QUANTUM_KEYCODES_H -#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) +#ifndef MIDI_ENABLE_STRICT +#define MIDI_ENABLE_STRICT 0 +#endif + +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) #ifndef MIDI_TONE_KEYCODE_OCTAVES #define MIDI_TONE_KEYCODE_OCTAVES 3 #endif @@ -113,18 +116,16 @@ enum quantum_keycodes { MUV_IN, MUV_DE, -#ifdef MIDI_ENABLE // Midi - -#ifdef MIDI_BASIC +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) MI_ON, // send midi notes when music mode is enabled MI_OFF, // don't send midi notes when music mode is enabled #endif -#ifdef MIDI_ADVANCED +#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)) MIDI_TONE_MIN, -#if MIDI_TONE_KEYCODE_OCTAVES > 0 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0 MI_C = MIDI_TONE_MIN, MI_Cs, MI_Db = MI_Cs, @@ -144,7 +145,7 @@ enum quantum_keycodes { MI_B, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 1 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1 MI_C_1, MI_Cs_1, MI_Db_1 = MI_Cs_1, @@ -164,7 +165,7 @@ enum quantum_keycodes { MI_B_1, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 2 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2 MI_C_2, MI_Cs_2, MI_Db_2 = MI_Cs_2, @@ -184,7 +185,7 @@ enum quantum_keycodes { MI_B_2, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 3 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3 MI_C_3, MI_Cs_3, MI_Db_3 = MI_Cs_3, @@ -204,7 +205,7 @@ enum quantum_keycodes { MI_B_3, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 4 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4 MI_C_4, MI_Cs_4, MI_Db_4 = MI_Cs_4, @@ -224,7 +225,7 @@ enum quantum_keycodes { MI_B_4, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 5 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 MI_C_5, MI_Cs_5, MI_Db_5 = MI_Cs_5, @@ -244,7 +245,7 @@ enum quantum_keycodes { MI_B_5, #endif -#if MIDI_TONE_KEYCODE_OCTAVES > 5 +#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5 MIDI_TONE_MAX = MI_B_5, #elif MIDI_TONE_KEYCODE_OCTAVES > 4 MIDI_TONE_MAX = MI_B_4, @@ -339,7 +340,6 @@ enum quantum_keycodes { MI_MODSD, // decrease modulation speed MI_MODSU, // increase modulation speed #endif // MIDI_ADVANCED -#endif // MIDI_ENABLE // Backlight functionality BL_0, diff --git a/quantum/template/config.h b/quantum/template/config.h index 54db4f242..7393097e1 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -163,6 +163,9 @@ along with this program. If not, see . * MIDI options */ +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ -- cgit v1.2.3 From 88e862e4728343fab4ed7e8dc44ae5594b702955 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 8 Mar 2017 16:00:23 -0500 Subject: Update smt keymaps for consistency --- keyboards/lets_split/keymaps/smt/keymap.c | 52 ++++++----- keyboards/planck/keymaps/smt/keymap.c | 56 ++++++------ keyboards/preonic/keymaps/smt/keymap.c | 143 +++++++++++++++++++----------- keyboards/tv44/keymaps/smt/keymap.c | 24 ++--- 4 files changed, 163 insertions(+), 112 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index 5ba5417a9..b7db699fd 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -28,6 +28,12 @@ enum custom_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -42,10 +48,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ - ALL_T(KC_TAB), 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_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ - MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_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_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -60,10 +66,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = KEYMAP( \ - ALL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - CTL_T(KC_ESC), 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_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ - MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_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, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Dvorak @@ -78,28 +84,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = KEYMAP( \ - ALL_T(KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ - SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT), \ - MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower * ,-----------------------------------------------------------------------------------. * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = KEYMAP( \ - KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - KC_DLR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), /* Raise @@ -110,14 +116,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ [_RAISE] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), /* Adjust (Lower + Raise) diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index afc82b49f..2e1c35547 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -31,6 +31,12 @@ enum planck_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -45,10 +51,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {ALL_T(KC_TAB), 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_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {SFT_T(KC_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_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_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Colemak @@ -63,10 +69,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = { - {ALL_T(KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {CTL_T(KC_ESC), 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_ESC), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {CTL_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, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Dvorak @@ -81,17 +87,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {ALL_T(KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {MEH_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -99,10 +105,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Raise @@ -113,19 +119,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ [_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} }, /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | Reset| * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -135,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index ba05d9ad5..690feca47 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -9,15 +9,17 @@ // 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 _DVORAK 0 -#define _QWERTY 1 -#define _LOWER 2 -#define _RAISE 3 +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 #define _ADJUST 16 enum preonic_keycodes { - DVORAK = SAFE_RANGE, - QWERTY, + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, BACKLIT @@ -27,57 +29,84 @@ enum preonic_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak +/* Qwerty * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {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_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_MINS}, - {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +[_QWERTY] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_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_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -/* Qwerty +/* Colemak * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * | Esc | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______}, - {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +[_COLEMAK] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {CTL_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, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, + {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -85,11 +114,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Raise @@ -102,24 +131,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ [_RAISE] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} }, /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | Reset| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -128,8 +157,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -145,8 +174,9 @@ float tone_startup[][2] = { {NOTE_B6, 8} }; -float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND); @@ -160,21 +190,30 @@ void persistant_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case DVORAK: + case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif - persistant_default_layer_set(1UL<<_DVORAK); + persistant_default_layer_set(1UL<<_QWERTY); } return false; break; - case QWERTY: + case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_NOTE_ARRAY(tone_colemak, false, 0); #endif - persistant_default_layer_set(1UL<<_QWERTY); + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); } return false; break; diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c index de5ce03e2..532e74de0 100644 --- a/keyboards/tv44/keymaps/smt/keymap.c +++ b/keyboards/tv44/keymaps/smt/keymap.c @@ -32,8 +32,8 @@ enum planck_keycodes { // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper -#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt (Ctrl+Alt+Shift) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -117,13 +117,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = KEYMAP_TV45( /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ - KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , +ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL , /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ - KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP , +CTL_T(KC_DLR), KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP , /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, KC_PGDN , +SFT_T(KC_EQL), KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, SFT_T(KC_PGDN), /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - BACKLIT , _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ), +ALT_T(BACKLIT), _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ), /*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ /* Raise @@ -139,18 +139,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = KEYMAP_TV45( /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ - KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , +ALL_T(KC_TILD),KC_EXLM,KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL , /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , +CTL_T(KC_F1), KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS , + SFT_T(KC_F7), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - BACKLIT , _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ), +ALT_T(BACKLIT), _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ), /*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ /* Adjust (Lower + Raise) * ,---------+------+------+------+------+------+------+------+------+------+------+---------. - * | | Reset| | | | | | | | | | Del | + * | | Reset| | | | | | | | | | Reset | * |---------`------`------`------`------`------`------`------`------`------`------`---------| * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |----------`------`------`------`------`------`------`------`------`------`------`--------| @@ -161,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = KEYMAP_TV45( /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ - _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , + _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET , /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ , /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ -- cgit v1.2.3 From 8d4bc714e4e69dd89b0ef7f1bad60e6ca6c0f791 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 8 Mar 2017 23:16:58 -0500 Subject: Update smt keymap READMEs --- keyboards/lets_split/keymaps/smt/keymap.c | 108 ++++++++++++++--------------- keyboards/lets_split/keymaps/smt/readme.md | 88 +++++++++++++++++++++++ keyboards/planck/keymaps/smt/keymap.c | 4 +- keyboards/planck/keymaps/smt/readme.md | 79 +++++++++++++-------- keyboards/preonic/keymaps/smt/keymap.c | 4 +- keyboards/preonic/keymaps/smt/readme.md | 77 ++++++++++++-------- 6 files changed, 246 insertions(+), 114 deletions(-) create mode 100644 keyboards/lets_split/keymaps/smt/readme.md (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index b7db699fd..c4bdb7ebc 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -37,15 +37,15 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_QWERTY] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ @@ -55,15 +55,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | H | N | E | I | O | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_COLEMAK] = KEYMAP( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ @@ -73,15 +73,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | D | H | T | N | S | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' */ [_DVORAK] = KEYMAP( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ @@ -91,15 +91,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower - * ,-----------------------------------------------------------------------------------. - * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' */ [_LOWER] = KEYMAP( \ ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ @@ -109,15 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Raise - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | _ | ? | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | - | / | = | [ | ] | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Home |PageDn|PageUp| End | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' */ [_RAISE] = KEYMAP( \ ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ @@ -127,15 +127,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Reset| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Reset| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = KEYMAP( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ diff --git a/keyboards/lets_split/keymaps/smt/readme.md b/keyboards/lets_split/keymaps/smt/readme.md new file mode 100644 index 000000000..20bc662f0 --- /dev/null +++ b/keyboards/lets_split/keymaps/smt/readme.md @@ -0,0 +1,88 @@ +# smt's Let's Split keymap + +This keymap is ported from my Planck keymap. + + +## Qwerty + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | S | D | F | G | | H | J | K | L | ; | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Colemak + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | R | S | T | D | | H | N | E | I | O | " | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Esc | A | O | E | U | I | | D | H | T | N | S | - | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------' `-----------------------------------------' +``` + +## Lower + +``` +,-----------------------------------------. ,-----------------------------------------. +| 0 | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| $ | F1 | F2 | F3 | F4 | F5 | | F6 | 4 | 5 | 6 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | | F12 | 1 | 2 | 3 | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------' `-----------------------------------------' +``` + +## Raise + +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | _ | ? | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | - | / | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | Home |PageDn|PageUp| End | +`-----------------------------------------' `-----------------------------------------' +``` + +## Adjust (Lower + Raise) + +``` +,-----------------------------------------. ,-----------------------------------------. +| | Reset| | | | | | | | | | | Reset| +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | | | | | | | | | +`-----------------------------------------' `-----------------------------------------' +``` diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 2e1c35547..708f699da 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -97,9 +97,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md index 0e955a574..dc7c9cf9f 100644 --- a/keyboards/planck/keymaps/smt/readme.md +++ b/keyboards/planck/keymaps/smt/readme.md @@ -4,49 +4,70 @@ This keymap is primarily based on the default Planck keymap. Notable differences from the default are: -1. **Dvorak by default** +- **[Mod-Tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys** - I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + - `Esc/Ctrl` -2. **Right Shift** + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... - I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + - `Enter/Shift` - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. -3. Escape + - `Tab/Hyper` (Super+Ctrl+Shift+Alt) - I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + It's great to be able to use Tab as a custom modifier key. I tend to use [Hyper](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) commands for various OS-specific operations depending on what machine I'm working on. -4. Backtick + - `Backtick/Meh` (Ctrl+Shift+Alt) - I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + Why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. The "Meh" mapping is just a less-cool "Hyper"; the same, just without Super. - So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. +- **Swapped responsibilities of "lower" and "raise" layers** -## Dvorak (default) + I prefer to use symbols via the "raise" layer, and numbers via the "lower" layer. + +- **Removed Plover layer** + + I don't intend to use stenography anytime soon, so Plover just didn't have a place in my keymap. + + +## Qwerty ``` ,-----------------------------------------------------------------------------------. -| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | O | E | U | I | D | H | T | N | S | - | +| Esc | A | S | D | F | G | H | J | K | L | ; | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` -## Qwerty (same as default) +## Colemak ``` ,-----------------------------------------------------------------------------------. -| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | S | D | F | G | H | J | K | L | ; | " | +| Esc | A | R | S | T | D | H | N | E | I | O | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------------------------------------------------. +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' @@ -54,15 +75,15 @@ Notable differences from the default are: ## Lower -This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. +This is where I put the number row, a numpad cluster, function keys, and media controls. ``` ,-----------------------------------------------------------------------------------. -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +| $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' @@ -70,7 +91,7 @@ This is where I put the number row, a numpad cluster, function keys, and some li ## Raise -As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. I've also added cursorkeys to correspond to the arrows. I haven't completely filled this layer, which leaves room for future mappings and macros. @@ -82,21 +103,21 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+------|------+------+------+------+------+------| | | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | Next | Vol- | Vol+ | Play | +| | | | | | | | | Home |PageDn|PageUp| End | `-----------------------------------------------------------------------------------' ``` ## Adjust (Lower + Raise) -Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. +Utility layer. This is where I'd switch between Qwerty and Dvorak, ~~fool around with~~ adjust the audio/music settings, or put the Planck into bootloader mode. ``` ,-----------------------------------------------------------------------------------. -| | Reset| | | | | | | | | | Del | +| | Reset| | | | | | | | | | Reset| |------+------+------+------+------+-------------+------+------+------+------+------| -| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +| | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | |------+------+------+------+------+------|------+------+------+------+------+------| -| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +| |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | `-----------------------------------------------------------------------------------' diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 690feca47..a10deb750 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -106,9 +106,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * | $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 016da7b01..2ec2603f3 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -4,53 +4,76 @@ This keymap is primarily based on the default Preonic keymap, which in turn is d Notable differences from the default are: -1. **Dvorak by default** +- **[Mod-Tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys** - I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + - `Esc/Ctrl` -2. **Right Shift** + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... - I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + - `Enter/Shift` - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. -3. Escape + - `Tab/Hyper` (Super+Ctrl+Shift+Alt) - I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + It's great to be able to use Tab as a custom modifier key. I tend to use [Hyper](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) commands for various OS-specific operations depending on what machine I'm working on. -4. Backtick + - `Backtick/Meh` (Ctrl+Shift+Alt) - I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + Why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. The "Meh" mapping is just a less-cool "Hyper"; the same, just without Super. - So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. +- **Swapped responsibilities of "lower" and "raise" layers** -## Dvorak (default) + I prefer to use symbols via the "raise" layer, and numbers via the "lower" layer. + +- **Removed Plover layer** + + I don't intend to use stenography anytime soon, so Plover just didn't have a place in my keymap. + + +## Qwerty ``` ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | O | E | U | I | D | H | T | N | S | - | +| Esc | A | S | D | F | G | H | J | K | L | ; | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` -## Qwerty (same as default) +## Colemak ``` ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | S | D | F | G | H | J | K | L | ; | " | +| Esc | A | R | S | T | D | H | N | E | I | O | " | |------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Dvorak + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' @@ -58,17 +81,17 @@ Notable differences from the default are: ## Lower -This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. +This is where I put the number row, a numpad cluster, function keys, and media controls. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. ``` ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |------+------+------+------+------+------+------+------+------+------+------+------| -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +| $ | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' @@ -76,7 +99,7 @@ This is where I put the number row, a numpad cluster, function keys, and some li ## Raise -As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. I've also added cursorkeys to correspond to the arrows. I haven't completely filled this layer, which leaves room for future mappings and macros. @@ -90,21 +113,21 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+------|------+------+------+------+------+------| | | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | Next | Vol- | Vol+ | Play | +| | | | | | | | | Home |PageDn|PageUp| End | `-----------------------------------------------------------------------------------' ``` ## Adjust (Lower + Raise) -Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. +Utility layer. This is where I'd switch between Qwerty and Dvorak, ~~fool around with~~ adjust the audio/music settings, or put the Preonic into bootloader mode. ``` ,-----------------------------------------------------------------------------------. | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |------+------+------+------+------+------+------+------+------+------+------+------| -| | Reset| | | | | | | | | | Del | +| | Reset| | | | | | | | | | Reset| |------+------+------+------+------+-------------+------+------+------+------+------| -| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +| | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | |------+------+------+------+------+------|------+------+------+------+------+------| | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| -- cgit v1.2.3 From d1e66e2e0715c680a8da3216525b54fd8f2b671f Mon Sep 17 00:00:00 2001 From: nielsenz Date: Thu, 30 Mar 2017 20:10:34 -0700 Subject: Worked around some new Makefile issues. --- keyboards/planck/keymaps/zach/Makefile | 2 +- keyboards/planck/keymaps/zach/config.h | 2 +- .../planck/keymaps/zach/zach_common_functions.c | 50 +++++++++++----------- keyboards/preonic/keymaps/zach/Makefile | 4 +- keyboards/preonic/keymaps/zach/config.h | 2 +- .../preonic/keymaps/zach/zach_common_functions.c | 50 +++++++++++----------- quantum/process_keycode/process_tap_dance.c | 2 + quantum/process_keycode/process_unicode.c | 1 + quantum/process_keycode/process_unicode_common.c | 1 - 9 files changed, 58 insertions(+), 56 deletions(-) (limited to 'keyboards/preonic/keymaps') diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile index 977f1a901..9d86fc81f 100644 --- a/keyboards/planck/keymaps/zach/Makefile +++ b/keyboards/planck/keymaps/zach/Makefile @@ -17,7 +17,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Debug changes to variable values -UNICODE_ENABLE = yes # Unicode +UNICODE_ENABLE = no # Unicode (can't be used with unicodemap) UNICODEMAP_ENABLE = yes # Enable extended 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. diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h index 7deb9ebfe..d309c9493 100644 --- a/keyboards/planck/keymaps/zach/config.h +++ b/keyboards/planck/keymaps/zach/config.h @@ -77,7 +77,7 @@ along with this program. If not, see . /* disable action features */ //#define NO_ACTION_LAYER #define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT +//#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index b77f2b241..2c47b2289 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -141,31 +141,31 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -#ifdef UNICODE_ENABLE +//#ifdef UNICODE_ENABLE // Unicode shortcuts -#define IBANG UC(0x203D) -#define RAROW UC(0x2192) -#define LAROW UC(0x2190) -#define DEGREE UC(0x00B0) -#define OMEGA UC(0x03A9) -#define WOMEGA UC(0x03C9) -#define MICRO UC(0x00B5) -#define PLUMIN UC(0x00B1) -#define SUPA2 UC(0x00B2) -#define ROMAN1 UC(0x2160) -#define ROMAN2 UC(0x2161) -#define ROMAN3 UC(0x2162) -#define ROMAN4 UC(0x2163) -#define ROMAN5 UC(0x2164) -#define ROMAN6 UC(0x2165) -#define ROMAN7 UC(0x2166) -#define roman1 UC(0x2170) -#define roman2 UC(0x2171) -#define roman3 UC(0x2172) -#define roman4 UC(0x2173) -#define roman5 UC(0x2174) -#define roman6 UC(0x2175) -#define roman7 UC(0x2176) +#define IBANG X(0x203D) +#define RAROW X(0x2192) +#define LAROW X(0x2190) +#define DEGREE X(0x00B0) +#define OMEGA X(0x03A9) +#define WOMEGA X(0x03C9) +#define MICRO X(0x00B5) +#define PLUMIN X(0x00B1) +#define SUPA2 X(0x00B2) +#define ROMAN1 X(0x2160) +#define ROMAN2 X(0x2161) +#define ROMAN3 X(0x2162) +#define ROMAN4 X(0x2163) +#define ROMAN5 X(0x2164) +#define ROMAN6 X(0x2165) +#define ROMAN7 X(0x2166) +#define roman1 X(0x2170) +#define roman2 X(0x2171) +#define roman3 X(0x2172) +#define roman4 X(0x2173) +#define roman5 X(0x2174) +#define roman6 X(0x2175) +#define roman7 X(0x2176) #ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() enum Ext_Unicode{ @@ -192,7 +192,7 @@ const uint32_t PROGMEM unicode_map[] = { #define TMBL X(TUMBLER) #endif -#endif +//#endif static uint16_t key_timer; static uint8_t caps_status = 0; diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile index f0a84abac..eebf41349 100644 --- a/keyboards/preonic/keymaps/zach/Makefile +++ b/keyboards/preonic/keymaps/zach/Makefile @@ -17,8 +17,8 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 #VARIABLE_TRACE = no # Debug changes to variable values -UNICODE_ENABLE = yes # Unicode -UNICODEMAP_ENABLE = no # Enable extended unicode +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes # Enable extended 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 diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index 59959524f..bb8913c7a 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -84,7 +84,7 @@ along with this program. If not, see . /* disable action features */ //#define NO_ACTION_LAYER #define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT +//#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index b77f2b241..2c47b2289 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -141,31 +141,31 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -#ifdef UNICODE_ENABLE +//#ifdef UNICODE_ENABLE // Unicode shortcuts -#define IBANG UC(0x203D) -#define RAROW UC(0x2192) -#define LAROW UC(0x2190) -#define DEGREE UC(0x00B0) -#define OMEGA UC(0x03A9) -#define WOMEGA UC(0x03C9) -#define MICRO UC(0x00B5) -#define PLUMIN UC(0x00B1) -#define SUPA2 UC(0x00B2) -#define ROMAN1 UC(0x2160) -#define ROMAN2 UC(0x2161) -#define ROMAN3 UC(0x2162) -#define ROMAN4 UC(0x2163) -#define ROMAN5 UC(0x2164) -#define ROMAN6 UC(0x2165) -#define ROMAN7 UC(0x2166) -#define roman1 UC(0x2170) -#define roman2 UC(0x2171) -#define roman3 UC(0x2172) -#define roman4 UC(0x2173) -#define roman5 UC(0x2174) -#define roman6 UC(0x2175) -#define roman7 UC(0x2176) +#define IBANG X(0x203D) +#define RAROW X(0x2192) +#define LAROW X(0x2190) +#define DEGREE X(0x00B0) +#define OMEGA X(0x03A9) +#define WOMEGA X(0x03C9) +#define MICRO X(0x00B5) +#define PLUMIN X(0x00B1) +#define SUPA2 X(0x00B2) +#define ROMAN1 X(0x2160) +#define ROMAN2 X(0x2161) +#define ROMAN3 X(0x2162) +#define ROMAN4 X(0x2163) +#define ROMAN5 X(0x2164) +#define ROMAN6 X(0x2165) +#define ROMAN7 X(0x2166) +#define roman1 X(0x2170) +#define roman2 X(0x2171) +#define roman3 X(0x2172) +#define roman4 X(0x2173) +#define roman5 X(0x2174) +#define roman6 X(0x2175) +#define roman7 X(0x2176) #ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X() enum Ext_Unicode{ @@ -192,7 +192,7 @@ const uint32_t PROGMEM unicode_map[] = { #define TMBL X(TUMBLER) #endif -#endif +//#endif static uint16_t key_timer; static uint8_t caps_status = 0; diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 68c8425bb..b807ec3c3 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -16,6 +16,8 @@ #include "quantum.h" #include "action_tapping.h" +uint8_t get_oneshot_mods(void); + static uint16_t last_td; static int8_t highest_td = -1; diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 1f16b9bdb..678a15234 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -16,6 +16,7 @@ #include "process_unicode.h" #include "action_util.h" +static uint8_t first_flag = 0; bool process_unicode(uint16_t keycode, keyrecord_t *record) { if (keycode > QK_UNICODE && record->event.pressed) { diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index b4d4231db..1dbdec3e7 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -17,7 +17,6 @@ #include "process_unicode_common.h" static uint8_t input_mode; -static uint8_t first_flag = 0; uint8_t mods; void set_unicode_input_mode(uint8_t os_target) -- cgit v1.2.3