mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-10-19 15:40:24 +02:00
Merge branch 'master' of https://github.com/qmk/qmk_firmware
This commit is contained in:
@@ -29,21 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define PRODUCT Helix Beta
|
||||
#define DESCRIPTION A split keyboard for the cheap makers
|
||||
|
||||
#define HELIX_ROWS 5
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#if HELIX_ROWS == 4
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||
#elif HELIX_ROWS == 5
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||
#else
|
||||
#error "expected HELIX_ROWS 4 or 5"
|
||||
#endif
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
|
||||
@@ -38,6 +38,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Helix keyboard OLED support
|
||||
//#define SSD1306OLED
|
||||
|
||||
/* Select rows configuration */
|
||||
// Rows are 4 or 5
|
||||
#define HELIX_ROWS 5
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#if HELIX_ROWS == 4
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||
#elif HELIX_ROWS == 5
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||
#else
|
||||
#error "expected HELIX_ROWS 4 or 5"
|
||||
#endif
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
// #define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,110 @@
|
||||
#include "iris.h"
|
||||
#include "keymap_swedish.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _EMPTY 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define KC_LOWR LOWER
|
||||
#define KC_RASE RAISE
|
||||
#define KC_RST RESET
|
||||
|
||||
#define KC_AA NO_AA
|
||||
#define KC_AE NO_AE
|
||||
#define KC_OE NO_OSLH
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P , AA ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LSFT, A , S , D , F , G , H , J , K , L , OE , AE ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LCTL, Z , X , C , V , B ,DEL , BSPC, N , M ,COMM,DOT ,SLSH,MINS,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LGUI,LOWR,SPC , ENT ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_LOWER] = KEYMAP(
|
||||
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||
NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
NO_ACUT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,NO_LCBR,NO_RCBR,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_BSLS, KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,NO_LBRC,NO_RBRC,
|
||||
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_LESS,NO_GRTR,
|
||||
//`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------'
|
||||
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS
|
||||
// `-------+-------+-------' `-------+-------+-------'
|
||||
),
|
||||
|
||||
[_RAISE] = KEYMAP(
|
||||
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||
KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
NO_GRV ,KC_7 ,KC_8 ,KC_9 ,NO_MINS,NO_ASTR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_4 ,KC_5 ,KC_6 ,NO_PLUS,NO_SLSH, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_TRNS,NO_BSLS,
|
||||
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_1 ,KC_2 ,KC_3 ,KC_0 ,NO_EQL ,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
//`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------'
|
||||
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS
|
||||
// `-------+-------+-------' `-------+-------+-------'
|
||||
)
|
||||
};
|
||||
|
||||
void persistent_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 QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
@@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "backlight.h"
|
||||
#include "backlight_custom.h"
|
||||
|
||||
extern rgblight_config_t rgblight_config;
|
||||
|
||||
// for keyboard subdirectory level init functions
|
||||
// @Override
|
||||
void matrix_init_kb(void) {
|
||||
@@ -52,6 +50,9 @@ void backlight_set(uint8_t level) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
extern rgblight_config_t rgblight_config;
|
||||
|
||||
// custom RGB driver
|
||||
void rgblight_set(void) {
|
||||
if (!rgblight_config.enable) {
|
||||
@@ -77,7 +78,9 @@ void matrix_scan_kb(void) {
|
||||
}
|
||||
|
||||
rgblight_task();
|
||||
|
||||
#else
|
||||
void matrix_scan_kb(void) {
|
||||
#endif
|
||||
matrix_scan_user();
|
||||
/* Nothing else for now. */
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
#define TAPPING_TERM 300
|
||||
|
||||
#endif
|
||||
@@ -18,9 +18,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "jj40.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#ifdef KEYMAP
|
||||
#undef KEYMAP
|
||||
#endif
|
||||
#define KEYMAP KEYMAP_OFFSET
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _NAV 3
|
||||
|
||||
#define NAV_TAP LT(_NAV, KC_SPC)
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
@@ -48,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||
KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), NAV_TAP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
@@ -66,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||
KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
KC_PSCR, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
@@ -84,7 +92,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \
|
||||
KC_TAB, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \
|
||||
CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||
),
|
||||
|
||||
[_NAV] = KEYMAP( \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# build options
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
|
||||
BACKLIGHT_ENABLE = no
|
||||
BACKLIGHT_CUSTOM_DRIVER = no
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGBLIGHT_CUSTOM_DRIVER = no
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
||||
@@ -4,9 +4,6 @@
|
||||
#define _GA 1
|
||||
#define _FL 2
|
||||
#define _AR 3
|
||||
#define _LE 4
|
||||
#define _LO 5
|
||||
#define _UL 6
|
||||
|
||||
#define TRNS KC_TRNS
|
||||
#define ______ KC_NO
|
||||
@@ -14,56 +11,52 @@
|
||||
|
||||
#define LSHIFT OSM(MOD_LSFT)
|
||||
#define SPACE LT(_AR, KC_SPC)
|
||||
#define CAPS LT(_LE, KC_CAPS)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Main Layer
|
||||
[_MA] = KEYMAP_ANSI(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_MPLY, KC_BSPC, KC_PSCR,
|
||||
[_MA] = KEYMAP(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, ______, KC_BSPC, KC_MPLY,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||
CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
LSHIFT, TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, SPACE, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
//Function Layer
|
||||
[_FL] = KEYMAP_ANSI(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, RESET, KC_PGUP,
|
||||
TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_PGDN,
|
||||
TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, TRNS, KC_WH_U,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_WH_L, KC_WH_D, KC_WH_R),
|
||||
[_FL] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, RESET, KC_PSCR,
|
||||
TRNS, ______, ______, ______, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______,
|
||||
TRNS, ______, ______, ______, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, TRNS, KC_PGUP,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, KC_PGDN, ______),
|
||||
|
||||
//Arrow keys layer (space bar)
|
||||
[_AR] = KEYMAP_ANSI(
|
||||
[_AR] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, M(0), TRNS, TRNS, TRNS),
|
||||
//LED control layer (caps)
|
||||
[_LE] = KEYMAP_ANSI(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, BL_TOGG, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, BL_INC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, BL_DEC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
|
||||
|
||||
//Game layer (fn + g)
|
||||
[_GA] = KEYMAP_ANSI(
|
||||
[_GA] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
KC_CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
KC_LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, KC_SPC, KC_SPC, TRNS, TRNS, MO(_FL), TRNS, TRNS, TRNS),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("AdminF123!");
|
||||
}
|
||||
break;
|
||||
void matrix_init_user() {
|
||||
//Set led port to output
|
||||
DDRB |= (1<<2);
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB |= (1<<2);
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -107,7 +107,11 @@ void set_switch_led(int ledId, bool state) {
|
||||
PORTD |= (1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC |= (1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC |= (1<<6);
|
||||
} else {
|
||||
PORTC |= (1<<7);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
PORTD |= (1<<4);
|
||||
@@ -128,7 +132,11 @@ void set_switch_led(int ledId, bool state) {
|
||||
PORTD &= ~(1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC &= ~(1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC &= ~(1<<6);
|
||||
} else {
|
||||
PORTC &= ~(1<<7);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
PORTD &= ~(1<<4);
|
||||
@@ -167,9 +175,12 @@ void set_layer_led(int layerId) {
|
||||
void matrix_init_user(void) {
|
||||
led_init_ports();
|
||||
|
||||
PORTB |= (1 << 7);
|
||||
DDRB &= ~(1<<7);
|
||||
|
||||
PORTD |= (1<<7);
|
||||
PORTC |= (1<<6);
|
||||
PORTC |= (1<<7);
|
||||
PORTD |= (1<<4);
|
||||
PORTE |= (1<<6);
|
||||
PORTB |= (1<<4);
|
||||
@@ -188,7 +199,9 @@ void led_init_ports() {
|
||||
|
||||
// led voor switch #2
|
||||
DDRC |= (1<<6);
|
||||
DDRC |= (1<<7);
|
||||
PORTC &= ~(1<<6);
|
||||
PORTC &= ~(1<<7);
|
||||
|
||||
// led voor switch #3
|
||||
DDRD |= (1<<4);
|
||||
|
||||
@@ -16,7 +16,11 @@ void set_led_state(int ledId, bool state) {
|
||||
PORTD |= (1<<7);
|
||||
break;
|
||||
case 1:
|
||||
PORTC |= (1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC |= (1<<6);
|
||||
} else {
|
||||
PORTC |= (1<<7);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
PORTD |= (1<<4);
|
||||
@@ -47,7 +51,11 @@ void set_led_state(int ledId, bool state) {
|
||||
PORTD &= ~(1<<7);
|
||||
break;
|
||||
case 1:
|
||||
PORTC &= ~(1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC &= ~(1<<6);
|
||||
} else {
|
||||
PORTC &= ~(1<<7);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
PORTD &= ~(1<<4);
|
||||
@@ -75,8 +83,12 @@ void set_led_state(int ledId, bool state) {
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
PORTB |= (1 << 7);
|
||||
DDRB &= ~(1<<7);
|
||||
|
||||
DDRD |= (1<<7);
|
||||
DDRC |= (1<<6);
|
||||
DDRC |= (1<<7);
|
||||
DDRD |= (1<<4);
|
||||
DDRE |= (1<<6);
|
||||
DDRB |= (1<<4);
|
||||
@@ -87,10 +99,16 @@ void led_init_ports() {
|
||||
DDRB |= (1<<0);
|
||||
}
|
||||
|
||||
void led_set_layer(int layer) {
|
||||
|
||||
/*KNOPS_SIMPLELED_STATES*/
|
||||
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
led_init_ports();
|
||||
|
||||
led_set_layer(0);
|
||||
led_set_layer(1);
|
||||
|
||||
/*KNOPS_INIT*/
|
||||
}
|
||||
@@ -112,12 +130,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_layer(int layer) {
|
||||
|
||||
/*KNOPS_SIMPLELED_STATES*/
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
/*KNOPS_PROCESS_STATE*/
|
||||
|
||||
@@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define BACKLIGHT_LEVELS 10
|
||||
#define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255}
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_TIMER
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
BLUETOOTH_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
F_CPU = 8000000
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "meira.h"
|
||||
#include "issi.h"
|
||||
#include "lighting.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
@@ -277,10 +276,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
break;
|
||||
case BL_TOGG:
|
||||
#ifdef ISSI_ENABLE
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
print("Enabling backlight\n");
|
||||
issi_init();
|
||||
backlight_init_ports();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
EXTRAFLAGS+=-flto # -4-7k
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(-47kb)
|
||||
ISSI_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
@@ -49,6 +49,8 @@ void backlight_set(uint8_t level){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_backlight_by_keymap(uint8_t col, uint8_t row){
|
||||
// dprintf("LED: %02X, %d %d %d\n", lookup_value, matrix, led_col, led_row);
|
||||
// activateLED(matrix, led_col, led_row, 255);
|
||||
|
||||
+18
-1
@@ -17,6 +17,7 @@
|
||||
#define MEIRA_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "issi.h"
|
||||
|
||||
void reset_keyboard_kb(void);
|
||||
|
||||
@@ -37,6 +38,22 @@ void reset_keyboard_kb(void);
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
|
||||
}
|
||||
|
||||
#endif
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
|
||||
KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
|
||||
KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
|
||||
KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
BLUETOOTH_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
|
||||
@@ -62,16 +62,15 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
|
||||
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
|
||||
#WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||
BACKLIGHT_CUSTOM_DRIVER = yes
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera
|
||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
// AutoShift config
|
||||
#define AUTO_SHIFT_TIMEOUT 135
|
||||
#define NO_AUTO_SHIFT_SPECIAL
|
||||
// #define NO_AUTO_SHIFT_NUMERIC
|
||||
// #define NO_AUTO_SHIFT_ALPHA
|
||||
|
||||
// TapDance config
|
||||
#define TAPPING_TERM 150
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,207 @@
|
||||
/* Copyright 2015-2018 Jack Humbert, Corey Kump
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_COLEMAK,
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_LEANDOWN,
|
||||
_RAISE,
|
||||
_WOBBLE,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
/* This include relies on the layer constants above and so must be declared after them */
|
||||
#include "tapdance.c"
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define KC_____ KC_TRNS
|
||||
#define KC_XXXX KC_NO
|
||||
#define KC_LOWR LOWER
|
||||
#define KC_RASE RAISE
|
||||
|
||||
/**
|
||||
* Custom Corvec Bindings
|
||||
*
|
||||
* Previously used but currently unused bindings are commented out.
|
||||
**/
|
||||
|
||||
// Activate the Wobble layer
|
||||
#define KC_WOBL MO(_WOBBLE)
|
||||
// Dual function with Raise
|
||||
#define KC_RESC LT(_RAISE, KC_ESC)
|
||||
// Dual functions with Lower
|
||||
#define KC_LENT LT(_LOWER, KC_ENT)
|
||||
#define KC_LQUT LT(_LEANDOWN, KC_QUOT)
|
||||
// Dual functions with Shift
|
||||
#define KC_SDEL MT(MOD_LSFT, KC_DEL)
|
||||
#define KC_SAPP MT(MOD_LSFT, KC_APP)
|
||||
|
||||
/**
|
||||
* Functions taking advantage of tap dance:
|
||||
**/
|
||||
// Tap once: quote. Hold: LEANDOWN layer. Tap twice: minus.
|
||||
#define KC_TQTD TD(TD_QUOT_LEAN_MINS)
|
||||
// Tap once: [. Hold: RALT. Tap twice: {
|
||||
#define KC_TALT TD(TD_LBRC_RALT_LCBR)
|
||||
// Tap once: ]. Hold: RGUI. Tap twice: }
|
||||
#define KC_TGUI TD(TD_RBRC_RGUI_RCBR)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_COLEMAK] = KC_KEYMAP(
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
RESC, A , R , S , T , D , H , N , E , I , O ,TQTD,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,SDEL,TALT,TGUI,RCTL
|
||||
),
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
RESC, A , S , D , F , G , H , J , K , L ,SCLN,TQTD,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,RALT,SAPP,RGUI,RCTL
|
||||
),
|
||||
|
||||
[_LOWER] = KC_KEYMAP(
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
|
||||
____,LPRN,RPRN,LBRC,RBRC,XXXX,LEFT,DOWN, UP ,RGHT,XXXX,MINS,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,PGDN,PGUP,END ,BSLS,____,
|
||||
____,____,____,____,____,____,____,____,____,____,____,____
|
||||
),
|
||||
|
||||
[_LEANDOWN] = KC_KEYMAP(
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
|
||||
____,LPRN,RPRN,LBRC,RBRC,LCBR,LCBR,DLR ,PERC,CIRC,____,____,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,EXLM, AT ,HASH,BSLS,____,
|
||||
____,____,____,____,____,____,____,____,LEFT,DOWN, UP ,RGHT
|
||||
),
|
||||
|
||||
[_RAISE] = KC_KEYMAP(
|
||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,____,
|
||||
____,LPRN,RPRN,LCBR,RCBR,XXXX,XXXX, 4 , 5 , 6 ,PPLS,MINS,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,XXXX, 1 , 2 , 3 ,PAST,____,
|
||||
____,____,____,____,____,____,____,____,____,____,____,____
|
||||
),
|
||||
|
||||
[_WOBBLE] = KC_KEYMAP(
|
||||
GRV , F1 , F2 , F3 , F4 , NO ,MUTE,VOLD,VOLU, NO , NO , DEL,
|
||||
, F5 , F6 , F7 , F8 , NO ,MPRV,MPLY,MSTP,MNXT, NO ,BSLS,
|
||||
, F9 , F10, F11, F12, NO , NO , NO , NO , INS,PSCR, ,
|
||||
, , , , , , , , , , ,
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Colemk| | Debug|RGB Tg|RGB Md|RGB H+|RGB H-|RGB S+|RGB S-|RGB V+|RGB V-|Qwerty|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk| |AS On | AS + |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf|AS Rep|AS Off| AS - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Reset|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_ADJUST] = {
|
||||
{COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY },
|
||||
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
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
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# Corvec's Planck Layout
|
||||
|
||||
This layout is a development-focused layout with an emphasis on ergonomics. It is intended to be used in Colemak mode,
|
||||
but has a full-QWERTY mode for gaming compatibility.
|
||||
|
||||
It utilizes redundancy for common keys so that they are more easily accessible in every task. For example, the common
|
||||
layers, Raise and Lower, both can be activated with two different keys, each pressed with either hand. Certain symbols
|
||||
( \~|+_ ) are on both layers, since the keys they take up are a bit out of the way. The minus symbol is available on the
|
||||
quote key in a variety of ways - both layers, as well as via tap dance.
|
||||
|
||||
The right-hand Lower activation key activates a slightly different layer. The keys accessed by the opposite hand are the
|
||||
same as the Lower layer, but the keys on the right hand differ. For this reason, we refer to this instead as the
|
||||
Leandown layer.
|
||||
|
||||
Auto-shift is enabled, but there are also three shift keys, since typing with auto-shift is by necessity slow.
|
||||
|
||||
Movement is done Vim-style, on the hjkl / hnei keys, on the Lower layer so that it is easiest to activate it.
|
||||
The arrow keys are mimicked by Home/PgDn/PgUp/End on the next row.
|
||||
|
||||
The arrow keys and broad navigation keys are replaced by a symbol-pad on the Leandown layer. However, in order to allow
|
||||
single-hand navigation, the bottom right corner cluster becomes arrow keys.
|
||||
|
||||
Media keys are in the same location as the arrow keys, but are on the Wobble layer instead.
|
||||
|
||||
Toggle layers are minimized so that the state of the keyboard is more predictable. Shift Toggle is in the works, but
|
||||
will not be included until it can be set to deactivate automatically.
|
||||
|
||||
Delete is accessible from the third Shift key.
|
||||
@@ -0,0 +1,5 @@
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
API_SYSEX_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
* Tap Dance config and functions
|
||||
**/
|
||||
/* Copyright 2018 Corey Kump
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_SINGLE_TAP = 4,
|
||||
UNKNOWN_TAPS = 5
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
if (state->interrupted || !state->pressed) {
|
||||
return SINGLE_TAP;
|
||||
} else {
|
||||
return SINGLE_HOLD;
|
||||
}
|
||||
}
|
||||
if (state->count == 2) {
|
||||
if (state->interrupted) {
|
||||
return DOUBLE_SINGLE_TAP;
|
||||
} else if (!state->pressed) {
|
||||
return DOUBLE_TAP;
|
||||
}
|
||||
}
|
||||
return UNKNOWN_TAPS;
|
||||
}
|
||||
|
||||
/**
|
||||
* quote
|
||||
**/
|
||||
|
||||
static tap quote_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void quote_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
quote_state.state = cur_dance(state);
|
||||
switch(quote_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_QUOT); break;
|
||||
case SINGLE_HOLD: layer_on(_LEANDOWN); break;
|
||||
case DOUBLE_TAP: register_code(KC_MINS); break;
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_QUOT); unregister_code(KC_QUOT); register_code(KC_QUOT); break;
|
||||
}
|
||||
}
|
||||
void quote_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(quote_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_QUOT); break;
|
||||
case SINGLE_HOLD: layer_off(_LEANDOWN); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_MINS); break;
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_QUOT); break;
|
||||
}
|
||||
quote_state.state = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ralt / left bracket / left curly brace
|
||||
**/
|
||||
|
||||
static tap ralt_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void ralt_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ralt_state.state = cur_dance(state);
|
||||
switch(ralt_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_LBRC); break;
|
||||
case SINGLE_HOLD: register_code(KC_RALT); break;
|
||||
case DOUBLE_TAP: register_code(KC_LSFT); register_code(KC_LBRC); break;
|
||||
// fallback to alt because it's the primary purpose of this key
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_RALT); break;
|
||||
}
|
||||
}
|
||||
void ralt_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(ralt_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_LBRC); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_RALT); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_LBRC); unregister_code(KC_LSFT); break;
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_RALT); break;
|
||||
}
|
||||
ralt_state.state = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* rgui / right bracket / right curly brace
|
||||
**/
|
||||
|
||||
static tap rgui_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void rgui_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
rgui_state.state = cur_dance(state);
|
||||
switch(rgui_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_RBRC); break;
|
||||
case SINGLE_HOLD: register_code(KC_RGUI); break;
|
||||
case DOUBLE_TAP: register_code(KC_LSFT); register_code(KC_RBRC); break;
|
||||
// fallback to alt because it's the primary purpose of this key
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_RGUI); break;
|
||||
}
|
||||
}
|
||||
void rgui_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(rgui_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_RBRC); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_RGUI); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_RBRC); unregister_code(KC_LSFT); break;
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_RGUI); break;
|
||||
}
|
||||
rgui_state.state = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the available tap dance keys
|
||||
**/
|
||||
|
||||
enum {
|
||||
TD_ALT_SHIFT = 0,
|
||||
TD_LQUT_MINS,
|
||||
TD_QUOT_LEAN_MINS,
|
||||
TD_LBRC_RALT_LCBR,
|
||||
TD_RBRC_RGUI_RCBR
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Alt, twice for Shift
|
||||
[TD_ALT_SHIFT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_RSFT),
|
||||
[TD_QUOT_LEAN_MINS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, quote_finished, quote_reset),
|
||||
[TD_LBRC_RALT_LCBR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ralt_finished, ralt_reset),
|
||||
[TD_RBRC_RGUI_RCBR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rgui_finished, rgui_reset)
|
||||
};
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
// this is the style you want to emulate.
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// 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 _QWERTY 0
|
||||
|
||||
#define _LOWER 2
|
||||
#define _RAISE 3
|
||||
|
||||
#define _FUNCTION 15
|
||||
#define _ADJUST 16
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Defines for task manager and such
|
||||
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Func | A | S | D | F | G | H | J | K | L | ; | Enter|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | ` | GUI | Alt |Lower | 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},
|
||||
{MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
|
||||
{OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT},
|
||||
{KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_ESC, 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_PLUS, KC_LCBR, KC_RCBR, _______},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE},
|
||||
{_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||
{_______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
|
||||
{KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS},
|
||||
{_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Taskmg| | | | | | | | | | |caltde|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | RESET|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}
|
||||
},
|
||||
|
||||
/* Function
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | Up | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | Left | Down |Right | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Caps | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNCTION] = {
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______},
|
||||
{KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
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 tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
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 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;
|
||||
}
|
||||
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
|
||||
@@ -0,0 +1,2 @@
|
||||
# That-Canadian personal planck layout
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PREONIC_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,253 @@
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "preonic.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_NUMPAD,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
NUMPAD,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_5, 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_BSPC, 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},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 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_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},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||
{KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Numpad
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUMPAD] = {
|
||||
{KC_ESC, _______, _______, KC_PGDN, KC_PGUP, KC_END, KC_HOME, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL},
|
||||
{KC_TAB, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC},
|
||||
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_QUOT},
|
||||
{KC_LSFT, _______, _______, _______, _______, _______, KC_COMM, KC_P1, KC_P2, KC_P3, _______, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_P0, KC_PDOT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | | Up | | | | | -_ | - | + | = | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | | | | | ¢ | € | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{KC_ESC, _______, KC_UP, _______, _______, _______, _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_BSPC},
|
||||
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{KC_LSFT, KC_PIPE, _______, _______, _______, _______, _______, _______, ALGR_T(KC_4), ALGR_T(KC_5), _______, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | | Up | | | | | - | _ | = | + | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| \ | | | | | | | | £ | $ | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{KC_ESC, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, KC_BSPC},
|
||||
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{KC_LSFT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, ALGR_T(KC_DLR), KC_DLR, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,LALT(KC_PSCR), LCTL(KC_PSCR), KC_PSCR},
|
||||
{KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, NUMPAD, KC_INS},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
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 COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUMPAD:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_NUMPAD);
|
||||
}
|
||||
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
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -0,0 +1,108 @@
|
||||
# Preonic layout by [Blake Newman](https://github.com/blake-newman)
|
||||
|
||||
## Layouts
|
||||
|
||||
### Qwerty
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Colemak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Dvorak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | O | E | U | I | D | H | T | N | S | / |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Numpad
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Lower
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | | Up | | | | | -_ | - | + | = | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | | | | | ¢ | € | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Raise
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | | Up | | | | | - | _ | = | + | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| \ | | | | | | | | £ | $ | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
@@ -10,11 +10,14 @@ Note that this is a complete replacement for the firmware, so you won't be
|
||||
using Bootmapper Client to change any keyboard settings, since not all the
|
||||
USB report options are supported.
|
||||
|
||||
This is an example based on the b.mini keyboard for making other keyboards
|
||||
compatible with QMK; fully supported boards have their own directory.
|
||||
|
||||
## Supported Boards
|
||||
|
||||
Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been
|
||||
tested so far (since it's the only one I own). But other boards that use
|
||||
the ps2avrGB firmware should work as well.
|
||||
- [b.fake](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake)
|
||||
- [b.mini](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bmini)
|
||||
- [pearl](https://github.com/qmk/qmk_firmware/tree/master/keyboards/pearl)
|
||||
|
||||
## Installing
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BMINI_H
|
||||
#define BMINI_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
|
||||
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
|
||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
|
||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
|
||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
|
||||
K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
|
||||
){ \
|
||||
{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \
|
||||
{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
|
||||
{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
|
||||
{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
|
||||
{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
|
||||
{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
|
||||
{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
|
||||
{ K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
|
||||
}
|
||||
|
||||
#define KC_KEYMAP( \
|
||||
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
|
||||
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
|
||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
|
||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
|
||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
|
||||
K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \
|
||||
{ KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \
|
||||
{ KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \
|
||||
{ KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \
|
||||
{ KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \
|
||||
{ KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \
|
||||
{ KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \
|
||||
{ KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -18,15 +18,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0x20A0
|
||||
#define PRODUCT_ID 0x422D
|
||||
// TODO: share these strings with usbconfig.h
|
||||
// Edit usbconfig.h to change these.
|
||||
#define MANUFACTURER winkeyless.kr
|
||||
#define PRODUCT ps2avrGB
|
||||
|
||||
/* matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define NO_UART 1
|
||||
#define BOOTLOADHID_BOOTLOADER 1
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "bmini.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_HOME,KC_END,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, 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_LBRC,KC_RBRC,KC_BSLS, KC_INS,
|
||||
MO(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_PGUP,
|
||||
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_UP, KC_PGDN,
|
||||
KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT
|
||||
),
|
||||
[1] = KEYMAP(
|
||||
KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_DEL,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT
|
||||
),
|
||||
};
|
||||
@@ -22,13 +22,11 @@
|
||||
|
||||
// Layer shorthand
|
||||
#define _CM 0 // Colemak
|
||||
#define _QW 1 // Qwerty
|
||||
#define _DV 2 // Dvorak
|
||||
#define _NB 3 // Numbers
|
||||
#define _FN 4 // Function
|
||||
#define _SYL 5 // Symbols left
|
||||
#define _SYR 6 // Symbols right
|
||||
#define _NAV 7 // Navigation
|
||||
#define _NB 1 // Numbers
|
||||
#define _FN 2 // Function
|
||||
#define _SYL 3 // Symbols left
|
||||
#define _SYR 4 // Symbols right
|
||||
#define _NAV 5 // Navigation
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@@ -42,15 +40,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------|
|
||||
* | | sft or Z | nb or X | sym or C | V | nav or B | | | | nav or K | M | sym or , | nb or . | sft or / | |
|
||||
* |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------|
|
||||
* | LSHIFT | LCTRL | LALT | LGUI | | SPACE | LCTRL | DEL | LALT | BACKSP | | RGUI | RALT | RCTRL | RSHIFT |
|
||||
* | LSHIFT | LCTRL | LALT | LGUI | CTRL ' | SPACE | LCTRL | DEL | LALT | BACKSP | RGUI | RGUI | RALT | RCTRL | RSHIFT |
|
||||
* '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
*/
|
||||
[_CM] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______ },
|
||||
{ _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT },
|
||||
{ _______, SFT_T(KC_Z), LT(_NB, KC_X), LT(_SYL, KC_C), KC_V, LT(_NAV, KC_B), _______, _______, _______, LT(_NAV, KC_K), KC_M, LT(_SYR, KC_COMM), LT(_FN, KC_DOT), SFT_T(KC_SLSH), _______ },
|
||||
{ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT },
|
||||
{ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT },
|
||||
},
|
||||
|
||||
/* Numbers _NB / Functions _FN
|
||||
@@ -93,14 +91,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* '-------------------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
*/
|
||||
[_SYL] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, UK_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ },
|
||||
{ _______, KC_DLR, KC_PERC, KC_PLUS, KC_EQL, _______, _______, _______, _______, UK_QUOT, KC_LPRN, KC_RPRN, KC_QUOT, UK_AT, _______ },
|
||||
{ _______, KC_CIRC, KC_AMPR, LT(_SYL, KC_C), UK_PIPE, _______, _______, _______, _______, KC_LABK, KC_LBRC, KC_RBRC, KC_RABK, KC_GRV, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
},
|
||||
},
|
||||
[_SYR] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, KC_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ },
|
||||
|
||||
Reference in New Issue
Block a user