From b2877470ced1deb9651ecb39f6a82f5ef380b399 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 16 Jul 2018 18:04:32 -0700 Subject: Update to drashna userspace and keymaps (#3172) * Use string with delay * Add skipped region to ergodox * Add send string config * Use default_layer_state instead of function * Fully generalize keyboards * old iris cleanup * Fix Drashna keymap compile issues By checking to see if secret.c exists before actually trying to add it * Remove unnecessary references * Add 4x12 ortho board * Update userspace readme for secrets * Make RGB more modular * Fix iris keymap, since we don't need the lower left (Function keys) * Fix includes * Add Blanks * Fix Ergodox lower layer * Add suspend commands * Add Maltron Layout * Add additional layouts * Finish adding gamepad to Iris * Tweaks to iris gamepag layer * make gaming layers more friendly * minor gaming layer tweak * Add Carplax * Add modded key timer function * Cleanup and macro documentation * Add QMK DFU info * Add 'old' keymap for 12 LED spare * Update Pro Micro documentation * Disable twinkling so it fits in firmware space * Switch to QMK DFU bootloader, since it's better anyhow * Write default layer state colors to EEPROM Since we are writing to EEPROM anyways, and this way, it sticks on reboot * Fix QMK DFU bootloader options * More updates for QMK DFU support * Use matrix scanning hack for startup_user until #3113 gets merged * Fix indicator light consistency issue * Add/readd ifdefs to indicators * Add/readd alt indicator * Remove RGB Twinkling from Viterbi macro pad * Fix default layer color detection * Fix rebase and detection issues * Cleanup code so it will compile if RGBLIGHT is disabled * Revert vsode settings * Use Pragma Once instead of boilerplate code --- layouts/community/ortho_4x12/drashna/config.h | 56 ++++++++ layouts/community/ortho_4x12/drashna/keymap.c | 177 +++++++++++++++++++++++++ layouts/community/ortho_4x12/drashna/readme.md | 2 + layouts/community/ortho_4x12/drashna/rules.mk | 20 +++ 4 files changed, 255 insertions(+) create mode 100644 layouts/community/ortho_4x12/drashna/config.h create mode 100644 layouts/community/ortho_4x12/drashna/keymap.c create mode 100644 layouts/community/ortho_4x12/drashna/readme.md create mode 100644 layouts/community/ortho_4x12/drashna/rules.mk (limited to 'layouts/community/ortho_4x12') diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h new file mode 100644 index 0000000000..0bb6a4f501 --- /dev/null +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -0,0 +1,56 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + + +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) +#define RGB_DI_PIN D3 +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#endif // RGBLIGHT_ENABLE + + +#if defined(KEYBOARD_lets_split_rev2) +#define USE_SERIAL +#undef USE_I2C + +#define EE_HANDS +#endif + +#if defined(KEYBOARD_planck_rev5) +#ifdef RGBLIGHT_ENABLE +#define NO_MUSIC_MODE +#endif // RGBLIGHT_ENABLE +#endif // KEYBOARD_planck_rev5 + + +/* + * 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/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c new file mode 100644 index 0000000000..a5443939ca --- /dev/null +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -0,0 +1,177 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "drashna.h" + + +enum planck_keycodes { + BACKLIT = NEW_SAFE_RANGE, +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12_wrapper( + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, + KC_ESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, + KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12_wrapper( + KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, + KC_ESC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, + KC_LSFT, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12_wrapper( + KC_TAB, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, + KC_ESC, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_SLSH, + KC_LSFT, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + +[_WORKMAN] = LAYOUT_ortho_4x12_wrapper( + KC_TAB, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, + KC_ESC, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, + KC_LSFT, _________________WORKMAN_L3________________, _________________WORKMAN_R3________________, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12_wrapper( + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, + KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12_wrapper( + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, + KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12_wrapper( + _______, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_DEL, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + +#ifdef KEYBOARD_planck + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; +#endif + } + return true; +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/layouts/community/ortho_4x12/drashna/readme.md b/layouts/community/ortho_4x12/drashna/readme.md new file mode 100644 index 0000000000..de9680b498 --- /dev/null +++ b/layouts/community/ortho_4x12/drashna/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk new file mode 100644 index 0000000000..ebd8b26b0a --- /dev/null +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -0,0 +1,20 @@ +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 +TAP_DANCE_ENABLE = no +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = yes + + +ifeq ($(strip $(PROTOCOL)), VUSB) +NKRO_ENABLE = no +else +NKRO_ENABLE = yes +endif + + +INDICATOR_LIGHTS = yes +MACROS_ENABLED = no +RGBLIGHT_TWINKLE = yes -- cgit v1.2.3