Merge tag '0.5.43' into coderkun_neo2
@ -0,0 +1,5 @@
|
||||
#include "M10A.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
#ifndef M10A_H
|
||||
#define M10A_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define M10A( \
|
||||
k00, k01, k02, \
|
||||
k10, k11, k12, \
|
||||
k20, k21, k22, \
|
||||
k30, k31, k32 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, k11, k12 }, \
|
||||
{ k20, k21, k22 }, \
|
||||
{ k30, k31, k32 } \
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,82 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0007
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Machine Industries
|
||||
#define PRODUCT M10-A
|
||||
#define DESCRIPTION RAMA x Machine Industries M10-A
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 3
|
||||
|
||||
/* Planck PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { B6, F7, F6, D6 }
|
||||
#define MATRIX_COL_PINS { F5, F1, F0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,49 @@
|
||||
// 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 "M10A.h"
|
||||
#include "action_layer.h"
|
||||
#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.
|
||||
|
||||
enum layers {
|
||||
_LAYER0,
|
||||
_LAYER1,
|
||||
_LAYER2,
|
||||
_LAYER3,
|
||||
_LAYER4,
|
||||
_LAYER5,
|
||||
_LAYER6,
|
||||
_LAYER7,
|
||||
_LAYER8,
|
||||
_LAYER9
|
||||
};
|
||||
|
||||
// // Fillers to make layering more clear
|
||||
// #define _______ KC_TRNS
|
||||
// #define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER2] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER3] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER4] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER5] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER6] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER7] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER8] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
|
||||
[_LAYER9] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_level(0);
|
||||
#endif
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
UNICODE_ENABLE ?= yes # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
@ -0,0 +1,61 @@
|
||||
// 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 "amj60.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// 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 _DEF 0
|
||||
#define _SPC 1
|
||||
|
||||
// dual-role shortcuts
|
||||
#define SPACEDUAL LT(_SPC, KC_SPACE)
|
||||
|
||||
|
||||
// increase readability
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _DEF: Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | ~ |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| bspc|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Caps | A| S| D| F| G| H| J| K| L| ;| '| Return |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Sft | Fn0| Z| X| C| V| B| N| M| ,| .| /| Sft |Fn2|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_DEF] = KEYMAP_MAX(
|
||||
KC_ESC, 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_BSLS, KC_GRV, \
|
||||
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_BSPC, \
|
||||
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, \
|
||||
KC_LSFT, F(0), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, F(1), \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, SPACEDUAL, KC_RGUI, KC_RALT, KC_RCTL, F(2)),
|
||||
|
||||
/* Keymap 1: F-and-vim Layer, modified with Space (by holding space)
|
||||
* ,-----------------------------------------------------------.
|
||||
* |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
|
||||
* |-----------------------------------------------------------|
|
||||
* | |Paus| Up| [ | ] | | | | ( | ) | | | | Del |
|
||||
* |-----------------------------------------------------------|
|
||||
* | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | | < | > | |M0 | | | | | Vol+ | |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | |Alt |Prev|Vol-|Next|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_SPC] = KEYMAP_MAX(
|
||||
KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \
|
||||
_______, _______, _______, _______, _______, _______, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
|
||||
};
|
@ -0,0 +1,102 @@
|
||||
#include "amjpad.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#include "rgblight.h"
|
||||
#endif
|
||||
|
||||
// Used for SHIFT_ESC
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
// 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 _BL 0
|
||||
#define _FL 1
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,-------------------.
|
||||
* |Esc |Setp| - | = |
|
||||
* |----|----|----|----|
|
||||
* | F1 | F2 | F3 | F4 |
|
||||
* |----|----|----|----|
|
||||
* | 7 | 8 | 9 | - |
|
||||
* |----|----|----|----|
|
||||
* | 4 | 5 | 6 | LF |
|
||||
* |----|----|----|----|
|
||||
* | 1 | 2 | 3 | \ |
|
||||
* |----|----|----|----|
|
||||
* |Left|Down| Up |Rght|
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
[_BL] = MAXKEYMAP(
|
||||
|
||||
KC_ESC, KC_TAB, KC_MINS,KC_EQL, \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, \
|
||||
KC_P7, KC_P8, KC_P9, KC_PMNS, \
|
||||
KC_P4, KC_P5, KC_P6, KC_PENT, \
|
||||
KC_P1, KC_P2, KC_P3, KC_BSLS, \
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,-------------------.
|
||||
* |Esc |TAB |BS | = |
|
||||
* |----|----|----|----|
|
||||
* | NL | / | * | - |
|
||||
* |----|----|----|----|
|
||||
* | 7 | 8 | 9 | |
|
||||
* |----|----|----|RST |
|
||||
* | 4 | 5 | 6 | |
|
||||
* |----|----|----|----|
|
||||
* | 1 | 2 | 3 | |
|
||||
* |----|----|----| En |
|
||||
* | 0 |./FN| |
|
||||
* `-------------------'
|
||||
*/
|
||||
[_FL] = MAXKEYMAP(
|
||||
|
||||
KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
|
||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_P7, KC_P8, KC_P9, RESET, \
|
||||
KC_P4, KC_P5, KC_P6, KC_PENT, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
#include "amjpad.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#include "rgblight.h"
|
||||
#endif
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,-------------------.
|
||||
* | T | G | B |Spac|
|
||||
* |----|----|----|----|
|
||||
* | R | F | V | Fn |
|
||||
* |----|----|----|----|
|
||||
* | E | D | C | OS |
|
||||
* |----|----|----|----|
|
||||
* | W | S | X | Alt|
|
||||
* |----|----|----|----|
|
||||
* | Q | A | Z | Ctl|
|
||||
* |----|----|----|----|
|
||||
* | Esc| Tab|Shft| Fn2|
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
[_BL] = MAXKEYMAP(
|
||||
|
||||
KC_T, KC_G, KC_B, KC_SPACE,\
|
||||
KC_R, KC_F, KC_V, MO(1), \
|
||||
KC_E, KC_D, KC_C, KC_LGUI, \
|
||||
KC_W, KC_S, KC_X, KC_LALT, \
|
||||
KC_Q, KC_A, KC_Z, KC_LCTL, \
|
||||
KC_TAB, KC_ESC, KC_LSHIFT, MO(1)),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,-------------------.
|
||||
* | 5 | F5 | F11|Spac|
|
||||
* |----|----|----|----|
|
||||
* | 4 | F4 | F10| |
|
||||
* |----|----|----|----|
|
||||
* | 3 | F3 | F9 | OS |
|
||||
* |----|----|----|----|
|
||||
* | 2 | F2 | F8 | Alt|
|
||||
* |----|----|----|----|
|
||||
* | 1 | F1 | F7 | Ctl|
|
||||
* |----|----|----|----|
|
||||
* | ` | Del|Shft| |
|
||||
* `-------------------'
|
||||
*/
|
||||
[_FL] = MAXKEYMAP(
|
||||
|
||||
KC_5, KC_F5, KC_F11, _______, \
|
||||
KC_4, KC_F4, KC_F10, _______, \
|
||||
KC_3, KC_F3, KC_F9, _______, \
|
||||
KC_2, KC_F2, KC_F8, _______, \
|
||||
KC_1, KC_F1, KC_F7, _______, \
|
||||
KC_GRV,KC_DEL, _______, _______),
|
||||
};
|
@ -0,0 +1,65 @@
|
||||
#include "amjpad.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#include "rgblight.h"
|
||||
#endif
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,-------------------.
|
||||
* |Spac| N | H | Y |
|
||||
* |----|----|----|----|
|
||||
* | Fn | M | J | U |
|
||||
* |----|----|----|----|
|
||||
* |Left| , | K | I |
|
||||
* |----|----|----|----|
|
||||
* |Down| . | L | O |
|
||||
* |----|----|----|----|
|
||||
* | Up | / | ; | P |
|
||||
* |----|----|----|----|
|
||||
* |Rght| Ret| " |Bspc|
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
[_BL] = MAXKEYMAP(
|
||||
|
||||
KC_SPACE, KC_N, KC_H, KC_Y, \
|
||||
MO(1), KC_M, KC_J, KC_U, \
|
||||
KC_LEFT, KC_COMM, KC_K, KC_I, \
|
||||
KC_DOWN, KC_DOT, KC_L, KC_O, \
|
||||
KC_UP, KC_SLASH, KC_SCLN, KC_P, \
|
||||
KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,-------------------.
|
||||
* |Esc | F12| F6 | 6 |
|
||||
* |----|----|----|----|
|
||||
* | NL | M | - | 7 |
|
||||
* |----|----|----|----|
|
||||
* |Left| , | = | 8 |
|
||||
* |----|----|----|----|
|
||||
* |Down| . | [ | 9 |
|
||||
* |----|----|----|----|
|
||||
* | Up | / | ] | 0 |
|
||||
* |----|----|----|----|
|
||||
* |Rght| Ret| \ | Del|
|
||||
* `-------------------'
|
||||
*/
|
||||
[_FL] = MAXKEYMAP(
|
||||
|
||||
_______, KC_F12, KC_F6, KC_6, \
|
||||
_______, _______, KC_MINS, KC_7, \
|
||||
_______, _______, KC_EQL, KC_8, \
|
||||
_______, _______, KC_LBRC, KC_9, \
|
||||
_______, _______, KC_RBRC, KC_0, \
|
||||
_______, _______, KC_BSLS, KC_DEL),
|
||||
};
|
@ -0,0 +1,72 @@
|
||||
#include "atomic.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTY - MIT ENHANCED / GRID COMPATIBLE
|
||||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
|
||||
* | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
|
||||
* |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT |
|
||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[0] = { /* QWERTY */
|
||||
{ KC_ESC, 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_BSPC },
|
||||
{ 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 },
|
||||
{ KC_LCTL, 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_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_RSFT, KC_UP, KC_PGDN },
|
||||
{ M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT },
|
||||
},
|
||||
|
||||
|
||||
/* FUNCTION
|
||||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
|
||||
* | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
|
||||
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
|
||||
* | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- |
|
||||
* |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------|
|
||||
* | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R |
|
||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[1] = { /* FUNCTION LAYER*/
|
||||
{ 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, ___T___, ___T___ },
|
||||
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR },
|
||||
{ KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U },
|
||||
{ KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D },
|
||||
{ _______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R },
|
||||
},
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_MOMENTARY(1),
|
||||
[2] = ACTION_LAYER_MOMENTARY(1),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,107 @@
|
||||
# Xyverz's Atreus Keymap
|
||||
|
||||
## About this keymap:
|
||||
|
||||
This is the second iteration of my Atreus keymap. The first one was as close to the planck as I could get at the
|
||||
time, but still very much like the original Atreus keymap. I've managed to get things working better now and have
|
||||
implemented (more like copied) the RAISE/LOWER/ADJUST layers. This is a work in progress, but I think I'm closer
|
||||
to a final go with this.
|
||||
|
||||
I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held
|
||||
and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held,
|
||||
and Enter/ALT on the right thumb key for all layers.
|
||||
|
||||
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
|
||||
|
||||
Recently added: Documentation, Formatting, and another Dvorak layer that has Command on the left thumb, instead of
|
||||
Control.
|
||||
|
||||
## Still to do:
|
||||
|
||||
* Enjoy this revision; figure out new things later.
|
||||
|
||||
### Layer 0: Dvorak layer
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| ' | , | . | P | Y | | F | G | C | R | L |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| A | O | E | U | I | | D | H | T | N | S |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
|Shft ;| Q | J | K | X | CTRL ||Alt / | B | M | W | V |Shft Z|
|
||||
|------+------+------+------+------| ||Enter |------+------+------+------+------|
|
||||
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ |
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
||||
### Layer 1: QWERTY layer
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| Q | W | E | R | T | | Y | U | I | O | P |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| A | S | D | F | G | | H | J | K | L | ; |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
|Shft Z| X | C | V | B | CTRL ||Alt / | N | M | , | . |Shft /|
|
||||
|------+------+------+------+------| ||Enter |------+------+------+------+------|
|
||||
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ |
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
||||
### Keymap 2: Colemak layer
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| Q | W | F | P | G | | J | L | U | Y | L |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| A | R | S | T | D | | H | N | E | I | S |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
|Shft Z| X | C | V | B | CTRL ||Alt / | K | M | , | . |Shft /|
|
||||
|------+------+------+------+------| ||Enter |------+------+------+------+------|
|
||||
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ |
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
||||
### Keymap 3: Dvorak for Mac layout
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| ' | , | . | P | Y | | F | G | C | R | L |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| A | O | E | U | I | | D | H | T | N | S |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
|SFT/ ;| Q | J | K | X | CMD ||Alt / | B | M | W | V |SFT/ Z|
|
||||
|------+------+------+------+------| ||Enter |------+------+------+------+------|
|
||||
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ |
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
||||
### Keymap 4: LOWER layer
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| ! | @ | # | $ | % | | ^ | & | * | ( | ) |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| CAPS | | UP | | Home | | PgDn | | + | { | } |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|
||||
|------+------+------+------+------| || |------+------+------+------+------|
|
||||
| ~ | | | | Del |------'`------| Ins | | | | |
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
||||
|
||||
### Keymap 5: RAISE layer
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| CAPS | | UP | | Home | | PgDn | | = | [ | ] |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|
||||
|------+------+------+------+------| || |------+------+------+------+------|
|
||||
| ` | | | | Del |------'`------| Ins | | | | |
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
||||
### Keymap 6: ADJUST layer
|
||||
|
||||
,----------------------------------. ,----------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|
||||
|------+------+------+------+------| |------+------+------+------+------|
|
||||
| F11 | | | | | | | PScr | SLck | Paus | F12 |
|
||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||
| |QWERTY|COLEMK|DVORAK|DVORMC| || | | | | | |
|
||||
|------+------+------+------+------| || |------+------+------+------+------|
|
||||
| | | | | |------'`------| | | | | RESET|
|
||||
`----------------------------------' `----------------------------------'
|
||||
|
@ -0,0 +1,175 @@
|
||||
/* This is the Atreus62 keyboard layout by Xyverz aka u/Zrevyx on r/mk
|
||||
I've blatantly stolen what works for me from the Planck and Preonic
|
||||
layouts and modified this file to fit me. Initial credet goes to
|
||||
u/profet23 for the doing all the work and adding this keyboard to
|
||||
QMK in the first place.
|
||||
|
||||
I've got Dvorak, Qwerty, and Colemak layouts at this time, with the
|
||||
possibility of adding more in the future.
|
||||
|
||||
The bottom row is fairly Kinesis-ish since the Contour and Advantage
|
||||
keyboards have been my daily drivers for the last 17 years. I hope
|
||||
You can get some enjoyment out of this layout should you chose it!
|
||||
|
||||
CHANGELOG:
|
||||
|
||||
0.1 - Initial commit. Based off of Profet's default keymap.
|
||||
0.2 - Converted to a more Planck/Preonic keymap style file with
|
||||
persistent layers enabled. Renamed layers to reflect OLKB maps.
|
||||
Added a TODO list.
|
||||
|
||||
TODO:
|
||||
|
||||
* Make the layout more efficient, even if it means changing the RAISE
|
||||
and LOWER functionality.
|
||||
* Add legends in comments for each layer. Maybe.
|
||||
* Add a gaming layer.
|
||||
|
||||
*/
|
||||
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
#include "atreus62.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _DVORAK 0
|
||||
#define _QWERTY 1
|
||||
#define _COLEMAK 2
|
||||
#define _WOW 3
|
||||
#define _LOWER 4
|
||||
#define _RAISE 5
|
||||
#define _ADJUST 16
|
||||
|
||||
enum atreus52_keycodes {
|
||||
DVORAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
COLEMAK,
|
||||
WOW,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_DVORAK] = { /* dvorak */
|
||||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
|
||||
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
|
||||
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS },
|
||||
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
|
||||
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL }
|
||||
},
|
||||
|
||||
[_QWERTY] = { /* qwerty */
|
||||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
|
||||
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL },
|
||||
{ KC_CAPS, 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_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
|
||||
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL }
|
||||
},
|
||||
|
||||
[_COLEMAK] = { /* colemak */
|
||||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
|
||||
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL },
|
||||
{ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT },
|
||||
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
|
||||
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL}
|
||||
},
|
||||
|
||||
[_WOW] = { /* Dvorak with minor modifications for playing World of Warcraft */
|
||||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
|
||||
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
|
||||
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS },
|
||||
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
|
||||
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
|
||||
},
|
||||
|
||||
[_LOWER] = {
|
||||
{ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
|
||||
{ KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______ },
|
||||
{ _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ }
|
||||
},
|
||||
[_RAISE] = {
|
||||
{ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
|
||||
{ KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______ },
|
||||
{ _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ }
|
||||
},
|
||||
[_ADJUST] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
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) {
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case WOW:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_WOW);
|
||||
}
|
||||
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;
|
||||
};
|
@ -0,0 +1,4 @@
|
||||
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
|
@ -0,0 +1,103 @@
|
||||
#include "clueboard.h"
|
||||
|
||||
// Helpful defines
|
||||
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||
#define _______ KC_TRNS
|
||||
|
||||
// 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 _BL 0
|
||||
#define _FL 1
|
||||
#define _ME 2
|
||||
#define _CL 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
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_GRV, KC_BSPC, KC_PGUP, \
|
||||
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_PGDN, \
|
||||
F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = 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_DEL, KC_HOME, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \
|
||||
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
|
||||
_______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_ME] = KEYMAP(
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \
|
||||
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \
|
||||
_______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT),
|
||||
|
||||
|
||||
/* Keymap _CL: Control layer
|
||||
*/
|
||||
[_CL] = KEYMAP(
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
|
||||
_______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
|
||||
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \
|
||||
_______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||
};
|
||||
|
||||
/* This is a list of user defined functions. F(N) corresponds to item N
|
||||
of this list.
|
||||
*/
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(0), // Calls action_function()
|
||||
[1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t mods_pressed;
|
||||
static bool mod_flag;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
/* Handle the combined Grave/Esc key
|
||||
*/
|
||||
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
|
||||
|
||||
if (record->event.pressed) {
|
||||
/* The key is being pressed.
|
||||
*/
|
||||
if (mods_pressed) {
|
||||
mod_flag = true;
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
/* The key is being released.
|
||||
*/
|
||||
if (mod_flag) {
|
||||
mod_flag = false;
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(record->event.pressed) {
|
||||
del_key(KC_ESC);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,23 @@
|
||||
```
|
||||
___ _____ _ _ _ __ __ _ __
|
||||
|__ \ / ____| | | | | | / / / /(_) / /
|
||||
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|
||||
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|
||||
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
|
||||
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
|
||||
```
|
||||
|
||||
# Serubin's Clueboard Layout
|
||||
|
||||
This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim.
|
||||
|
||||
#### Base Layer
|
||||
![Base Layout Image](layout-base.png)
|
||||
|
||||
#### Fn Layer
|
||||
![Fn Layout Image](layout-fn.png)
|
||||
|
||||
#### Media Layer
|
||||
![Media Layer Image](layout-media.png)
|
||||
|
||||
|
@ -0,0 +1,49 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the makefile.mk in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,111 @@
|
||||
// Xyverz' keymap.
|
||||
// It's based on the default keymap, but Dvorak!
|
||||
|
||||
#include "clueboard.h"
|
||||
|
||||
// Used for SHIFT_ESC
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
// 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 _BL 0
|
||||
#define _FL 1
|
||||
#define _RS 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,--------------------------------------------------------------------------. ,----.
|
||||
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP|
|
||||
* |--------------------------------------------------------------------------| |----|
|
||||
* | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN|
|
||||
* |--------------------------------------------------------------------------| `----'
|
||||
* |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent|
|
||||
* |-----------------------------------------------------------------------------.
|
||||
* |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP|
|
||||
* |------------------------------------------------------------------------|----|----.
|
||||
* | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
|
||||
* `----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \
|
||||
LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \
|
||||
KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,--------------------------------------------------------------------------. ,----.
|
||||
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
|
||||
* |--------------------------------------------------------------------------| |----|
|
||||
* | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
|
||||
* |--------------------------------------------------------------------------| `----'
|
||||
* | | | _RS| | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | |PGUP|
|
||||
* |------------------------------------------------------------------------|----|----.
|
||||
* | | | | | | | | | | _FL|HOME|PGDN| END|
|
||||
* `----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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, KC_TRNS, KC_DEL, BL_STEP, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, MO(_RS), 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_PGUP, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/* Keymap _RS: Reset layer
|
||||
* ,--------------------------------------------------------------------------. ,----.
|
||||
* | | | | | | | | | | | | | | | RGB| |VAL+|
|
||||
* |--------------------------------------------------------------------------| |----|
|
||||
* | | | | |RESET| | | | | | | | | | |VAL-|
|
||||
* |--------------------------------------------------------------------------| `----'
|
||||
* | | | _RS| | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | |SAT+|
|
||||
* |------------------------------------------------------------------------|----|----.
|
||||
* | | | | | | | | | | _FL|HUE-|SAT-|HUE+|
|
||||
* `----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RS] = KEYMAP(
|
||||
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, RGB_TOG, RGB_VAI, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \
|
||||
KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
||||
endif
|
||||
|
@ -0,0 +1,107 @@
|
||||
/* Copyright 2017 Fred Sundvik
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#if defined(VISUALIZER_ENABLE)
|
||||
|
||||
#include "animations.h"
|
||||
#include "visualizer.h"
|
||||
#ifdef LCD_ENABLE
|
||||
#include "lcd_keyframes.h"
|
||||
#endif
|
||||
#ifdef LCD_BACKLIGHT_ENABLE
|
||||
#include "lcd_backlight_keyframes.h"
|
||||
#endif
|
||||
|
||||
#ifdef LED_ENABLE
|
||||
#include "led_keyframes.h"
|
||||
#endif
|
||||
|
||||
#include "visualizer_keyframes.h"
|
||||
|
||||
|
||||
#if defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE)
|
||||
|
||||
// Don't worry, if the startup animation is long, you can use the keyboard like normal
|
||||
// during that time
|
||||
keyframe_animation_t default_startup_animation = {
|
||||
.num_frames = 4,
|
||||
.loop = false,
|
||||
.frame_lengths = {0, 0, 0, gfxMillisecondsToTicks(5000), 0},
|
||||
.frame_functions = {
|
||||
lcd_keyframe_enable,
|
||||
backlight_keyframe_enable,
|
||||
lcd_keyframe_draw_logo,
|
||||
backlight_keyframe_animate_color,
|
||||
},
|
||||
};
|
||||
|
||||
keyframe_animation_t default_suspend_animation = {
|
||||
.num_frames = 4,
|
||||
.loop = false,
|
||||
.frame_lengths = {0, gfxMillisecondsToTicks(1000), 0, 0},
|
||||
.frame_functions = {
|
||||
lcd_keyframe_display_layer_text,
|
||||
backlight_keyframe_animate_color,
|
||||
lcd_keyframe_disable,
|
||||
backlight_keyframe_disable,
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(LED_ENABLE)
|
||||
#define CROSSFADE_TIME 1000
|
||||
#define GRADIENT_TIME 3000
|
||||
|
||||
keyframe_animation_t led_test_animation = {
|
||||
.num_frames = 14,
|
||||
.loop = true,
|
||||
.frame_lengths = {
|
||||
gfxMillisecondsToTicks(1000), // fade in
|
||||
gfxMillisecondsToTicks(1000), // no op (leds on)
|
||||
gfxMillisecondsToTicks(1000), // fade out
|
||||
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
|
||||
gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in)
|
||||
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
|
||||
gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
|
||||
0, // mirror leds
|
||||
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
|
||||
gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out)
|
||||
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
|
||||
gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
|
||||
0, // normal leds
|
||||
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
|
||||
|
||||
},
|
||||
.frame_functions = {
|
||||
led_keyframe_fade_in_all,
|
||||
keyframe_no_operation,
|
||||
led_keyframe_fade_out_all,
|
||||
led_keyframe_crossfade,
|
||||
led_keyframe_left_to_right_gradient,
|
||||
led_keyframe_crossfade,
|
||||
led_keyframe_top_to_bottom_gradient,
|
||||
led_keyframe_mirror_orientation,
|
||||
led_keyframe_crossfade,
|
||||
led_keyframe_left_to_right_gradient,
|
||||
led_keyframe_crossfade,
|
||||
led_keyframe_top_to_bottom_gradient,
|
||||
led_keyframe_normal_orientation,
|
||||
led_keyframe_crossfade,
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
@ -0,0 +1,30 @@
|
||||
/* Copyright 2017 Fred Sundvik
|
||||
*
|
||||
* 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 KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
|
||||
#define KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
|
||||
|
||||
#include "visualizer.h"
|
||||
|
||||
// You can use these default animations, but of course you can also write your own custom ones instead
|
||||
extern keyframe_animation_t default_startup_animation;
|
||||
extern keyframe_animation_t default_suspend_animation;
|
||||
|
||||
// An animation for testing and demonstrating the led support, should probably not be used for real world
|
||||
// cases
|
||||
extern keyframe_animation_t led_test_animation;
|
||||
|
||||
#endif /* KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_ */
|
@ -0,0 +1,123 @@
|
||||
/* Copyright 2017 Fred Sundvik
|
||||
*
|
||||
* 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 KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_
|
||||
#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_
|
||||
|
||||
// Currently we are assuming that both the backlight and LCD are enabled
|
||||
// But it's entirely possible to write a custom visualizer that use only
|
||||
// one of them
|
||||
#ifndef LCD_BACKLIGHT_ENABLE
|
||||
#error This visualizer needs that LCD backlight is enabled
|
||||
#endif
|
||||
|
||||
#ifndef LCD_ENABLE
|
||||
#error This visualizer needs that LCD is enabled
|
||||
#endif
|
||||
|
||||
#include "visualizer.h"
|
||||
#include "visualizer_keyframes.h"
|
||||
#include "lcd_keyframes.h"
|
||||
#include "lcd_backlight_keyframes.h"
|
||||
#include "system/serial_link.h"
|
||||
#include "led.h"
|
||||
#include "animations.h"
|
||||
|
||||
static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF);
|
||||
static const uint32_t initial_color = LCD_COLOR(0, 0, 0);
|
||||
|
||||
static bool initial_update = true;
|
||||
|
||||
// Feel free to modify the animations below, or even add new ones if needed
|
||||
|
||||
static keyframe_animation_t lcd_layer_display = {
|
||||
.num_frames = 1,
|
||||
.loop = false,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {lcd_keyframe_display_layer_and_led_states}
|
||||
};
|
||||
|
||||
// The color animation animates the LCD color when you change layers
|
||||
static keyframe_animation_t color_animation = {
|
||||
.num_frames = 2,
|
||||
.loop = false,
|
||||
// Note that there's a 200 ms no-operation frame,
|
||||
// this prevents the color from changing when activating the layer
|
||||
// momentarily
|
||||
.frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)},
|
||||
.frame_functions = {keyframe_no_operation, backlight_keyframe_animate_color},
|
||||
};
|
||||
|
||||
void initialize_user_visualizer(visualizer_state_t* state) {
|
||||
// The brightness will be dynamically adjustable in the future
|
||||
// But for now, change it here.
|
||||
lcd_backlight_brightness(130);
|
||||
state->current_lcd_color = initial_color;
|
||||
state->target_lcd_color = logo_background_color;
|
||||
initial_update = true;
|
||||
start_keyframe_animation(&default_startup_animation);
|
||||
}
|
||||
|
||||
|
||||
// This function should be implemented by the keymap visualizer
|
||||
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
|
||||
// that the simple_visualizer assumes that you are updating
|
||||
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
|
||||
// stopped. This can be done by either double buffering it or by using constant strings
|
||||
static void get_visualizer_layer_and_color(visualizer_state_t* state);
|
||||
|
||||
void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
// Add more tests, change the colors and layer texts here
|
||||
// Usually you want to check the high bits (higher layers first)
|
||||
// because that's the order layers are processed for keypresses
|
||||
// You can for check for example:
|
||||
// state->status.layer
|
||||
// state->status.default_layer
|
||||
// state->status.leds (see led.h for available statuses)
|
||||
|
||||
uint32_t prev_color = state->target_lcd_color;
|
||||
const char* prev_layer_text = state->layer_text;
|
||||
|
||||
get_visualizer_layer_and_color(state);
|
||||
|
||||
if (initial_update || prev_color != state->target_lcd_color) {
|
||||
start_keyframe_animation(&color_animation);
|
||||
}
|
||||
|
||||
if (initial_update || prev_layer_text != state->layer_text) {
|
||||
start_keyframe_animation(&lcd_layer_display);
|
||||
}
|
||||
// You can also stop existing animations, and start your custom ones here
|
||||
// remember that you should normally have only one animation for the LCD
|
||||
// and one for the background. But you can also combine them if you want.
|
||||
}
|
||||
|
||||
void user_visualizer_suspend(visualizer_state_t* state) {
|
||||
state->layer_text = "Suspending...";
|
||||
uint8_t hue = LCD_HUE(state->current_lcd_color);
|
||||
uint8_t sat = LCD_SAT(state->current_lcd_color);
|
||||
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
|
||||
start_keyframe_animation(&default_suspend_animation);
|
||||
}
|
||||
|
||||
void user_visualizer_resume(visualizer_state_t* state) {
|
||||
state->current_lcd_color = initial_color;
|
||||
state->target_lcd_color = logo_background_color;
|
||||
initial_update = true;
|
||||
start_keyframe_animation(&default_startup_animation);
|
||||
}
|
||||
|
||||
#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */
|
@ -0,0 +1,329 @@
|
||||
/*
|
||||
Copyright 2016 Fred Sundvik <fsundvik@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/>.
|
||||
*/
|
||||
|
||||
// Currently we are assuming that both the backlight and LCD are enabled
|
||||
// But it's entirely possible to write a custom visualizer that use only
|
||||
// one of them
|
||||
#ifndef LCD_BACKLIGHT_ENABLE
|
||||
#error This visualizer needs that LCD backlight is enabled
|
||||
#endif
|
||||
|
||||
#ifndef LCD_ENABLE
|
||||
#error This visualizer needs that LCD is enabled
|
||||
#endif
|
||||
|
||||
#include "visualizer.h"
|
||||
#include "visualizer_keyframes.h"
|
||||
#include "lcd_keyframes.h"
|
||||
#include "lcd_backlight_keyframes.h"
|
||||
#include "system/serial_link.h"
|
||||
#include "animations.h"
|
||||
|
||||
static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF);
|
||||
static const uint32_t initial_color = LCD_COLOR(0, 0, 0);
|
||||
|
||||
static const uint32_t led_emulation_colors[4] = {
|
||||
LCD_COLOR(0, 0, 0),
|
||||
LCD_COLOR(255, 255, 255),
|
||||
LCD_COLOR(84, 255, 255),
|
||||
LCD_COLOR(168, 255, 255),
|
||||
};
|
||||
|
||||
static uint32_t next_led_target_color = 0;
|
||||
|
||||
typedef enum {
|
||||
LCD_STATE_INITIAL,
|
||||
LCD_STATE_LAYER_BITMAP,
|
||||
LCD_STATE_BITMAP_AND_LEDS,
|
||||
} lcd_state_t;
|
||||
|
||||
static lcd_state_t lcd_state = LCD_STATE_INITIAL;
|
||||
|
||||
typedef struct {
|
||||
uint8_t led_on;
|
||||
uint8_t led1;
|
||||
uint8_t led2;
|
||||
uint8_t led3;
|
||||
} visualizer_user_data_t;
|
||||
|
||||
// Don't access from visualization function, use the visualizer state instead
|
||||
static visualizer_user_data_t user_data_keyboard = {
|
||||
.led_on = 0,
|
||||
.led1 = LED_BRIGHTNESS_HI,
|
||||
.led2 = LED_BRIGHTNESS_HI,
|
||||
.led3 = LED_BRIGHTNESS_HI,
|
||||
};
|
||||
|
||||
_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE,
|
||||
"Please increase the VISUALIZER_USER_DATA_SIZE");
|
||||
|
||||
// Feel free to modify the animations below, or even add new ones if needed
|
||||
|
||||
|
||||
// The color animation animates the LCD color when you change layers
|
||||
static keyframe_animation_t one_led_color = {
|
||||
.num_frames = 1,
|
||||
.loop = false,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {backlight_keyframe_set_color},
|
||||
};
|
||||
|
||||
bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) {
|
||||
uint32_t temp = next_led_target_color;
|
||||
next_led_target_color = state->target_lcd_color;
|
||||
state->target_lcd_color = temp;
|
||||
return false;
|
||||
}
|
||||
|
||||
// The color animation animates the LCD color when you change layers
|
||||
static keyframe_animation_t two_led_colors = {
|
||||
.num_frames = 2,
|
||||
.loop = true,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {backlight_keyframe_set_color, swap_led_target_color},
|
||||
};
|
||||
|
||||
// The LCD animation alternates between the layer name display and a
|
||||
// bitmap that displays all active layers
|
||||
static keyframe_animation_t lcd_bitmap_animation = {
|
||||
.num_frames = 1,
|
||||
.loop = false,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {lcd_keyframe_display_layer_bitmap},
|
||||
};
|
||||
|
||||
static keyframe_animation_t lcd_bitmap_leds_animation = {
|
||||
.num_frames = 2,
|
||||
.loop = true,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)},
|
||||
.frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states},
|
||||
};
|
||||
|
||||
void initialize_user_visualizer(visualizer_state_t* state) {
|
||||
// The brightness will be dynamically adjustable in the future
|
||||
// But for now, change it here.
|
||||
lcd_backlight_brightness(130);
|
||||
state->current_lcd_color = initial_color;
|
||||
state->target_lcd_color = logo_background_color;
|
||||
lcd_state = LCD_STATE_INITIAL;
|
||||
start_keyframe_animation(&default_startup_animation);
|
||||
}
|
||||
|
||||
inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) {
|
||||
return user_data->led_on & (1u << num);
|
||||
}
|
||||
|
||||
static uint8_t get_led_index_master(visualizer_user_data_t* user_data) {
|
||||
for (int i=0; i < 3; i++) {
|
||||
if (is_led_on(user_data, i)) {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) {
|
||||
uint8_t master_index = get_led_index_master(user_data);
|
||||
if (master_index!=0) {
|
||||
for (int i=master_index; i < 3; i++) {
|
||||
if (is_led_on(user_data, i)) {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) {
|
||||
if (is_led_on(user_data, 0) &&
|
||||
is_led_on(user_data, 1) &&
|
||||
is_led_on(user_data, 2)) {
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
return user_data->led1;
|
||||
case 2:
|
||||
return user_data->led2;
|
||||
case 3:
|
||||
return user_data->led3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data;
|
||||
visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data;
|
||||
|
||||
uint8_t new_index;
|
||||
uint8_t old_index;
|
||||
|
||||
if (is_serial_link_master()) {
|
||||
new_index = get_led_index_master(user_data_new);
|
||||
old_index = get_led_index_master(user_data_old);
|
||||
}
|
||||
else {
|
||||
new_index = get_led_index_slave(user_data_new);
|
||||
old_index = get_led_index_slave(user_data_old);
|
||||
}
|
||||
uint8_t new_secondary_index = get_secondary_led_index(user_data_new);
|
||||
uint8_t old_secondary_index = get_secondary_led_index(user_data_old);
|
||||
|
||||
uint8_t old_brightness = get_brightness(user_data_old, old_index);
|
||||
uint8_t new_brightness = get_brightness(user_data_new, new_index);
|
||||
|
||||
uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index);
|
||||
uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index);
|
||||
|
||||
if (lcd_state == LCD_STATE_INITIAL ||
|
||||
new_index != old_index ||
|
||||
new_secondary_index != old_secondary_index ||
|
||||
new_brightness != old_brightness ||
|
||||
new_secondary_brightness != old_secondary_brightness) {
|
||||
|
||||
if (new_secondary_index != 0) {
|
||||
state->target_lcd_color = change_lcd_color_intensity(
|
||||
led_emulation_colors[new_index], new_brightness);
|
||||
next_led_target_color = change_lcd_color_intensity(
|
||||
led_emulation_colors[new_secondary_index], new_secondary_brightness);
|
||||
|
||||
stop_keyframe_animation(&one_led_color);
|
||||
start_keyframe_animation(&two_led_colors);
|
||||
} else {
|
||||
state->target_lcd_color = change_lcd_color_intensity(
|
||||
led_emulation_colors[new_index], new_brightness);
|
||||
stop_keyframe_animation(&two_led_colors);
|
||||
start_keyframe_animation(&one_led_color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
if (state->status.leds) {
|
||||
if (lcd_state != LCD_STATE_BITMAP_AND_LEDS ||
|
||||
state->status.leds != prev_status->leds ||
|
||||
state->status.layer != prev_status->layer ||
|
||||
state->status.default_layer != prev_status->default_layer) {
|
||||
|
||||
// NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case
|
||||
stop_keyframe_animation(&lcd_bitmap_animation);
|
||||
|
||||
lcd_state = LCD_STATE_BITMAP_AND_LEDS;
|
||||
// For information:
|
||||
// The logic in this function makes sure that this doesn't happen, but if you call start on an
|
||||
// animation that is already playing it will be restarted.
|
||||
start_keyframe_animation(&lcd_bitmap_leds_animation);
|
||||
}
|
||||
} else {
|
||||
if (lcd_state != LCD_STATE_LAYER_BITMAP ||
|
||||
state->status.layer != prev_status->layer ||
|
||||
state->status.default_layer != prev_status->default_layer) {
|
||||
|
||||
stop_keyframe_animation(&lcd_bitmap_leds_animation);
|
||||
|
||||
lcd_state = LCD_STATE_LAYER_BITMAP;
|
||||
start_keyframe_animation(&lcd_bitmap_animation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
// Check the status here to start and stop animations
|
||||
// You might have to save some state, like the current animation here so that you can start the right
|
||||
// This function is called every time the status changes
|
||||
|
||||
// NOTE that this is called from the visualizer thread, so don't access anything else outside the status
|
||||
// This is also important because the slave won't have access to the active layer for example outside the
|
||||
// status.
|
||||
|
||||
update_emulated_leds(state, prev_status);
|
||||
update_lcd_text(state, prev_status);
|
||||
|
||||
}
|
||||
|
||||
void user_visualizer_suspend(visualizer_state_t* state) {
|
||||
state->layer_text = "Suspending...";
|
||||
uint8_t hue = LCD_HUE(state->current_lcd_color);
|
||||
uint8_t sat = LCD_SAT(state->current_lcd_color);
|
||||
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
|
||||
start_keyframe_animation(&default_suspend_animation);
|
||||
}
|
||||
|
||||
void user_visualizer_resume(visualizer_state_t* state) {
|
||||
state->current_lcd_color = initial_color;
|
||||
state->target_lcd_color = logo_background_color;
|
||||
lcd_state = LCD_STATE_INITIAL;
|
||||
start_keyframe_animation(&default_startup_animation);
|
||||
}
|
||||
|
||||
void ergodox_board_led_on(void){
|
||||
// No board led support
|
||||
}
|
||||
|
||||
void ergodox_right_led_1_on(void){
|
||||
user_data_keyboard.led_on |= (1u << 0);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_2_on(void){
|
||||
user_data_keyboard.led_on |= (1u << 1);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_3_on(void){
|
||||
user_data_keyboard.led_on |= (1u << 2);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_board_led_off(void){
|
||||
// No board led support
|
||||
}
|
||||
|
||||
void ergodox_right_led_1_off(void){
|
||||
user_data_keyboard.led_on &= ~(1u << 0);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_2_off(void){
|
||||
user_data_keyboard.led_on &= ~(1u << 1);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_3_off(void){
|
||||
user_data_keyboard.led_on &= ~(1u << 2);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_1_set(uint8_t n) {
|
||||
user_data_keyboard.led1 = n;
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_2_set(uint8_t n) {
|
||||
user_data_keyboard.led2 = n;
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_3_set(uint8_t n) {
|
||||
user_data_keyboard.led3 = n;
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2017 Fred Sundvik
|
||||
|
||||
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 "simple_visualizer.h"
|
||||
|
||||
// This function should be implemented by the keymap visualizer
|
||||
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
|
||||
// that the simple_visualizer assumes that you are updating
|
||||
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
|
||||
// stopped. This can be done by either double buffering it or by using constant strings
|
||||
static void get_visualizer_layer_and_color(visualizer_state_t* state) {
|
||||
uint8_t saturation = 60;
|
||||
if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
|
||||
saturation = 255;
|
||||
}
|
||||
if (state->status.layer & 0x4) {
|
||||
state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
|
||||
state->layer_text = "Media & Mouse";
|
||||
}
|
||||
else if (state->status.layer & 0x2) {
|
||||
state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
|
||||
state->layer_text = "Symbol";
|
||||
}
|
||||
else {
|
||||
state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
|
||||
state->layer_text = "Default";
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
# ErgoDox Familiar Layout
|
||||
Familiar layout for those who regularly switch back and forth from ErgoDox to regular QWERTY.
|
||||
|
||||
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](../../../../license_GPLv3.md../../../../license_GPLv3.md) [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Background](#background)
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [Layers](#layers)
|
||||
- [Contribute](#contribute)
|
||||
- [Issues](#issues)
|
||||
- [License](#license)
|
||||
|
||||
## Background
|
||||
|
||||
This layout is built to be as familiar as possible for users coming directly from a default (QWERTY US) keyboard, while gaining as much advantage as possible from the ErgoDox and QMK featureset. I use an ErgoDoxEZ at home, but I don't have a regular office (CS grad student) so I regularly use either my laptop or a default-setup lab computer; I context switch daily so this layout is meant to reduce the mental overhead as much as possible.
|
||||
|
||||
The default ErgoDoxEZ layout is probably more optimized as a solo daily driver - as are a lot of the others available keymaps. The focus of this layout is to get as much from the 'Dox as possible without overly disrupting long-established muscle memory.
|
||||
|
||||
Key features of the familiar layout:
|
||||
1. QWERTY default layout.
|
||||
1. International symbols layer, mapped in the US-International layout default positions, through [UCIS](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable).
|
||||
1. Numpad layer on right hand.
|
||||
1. Thumb cluster holds spacebar, ALT, and access to secondary layers.
|
||||
1. Function-layer arrow keys in both the first-person-shooter (actually ESDF instead of WASD) and vim (HJKL) locations.
|
||||
|
||||
## Install
|
||||
|
||||
If you are on Windows or Mac, choose the proper line in [`keymap.c`](keymap.c) for [unicode/international character support](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable) (starts at line 235).
|
||||
```c
|
||||
void matrix_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX); // Linux
|
||||
//set_unicode_input_mode(UC_OSX); // Mac OSX
|
||||
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
|
||||
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
|
||||
};
|
||||
```
|
||||
|
||||
For instructions on building and installing this keymap, [go to the wiki](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox#build-dependencies). Below is the command for me; it may be different for you.
|
||||
```sh
|
||||
$ make ergodox-ez-familiar-teensy
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
[![Familiar Layout](familiar.png)](http://www.keyboard-layout-editor.com/#/gists/13508a9f99cff381d58b7be6f7dcc644)
|
||||
|
||||
### Layers
|
||||
1. Base Layer: QWERTY, with arrow keys at bottom right.
|
||||
1. UCIS Layer: US-International symbols layer, plus —. Accessed by toggling the `INTL` layer using the UCIS key (bottom of left thumb cluster).
|
||||
1. UCIS-Shifted Layer: Making shift work for UCIS characters. An ugly workaround. Any ideas? Accessed through holding shift while the UCIS layer is active (toggles the `INSF` layer).
|
||||
1. Numpad Layer: Right hand number pad. Accessed by toggling the `NUMP` layer using the NPAD key (bottom of right thumb cluster).
|
||||
1. Function Layer: F1-F12, arrows on ESDF and HJKL, media player controls. Accessed by holding either FN key (center key of each thumb cluster), which toggles the `ARRW` layer. I know, I need to work on my naming conventions.
|
||||
|
||||
## Contribute
|
||||
|
||||
[Contributor Covenant](http://contributor-covenant.org/)
|
||||
|
||||
I'm terrible at this; I have no background in human-computer interaction, kinesiology, or keyboard-ology. Please send comments/issues/pull requests/angry tweets/etc. If you think there is a better way to take advantage of the ErgoDox/QMK comination without straying far from 84/101-key QWERTY, I want to know it.
|
||||
|
||||
### Issues
|
||||
1. The top two keys of the right thumb cluster are currently unused. I wanted them for screen brightness, but I haven't found a solution I like.
|
||||
1. The `'`, `"`, `[`, and `]` keys are terrible to access; I want to put them somewhere else but I haven't figured out where.
|
||||
1. The `INSF` layer is an ugly workaround. I should write a function for doing different things in the `INTL` layer depending on whether SHIFT is being held. Or something. Ideas?
|
||||
|
||||
## License
|
||||
QMK is licensed ([mostly](https://github.com/qmk/qmk_firmware/issues/1038)) under the [GPLv2](blob/master/license_GPLv2.md). Accordingly, to whatever extent applicable, this keymap is licensed under the [GPLv3](../../../../license_GPLv3.md).
|
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 1.4 MiB |
@ -0,0 +1,187 @@
|
||||
// Netable differences vs. the default firmware for the ErgoDox EZ:
|
||||
// 1. The Cmd key is now on the right side, making Cmd+Space easier.
|
||||
// 2. The media keys work on OSX (But not on Windows).
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LCtl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| LGui |
|
||||
* |--------+------+------+------+------+------| BkSp | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,---------------.
|
||||
* | BkSp | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|LANG1 |------| |------|LANG2 |Enter |
|
||||
* | /LGui| | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_BSPC,
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
KC_BSPC, KC_LGUI,
|
||||
KC_HOME,
|
||||
MT(MOD_LGUI, KC_SPC),KC_LANG1,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI,
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_LANG2, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
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_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,15 @@
|
||||
# ErgoDox EZ Default Configuration
|
||||
|
||||
## Changelog
|
||||
|
||||
* Dec 2016:
|
||||
* Added LED keys
|
||||
* Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
|
||||
* Sep 22, 2016:
|
||||
* Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
|
||||
* Feb 2, 2016 (V1.1):
|
||||
* Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
|
||||
|
||||
This is what we ship with out of the factory. :) The image says it all:
|
||||
|
||||
![Default](default_firmware_v1.2-2.png)
|
@ -0,0 +1,111 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
# CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
# COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= no # Enable RGB Underglow
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,88 @@
|
||||
#include "gh60.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define _DEFAULT 0
|
||||
#define _FN 1
|
||||
|
||||
int esc_led = 0;
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define ______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty gui/alt/space/alt/gui
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* |LGUI | LAlt | Space | RAlt |RGUI |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */
|
||||
KC_ESC, 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_BSLS, KC_GRV, \
|
||||
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_BSPC, \
|
||||
KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \
|
||||
______, KC_LGUI, KC_LALT, KC_SPC, ______, KC_RALT, KC_RGUI, ______ \
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Led | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | Stop | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_FN] = KEYMAP_HHKB( /* Layer 1 */
|
||||
F(0), 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, KC_DEL, \
|
||||
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
|
||||
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
|
||||
______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
|
||||
______, ______, ______, ______, ______, KC_MSTP, ______, ______ \
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
LED_TOGGLE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(LED_TOGGLE)
|
||||
};
|
||||
|
||||
void esc_led_toggle(void) {
|
||||
if (esc_led == 0){
|
||||
esc_led = 1;
|
||||
gh60_esc_led_on();
|
||||
} else {
|
||||
esc_led = 0;
|
||||
gh60_esc_led_off();
|
||||
}
|
||||
}
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
case LED_TOGGLE:
|
||||
if (record->event.pressed) {
|
||||
esc_led_toggle();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
#include "gh60.h"
|
||||
#include "action_layer.h"
|
||||
#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 _QW 0
|
||||
#define _DV 1
|
||||
#define _CM 2
|
||||
#define _FL 3
|
||||
|
||||
// Macro name shortcuts
|
||||
#define QWERTY M(_QW)
|
||||
#define DVORAK M(_DV)
|
||||
#define COLEMAK M(_CM)
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* _QW: Qwerty Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_QW] = { /* Layer 0: Qwerty */
|
||||
{KC_ESC, 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_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},
|
||||
{MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT },
|
||||
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT},
|
||||
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
|
||||
},
|
||||
|
||||
/*
|
||||
* _DV: Dvorak Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| Backsp|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Fn | A| O| E| U| I| D| H| T| N| S| -| Return|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_DV] = { /* Layer 1: Dvorak */
|
||||
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC},
|
||||
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS},
|
||||
{MO(_FL), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT },
|
||||
{KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, XXXXXXX, KC_RSFT},
|
||||
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
|
||||
},
|
||||
|
||||
/*
|
||||
* _CM: Colemak Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Fn | A| R| S| T| D| H| N| E| I| O| '| Return|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_CM] = { /* Layer 2: Colemak */
|
||||
{KC_ESC, 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{MO(_FL), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT },
|
||||
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT},
|
||||
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
|
||||
},
|
||||
|
||||
/*
|
||||
* _FL: Function Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del|
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | | | | |PgU| Up|PgD|PSc|SLk|Pau| |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | |
|
||||
* |-----------------------------------------------------------|
|
||||
* |CAPS | |Mut|VlD|VlU| |End| | | | | |
|
||||
* |-----------------------------------------------------------|
|
||||
* |_QW |_DV |_CM | | | | | |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_FL] = { /* Layer 3: Functions */
|
||||
{_______, 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_DEL },
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______},
|
||||
{_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, XXXXXXX, _______},
|
||||
{KC_CAPS, XXXXXXX, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, XXXXXXX, _______},
|
||||
{QWERTY, DVORAK, COLEMAK, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______}
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case _DV:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_DV);
|
||||
}
|
||||
break;
|
||||
case _QW:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_QW);
|
||||
}
|
||||
break;
|
||||
case _CM:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_CM);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -1 +0,0 @@
|
||||
#include "MS-sculpt-mobile.h"
|
@ -0,0 +1 @@
|
||||
#include "MS_sculpt_mobile.h"
|
@ -0,0 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../../MS_sculpt_mobile/config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
#include "MS-sculpt-mobile.h"
|
||||
#include "../../MS_sculpt_mobile.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
@ -1,7 +1,7 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#include "../../../MS_sculpt_mobile/config.h"
|
||||
|
||||
#define USE_BABLPASTE
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "MS-sculpt-mobile.h"
|
||||
#include "../../../MS_sculpt_mobile/babblePaste.h"
|
||||
#include "../../MS_sculpt_mobile.h"
|
||||
#include "action_layer.h"
|
||||
#include "action_util.h"
|
||||
#include "babblePaste.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
@ -0,0 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -1,4 +1,4 @@
|
||||
#include "s60-x.h"
|
||||
#include "kbod.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
@ -0,0 +1,21 @@
|
||||
#ifndef KBOD_H
|
||||
#define KBOD_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
|
||||
k40, k41, k42, k43, k44, k45, k46, k47 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37 }, \
|
||||
{ k40, k41, k42, k43, k44, k45, k46, k47 }, \
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,21 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
@ -0,0 +1,104 @@
|
||||
#include "kbod.h"
|
||||
|
||||
#define _____ KC_TRNS
|
||||
|
||||
#define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn)))
|
||||
|
||||
#define SET_WHETHER(mask, btn1, btn2) \
|
||||
if (record->event.pressed) { \
|
||||
if (mask) { \
|
||||
add_key(btn2); \
|
||||
send_keyboard_report(); \
|
||||
} else { \
|
||||
add_key(btn1); \
|
||||
send_keyboard_report(); \
|
||||
} \
|
||||
} else { \
|
||||
if (mask) { \
|
||||
del_key(btn2); \
|
||||
send_keyboard_report(); \
|
||||
} else { \
|
||||
del_key(btn1); \
|
||||
send_keyboard_report(); \
|
||||
} \
|
||||
} \
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KEYMAP( /* Base */
|
||||
F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT,
|
||||
TT(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
|
||||
),
|
||||
KEYMAP( /* Cursor layer */
|
||||
KC_GRAVE, 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_DEL,
|
||||
TT(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT,
|
||||
TT(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____,
|
||||
_____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP,
|
||||
_____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
KEYMAP( /* Keypad layer */
|
||||
TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC,
|
||||
_____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____,
|
||||
_____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____,
|
||||
_____, _____, _____, _____, _____, _____, _____, KC_P0, KC_PDOT, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2,
|
||||
_____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3
|
||||
),
|
||||
KEYMAP( /* Multimedia layer */
|
||||
TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____,
|
||||
_____, _____, KC_WAKE, _____, _____, _____, _____, _____, _____, _____, KC_MSTP, KC_MPRV, KC_MNXT, _____,
|
||||
_____, _____, KC_SLEP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
|
||||
_____, _____, KC_PWR, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2,
|
||||
_____, _____, _____, KC_MPLY, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(0),
|
||||
[1] = ACTION_FUNCTION(1),
|
||||
};
|
||||
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_mask;
|
||||
static uint8_t alt_mask;
|
||||
switch (id) {
|
||||
case 0:
|
||||
shift_esc_mask = MODS_PRESSED(SHIFT);
|
||||
SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE);
|
||||
break;
|
||||
case 1:
|
||||
alt_mask = MODS_PRESSED(ALT);
|
||||
SET_WHETHER(alt_mask, KC_4, KC_F4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & _BV(USB_LED_CAPS_LOCK)) {
|
||||
PORTB |= _BV(PB0);
|
||||
} else {
|
||||
PORTB &= ~_BV(PB0);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
DDRB |= _BV(PB0);
|
||||
DDRC |= _BV(PC7);
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
if (layer) {
|
||||
PORTC |= _BV(PC7);
|
||||
} else {
|
||||
PORTC &= ~_BV(PC7);
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
# The default keymap for kbod
|
||||
|
||||
This is the default keymap for kbod,
|
||||
|
||||
it consists of a base layer with QWERTY layout, a momentary cursor-layer, and mouse-keys and multimedia layers.
|
@ -0,0 +1,21 @@
|
||||
KBOD keyboard firmware
|
||||
======================
|
||||
|
||||
KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It's utilize 8x8 matrix and has layout similar to GH-60
|
||||
|
||||
## Quantum MK Firmware
|
||||
|
||||
For the full Quantum feature list, see [the parent readme](/).
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and use ```make handwired-kbod-default``` to generate the .hex file. You may flash it with avrdude
|
||||
|
||||
## Flashing
|
||||
Something along this line:
|
||||
|
||||
```
|
||||
avrdude -p m32u4 -c avr109 -P <COM PORT> -C <avrdude conf file> -e -u flash:w:handwired_kbod_default.hex
|
||||
```
|
||||
|
||||
[More info](https://github.com/fudanchii/keyboard_of_disapproval)
|
@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
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 controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
@ -0,0 +1,15 @@
|
||||
#define COLOR_BLANK 0, 0, 0
|
||||
|
||||
#define COLOR_BLACK 0, 0, 0
|
||||
#define COLOR_WHITE 15,15,15
|
||||
#define COLOR_GRAY 7, 7, 7
|
||||
|
||||
#define COLOR_RED 15, 0, 0
|
||||
#define COLOR_GREEN 0,15, 0
|
||||
#define COLOR_BLUE 0, 0,15
|
||||
|
||||
#define COLOR_YELLOW 15,15, 0
|
||||
#define COLOR_MAGENTA 15, 0,15
|
||||
#define COLOR_CYAN 0,15,15
|
||||
|
||||
#define COLOR_ORANGE 15, 5, 0
|