Merge remote-tracking branch 'refs/remotes/qmk/master'
@ -0,0 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,30 @@
|
||||
#include "amjpad.h"
|
||||
#include "led.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// * Set our LED pins as output
|
||||
DDRD |= (1<<6);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||
// Turn numlock on
|
||||
PORTD &= ~(1<<6);
|
||||
} else {
|
||||
// Turn numlock off
|
||||
PORTD |= (1<<6);
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
#ifndef AMJPAD_H
|
||||
#define ADMJPAD_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// readability
|
||||
#define XXX KC_NO
|
||||
|
||||
/* AMJPAD matrix layout
|
||||
* ,-------------------.
|
||||
* | 00 | 01 | 02 | 03 |
|
||||
* |----|----|----|----|
|
||||
* | 10 | 11 | 12 | 13 |
|
||||
* |----|----|----|----|
|
||||
* | 20 | 21 | 22 | |
|
||||
* |----|----|----| 23 |
|
||||
* | 30 | 31 | 32 | |
|
||||
* |----|----|----|----|
|
||||
* | 40 | 41 | 42 | |
|
||||
* |----|----|----| 43 |
|
||||
* | 50 | 52 | |
|
||||
* `-------------------'
|
||||
*/
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, k23, \
|
||||
k30, k31, k32, \
|
||||
k40, k41, k42, k43, \
|
||||
k50, k52 \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03}, \
|
||||
{k10, k11, k12, k13}, \
|
||||
{k20, k21, k22, k23}, \
|
||||
{k30, k31, k32, XXX}, \
|
||||
{k40, k41, k42, k43}, \
|
||||
{k50, XXX, k52, XXX} \
|
||||
}
|
||||
|
||||
void matrix_init_user(void);
|
||||
void matrix_scan_user(void);
|
||||
|
||||
#endif
|
@ -0,0 +1,94 @@
|
||||
/*
|
||||
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 0x6060
|
||||
#define DEVICE_VER 0x0003
|
||||
#define MANUFACTURER AMJ
|
||||
#define PRODUCT PAD
|
||||
#define DESCRIPTION QMK keyboard firmware for AMJ PAD
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
|
||||
#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5, D0 }
|
||||
#define MATRIX_COL_PINS { F1, F0, E6, C7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* 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)) \
|
||||
)
|
||||
|
||||
/* Backlight configuration
|
||||
*/
|
||||
#define BACKLIGHT_LEVELS 4
|
||||
|
||||
/* Underlight configuration
|
||||
*/
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 8 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@ -0,0 +1,101 @@
|
||||
#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 |TAB |BS | = |
|
||||
* |----|----|----|----|
|
||||
* | NL | / | * | - |
|
||||
* |----|----|----|----|
|
||||
* | 7 | 8 | 9 | |
|
||||
* |----|----|----| + |
|
||||
* | 4 | 5 | 6 | |
|
||||
* |----|----|----|----|
|
||||
* | 1 | 2 | 3 | |
|
||||
* |----|----|----| En |
|
||||
* | 0 |./FN| |
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
[_BL] = KEYMAP(
|
||||
KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
|
||||
KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||
KC_P4, KC_P5, KC_P6, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_P0, LT(_FL,KC_PDOT)),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,-------------------.
|
||||
* |Esc |TAB |BS | = |
|
||||
* |----|----|----|----|
|
||||
* | NL | / | * | - |
|
||||
* |----|----|----|----|
|
||||
* | 7 | 8 | 9 | |
|
||||
* |----|----|----|RST |
|
||||
* | 4 | 5 | 6 | |
|
||||
* |----|----|----|----|
|
||||
* | 1 | 2 | 3 | |
|
||||
* |----|----|----| En |
|
||||
* | 0 |./FN| |
|
||||
* `-------------------'
|
||||
*/
|
||||
[_FL] = KEYMAP(
|
||||
|
||||
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_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_P0, LT(_FL,KC_PDOT)),
|
||||
};
|
||||
|
||||
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,66 @@
|
||||
|
||||
# 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 ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # 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
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
Before Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 73 KiB |
@ -0,0 +1,5 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
NKRO_ENABLE = true
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
@ -0,0 +1,58 @@
|
||||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||
|
||||
Mnemes Swedish Bonanza
|
||||
=======================
|
||||
|
||||
My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout
|
||||
|
||||
[algernon]: https://github.com/algernon/ergodox-layout
|
||||
|
||||
It's for Windows (current work forces me to) and Swedish (matter of birth) so ymmw.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Layouts](#layouts)
|
||||
- [Base layer](#base-layer)
|
||||
- [Nav layer](#nav-layer)
|
||||
- [Sym layer](#sym-layer)
|
||||
- [LED states](#led-states)
|
||||
|
||||
# Layouts
|
||||
|
||||
## Base layer
|
||||
|
||||
![Base layer](img/base.png)
|
||||
|
||||
|
||||
* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx
|
||||
* The `Shift`, `Alt`, and `Control` modifiers are one-shot.
|
||||
* `Backspace` and `Enter` doubles as switches to the `sym` layer when held
|
||||
* The `ESC` key also doubles as a one-shot cancel key.
|
||||
* The **Lead** key is followed by a sequence of keys.
|
||||
- `LEAD l` : `lgui+l`.
|
||||
- `LEAD s l` : `λ`.
|
||||
- `LEAD s s` : `¯\_(ツ)_/¯`
|
||||
- `LEAD s f` : `凸(ツ)凸`
|
||||
- `LEAD u l` : Set unicode input mode to linux.
|
||||
- `LEAD s w` : Set unicode input mode to windows.
|
||||
- `LEAD a *` : Application switching based on position in start menu. Very specific to my computer.
|
||||
|
||||
|
||||
## Nav layer
|
||||
|
||||
![Nav layer](img/fun.png)
|
||||
|
||||
Basic navigation on the right hand and modifiers close
|
||||
by for the left. The latter because I tend to use `ctrl+arrows` quite a lot.
|
||||
|
||||
## Sym layer
|
||||
|
||||
![Sym layer](img/sym.png)
|
||||
|
||||
* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could.
|
||||
|
||||
- `eq` : Tapdance, produces `===` and `!==`
|
||||
- `fun`: Tapdance, produces `=>` and `() => {\n`
|
||||
|
||||
# License
|
||||
GPL-3+
|
@ -0,0 +1,7 @@
|
||||
#define ONESHOT_TIMEOUT 3000
|
||||
#define TAPPING_TERM 200
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
#define FORCE_NKRO
|
||||
#define LEADER_TIMEOUT 1000
|
||||
|
||||
#include "../../config.h"
|
After Width: | Height: | Size: 446 KiB |
After Width: | Height: | Size: 415 KiB |
After Width: | Height: | Size: 423 KiB |
@ -0,0 +1,5 @@
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,12 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/* using UK layout for space-cadet-shift */
|
||||
#define LSPO_KEY KC_9
|
||||
#define RSPC_KEY KC_0
|
||||
|
||||
#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis
|
||||
|
||||
#endif
|
@ -0,0 +1,661 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
/* use UK keymap */
|
||||
|
||||
#define UK_HASH KC_NONUS_HASH
|
||||
#define UK_BSLS KC_NONUS_BSLASH
|
||||
#define UK_PIPE LSFT(UK_BSLS)
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define NUMB 2 // numbers and hex
|
||||
#define CRSR 3 // cursor keys
|
||||
#define MOUS 4 // mouse keys
|
||||
#define KEYW 5 // keyword macros
|
||||
#define EMAC 6 // emacs
|
||||
|
||||
// my macros
|
||||
#define UM_ECET M(0) // { }
|
||||
#define UM_0x M(1)
|
||||
#define UM_PUB M(2)
|
||||
#define UM_PRO M(3)
|
||||
#define UM_PRV M(4)
|
||||
#define UM_CLS M(5)
|
||||
#define UM_STR M(6)
|
||||
#define UM_RET M(7)
|
||||
#define UM_INC M(8)
|
||||
#define UM_OBJ M(9)
|
||||
#define UM_GITLOG M(10)
|
||||
#define UM_GOODM M(11)
|
||||
#define UM_NAMESP M(12)
|
||||
#define UM_EMTR M(14) // emacs toggle read-only
|
||||
#define UM_EMWR M(15) // emacs write buffer (save)
|
||||
#define UM_EMUN M(16) // emacs undo
|
||||
#define UM_EMRE M(17) // emacs redo
|
||||
#define UM_EMPB M(18) // emacs previous buffer
|
||||
#define UM_EMNB M(19) // emacs next buffer
|
||||
#define UM_GOODN M(20)
|
||||
#define UM_ECETS M(22) // { };
|
||||
#define UM_TMPL M(23)
|
||||
#define UM_TYPN M(24)
|
||||
#define UM_CONT M(25)
|
||||
#define UM_BREAK M(26)
|
||||
#define UM_CONST M(27)
|
||||
#define UM_SMILY M(28)
|
||||
#define UM_SADF M(29)
|
||||
#define UM_SCARF M(30)
|
||||
#define UM_DECAF M(31)
|
||||
#define UM_OPER M(32)
|
||||
#define UM_NULP M(33)
|
||||
#define UM_EXTR M(34)
|
||||
#define UM_VIRT M(35)
|
||||
#define UM_EMFB M(36) // emacs font bigger
|
||||
#define UM_EMFS M(37) // emacs font smaller
|
||||
#define UM_VOLAT M(38)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Base layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2|
|
||||
* |--------+------+------+------+------+------| L6 | | L6 |------+------+------+------+------+--------|
|
||||
* | LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L2 | lead | | lead | Ins |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | Space| BkSp | Home | | PgUp | Enter|Space |
|
||||
* | / | / |------| |------| / | / |
|
||||
* | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB),
|
||||
LT(NUMB, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, LT(CRSR, KC_V), LT(MOUS, KC_B), MO(EMAC),
|
||||
CTL_T(KC_LBRC), ALT_T(KC_RBRC), UK_HASH, KC_LEFT, KC_RGHT,
|
||||
TG(NUMB), KC_LEAD,
|
||||
KC_HOME,
|
||||
CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END),
|
||||
// right hand
|
||||
LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT),
|
||||
MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||
KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC),
|
||||
KC_LEAD, KC_INS,
|
||||
KC_PGUP,
|
||||
LT(KEYW, KC_PGDN), ALT_T(KC_ENT), CTL_T(KC_SPC)
|
||||
),
|
||||
/* Keymap 1: Symbol Layer with F keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## |
|
||||
* |--------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
|
||||
* | ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | ## | ## | | ## | ## |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | ## | | ## | | |
|
||||
* | ## | ## |------| |------| ## | ## |
|
||||
* | | | ## | | ## | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS,
|
||||
KC_TRNS, LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_MINS), UK_HASH,
|
||||
KC_TRNS, UK_BSLS, UK_PIPE, KC_GRV, KC_MINS, KC_SLSH, 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_MINS, KC_PLUS, KC_EQL, LSFT(KC_QUOT), LSFT(UK_HASH), KC_F12,
|
||||
KC_LCBR, KC_RCBR, KC_SCLN, KC_QUOT, UK_HASH, KC_TRNS,
|
||||
KC_TRNS, KC_LBRC, KC_RBRC, LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_SLSH), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Numerics and hex
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## |
|
||||
* |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
|
||||
* | ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | = | + | 0 | , | . | | 0 | , | . | + | = |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | ## | ## | | ## | ## |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | ## | | ## | | |
|
||||
* | ## | ## |------| |------| ## | ## |
|
||||
* | | | ## | | ## | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[NUMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
|
||||
KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x,
|
||||
KC_TRNS, KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH,
|
||||
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS,
|
||||
KC_EQL, KC_PLUS, KC_0, KC_COMM, KC_DOT,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS,
|
||||
UM_0x, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||
KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
|
||||
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS,
|
||||
KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_EQL,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 3: Cursor movement
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Left | Down | Right| | | | | | Left | Down | Right|
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | ## | ## |------| |------| ## | ## |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[CRSR] = KEYMAP(
|
||||
// left hand
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO,
|
||||
KC_NO, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
|
||||
KC_TRNS, KC_UP, KC_NO, KC_DOWN, KC_TRNS, KC_NO, KC_NO,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_TRNS, KC_TRNS, KC_NO,
|
||||
// right hand
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, KC_NO,
|
||||
KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO,
|
||||
KC_NO, KC_NO, KC_TRNS, KC_DOWN, KC_NO, KC_UP, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 4: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght|
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[MOUS] = KEYMAP(
|
||||
// left hand
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
|
||||
KC_BTN1, KC_MS_U, KC_BTN2, KC_MS_D, KC_NO, KC_TRNS, KC_NO,
|
||||
KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
// right hand
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_TRNS, KC_NO, KC_MS_D, KC_BTN1, KC_MS_U, KC_BTN2,
|
||||
KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
/* Keymap 5: Keywords
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | scarf| sadf | smily| | | | decaf| | | | | |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | str | obj | | gitl |------| |------| | | | nulp | | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | inc | | | | | | | | |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | ecet | ecets|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | ## | | ## | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[KEYW] = KEYMAP(
|
||||
// left hand
|
||||
KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO,
|
||||
KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO,
|
||||
KC_NO, KC_NO, UM_STR, UM_OBJ, KC_NO, UM_GITLOG,
|
||||
KC_NO, KC_NO, UM_EXTR, UM_CLS, UM_VIRT, UM_BREAK, KC_NO,
|
||||
KC_NO, KC_NO, UM_INC, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_TRNS,
|
||||
// right hand
|
||||
KC_NO, UM_DECAF, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, UM_TYPN, UM_CONT, UM_PRV, UM_PRO, UM_PUB, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, UM_NULP, KC_NO, KC_NO,
|
||||
KC_NO, UM_NAMESP, UM_GOODM, UM_GOODN, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
UM_ECET, UM_ECETS,
|
||||
KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO
|
||||
),
|
||||
/* Keymap 6: emacs
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | empb | | emnb | emfs | emfb | | | | |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | emtr | | | | | | | | emun | emre | w-up | | | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | emwr | | | |------| |------| |w-left|w-down|w-rght| | |
|
||||
* |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | |w-down| | | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[EMAC] = KEYMAP(
|
||||
// left hand
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB,
|
||||
KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, UM_EMWR, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
// right hand
|
||||
UM_EMNB, UM_EMFS, UM_EMFB, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, UM_EMUN, UM_EMRE, LSFT(KC_UP), KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, LSFT(KC_DOWN), KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
};
|
||||
|
||||
enum next_key_down_up {
|
||||
NK_DOWN_UP,
|
||||
NK_DOWN,
|
||||
NK_UP // a bit of a hack, this works as long as NK_UP < KC_A
|
||||
};
|
||||
|
||||
void send_keystrokes(uint8_t key, ...)
|
||||
{
|
||||
va_list vl;
|
||||
va_start(vl, key);
|
||||
enum next_key_down_up nkdu = NK_DOWN_UP;
|
||||
while (key != KC_NO) {
|
||||
if (key < KC_A) {
|
||||
nkdu = key;
|
||||
} else {
|
||||
switch (nkdu) {
|
||||
case NK_DOWN_UP:
|
||||
register_code(key);
|
||||
case NK_UP:
|
||||
unregister_code(key);
|
||||
break;
|
||||
case NK_DOWN:
|
||||
register_code(key);
|
||||
}
|
||||
nkdu = NK_DOWN_UP;
|
||||
}
|
||||
key = va_arg(vl, int);
|
||||
}
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
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) {
|
||||
return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||
D(LSFT), T(RBRC), U(LSFT), T(UP),
|
||||
T(TAB), END);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
return MACRO(T(0), T(X), END);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("public");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("protected");
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("private");
|
||||
}
|
||||
break;
|
||||
case 5: // class
|
||||
if (record->event.pressed) {
|
||||
return MACRO(T(C), T(L), T(A), T(S), T(S), T(ENT),
|
||||
D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||
T(P), T(U), T(B), T(L), T(I), T(C),
|
||||
D(LSFT), T(SCLN), U(LSFT), T(ENT), T(ENT),
|
||||
T(P), T(R), T(I), T(V), T(A), T(T), T(E),
|
||||
D(LSFT), T(SCLN), U(LSFT), T(ENT),
|
||||
D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT),
|
||||
T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), T(UP),
|
||||
T(END), T(SPC), END);
|
||||
}
|
||||
break;
|
||||
case 6: // struct
|
||||
if (record->event.pressed) {
|
||||
return MACRO(T(S), T(T), T(R), T(U), T(C), T(T), T(ENT),
|
||||
D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||
D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT),
|
||||
T(UP), T(UP), T(UP), T(UP),
|
||||
T(END), T(SPC), END);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("return");
|
||||
}
|
||||
break;
|
||||
case 8: // #include
|
||||
if (record->event.pressed) {
|
||||
return MACRO(T(NONUS_HASH), T(I), T(N), T(C), T(L), T(U), T(D), T(E), END);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("objdump -CT -x -d");
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git log --oneline --graph --decorate=short");
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("good morning");
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("namespace");
|
||||
}
|
||||
break;
|
||||
case 14: // emacs toggle read-only
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), T(X), T(Q), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case 15: // emacs write buffer
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), T(X), T(S), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case 16: // emacs undo
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), D(LSFT), T(MINS), U(LSFT), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case 17: // emacs redo
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LALT), D(LSFT), T(MINS), U(LSFT), U(LALT), END);
|
||||
}
|
||||
break;
|
||||
case 18: // emacs previous buffer
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), T(X), U(LCTL), T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case 19: // emacs next buffer
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), T(X), U(LCTL), T(RGHT), END);
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("good night");
|
||||
}
|
||||
break;
|
||||
case 22: // { };
|
||||
if (record->event.pressed) {
|
||||
return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT),
|
||||
D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(UP),
|
||||
T(TAB), END);
|
||||
}
|
||||
break;
|
||||
case 23:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("template");
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("typename");
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("continue");
|
||||
return MACRO(T(SCLN), END);
|
||||
}
|
||||
break;
|
||||
case 26:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("break");
|
||||
return MACRO(T(SCLN), END);
|
||||
}
|
||||
break;
|
||||
case 27:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("const");
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(":-)");
|
||||
}
|
||||
break;
|
||||
case 29:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(":-(");
|
||||
}
|
||||
break;
|
||||
case 30: // dazed
|
||||
if (record->event.pressed) {
|
||||
send_keystrokes(NK_DOWN, KC_LSFT, KC_8, KC_MINS, KC_8, NK_UP, KC_LSFT, KC_NO);
|
||||
}
|
||||
break;
|
||||
case 31: // decaf
|
||||
if (record->event.pressed) {
|
||||
send_keystrokes(NK_DOWN, KC_LSFT, KC_C, KC_9, KC_MINS, KC_0, NK_UP, KC_LSFT, KC_NO);
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("operator");
|
||||
}
|
||||
break;
|
||||
case 33:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("nullptr");
|
||||
}
|
||||
break;
|
||||
case 34:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("extern");
|
||||
}
|
||||
break;
|
||||
case 35:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("virtual");
|
||||
}
|
||||
break;
|
||||
case 36: // emacs font smaller
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), T(X), T(EQL), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case 37: // emacs font bigger
|
||||
if (record->event.pressed) {
|
||||
return MACRO(D(LCTL), T(X), T(MINS), U(LCTL), END);
|
||||
}
|
||||
break;
|
||||
case 38:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("volatile");
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
|
||||
SEQ_TWO_KEYS(KC_G, KC_A) {
|
||||
SEND_STRING("git add .");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_D) {
|
||||
SEND_STRING("git diff");
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_G, KC_D, KC_S) {
|
||||
SEND_STRING("git diff --staged");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_L) {
|
||||
SEND_STRING("git log");
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_G, KC_L, KC_O) {
|
||||
SEND_STRING("git log --oneline");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_F) {
|
||||
SEND_STRING("git fetch");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_O) {
|
||||
SEND_STRING("git checkout");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_P) {
|
||||
SEND_STRING("git pull");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_S) {
|
||||
SEND_STRING("git status");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_G, KC_C) {
|
||||
SEND_STRING("git commit -m ''");
|
||||
send_keystrokes(KC_LEFT, KC_NO);
|
||||
}
|
||||
SEQ_THREE_KEYS(KC_G, KC_C, KC_A) {
|
||||
SEND_STRING("git commit --amend");
|
||||
}
|
||||
|
||||
SEQ_TWO_KEYS(KC_C, KC_C) {
|
||||
SEND_STRING("const_cast<>");
|
||||
send_keystrokes(KC_LEFT, KC_NO);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_C, KC_D) {
|
||||
SEND_STRING("dynamic_cast<>");
|
||||
send_keystrokes(KC_LEFT, KC_NO);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_C, KC_R) {
|
||||
SEND_STRING("reinterpret_cast<>");
|
||||
send_keystrokes(KC_LEFT, KC_NO);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_C, KC_S) {
|
||||
SEND_STRING("static_cast<>");
|
||||
send_keystrokes(KC_LEFT, KC_NO);
|
||||
}
|
||||
|
||||
SEQ_ONE_KEY(KC_SLSH) {
|
||||
send_keystrokes(KC_SLSH, NK_DOWN, KC_LSFT, KC_8, KC_8, NK_UP, KC_LSFT, KC_ENT,
|
||||
NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_ENT,
|
||||
NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_SLSH, KC_UP, KC_END, KC_SPC,
|
||||
KC_NO);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
# ErgoDox EZ Configuration for typing like a boss.
|
||||
|
||||
This layout has 7 layers:
|
||||
0. Base layers
|
||||
1. Symbols and F-keys
|
||||
2. Number pad (with hexadecimal)
|
||||
3. Cursor keys
|
||||
4. Mouse movement and clicks
|
||||
5. Keyword macros
|
||||
6. Emacs
|
||||
|
||||
There are also some leader keys defined for frequently used commands (git etc).
|
||||
|
||||
## The layers
|
||||
|
||||
Double hashes (`##`) indicate transparent keys (`KC_TRNS`) and blanks indicate no key (`KC_NO`).
|
||||
|
||||
### 0. Base layer
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp |
|
||||
|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
|
||||
| Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del |
|
||||
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2|
|
||||
|--------|------|------|------|------|------| L6 | | L6 |------|------|------|------|------|--------|
|
||||
| LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) |
|
||||
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
|Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]|
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| L2 | lead | | lead | Ins |
|
||||
,------|------|------| |------|------|------.
|
||||
| Space| BkSp | Home | | PgUp | Enter|Space |
|
||||
| / | / |------| |------| / | / |
|
||||
| Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
Space Cadet shift is enabled. Ctrl and Alt doubles up as normal keys when tapped.
|
||||
SfLt and SfRt sends Shift + left and Shift + Right respectively - for use with emacs with `windmove-default-keybindings`.
|
||||
Caps and Enter may be held down to activate layer 2 (hexadecimal number pad).
|
||||
Please see `matrix_scan_user` function in `keymap.c` for list of commands available via `lead` key.
|
||||
|
||||
### 1. Symbols and F-keys
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
|--------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||
| ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 |
|
||||
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## |
|
||||
|--------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
|
||||
| ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## |
|
||||
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
| ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| ## | ## | | ## | ## |
|
||||
,------|------|------| |------|------|------.
|
||||
| | | ## | | ## | | |
|
||||
| ## | ## |------| |------| ## | ## |
|
||||
| | | ## | | ## | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
### 2. Number pad (with hexadecimal)
|
||||
|
||||
```
|
||||
,---------------------------------------------------. ,--------------------------------------------------.
|
||||
| ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## |
|
||||
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||
| ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## |
|
||||
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## |
|
||||
|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
|
||||
| ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## |
|
||||
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
| = | + | 0 | , | . | | 0 | , | . | + | = |
|
||||
`-----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| ## | ## | | ## | ## |
|
||||
,------|------|------| |------|------|------.
|
||||
| | | ## | | ## | | |
|
||||
| ## | ## |------| |------| ## | ## |
|
||||
| | | ## | | ## | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
### 3. Cursor keys
|
||||
|
||||
```
|
||||
,---------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | | | | | | | | | | | | |
|
||||
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||
| | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | |
|
||||
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | |
|
||||
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## |
|
||||
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
| Left | Down | Right| | | | | | Left | Down | Right|
|
||||
`-----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | | | |
|
||||
,------|------|------| |------|------|------.
|
||||
| | | | | | | |
|
||||
| ## | ## |------| |------| ## | ## |
|
||||
| | | | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
### 4. Mouse movement and clicks
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | | | | | | | | | | | | |
|
||||
|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
|
||||
| | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | |
|
||||
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | |
|
||||
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk |
|
||||
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
|MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght|
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | | | |
|
||||
,------|------|------| |------|------|------.
|
||||
| | | | | | | |
|
||||
| | |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
### 5. Keyword macros
|
||||
|
||||
```
|
||||
,---------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | scarf| sadf | smily| | | | decaf| | | | | |
|
||||
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||
| | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | |
|
||||
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| | | str | obj | | gitl |------| |------| | | | nulp | | |
|
||||
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | |
|
||||
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
| | | inc | | | | | | | | |
|
||||
`-----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | | ecet | ecets|
|
||||
,------|------|------| |------|------|------.
|
||||
| | | | | | | |
|
||||
| | |------| |------| | |
|
||||
| | | ## | | ## | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
Please see `keymap.c` for the keywords/commands.
|
||||
Some are const, volatile, operator, return, template, typename, continue, private,
|
||||
protected, public, struct, class, extern, virtual, break, namespace.
|
||||
Also a git log command I use a lot (`git log --oneline --graph --decorate=short` (I know git can be configured but that is boring)).
|
||||
|
||||
### 6. Emacs
|
||||
|
||||
```
|
||||
,---------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | | | | empb | | emnb | emfs | emfb | | | | |
|
||||
|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
|
||||
| | emtr | | | | | | | | emun | emre | w-up | | | |
|
||||
|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
|
||||
| | | emwr | | | |------| |------| |w-left|w-down|w-rght| | |
|
||||
|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
|
||||
| | | | | | | | | | | |w-down| | | |
|
||||
`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|
||||
| | | | | | | | | | | |
|
||||
`-----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | | | |
|
||||
,------|------|------| |------|------|------.
|
||||
| | | | | | | |
|
||||
| | |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
Some emacs shortcuts like toggle read/write mode (emtr), write file (emwr), previous-buffer (empb),
|
||||
next-buffer (emnb), smaller font(emfs), larger font (emfb), undo (emun), redo (emre) and switching between windows in a frame.
|
@ -0,0 +1,226 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------------. ,--------------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | Cmd,Shft,[ | | Cmd,Shft,] | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------------| |------------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |BkSp/Cmd| A | S | D | F | G |------------| |------------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Ctrl/Esc|PgUp| | App | LGui |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | PgDn | | Home | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | Esc | | Alt | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// 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, M(2),
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
GUI_T(KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
CTL_T(KC_ESC),KC_PGUP,
|
||||
KC_PGDN,
|
||||
KC_SPC,KC_BSPC, KC_ESC,
|
||||
// right hand
|
||||
M(3), 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),GUI_T(KC_QUOT),
|
||||
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,
|
||||
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_LALT,KC_TAB, 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, M(1), 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
|
||||
),
|
||||
// KC_COMM, KC_MINS
|
||||
|
||||
/* 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) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 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,6 @@
|
||||
SUBPROJECT_DEFAULT = ez
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,216 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_U_LBRC = 0,
|
||||
TD_I_RBRC,
|
||||
};
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_U_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_U, KC_LBRC),
|
||||
[TD_I_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_RBRC)
|
||||
};
|
||||
|
||||
//Macro Declarations
|
||||
static uint16_t sunds_timer;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | _ | x | x | _ | Esc | Hypr | Home | | End | Hypr | [ | ] | `~ | `~ | Bks |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* |Ctrl/Tab| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P | Ctrl |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Cmd/"' | A | S | D | F | G |------| |------| H | J | K | L | ;: |Cmd/Entr|
|
||||
* |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------|
|
||||
* | Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | Shft |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Alt | x | x | x | Left | |Right | Bks | x | x | Alt |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Teensy| VolUp| | Play | Del |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | VolDn| | Next | | |
|
||||
* |Sp/~L1| L2 |------| |------| L2 |'"/~L1|
|
||||
* | | | Mute | | Prev | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME,
|
||||
CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP,
|
||||
M(1), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN,
|
||||
KC_LALT, KC_1, KC_1, KC_1, KC_LEFT,
|
||||
RESET, KC_VOLU,
|
||||
KC_VOLD,
|
||||
LT(SYMB, KC_SPC), TG(MDIA), KC_MUTE,
|
||||
// right hand
|
||||
KC_END, ALL_T(KC_NO), KC_LBRC, KC_RBRC, KC_GRV, KC_GRV, KC_BSPC,
|
||||
KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCTRL,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT),
|
||||
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_RGHT, KC_BSPC, KC_1, KC_1, KC_RALT,
|
||||
KC_MPLY, KC_DEL,
|
||||
KC_MNXT,
|
||||
KC_MPRV, TG(MDIA), LT(SYMB, KC_QUOT)
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | ^ | [ | ( | { | | | | = | 7 | 8 | 9 | 0 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | & | $ | ] | ) | } |------| |------| + | 4 | 5 | 6 | * | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | \ | @ | # | % | | | | | | - | 1 | 2 | 3 | / | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | 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_CIRC, KC_LBRC, KC_LPRN, KC_LCBR, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_DLR, KC_RBRC, KC_RPRN, KC_RCBR,
|
||||
KC_TRNS, KC_BSLS, KC_AT, KC_HASH, KC_PERC, KC_PIPE, 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_TRNS,
|
||||
KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||
KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, KC_TRNS,
|
||||
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
|
||||
KC_0, KC_0, KC_DOT, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | WhDn | WhUp | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | R-Ck | L-Ck | |------| |------| MsLt | MsDn | MsUp | MsRt | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
M(0), 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_BTN2, KC_BTN1, 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,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WH_U, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, 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_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) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
sunds_timer = timer_read();
|
||||
register_code (KC_LGUI);
|
||||
} else {
|
||||
if (timer_elapsed (sunds_timer) < TAPPING_TERM) {
|
||||
unregister_code (KC_LGUI);
|
||||
register_code (KC_LSFT);
|
||||
register_code (KC_QUOT);
|
||||
unregister_code (KC_QUOT);
|
||||
unregister_code (KC_LSFT);
|
||||
register_code (KC_LGUI);
|
||||
}
|
||||
unregister_code (KC_LGUI);
|
||||
}
|
||||
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_3_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
|
||||
ergodox_right_led_1_on ();
|
||||
}
|
||||
};
|
@ -0,0 +1 @@
|
||||
UNICODE_ENABLE = yes
|
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 58 KiB |
@ -0,0 +1,517 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
#define NAVG 3 // navigation
|
||||
|
||||
enum macros {
|
||||
RUN
|
||||
};
|
||||
|
||||
enum function_ids {
|
||||
EMOJI,
|
||||
EMOJI2,
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
GO_GROUP
|
||||
};
|
||||
|
||||
/* opt can only be 0-15 */
|
||||
enum emojis {
|
||||
SHRUG,
|
||||
YAY,
|
||||
HUG,
|
||||
SMILE,
|
||||
SMILE2,
|
||||
HMM1,
|
||||
HMM2,
|
||||
BEAR1,
|
||||
BEAR2,
|
||||
FUU,
|
||||
EGGY1,
|
||||
EGGY2,
|
||||
FACE1,
|
||||
FACE2,
|
||||
UHU,
|
||||
SMRK1
|
||||
};
|
||||
|
||||
enum emojis2 {
|
||||
SMRK2,
|
||||
LOVE
|
||||
};
|
||||
|
||||
enum progmem_ids {
|
||||
EMOJI_SHRUG,
|
||||
EMOJI_YAY,
|
||||
EMOJI_HUG,
|
||||
EMOJI_SMILE,
|
||||
EMOJI_SMILE2,
|
||||
EMOJI_HMM1,
|
||||
EMOJI_HMM2,
|
||||
EMOJI_BEAR1,
|
||||
EMOJI_BEAR2,
|
||||
EMOJI_FUU,
|
||||
EMOJI_EGGY1,
|
||||
EMOJI_EGGY2,
|
||||
EMOJI_FACE1,
|
||||
EMOJI_FACE2,
|
||||
EMOJI_UHU,
|
||||
EMOJI_SMRK1,
|
||||
EMOJI_SMRK2,
|
||||
EMOJI_LOVE,
|
||||
F_EPRM,
|
||||
F_VRSN,
|
||||
F_RGB_SLD,
|
||||
I3_GO_GROUP_10,
|
||||
I3_GO_GROUP_1,
|
||||
I3_GO_GROUP_2,
|
||||
I3_GO_GROUP_3,
|
||||
I3_GO_GROUP_4,
|
||||
I3_GO_GROUP_5,
|
||||
I3_GO_GROUP_6,
|
||||
I3_GO_GROUP_7,
|
||||
I3_GO_GROUP_8,
|
||||
I3_GO_GROUP_9,
|
||||
};
|
||||
|
||||
// TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch)
|
||||
|
||||
// TODO: Do stuff with hyper and meh keys
|
||||
// TODO: Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?)
|
||||
// TODO: Make macros for gnu screen and i3wm
|
||||
// TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers
|
||||
// TODO: Look into using tap dance
|
||||
// TODO: Use leader key for stuff. See https://github.com/qmk/qmk_firmware/wiki
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab/L1 | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \/L1 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LCtrl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ctrl/'|
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | Home | | PgUp | Ins |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | End | | PgDn | | |
|
||||
* | Space| TAB |------| |------| BSPC |Enter |
|
||||
* | | | [ | | ] | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// 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
|
||||
LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT,
|
||||
ALT_T(KC_APP), KC_HOME,
|
||||
KC_END,
|
||||
KC_SPC,KC_TAB,KC_LBRC,
|
||||
// right hand
|
||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(NAVG,KC_EQL),
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS),
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD),
|
||||
KC_PGUP, KC_INS,
|
||||
KC_PGDN,
|
||||
KC_RBRC,KC_BSPC, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U))
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Toggle|Animat| | Hue+ | Hue- |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Bright|Bright|Solid | | | | |
|
||||
* |ness- |ness+ |------| |------| DEL | |
|
||||
* | | | | | EPRM | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
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,
|
||||
RGB_TOG,RGB_MOD,
|
||||
F(F_RGB_SLD),
|
||||
RGB_VAD,RGB_VAI,KC_TRNS,
|
||||
// right hand
|
||||
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
|
||||
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,
|
||||
RGB_HUD, RGB_HUI,
|
||||
KC_TRNS,
|
||||
F(F_EPRM), KC_DEL, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media, mouse and navigation
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | gg(1)| | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | RUN | | | | | | | Up | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA , MOUSE and NAVIGATION
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), 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
|
||||
F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, 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
|
||||
),
|
||||
|
||||
/* Keymap 3: Unicode
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | ┌ | ┐ | └ | ┘ | │ | ─ | | ╔ | ╗ | ╚ | ╝ | ║ | ═ | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | █ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | ░ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | ☐ | ☑ | ☒ | ✓ | ▄ |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | smrk1| smrk2| love | VER | | ✔ | ✗ | ✘ | ● | ▀ |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | ▒ | ▓ |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// Unicode
|
||||
[NAVG] = KEYMAP(
|
||||
KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500),
|
||||
KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS,
|
||||
KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU),
|
||||
KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS,
|
||||
KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN),
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
UC(0x2554), UC(0x2557), UC(0x255a), UC(0x255d), UC(0x2551), UC(0x2550), KC_TRNS,
|
||||
KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), UC(0x2588),
|
||||
UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), UC(0x2591),
|
||||
KC_TRNS, UC(0x2764), UC(0x2610), UC(0x2611), UC(0x2612), UC(0x2713), UC(0x2584),
|
||||
UC(0x2714), UC(0x2717), UC(0x2718), UC(0x25cf), UC(0x2580),
|
||||
UC(0x2592), UC(0x2593),
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG),
|
||||
[EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY),
|
||||
[EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG),
|
||||
[EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE),
|
||||
[EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2),
|
||||
[EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1),
|
||||
[EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2),
|
||||
[EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1),
|
||||
[EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2),
|
||||
[EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU),
|
||||
[EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1),
|
||||
[EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2),
|
||||
[EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1),
|
||||
[EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2),
|
||||
[EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU),
|
||||
[EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1),
|
||||
[EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2),
|
||||
[EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE),
|
||||
[F_EPRM] = ACTION_FUNCTION(EPRM),
|
||||
[F_VRSN] = ACTION_FUNCTION(VRSN),
|
||||
[F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD),
|
||||
[I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0),
|
||||
[I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1),
|
||||
[I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2),
|
||||
[I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3),
|
||||
[I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4),
|
||||
[I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5),
|
||||
[I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6),
|
||||
[I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7),
|
||||
[I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8),
|
||||
[I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9),
|
||||
};
|
||||
|
||||
#define TAP_ONCE(code) \
|
||||
register_code (code); \
|
||||
unregister_code (code)
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case EPRM:
|
||||
eeconfig_init();
|
||||
break;
|
||||
case VRSN:
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
break;
|
||||
case RGB_SLD:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
break;
|
||||
case GO_GROUP:
|
||||
register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL);
|
||||
TAP_ONCE(KC_G);
|
||||
if (opt == 0) {
|
||||
TAP_ONCE(39);
|
||||
} else {
|
||||
TAP_ONCE(29+opt);
|
||||
}
|
||||
break;
|
||||
case EMOJI:
|
||||
switch(opt) {
|
||||
case SHRUG:
|
||||
unicode_input_start(); register_hex(0xaf); unicode_input_finish();
|
||||
TAP_ONCE (KC_BSLS);
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
|
||||
unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
|
||||
register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT);
|
||||
TAP_ONCE (KC_SLSH);
|
||||
unicode_input_start (); register_hex(0xaf); unicode_input_finish();
|
||||
break;
|
||||
case YAY:
|
||||
SEND_STRING ("\\o/");
|
||||
break;
|
||||
case HUG:
|
||||
unicode_input_start(); register_hex(0x0f3c); unicode_input_finish();
|
||||
TAP_ONCE (KC_SPC);
|
||||
unicode_input_start(); register_hex(0x3064); unicode_input_finish();
|
||||
TAP_ONCE (KC_SPC);
|
||||
unicode_input_start(); register_hex(0x25d5); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x25d5); unicode_input_finish();
|
||||
TAP_ONCE (KC_SPC);
|
||||
unicode_input_start(); register_hex(0x0f3d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x3064); unicode_input_finish();
|
||||
break;
|
||||
case SMILE:
|
||||
unicode_input_start(); register_hex(0x0298); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x203f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0298); unicode_input_finish();
|
||||
break;
|
||||
case SMILE2:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0298); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x203f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0298); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case HMM1:
|
||||
unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
|
||||
break;
|
||||
case HMM2:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case BEAR1:
|
||||
unicode_input_start(); register_hex(0x0295); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2022); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x1d25); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2022); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0294); unicode_input_finish();
|
||||
break;
|
||||
case BEAR2:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x1d54); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x1d25); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x1d54); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case FUU:
|
||||
unicode_input_start(); register_hex(0x256d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2229); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x256e); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x002d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x002d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x256d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2229); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x256e); unicode_input_finish();
|
||||
break;
|
||||
case EGGY1:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x256f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x00b0); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x25a1); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x00b0); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0xff09); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x256f); unicode_input_finish();
|
||||
break;
|
||||
case EGGY2:
|
||||
unicode_input_start(); register_hex(0x30ce); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0020); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x309c); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x002d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x309c); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x30ce); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case FACE1:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x002d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x002d); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case FACE2:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2022); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2022); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case UHU:
|
||||
unicode_input_start(); register_hex(0x2299); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0xfe4f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2299); unicode_input_finish();
|
||||
break;
|
||||
case SMRK1:
|
||||
unicode_input_start(); register_hex(0x005e); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x032e); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005e); unicode_input_finish();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case EMOJI2:
|
||||
switch(opt) {
|
||||
case SMRK2:
|
||||
unicode_input_start(); register_hex(0x0028); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005e); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x032e); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x005e); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x0029); unicode_input_finish();
|
||||
break;
|
||||
case LOVE:
|
||||
unicode_input_start(); register_hex(0x2665); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x203f); unicode_input_finish();
|
||||
unicode_input_start(); register_hex(0x2665); unicode_input_finish();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case RUN:
|
||||
return MACRO( D(LCTL), T(I), U(LCTL), T(R), END );
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
};
|
||||
|
||||
// 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) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_setrgb(0x00,0xff,0x00);
|
||||
#endif
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_setrgb(0x00,0x00,0xff);
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_on(); // TODO: Make a fourth layer
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,72 @@
|
||||
# ErgoDox EZ 1337 configuration
|
||||
|
||||
Custom layout based on the default layout. Intended for interational
|
||||
users of us intl-altgr layout. Note that some common keys might be
|
||||
missing, as this layout is intented to be used on *nix systems by
|
||||
users familiar with their system. The layout is geared towards
|
||||
avoiding using the rat (mouse for those of you who are unfamiliar with
|
||||
tiling window managers) as much as possibly.
|
||||
|
||||
# Layouts
|
||||
|
||||
All layer images created using [keyboard-layout-editor](http://www.keyboard-layout-editor.com/)
|
||||
|
||||
## Base layer
|
||||
|
||||
[![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366)
|
||||
|
||||
The base layer here is marked with the us international alt-gr layout,
|
||||
including characters bound to what on an iso keyboard would be alt-gr
|
||||
and on an ansi keyboard right alt.
|
||||
|
||||
Regular (and irregular) modifier keys are marked with a yellowish
|
||||
gray. Layer moderators are marked with blue, red and green, which are
|
||||
the same colors each layer displays on the LEDs when active.
|
||||
|
||||
All of the layer switch keys, except for the two center keys marked L1
|
||||
TOG, are dual purpose. Hence for example the top left key produces ESC
|
||||
if tapped, and temporarilly toggles L3 when hold down. The two center
|
||||
L1 TOG keys toggle L1 on and off for more permanent layer toggling.
|
||||
|
||||
The UNI keys enter the linux ibus unicode composer mode
|
||||
(ie. Ctrl+Shift+u). Use this to enter unicode characters. Hit the key,
|
||||
type in the unicode hex value, and hit enter.
|
||||
|
||||
## Layer 1 - Symbols and RGB
|
||||
|
||||
[![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73)
|
||||
|
||||
The Symbols and RGB layer contains function keys, commonly used
|
||||
symbols, a numpad and if you have the new Ergodox Ez shine keys for
|
||||
controlling various RGB-led functions. In addition, it provides an up
|
||||
and a down key for easy scrolling. RGB controller keys are yellow.
|
||||
|
||||
## Layer 2 - Media, Mouse and Navigation
|
||||
|
||||
[![Layer 2 - Media, Mouse and Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731)
|
||||
|
||||
The Media, Mouse and unicode layer contains special keys for moving
|
||||
the mouse and clicking on it with the keyboard. In addition it
|
||||
provides standard media control keys, and default arrow keys.
|
||||
|
||||
## Layer 3 - Unicode
|
||||
|
||||
[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289)
|
||||
|
||||
The unicode layer provides keys for directly typing unicode (utf-8)
|
||||
|
||||
# Changelog
|
||||
|
||||
- 02.01.2017 Added delete key on second layer
|
||||
- 10.01.2017 Added layer images to readme
|
||||
- 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand
|
||||
- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2
|
||||
- 25.01.2017 Added lots of new emojis and some unicode keys
|
||||
- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U)
|
||||
|
||||
# TODO
|
||||
|
||||
- Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?)
|
||||
- Make macros for gnu screen and i3wm
|
||||
- Look into the app launch macros in algernon keymap
|
||||
|
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 71 KiB |
@ -0,0 +1,54 @@
|
||||
This is a dual English-Japanese keymap that utilises a thumb-shift system for Japanese input. You can read more about this layout on my blog [here](https://ishigoya.com).
|
||||
|
||||
### Some Editing Necessary
|
||||
The system I created this on is a Chromebook, and uses a Japanese keymap, so some of the key mappings may not be the same as those on your system. In particular, the Escape key on layer 0 is mapped to KC_LCTL.
|
||||
|
||||
### Layouts
|
||||
------
|
||||
#### English layer - layer 0
|
||||
The English layout is a modified Workman layout, and is pictured below:
|
||||
|
||||
![English layout](img/keyboard-layout-enL.png)
|
||||
|
||||
Some of the punctuation keys have been moved to a separate number/symbol layer.
|
||||
|
||||
#### Number / Symbol layer - layer 6
|
||||
|
||||
The Number / Symbol layer is reachable through a ACTION_LAYER_MOMENTARY function. The blue LED is illuminated when this layer is active. It is accessible from the English or Japanese layers.
|
||||
|
||||
![Number layout](img/keyboard-layout-numL.png)
|
||||
|
||||
#### Japanese layers - layers 1-5
|
||||
|
||||
There are 5 layers involved in Japanese input. The TOJPLOUT macro is mapped to the En / 和 button, and switches default layer between layer 0 (English) and 1 (main Japanese layer). When layer 1 is the default layer, the red LED is on. It also outputs the ZKHK button to change the input method language.
|
||||
|
||||
On keypress, strings of romaji characters are output by the keyboard using macros, and these simulate the input of individual keys on a latin keyboard.
|
||||
|
||||
![Japanese layout](img/keyboard-layout-jpL.png)
|
||||
|
||||
Layer 1 is the JP layer. Keys on this layer correspond to singleton keys, or keys on the bottom row where a key is shared. For example, pressing the "ふ や" key outputs `ふ` (or "fu").
|
||||
|
||||
Layer 2 is the JPXON layer, and is active while holding the Fn key. This prints keys that are prefaced by "x" when writing in romaji. For example, pressing the "ふ や" key while holding the Fn key outputs `ゃ` (or "xya").
|
||||
|
||||
Layer 3 is the JPKAZARI layer, and is active while holding the 飾り key. This provides letters with dakuten. For example, pressing the "ふ や" key while holding the 飾り key outputs `ぶ` (or "bu").
|
||||
|
||||
Layer 4 is the JPTOPROW layer, and is active while holding the シフト key. Keys on this line correspond to top row keys on shared keys in the image. For example, pressing the "ふ や" key while holding the シフト key outputs `や` (or "ya").
|
||||
|
||||
Layer 5 is the JPTRKZ layer, and is active while holding both the シフト key and the 飾り key. This layer contains handakuten keys. For example, pressing the "ふ や" while holding both the シフト key and the 飾り key outputs `ぷ` (or "pu").
|
||||
|
||||
I've also separated out the #define sections and the macros required for kana for easy copying, in case anyone else should wish to make a kana-based layout.
|
||||
|
||||
When tapped, the シフト key acts as a space key, and the 飾り key acts as a return key. This allows them to function as 変換 and 無変換, respectively, in many IMEs.
|
||||
|
||||
Furthermore the Fn key, when tapped, acts as an F7 key, providing easy switching to katakana in many IMEs.
|
||||
|
||||
### Other features
|
||||
The cut/copy button gives copy functionality on a short press, and cut functionality on a long press.
|
||||
|
||||
The tmux prefix button outputs Control-B.
|
||||
|
||||
The Control & Shift key acts as holding the control and shift keys at the same time.
|
||||
|
||||
SelAll outputs Control-A.
|
||||
|
||||
Undo outputs Control-Z.
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
Config file - Ergodox QMK with replicaJunction layout
|
||||
|
||||
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_CONFIG_H_
|
||||
#define KEYBOARDS_ERGODOX_CONFIG_H_
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
#define MOUSEKEY_TIME_TO_MAX 10
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
// MS the button needs to be held before a tap becomes a hold (default: 200)
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
|
||||
// I don't have any locking keys, so I don't need these features
|
||||
|
||||
|
||||
/* 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
|
||||
|
||||
/* Prevent modifiers from sticking when switching layers */
|
||||
/* Uses 5 bytes of memory per 8 keys, but makes sure modifiers don't get "stuck" switching layers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
|
||||
)
|
||||
|
||||
#ifdef SUBPROJECT_ez
|
||||
#include "ez/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_infinity
|
||||
#include "infinity/config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */
|
@ -0,0 +1,336 @@
|
||||
/*
|
||||
* Keyboard: Ergodox
|
||||
* Keymap: replicaJunction
|
||||
* Version: 1.2
|
||||
*
|
||||
* This keymap is designed to complement my Atreus keyboard layout, found in keyboards/atreus.
|
||||
* The Atreus keyboard is a 40% board whose design was heavily influenced by the Ergodox, and I now
|
||||
* have both keyboards, so I've designed these layouts in an effort to make switching between the
|
||||
* two as easy as possible.
|
||||
*
|
||||
* I've also tried to make use of the extra keys on the Ergodox in as logical of a manner as possible,
|
||||
* adding to the layers in the Atreus config without disturbing what's there already. This allows for
|
||||
* things like F11-F20, the Application (Menu) key, and better media key placement.
|
||||
*
|
||||
* The default key layout in this keymap is Colemak-ModDH. Information on that layout can be found
|
||||
* here: https://colemakmods.github.io/mod-dh/
|
||||
*/
|
||||
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define _CO 0 // Colemak
|
||||
#define _QW 1 // QWERTY
|
||||
#define _ME 2 // media keys
|
||||
#define _NU 3 // numpad
|
||||
#define _EX 4 // extend
|
||||
#define _GA 5 // mouse overlay for gaming
|
||||
|
||||
// Some quick aliases, just to make it look pretty
|
||||
#define _______ KC_TRNS
|
||||
#define KCX_CGR LCTL(KC_GRV)
|
||||
#define KX_STAB LSFT(KC_TAB)
|
||||
#define KX_COPY LCTL(KC_C)
|
||||
#define KX_CUT LCTL(KC_X)
|
||||
#define KX_PAST LCTL(KC_V)
|
||||
#define KX_UNDO LCTL(KC_Z)
|
||||
|
||||
; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* Keymap: Colemak-ModDH
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | LCtrl | Q | W | F | P | B | Home | | BkSp | J | L | U | Y | ; | - |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | ' |
|
||||
* |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------|
|
||||
* | LShft | Z | X | C | D | V | | | | K | H | , | , | / | RShft |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LGui | [ | ] |CtlShf| LAlt | | _EX | - | ' | = | \ |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | LCtrl| ~GA | | Left | Right|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ |
|
||||
* | BkSp | Del |------| |------| Enter| Space|
|
||||
* | | | _NU | | Down | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_CO] = KEYMAP(
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_LCTL,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME,
|
||||
KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G,
|
||||
KC_LSFT,KC_Z, KC_X, KC_C, KC_D, KC_V, ALL_T(KC_NO),
|
||||
KC_LGUI,KC_LBRC,KC_RBRC, LCTL(KC_LSFT), KC_LALT,
|
||||
|
||||
KC_LCTL, TG(_GA),
|
||||
KC_HOME,
|
||||
CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU),
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_MINS,
|
||||
KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
KC_BSLS, KC_K, KC_H, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,
|
||||
MO(_EX),KC_MINS,KC_QUOT,KC_EQL, KC_BSLS,
|
||||
|
||||
KC_LEFT, KC_RGHT,
|
||||
KC_UP,
|
||||
KC_DOWN, ALT_T(KC_ENT), LT(_NU,KC_SPC)
|
||||
),
|
||||
|
||||
/*
|
||||
* Keymap: QWERTY layout.
|
||||
*
|
||||
* This is optimized for gaming, not typing, so there aren't as many macros
|
||||
* as the Dvorak layer. Some of the keys have also been moved to "game-
|
||||
* like" locations, such as making the spacebar available to the left thumb,
|
||||
* and repositioning the arrow keys at the bottom right corner.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | Esc | | | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | LCtrl | Q | W | E | R | T | Home | | BkSp | Y | U | I | O | P | - |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Tab | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
* |--------+------+------+------+------+------| Hyper| | \ |------+------+------+------+------+--------|
|
||||
* | LShft | Z | X | C | V | B | | | | N | M | , | . | / | RShft |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LGui | ` | \ |CtlShf| _NU | | _EX | - | ' | = | \ |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | LCtrl| ~GA | | Left | Right|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |LCtrl/| LAlt/| Home | | Up | Alt/| _NU/ |
|
||||
* | BkSp | Del |------| |------| Enter| Space|
|
||||
* | | | _NU | | Down | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_QW] = KEYMAP( // Layer1: QWERTY
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_LCTL,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
KC_LGUI,KC_GRV, KC_SLSH,LCTL(KC_LSFT), MO(_NU),
|
||||
|
||||
KC_LCTL,TG(_GA),
|
||||
KC_HOME,
|
||||
CTL_T(KC_BSPC), ALT_T(KC_DEL), MO(_NU),
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,
|
||||
KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,
|
||||
MO(_EX),KC_MINS,KC_QUOT,KC_EQL, KC_BSLS,
|
||||
|
||||
KC_LEFT, KC_RGHT,
|
||||
KC_UP,
|
||||
KC_DOWN, ALT_T(KC_ENT), LT(_NU,KC_SPC)
|
||||
),
|
||||
|
||||
/*
|
||||
* Keymap: Numbers and symbols
|
||||
*
|
||||
* Note that the number keys here are actually numpad keystrokes. This often doesn't matter, but it may be relevant in a few cases.
|
||||
* That's why the Num Lock key exists on this layer - just in case.
|
||||
*
|
||||
* This layer also contains the layout switches.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | & | | | | / | 7 | 8 | 9 | * | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ~ |------| |------| | | 4 | 5 | 6 | - | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ` | | | | \ | 1 | 2 | 3 | + | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | |QWERTY|Colemk| | | | 0 | . | = | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |NumLck| RESET| | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_NU] = KEYMAP(
|
||||
// left hand
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
|
||||
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______,
|
||||
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD,
|
||||
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, _______,
|
||||
_______, DF(_QW), DF(_CO), _______, _______,
|
||||
|
||||
KC_NLCK,RESET,
|
||||
_______,
|
||||
_______,_______,_______,
|
||||
// right hand
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||
_______, KC_SLSH, KC_P7, KC_P8, KC_P9, KC_PAST, _______,
|
||||
KC_PIPE, KC_P4, KC_P5, KC_P6, KC_PMNS, _______,
|
||||
_______, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, _______,
|
||||
KC_P0, KC_PDOT, KC_EQL, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/*
|
||||
* Keymap: Extend
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F11 | F12 | F13 | F14 | F15 | Mute | | | F16 | F17 | F18 | F19 | F20 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | Ctrl`| Vol | | | PgUp | Home | Up | End | Del | |
|
||||
* |--------+------+------+------+------+------| Up | | |------+------+------+------+------+--------|
|
||||
* | | | Gui | Alt | Ctrl | |------| |------| PgDn | Left | Down | Right| BkSp | Menu |
|
||||
* |--------+------+------+------+------+------| Vol | | |------+------+------+------+------+--------|
|
||||
* | | Undo | Cut | Copy | | Paste| Down | | | | ^Tab | Tab | |Insert| PrntScr|
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*
|
||||
* Ctrl+` is a keyboard shortcut for the program ConEmu, which provides a Quake-style drop-down command prompt.
|
||||
*
|
||||
*/
|
||||
[_EX] = KEYMAP(
|
||||
// left hand
|
||||
_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, KCX_CGR, KC_VOLU,
|
||||
_______, _______, KC_LGUI, KC_LALT, KC_LCTL, _______,
|
||||
_______, KX_UNDO, KX_CUT, KX_COPY, _______, KX_PAST, KC_VOLD,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______,_______,
|
||||
_______,
|
||||
_______,_______,_______,
|
||||
// right hand
|
||||
_______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______,
|
||||
_______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, _______,
|
||||
KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU,
|
||||
_______, _______, KX_STAB, KC_TAB, _______, KC_INS, KC_PSCR,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/*
|
||||
* Keymap: Gaming
|
||||
*
|
||||
* Provides a mouse overlay for the right hand, and also moves some "gamer friendly" keys to the left, such as space.
|
||||
* This layer also removes a lot of dual-role keys, as when gaming, it's nicer not to need to keep track of those.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | |WhlUp | MsUp |WhlDn | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| |MsLeft|MsDown|MsRght| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LCtrl| | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | ~_GA | | |MClick|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | Space| |------| |------|RClick|LClick|
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_GA] = KEYMAP(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
KC_LCTL, _______, _______, _______, _______,
|
||||
|
||||
_______,_______,
|
||||
_______,
|
||||
KC_SPC, _______,_______,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______,
|
||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, KC_BTN3,
|
||||
_______,
|
||||
_______, KC_BTN2, KC_BTN1
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(_NU) // FN1 - Momentary Layer 1 (Numbers and 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);
|
||||
// uint8_t default_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) {
|
||||
case _CO:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case _QW:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case _NU:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case _GA:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
# replicaJunction - Ergodox (EZ) Layout
|
||||
|
||||
I designed this layout, along with my complimentary Atreus layout, to address the challenge of having an Ergodox as my primary home keyboard and an Atreus as my primary work board. I wanted a layout that provided symbols in comfortable locations on both keyboards - but didn't require me to learn two separate sets of symbols for the two keyboards.
|
||||
|
||||
I had originally used several keys as dual-role keys, where a tap would send a keypress and a long press and hold would trigger a different layer. However, after several months of experimenting with those ideas, I've begun moving away from that design due to performance. It's very hard to strike a balance between the time it takes to press a key normally while typing and the "delay" in the typing motion needed to trigger the alternate layer. I was frequently getting strange characters and artifacts because I pressed the function key + the symbol key too quickly, and the layer never shifted.
|
@ -0,0 +1,419 @@
|
||||
[
|
||||
{
|
||||
"backcolor": "#ffffff",
|
||||
"name": "Ergodox Swiss German Layout - Base Layer",
|
||||
"author": "Andreas Schmidt (https://github.com/remigius42)"
|
||||
},
|
||||
[
|
||||
{
|
||||
"x": 3.5
|
||||
},
|
||||
"#\n3",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"*\n8"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"@\n2",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"$\n4",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"&\n7",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"(\n9"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"%\n5",
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"<i class='fa fa-arrow-left'></i>",
|
||||
{
|
||||
"x": 4.5
|
||||
},
|
||||
"<i class='fa fa-arrow-right'></i>",
|
||||
{
|
||||
"a": 4
|
||||
},
|
||||
"^\n6"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"w": 1.5
|
||||
},
|
||||
"°\n§",
|
||||
"!\n1",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
")\n0",
|
||||
{
|
||||
"w": 1.5
|
||||
},
|
||||
"?\n'\n\n'"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5
|
||||
},
|
||||
"E",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"I"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"W",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"R",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"U",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"O"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"T",
|
||||
{
|
||||
"c": "#b56b6b",
|
||||
"a": 6,
|
||||
"h": 1.5
|
||||
},
|
||||
"Toggle Code Layer",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"Toggle Code Layer",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"a": 4
|
||||
},
|
||||
"Y"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"Delete",
|
||||
{
|
||||
"a": 4
|
||||
},
|
||||
"Q",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"P",
|
||||
{
|
||||
"w": 1.5
|
||||
},
|
||||
"è\nü\n\n["
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5
|
||||
},
|
||||
"D",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"K"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"S",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"F",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"J",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"L"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"G",
|
||||
{
|
||||
"x": 6.5
|
||||
},
|
||||
"H"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"Backspace",
|
||||
{
|
||||
"c": "#79c777",
|
||||
"a": 4
|
||||
},
|
||||
"A\n\nLyr3",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"é\nö\nLyr3",
|
||||
{
|
||||
"c": "#748adb",
|
||||
"w": 1.5
|
||||
},
|
||||
"à\nä\nCmd\n{"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.625,
|
||||
"x": 6.5,
|
||||
"c": "#cccccc",
|
||||
"a": 6,
|
||||
"h": 1.5
|
||||
},
|
||||
"Hyper",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"Meh"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 3.5,
|
||||
"a": 4
|
||||
},
|
||||
"C",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
";\n,"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"c": "#748adb"
|
||||
},
|
||||
"X\n\nAlt",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"V",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"M",
|
||||
{
|
||||
"x": 1,
|
||||
"c": "#748adb"
|
||||
},
|
||||
":\n.\nAlt"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"B",
|
||||
{
|
||||
"x": 6.5
|
||||
},
|
||||
"N"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"Shift",
|
||||
{
|
||||
"c": "#748adb",
|
||||
"a": 4
|
||||
},
|
||||
"Z\n\nCtrl",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"_\n-\nCtrl",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"a": 6,
|
||||
"w": 1.5
|
||||
},
|
||||
"Shift"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"a": 7
|
||||
},
|
||||
"<i class='fa fa-arrow-left'></i>",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"<i class='fa fa-arrow-down'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"a": 4
|
||||
},
|
||||
"£\n$\n\n}",
|
||||
{
|
||||
"x": 1,
|
||||
"a": 7
|
||||
},
|
||||
"<i class='fa fa-arrow-right'></i>",
|
||||
{
|
||||
"x": 10.5,
|
||||
"a": 6
|
||||
},
|
||||
"AltGr"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.9950000000000001,
|
||||
"x": 14,
|
||||
"a": 7
|
||||
},
|
||||
"<i class='fa fa-arrow-up'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.7549999999999999,
|
||||
"x": 0.5,
|
||||
"c": "#b56b6b",
|
||||
"a": 4
|
||||
},
|
||||
">\n<\nCode Layer\n\\",
|
||||
{
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"`\n^\n\n~",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"!\n¨\n\n]",
|
||||
{
|
||||
"c": "#b56b6b"
|
||||
},
|
||||
"\n\nCode Layer"
|
||||
],
|
||||
[
|
||||
{
|
||||
"r": 30,
|
||||
"rx": 6.5,
|
||||
"ry": 4.25,
|
||||
"y": -1,
|
||||
"x": 1,
|
||||
"c": "#748adb"
|
||||
},
|
||||
"Apps\nAlt",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"a": 6
|
||||
},
|
||||
"Win / Cmd"
|
||||
],
|
||||
[
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Space",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Back Space",
|
||||
"Home"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 2
|
||||
},
|
||||
"End"
|
||||
],
|
||||
[
|
||||
{
|
||||
"r": -30,
|
||||
"rx": 13,
|
||||
"y": -1,
|
||||
"x": -3
|
||||
},
|
||||
"Alt",
|
||||
{
|
||||
"c": "#748adb",
|
||||
"a": 4
|
||||
},
|
||||
"Esc\nCtrl"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3,
|
||||
"c": "#cccccc",
|
||||
"a": 6
|
||||
},
|
||||
"Pg Up",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Tab",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"Enter"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3
|
||||
},
|
||||
"Pg Dn"
|
||||
]
|
||||
]
|
After Width: | Height: | Size: 74 KiB |
@ -0,0 +1,436 @@
|
||||
[
|
||||
{
|
||||
"backcolor": "#ffffff",
|
||||
"name": "Ergodox Swiss German Layout - Symbol & Media Layer",
|
||||
"author": "Andreas Schmidt (https://github.com/remigius42)"
|
||||
},
|
||||
[
|
||||
{
|
||||
"x": 3.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"F3",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"F8"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"F2",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"F4",
|
||||
{
|
||||
"x": 8.5
|
||||
},
|
||||
"F7",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"F9"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"F5",
|
||||
{
|
||||
"t": "#000000",
|
||||
"a": 7
|
||||
},
|
||||
"",
|
||||
{
|
||||
"x": 4.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#b81c1c",
|
||||
"a": 4
|
||||
},
|
||||
"F6"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"t": "#000000\n\n\n#529151",
|
||||
"w": 1.5
|
||||
},
|
||||
"\n\n\nFlash",
|
||||
{
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"F1",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"F10",
|
||||
{
|
||||
"t": "#b81c1c\n\n\n#529151",
|
||||
"w": 1.5
|
||||
},
|
||||
"F11\n\n\nFlash"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5
|
||||
},
|
||||
"{\n\n\n<i class='fa fa-arrow-circle-up'></i>",
|
||||
{
|
||||
"x": 10.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"8"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"@",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"}",
|
||||
{
|
||||
"x": 8.5,
|
||||
"t": "#b81c1c\n\n\n#529151"
|
||||
},
|
||||
"7\n\n\nHTML ul",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"9\n\n\nHTML ol"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"|",
|
||||
{
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"h": 1.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#b81c1c",
|
||||
"a": 4
|
||||
},
|
||||
"<i class='fa fa-arrow-up'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#b81c1c",
|
||||
"a": 4
|
||||
},
|
||||
"!",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"*",
|
||||
{
|
||||
"w": 1.5
|
||||
},
|
||||
"F12"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"t": "#b81c1c\n\n\n#529151"
|
||||
},
|
||||
"(\n\n\n<i class='fa fa-arrow-circle-down'></i>",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"5\n\n\nHTML li"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5
|
||||
},
|
||||
"$\n\n\n<i class='fa fa-arrow-circle-left'></i>",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
")\n\n\n<i class='fa fa-arrow-circle-right'></i>",
|
||||
{
|
||||
"x": 8.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"4",
|
||||
{
|
||||
"x": 1
|
||||
},
|
||||
"6"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5
|
||||
},
|
||||
"`",
|
||||
{
|
||||
"x": 6.5
|
||||
},
|
||||
"<i class='fa fa-arrow-down'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#b81c1c",
|
||||
"a": 4
|
||||
},
|
||||
"#",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"+",
|
||||
{
|
||||
"t": "#000000\n\n\n#529151",
|
||||
"w": 1.5
|
||||
},
|
||||
"\n\n\n<i class='fa fa-play'></i><i class='fa fa-pause'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.625,
|
||||
"x": 6.5,
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"h": 1.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"x": 4.5,
|
||||
"h": 1.5
|
||||
},
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 3.5,
|
||||
"t": "#b81c1c\n\n\n#529151",
|
||||
"a": 4
|
||||
},
|
||||
"[\n\n\nHTML code",
|
||||
{
|
||||
"x": 10.5
|
||||
},
|
||||
"2\n\n\n<i class='fa fa-fast-backward'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"^",
|
||||
{
|
||||
"x": 1,
|
||||
"t": "#b81c1c\n\n\n#529151"
|
||||
},
|
||||
"]\n\n\nHTML br",
|
||||
{
|
||||
"x": 8.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"1",
|
||||
{
|
||||
"x": 1,
|
||||
"t": "#b81c1c\n\n\n#529151"
|
||||
},
|
||||
"3\n\n\n<i class='fa fa-fast-forward'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 5.5,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"~",
|
||||
{
|
||||
"x": 6.5
|
||||
},
|
||||
"&"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#b81c1c",
|
||||
"a": 4
|
||||
},
|
||||
"%",
|
||||
{
|
||||
"x": 14.5
|
||||
},
|
||||
"\\",
|
||||
{
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"w": 1.5
|
||||
},
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.375,
|
||||
"x": 3.5,
|
||||
"t": "#000000\n\n\n#529151",
|
||||
"a": 4
|
||||
},
|
||||
"\n\n\nleft click",
|
||||
{
|
||||
"x": 10.5,
|
||||
"t": "#b81c1c\n\n\n#529151"
|
||||
},
|
||||
".\n\n\n<i class='fa fa-volume-down'></i>"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.875,
|
||||
"x": 2.5,
|
||||
"t": "#000000",
|
||||
"a": 7
|
||||
},
|
||||
"",
|
||||
{
|
||||
"x": 1,
|
||||
"t": "#000000\n\n\n#529151",
|
||||
"a": 4
|
||||
},
|
||||
"\n\n\nright click",
|
||||
{
|
||||
"x": 8.5,
|
||||
"t": "#b81c1c\n\n\n#529151"
|
||||
},
|
||||
"?\n\n\n<i class='fa fa-volume-up'></i>",
|
||||
{
|
||||
"x": 1,
|
||||
"t": "#b81c1c"
|
||||
},
|
||||
"0"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 0.5,
|
||||
"t": "#000000",
|
||||
"a": 7
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#b81c1c",
|
||||
"a": 4
|
||||
},
|
||||
"EPRM RST",
|
||||
{
|
||||
"x": 14.5,
|
||||
"t": "#000000",
|
||||
"a": 7
|
||||
},
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"r": 30,
|
||||
"rx": 6.5,
|
||||
"ry": 4.25,
|
||||
"y": -1,
|
||||
"x": 1
|
||||
},
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"t": "#000000\n\n\n#529151",
|
||||
"a": 4,
|
||||
"h": 2
|
||||
},
|
||||
"\n\n\nEnter",
|
||||
{
|
||||
"t": "#000000",
|
||||
"a": 7,
|
||||
"h": 2
|
||||
},
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": 2
|
||||
},
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"r": -30,
|
||||
"rx": 13,
|
||||
"y": -1,
|
||||
"x": -3
|
||||
},
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3
|
||||
},
|
||||
"",
|
||||
{
|
||||
"h": 2
|
||||
},
|
||||
"",
|
||||
{
|
||||
"t": "#000000\n\n\n#529151",
|
||||
"a": 4,
|
||||
"h": 2
|
||||
},
|
||||
"\n\n\nWeb back"
|
||||
],
|
||||
[
|
||||
{
|
||||
"x": -3,
|
||||
"t": "#000000",
|
||||
"a": 7
|
||||
},
|
||||
""
|
||||
]
|
||||
]
|
After Width: | Height: | Size: 57 KiB |
@ -0,0 +1,287 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "string.h"
|
||||
|
||||
#ifdef SUBPROJECT_infinity
|
||||
#include "visualizer/lcd_backlight.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
#define EPRM M(1) // Macro 1: Reset EEPROM
|
||||
#define HTML_LI M(10)
|
||||
#define HTML_UL M(11)
|
||||
#define HTML_OL M(12)
|
||||
#define HTML_CODE M(13)
|
||||
#define HTML_BR M(14)
|
||||
|
||||
#define SEND_TAG(TAG) do {\
|
||||
send_key(KC_NONUS_BSLASH); \
|
||||
SEND_STRING(TAG); \
|
||||
send_larger_than(); \
|
||||
send_key(KC_NONUS_BSLASH); \
|
||||
SEND_STRING("&"); \
|
||||
SEND_STRING(TAG); \
|
||||
send_larger_than(); \
|
||||
go_back_based_on_tag(TAG); \
|
||||
} while (0)
|
||||
|
||||
#define SEND_SHORT_TAG(TAG) do {\
|
||||
send_key(KC_NONUS_BSLASH); \
|
||||
SEND_STRING(TAG); \
|
||||
SEND_STRING("&"); \
|
||||
send_larger_than(); \
|
||||
} while (0)
|
||||
|
||||
void send_key(uint16_t keycode);
|
||||
void go_back_based_on_tag(char* tag);
|
||||
void send_larger_than(void);
|
||||
|
||||
|
||||
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 | ' |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | ü |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L |ö / L2|ä / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | ¨ | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,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_LBRC,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1,
|
||||
KC_LALT,CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | EPRM | | | | | ? | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS,
|
||||
KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL),
|
||||
KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS,
|
||||
KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*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, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS,
|
||||
KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS,
|
||||
ACTION_MODS_KEY(MOD_RSFT,KC_MINS),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
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | RESET | | | | | | | | | | | | | | RESET |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | |H_UL | |H_OL | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |H_CODE| |H_BR | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Enter | | | | | |Brwser|
|
||||
* | | |------| |------| |Back |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
RESET, 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, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_ENT, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||
KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, 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) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (record->event.pressed) {
|
||||
SEND_TAG("li");
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (record->event.pressed) {
|
||||
SEND_TAG("ul");
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (record->event.pressed) {
|
||||
SEND_TAG("ol");
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (record->event.pressed) {
|
||||
SEND_TAG("code");
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (record->event.pressed) {
|
||||
SEND_SHORT_TAG("br");
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 0:
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
#ifdef SUBPROJECT_infinity
|
||||
lcd_backlight_hal_color(0, 0, 0);
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
#ifdef SUBPROJECT_infinity
|
||||
lcd_backlight_hal_color(5000, 0, 0);
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_3_off();
|
||||
#ifdef SUBPROJECT_infinity
|
||||
lcd_backlight_hal_color(0, 5000, 0);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void send_key(uint16_t keycode) {
|
||||
register_code(keycode);
|
||||
unregister_code(keycode);
|
||||
}
|
||||
|
||||
void go_back_based_on_tag(char* tag) {
|
||||
const int BRACKETS_AND_SLASH_LENGTH = 3;
|
||||
|
||||
for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) {
|
||||
send_key(KC_LEFT);
|
||||
}
|
||||
}
|
||||
|
||||
void send_larger_than() {
|
||||
register_code(KC_LSFT);
|
||||
send_key(KC_NONUS_BSLASH);
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
# ErgoDox Swiss German Configuration
|
||||
|
||||
Swiss German keyboard layout based on the Ergodox EZ default layout.
|
||||
|
||||
Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com).
|
||||
|
||||
Diagram sources: [default layer](keyboard-layout.json), [layer 1 & 2](keyboard-layout_1_2.json)
|
||||
|
||||
![Layout Layer 0](keyboard-layout.png)
|
||||
![Layout Layer 1&2](keyboard-layout_1_2.png)
|
||||
|
||||
## Changelog
|
||||
* Jan 21, 2017:
|
||||
* Initial version based on default layout.
|
||||
|
@ -0,0 +1,112 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# 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 ?= yes # Enable RGB Underglow
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
@ -0,0 +1,187 @@
|
||||
/*
|
||||
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 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER geekhack
|
||||
#define PRODUCT GH60
|
||||
#define DESCRIPTION t.m.k. keyboard firmware for GH60
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* RGB Underglow
|
||||
* These settings are for the F4 by default:
|
||||
*
|
||||
*
|
||||
* #define ws2812_PORTREG PORTF
|
||||
* #define ws2812_DDRREG DDRF
|
||||
* #define ws2812_pin PF4
|
||||
* #define RGBLED_NUM 14 // Number of LEDs
|
||||
* #define RGBLIGHT_HUE_STEP 10
|
||||
* #define RGBLIGHT_SAT_STEP 17
|
||||
* #define RGBLIGHT_VAL_STEP 17
|
||||
*
|
||||
* The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects.
|
||||
* To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations.
|
||||
* For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c
|
||||
*/
|
||||
|
||||
/* Deprecated code below
|
||||
#define ws2812_PORTREG PORTF
|
||||
#define ws2812_DDRREG DDRF
|
||||
#define ws2812_pin PF4
|
||||
*/
|
||||
#define RGB_DI_PIN F4
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 11 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
@ -0,0 +1,198 @@
|
||||
#include "gh60.h"
|
||||
#include "action_layer.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
#define _DEFAULT 0
|
||||
#define _FN 1
|
||||
#define _WASD 2
|
||||
#define _SFX 3
|
||||
|
||||
//bool esc_led_on;
|
||||
|
||||
enum planck_keycodes {
|
||||
DEFAULT = SAFE_RANGE
|
||||
};
|
||||
|
||||
// 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
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | 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 */
|
||||
TG(_SFX),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, ______, ______, \
|
||||
______, ______, ______, TG(_WASD), KC_MSTP, ______, ______, ______ \
|
||||
),
|
||||
|
||||
/* WASD Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | Up | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Left| Down|Right| | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_WASD] = KEYMAP_HHKB( /* Layer 2 */
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, KC_LEFT, KC_DOWN,KC_RGHT,______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______ \
|
||||
),
|
||||
|
||||
/* SFX Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | BL- | BL+ | BL | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | RGBT| RGBM| | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_SFX] = KEYMAP_HHKB(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______ \
|
||||
)
|
||||
};
|
||||
|
||||
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 {
|
||||
RGBLED_TOGGLE,
|
||||
RGBLED_STEP_MODE,
|
||||
RGBLED_INCREASE_HUE,
|
||||
RGBLED_DECREASE_HUE,
|
||||
RGBLED_INCREASE_SAT,
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(RGBLED_TOGGLE),
|
||||
[1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
|
||||
[2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
|
||||
[3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
|
||||
[4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
|
||||
[5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
|
||||
[6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
|
||||
[7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL)
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch (id) {
|
||||
case RGBLED_TOGGLE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_toggle();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_HUE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_hue();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_HUE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_SAT:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_sat();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_SAT:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_sat();
|
||||
}
|
||||
break;
|
||||
case RGBLED_INCREASE_VAL:
|
||||
if (record->event.pressed) {
|
||||
rgblight_increase_val();
|
||||
}
|
||||
break;
|
||||
case RGBLED_DECREASE_VAL:
|
||||
if (record->event.pressed) {
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
break;
|
||||
case RGBLED_STEP_MODE:
|
||||
if (record->event.pressed) {
|
||||
rgblight_step();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint32_t layer = layer_state;
|
||||
|
||||
if (layer & (1<<1)) {
|
||||
gh60_fn_led_on();
|
||||
} else {
|
||||
gh60_fn_led_off();
|
||||
}
|
||||
|
||||
if (layer & (1<<2)) {
|
||||
gh60_wasd_leds_on();
|
||||
} else {
|
||||
gh60_wasd_leds_off();
|
||||
}
|
||||
|
||||
if (layer & (1<<3)) {
|
||||
gh60_esc_led_on();
|
||||
} else {
|
||||
gh60_esc_led_off();
|
||||
}
|
||||
};
|
@ -0,0 +1,3 @@
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,43 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER GON
|
||||
#define PRODUCT NerD
|
||||
#define DESCRIPTION QMK port for the GON Nerd PCB
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 9
|
||||
|
||||
/* backlight */
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* matrix pins */
|
||||
#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 }
|
||||
#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5, D1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#endif
|
@ -0,0 +1 @@
|
||||
#include "gonnerd.h"
|
@ -0,0 +1,42 @@
|
||||
#ifndef GONNERD_H
|
||||
#define GONNERD_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP_TKL( \
|
||||
K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \
|
||||
K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \
|
||||
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \
|
||||
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \
|
||||
K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \
|
||||
{ K01, K11, K21, K31, K41, K51, K61, K71, K81 }, \
|
||||
{ K02, K12, K22, K32, K42, K52, K62, K72, K82 }, \
|
||||
{ K03, K13, K23, K33, K43, K53, K63, K73, K83 }, \
|
||||
{ K04, K14, K24, K34, K44, K54, K64, K74, K84 }, \
|
||||
{ K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \
|
||||
{ K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \
|
||||
{ K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \
|
||||
{ K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \
|
||||
{ K09, K19, K29, K39, K49, K59, K69, K79, K89 } \
|
||||
}
|
||||
|
||||
#define KEYMAP_60( \
|
||||
K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \
|
||||
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \
|
||||
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \
|
||||
K06, K05, K78, K70, K72, K73, K74, K75 \
|
||||
) KEYMAP_TKL( \
|
||||
K08, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \
|
||||
K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \
|
||||
K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
|
||||
K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \
|
||||
K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \
|
||||
)
|
||||
|
||||
#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 = yes # 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,26 @@
|
||||
#include "gonnerd.h"
|
||||
|
||||
#define __x__ KC_NO
|
||||
|
||||
// Keymap layers
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP_60( /* Base */
|
||||
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, \
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \
|
||||
),
|
||||
|
||||
[1] = KEYMAP_60( /* System layer to have access to RESET button */
|
||||
RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
@ -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 = yes # 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,108 @@
|
||||
#include "gonnerd.h"
|
||||
|
||||
// Keymap layers
|
||||
#define BASE_LAYER 0
|
||||
#define FUNCTION_LAYER 1
|
||||
#define SYSTEM_LAYER 2
|
||||
|
||||
// Key aliases
|
||||
#define __x__ KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0: Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | BSp |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Funct | A| S| D| F| G| H| J| K| L| ;| '|Enter |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |
|
||||
* |-----------------------------------------------------------'
|
||||
* | Ctl|Alt|Gui | Space |Gui |Alt| F2| Ctl |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[BASE_LAYER] = KEYMAP_60(
|
||||
F(0), 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(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
|
||||
KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(2), KC_RCTL \
|
||||
),
|
||||
|
||||
/* Layer 1: Function Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11| F12| Del |
|
||||
* |-----------------------------------------------------------|
|
||||
* | |Prv|Ply|Nxt| | |Pg^|Hme|Up |End| |Br-|Br+| |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Hold |Mte|Vl-|Vl+| | |Pgv|Lft|Dwn|Rgt| | | |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------'
|
||||
* | | | | | | | | |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[FUNCTION_LAYER] = KEYMAP_60(
|
||||
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_DEL, \
|
||||
__x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
|
||||
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
|
||||
KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
|
||||
),
|
||||
|
||||
/* Layer 2: System Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Reset| | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------'
|
||||
* | | | | | | | | |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[SYSTEM_LAYER] = KEYMAP_60(
|
||||
RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
|
||||
__x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
|
||||
),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
ESC_GRV, // Makes Esc behave like `~ when pressed with the left GUI modifier. This is the "switch between windows of the same application" key combination in macOS
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(ESC_GRV),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t esc_grv_mask;
|
||||
switch (id) {
|
||||
case ESC_GRV:
|
||||
esc_grv_mask = get_mods() & MOD_BIT(KC_LGUI);
|
||||
if (record->event.pressed) {
|
||||
if (esc_grv_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (esc_grv_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
# Mauin's keymap for the GON NerD
|
||||
|
||||
This layout is based on a Pok3r style layout with a standard base layer.
|
||||
|
||||
Function layers provide access to navigation and media keys.
|
@ -0,0 +1,38 @@
|
||||
GON NerD keyboard firmware
|
||||
======================
|
||||
|
||||
## Changing Bootloader
|
||||
|
||||
It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections.
|
||||
|
||||
It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here:
|
||||
[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard.
|
||||
|
||||
_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
|
||||
not work anymore. You will lose your warranty and official support from GON!_
|
||||
|
||||
## Reset button
|
||||
|
||||
To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins.
|
||||
|
||||
## Building
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||
|
||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||
|
||||
### Default
|
||||
|
||||
To build with the default keymap, simply run `make default`.
|
||||
|
||||
### Other Keymaps
|
||||
|
||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||
|
||||
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
||||
|
||||
```
|
||||
$ make [default|jack|<name>]
|
||||
```
|
||||
|
||||
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
@ -0,0 +1,66 @@
|
||||
# MCU name
|
||||
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 = 8000000
|
||||
|
||||
|
||||
#
|
||||
# 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 ?= yes # 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 ?= yes # 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
|
@ -1,5 +1,5 @@
|
||||
#include "onekey.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{ KC_A }
|
||||
{{ KC_A }}
|
||||
};
|
||||
|