1
0
Fork 0

Keymap: Trigotometry's Preonic (#4158)

* adding my keymap

* updated pull request comments from dashna, including redundancies and DVORAK entirely

* changed over visual representation to use 'LAYOUT_preonic_grid()'

* added a ReadMe and commented out AUDIO_ENABLED related stuff in keymap.c until I can align with current QMK standards

* Update readme.md

* readme corrections and adjustments
This commit is contained in:
Trigotometry 2018-10-20 02:40:46 +11:00 committed by Drashna Jaelre
parent 7222e3691b
commit ae31eb564a
4 changed files with 250 additions and 0 deletions

View file

@ -0,0 +1,8 @@
#pragma once
#define STARTUP_SONG SONG(PREONIC_SOUND)
#define MUSIC_MASK (keycode != KC_NO)
#define FORCE_NKRO 1
#define PREVENT_STUCK_MODIFIERS
#define GRAVE_ESC_GUI_OVERRIDE

View file

@ -0,0 +1,165 @@
#include QMK_KEYBOARD_H
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
// Layer declarations
enum preonic_layers {
_QWERTY = 1,
_GAMING = 2,
_LOWER = 3,
_RAISE = 4,
};
enum preonic_keycodes {
QWERTY = SAFE_RANGE,
GAMING,
LOWER,
RAISE,
};
// QMK predefined macros
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* ,-----------------------------------------------------------------------------------.
* | GEsc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Shft | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |SFTENT| Z | X | C | V | B | N | M | , | . | / | Entr |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Ctrl | Alt | Supr |Lower | Space | Raise| Left | Down | Up | Rght |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_preonic_grid(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC, \
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
SFT_ENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
XXXXXXX, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Gaming
* ,-----------------------------------------------------------------------------------.
* | Grve | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Shft | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shft | Z | X | C | V | B | N | M | , | . | / | Entr |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Ctrl | Alt | Alt |Lower | Space | Raise| Left | Down | Up | Rght |
* `-----------------------------------------------------------------------------------'
*/
[_GAMING] = LAYOUT_preonic_grid(
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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
KC_LCTL, KC_LCTL, KC_LALT, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | | * | / | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | VolD | Up | VolU | | | 7 | 8 | 9 | - | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | Left | Down | Rght | | | 4 | 5 | 6 | + | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | Prev | Play | Skip | | | 1 | 2 | 3 | = | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Supr | | | 0 | Home |PageDn|PageUp| End |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_preonic_grid(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_PAST, KC_PSLS, XXXXXXX, KC_DEL, \
_______, XXXXXXX, KC_VOLD, KC_UP, KC_VOLU, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PMNS, KC_BSPC, \
_______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, \
_______, XXXXXXX, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PEQL, KC_ENT, \
_______, _______, _______, KC_LGUI, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | \ | | | / | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | [ | { | ( | < | > | ) | } | ] | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | + | - | _ | = | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | |Qwerty| Game | | Reset|
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_preonic_grid(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , \
_______, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, XXXXXXX, XXXXXXX, KC_PSLS, XXXXXXX, XXXXXXX, XXXXXXX, _______, \
_______, KC_PIPE, KC_LBRC, KC_LCBR, KC_LPRN, KC_LABK, KC_RABK, KC_RPRN, KC_RCBR, KC_RBRC, KC_PIPE, XXXXXXX, \
_______, XXXXXXX, XXXXXXX, XXXXXXX, KC_PPLS, KC_PMNS, KC_UNDS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, QWERTY , GAMING, XXXXXXX, RESET \
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
} else {
layer_off(_LOWER);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
} else {
layer_off(_RAISE);
}
return false;
break;
case GAMING:
if (record->event.pressed) {
set_single_persistent_default_layer(_GAMING);
}
return false;
break;
}
return true;
};
// NFI how to bring this inline with current QMK standards yet, or it's redundant and don't use it.
// #ifdef AUDIO_ENABLE
// float tone_startup[][2] = {
// {NOTE_D5, 8},
// {NOTE_E6, 8},
// {NOTE_D6, 8},
// {NOTE_E5, 8}
// };
// void startup_user()
// {
// _delay_ms(20); // gets rid of tick
// PLAY_SONG(tone_startup);
// }
// #endif

View file

@ -0,0 +1,75 @@
# Trigotometry's v1.0
This layout is the confluence of the standard Preonic QWERTY layout and some of my own tweaks to make it's software as logical and straight cut as it's physical presence, at least in my eyes. Some might say there's wasted space, though possibly true, I believe in keeping it minimal and only adding what is really needed. So if, like me, you're also beginning your journey of coding and enjoy some downtime with friends on the battlefield I think you'll find this layout a stellar place to kick off your customisation.
## Qwerty
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | GEsc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Shft | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |SFTENT| Z | X | C | V | B | N | M | , | . | / | ENT |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Ctrl | Alt | Supr |Lower | Space | Raise| Left | Down | Up | Rght |
* `-----------------------------------------------------------------------------------
*/
Take note of the dual Enter keys, located where normally there'd be a pair of Shifts. I did this to ensure the alphas stayed in the same spot when compared to a staggered and standard board. My brain found it easier to switch the mods across keyboard than the relative position in the alphas, however it's easy to reverse the Enters/Shifts and you'll be back an (nearly) square one!
Also, LEnter acts as a Shift if it's held.
## Gaming
/* Gaming
* ,-----------------------------------------------------------------------------------.
* | Grve | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Shft | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shft | Z | X | C | V | B | N | M | , | . | / | Entr |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | Ctrl | Alt | Alt |Lower | Space | Raise| Left | Down | Up | Rght |
* `-----------------------------------------------------------------------------------'
*/
Honestly it's pretty standard, however I've doubled up on the important modifiers and removed the Super. It's still accessable readily by holding Lower and the key to it's left. Neato? I thought so.
## Raise Layer
/* Raise
* ,-----------------------------------------------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | \ | | | / | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | [ | { | ( | < | > | ) | } | ] | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | + | - | _ | = | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | |Qwerty| Game | | Reset|
* `-----------------------------------------------------------------------------------'
*/
Pretty self explanatory I think.
## Lower Layer
/* Lower
* ,-----------------------------------------------------------------------------------.
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | | * | / | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | VolD | Up | VolU | | | 7 | 8 | 9 | - | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | Left | Down | Rght | | | 4 | 5 | 6 | + | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | Prev | Play | Skip | | | 1 | 2 | 3 | = | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Supr | | | 0 | Home |PageDn|PageUp| End |
* `-----------------------------------------------------------------------------------'
*/
Music controls and arrows in prime location. F1-F6 there for extra mappings when in the Gaming layer.

View file

@ -0,0 +1,2 @@
#Build Options
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)