Merge remote-tracking branch 'upstream/master'
@ -0,0 +1,93 @@
|
|||||||
|
# auto for anything unspecified
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# sources
|
||||||
|
*.c text
|
||||||
|
*.cc text
|
||||||
|
*.cxx text
|
||||||
|
*.cpp text
|
||||||
|
*.c++ text
|
||||||
|
*.hpp text
|
||||||
|
*.h text
|
||||||
|
*.h++ text
|
||||||
|
*.hh text
|
||||||
|
*.bat text
|
||||||
|
*.coffee text
|
||||||
|
*.css text
|
||||||
|
*.htm text
|
||||||
|
*.html text
|
||||||
|
*.inc text
|
||||||
|
*.ini text
|
||||||
|
*.js text
|
||||||
|
*.jsx text
|
||||||
|
*.json text
|
||||||
|
*.less text
|
||||||
|
*.php text
|
||||||
|
*.pl text
|
||||||
|
*.py text
|
||||||
|
*.rb text
|
||||||
|
*.sass text
|
||||||
|
*.scm text
|
||||||
|
*.scss text
|
||||||
|
*.sh text
|
||||||
|
*.sql text
|
||||||
|
*.styl text
|
||||||
|
*.ts text
|
||||||
|
*.xml text
|
||||||
|
*.xhtml text
|
||||||
|
|
||||||
|
# make files (need to always use lf for compatibility with Windows 10 bash)
|
||||||
|
Makefile eol=lf
|
||||||
|
*.mk eol=lf
|
||||||
|
|
||||||
|
# make files (need to always use lf for compatibility with Windows 10 bash)
|
||||||
|
*.sh eol=lf
|
||||||
|
|
||||||
|
# documentation
|
||||||
|
*.markdown text
|
||||||
|
*.md text
|
||||||
|
*.mdwn text
|
||||||
|
*.mdown text
|
||||||
|
*.mkd text
|
||||||
|
*.mkdn text
|
||||||
|
*.mdtxt text
|
||||||
|
*.mdtext text
|
||||||
|
*.txt text
|
||||||
|
AUTHORS text
|
||||||
|
CHANGELOG text
|
||||||
|
CHANGES text
|
||||||
|
CONTRIBUTING text
|
||||||
|
COPYING text
|
||||||
|
INSTALL text
|
||||||
|
license text
|
||||||
|
LICENSE text
|
||||||
|
NEWS text
|
||||||
|
readme text
|
||||||
|
*README* text
|
||||||
|
TODO text
|
||||||
|
|
||||||
|
GRAPHICS
|
||||||
|
*.ai binary
|
||||||
|
*.bmp binary
|
||||||
|
*.eps binary
|
||||||
|
*.gif binary
|
||||||
|
*.ico binary
|
||||||
|
*.jng binary
|
||||||
|
*.jp2 binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.jpx binary
|
||||||
|
*.jxr binary
|
||||||
|
*.pdf binary
|
||||||
|
*.png binary
|
||||||
|
*.psb binary
|
||||||
|
*.psd binary
|
||||||
|
*.svg text
|
||||||
|
*.svgz binary
|
||||||
|
*.tif binary
|
||||||
|
*.tiff binary
|
||||||
|
*.wbmp binary
|
||||||
|
*.webp binary
|
||||||
|
|
||||||
|
# hex files
|
||||||
|
*.hex binary
|
@ -0,0 +1,70 @@
|
|||||||
|
|
||||||
|
# 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 ?= yes # 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
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,30 @@
|
|||||||
|
#include "amj60.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
|
||||||
|
DDRB |= (1<<2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// Turn capslock on
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
} else {
|
||||||
|
// Turn capslock off
|
||||||
|
PORTB |= (1<<2);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
#ifndef AMJ60_H
|
||||||
|
#define AMJ60_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#define XXX KC_NO
|
||||||
|
|
||||||
|
/* AMJ60 layout to the best of my knowledge matrix layout
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c | 3d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
#define KEYMAP( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||||
|
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ANSI
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
#define KEYMAP_ANSI( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
|
||||||
|
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \
|
||||||
|
{k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d}, \
|
||||||
|
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AMJ60 HHKB matrix layout
|
||||||
|
* ,------------------------------------------------------------.
|
||||||
|
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 |
|
||||||
|
* |------------------------------------------------------------|
|
||||||
|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
|
||||||
|
* |------------------------------------------------------------|
|
||||||
|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d |
|
||||||
|
* |------------------------------------------------------------|
|
||||||
|
* | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | 3c |
|
||||||
|
* |------------------------------------------------------------|
|
||||||
|
* | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
|
||||||
|
* `------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define KEYMAP_HHKB( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \
|
||||||
|
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \
|
||||||
|
{k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||||
|
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ISO
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|2d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
#define KEYMAP_ISO( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
|
||||||
|
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX}, \
|
||||||
|
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \
|
||||||
|
}
|
||||||
|
/* ISO w/ split right shift key matrix layout
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|2d |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | 3c |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
#define KEYMAP_ISO_SPLITRSHIFT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \
|
||||||
|
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||||
|
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \
|
||||||
|
}
|
||||||
|
|
||||||
|
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 0x6066
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Han Chen
|
||||||
|
#define PRODUCT AMJ60
|
||||||
|
#define DESCRIPTION qmk port of AMJ60 PCB
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5}
|
||||||
|
#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3}
|
||||||
|
#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_TIMER
|
||||||
|
#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,23 @@
|
|||||||
|
# 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 = no # 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.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# adjust for cpu
|
||||||
|
# -j 16 gave best result on a hyperthreaded quad core core i7
|
||||||
|
|
||||||
|
LIMIT=10
|
||||||
|
THREADS="-j 16"
|
||||||
|
KMAP=iso_split_rshift
|
||||||
|
|
||||||
|
echo "We need sudo later"
|
||||||
|
sudo ls 2>&1 /dev/null
|
||||||
|
|
||||||
|
function wait_bootloader {
|
||||||
|
echo "Waiting for Bootloader..."
|
||||||
|
local STARTTIME=$(date +"%s")
|
||||||
|
local REMIND=0
|
||||||
|
local EXEC=dfu-programmer
|
||||||
|
local TARGET=atmega32u4
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
sudo $EXEC $TARGET get > /dev/null 2>&1
|
||||||
|
[ $? -eq 0 ] && break
|
||||||
|
ENDTIME=$(date +"%s")
|
||||||
|
DURATION=$(($ENDTIME-$STARTTIME))
|
||||||
|
if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ]
|
||||||
|
then
|
||||||
|
echo "Did you forget to press the reset button?"
|
||||||
|
REMIND=1
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
make clean
|
||||||
|
make KEYMAP=${KMAP} ${THREADS}
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
|
echo "please trigger flashing!"
|
||||||
|
wait_bootloader
|
||||||
|
sudo make KEYMAP=${KMAP} dfu ${THREADS}
|
||||||
|
else
|
||||||
|
echo "make failed"
|
||||||
|
exit 77
|
||||||
|
fi
|
@ -0,0 +1,147 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "amj60.h"
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _DEF 0
|
||||||
|
#define _SPC 1
|
||||||
|
#define _TAB 2
|
||||||
|
#define _SFX 3
|
||||||
|
|
||||||
|
// dual-role shortcuts
|
||||||
|
#define TABDUAL LT(_TAB, KC_TAB)
|
||||||
|
#define CAPSDUAL CTL_T(KC_ESC)
|
||||||
|
#define SPACEDUAL LT(_SPC, KC_SPACE)
|
||||||
|
#define ENTERDUAL CTL_T(KC_ENT)
|
||||||
|
// arrow cluster duality bottom right corner
|
||||||
|
#define ARRLEFT ALT_T(KC_LEFT)
|
||||||
|
#define ARRDOWN GUI_T(KC_DOWN)
|
||||||
|
#define ARRUP SFT_T(KC_UP)
|
||||||
|
#define ARRRIGHT CTL_T(KC_RIGHT)
|
||||||
|
// german brackets
|
||||||
|
#define GER_CUR_L RALT(KC_7) // [
|
||||||
|
#define GER_CUR_R RALT(KC_0) // ]
|
||||||
|
#define GER_PAR_L LSFT(KC_8) // (
|
||||||
|
#define GER_PAR_R LSFT(KC_9) // )
|
||||||
|
#define GER_ANG_L KC_NUBS // <
|
||||||
|
#define GER_ANG_R LSFT(KC_NUBS) // >
|
||||||
|
#define GER_BRC_L RALT(KC_8) // [
|
||||||
|
#define GER_BRC_R RALT(KC_9) // ]
|
||||||
|
|
||||||
|
// increase readability
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _DEF: Default Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Sft | < | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is
|
||||||
|
* `-----------------------------------------------------------' LEFT DWN RIGHT
|
||||||
|
*/
|
||||||
|
[_DEF] = KEYMAP_ISO_SPLITRSHIFT(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
TABDUAL, 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, \
|
||||||
|
CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ARRUP, TG(_SFX), \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT),
|
||||||
|
|
||||||
|
/* Keymap 1: F-and-vim Layer, modified with Space (by holding space)
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Paus| Up| [ | ] | | | | ( | ) | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | < | > | |M0 | | | | | Vol+ | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | |Alt |Prev|Vol-|Next|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_SPC] = KEYMAP_ISO_SPLITRSHIFT(
|
||||||
|
KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||||
|
_______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \
|
||||||
|
_______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||||
|
|
||||||
|
/* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab)
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | { | } | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | |Pos1|PgDn|PgUp|End| | |Retrn |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | |AF2| | | | | PgUp | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | |Alt |Pos1|PgDn|End |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_TAB] = KEYMAP_ISO_SPLITRSHIFT(
|
||||||
|
KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, KC_PGUP, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
|
||||||
|
|
||||||
|
/* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key)
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |RSET| | | | | | | 7| 8| 9| | | |Backsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | 4 | 5 | 6 | | | | \ |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | L | L | | | | | 1 | 2 | 3 | | | Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent
|
||||||
|
* |-----------------------------------------------------------| LED controlling
|
||||||
|
* |Ctrl|Win |Alt | |Alt |Left|Down|Right|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_SFX] = KEYMAP_ISO_SPLITRSHIFT(
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \
|
||||||
|
_______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \
|
||||||
|
_______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
};
|
||||||
|
|
||||||
|
enum function_id {
|
||||||
|
LAUNCH,
|
||||||
|
RGBLED_TOGGLE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_FUNCTION(LAUNCH),
|
||||||
|
[10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT),
|
||||||
|
};
|
||||||
|
|
||||||
|
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:
|
||||||
|
return (record->event.pressed ?
|
||||||
|
MACRO( D(RALT), T(SPC), U(RALT), END )
|
||||||
|
:MACRO( END ));
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
return (record->event.pressed ?
|
||||||
|
MACRO( D(LALT), T(F2), U(LALT), END )
|
||||||
|
:MACRO( END ));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,30 @@
|
|||||||
|
toneman77's custom spacefn Layout
|
||||||
|
=====================
|
||||||
|
|
||||||
|
##Quantum MK Firmware
|
||||||
|
For the full Quantum feature list, see the parent readme.md.
|
||||||
|
|
||||||
|
# Features
|
||||||
|
* heavily modified ISO (!) layout with split right shift key
|
||||||
|
* spaceFn
|
||||||
|
* Dual-Role keys:
|
||||||
|
*
|
||||||
|
| Original key | when tapped | when held |
|
||||||
|
| ---------------- | ------------- | ------------- |
|
||||||
|
| Space | Space | layer change |
|
||||||
|
| Caps lock | Escape | Control |
|
||||||
|
| Tab | Tab | layer change |
|
||||||
|
| Enter | Enter | Control |
|
||||||
|
|
||||||
|
* vim-style arrow keys on hjkl (spacefn layer)
|
||||||
|
* corresponding Home/PgDn/PgUp/End on hjkl (tab layer)
|
||||||
|
* bonus arrow keys in the bottom right corner on Alt/Win/Menu/rCtrl/Shift
|
||||||
|
* more bonus arrow keys on wasd (spacefn layer)
|
||||||
|
* media keys prev/next/play/vol+/vol- (spacefn layer)
|
||||||
|
* firmware bootloader button
|
||||||
|
* additional brackets that only work in german layout due to horrible placement
|
||||||
|
in the default qwertz layout
|
||||||
|
|
||||||
|
|
||||||
|
### Additional Credits
|
||||||
|
* visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) (without the LED keys)
|
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
git checkout amj60 # gets you on branch amj60
|
||||||
|
git fetch origin # gets you up to date with origin
|
||||||
|
git merge origin/master
|
@ -0,0 +1,57 @@
|
|||||||
|
AMJ60 keyboard firmware
|
||||||
|
======================
|
||||||
|
DIY/Assembled compact 60% keyboard.
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/amj60
|
||||||
|
folder. Once your dev env is setup, you'll be able to type `make` to generate
|
||||||
|
your .hex - you can then use `make dfu` to program your PCB once you hit the
|
||||||
|
reset button.
|
||||||
|
|
||||||
|
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`.
|
||||||
|
|
||||||
|
### 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 file
|
||||||
|
named `<name>.c` in the keymaps folder, and see keymap document (you can find
|
||||||
|
in top readme.md) and existent keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with
|
||||||
|
`KEYMAP` option like:
|
||||||
|
``
|
||||||
|
$ make KEYMAP=[default|jack|<name>]
|
||||||
|
``
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps`
|
||||||
|
folder.
|
||||||
|
|
||||||
|
## Variations
|
||||||
|
KEYMAP macros for the following layouts are available:
|
||||||
|
|
||||||
|
* default, for all the available, possible keys
|
||||||
|
* ANSI, for 60% ANSI keyboard
|
||||||
|
* ISO
|
||||||
|
* ISO w/ split right shift key
|
||||||
|
* HHKB
|
||||||
|
|
||||||
|
Remark: all but "ISO w/ split right shift key" are untested and were done to the best of my knowledge.
|
||||||
|
|
||||||
|
### Original tmk firmware
|
||||||
|
The original firmware that was used to port to qmk can be found [here](https://github.com/AMJKeyboard/AMJ60).
|
||||||
|
|
||||||
|
## Further information
|
||||||
|
Since information and documentation for this board are sparse, (at least for non-chinese speaking ppl) here is everything that could be found
|
||||||
|
|
||||||
|
* [geekhack discussion](https://geekhack.org/index.php?topic=53070.0)
|
||||||
|
* [chinese discussion](https://www.v2ex.com/t/161887)
|
||||||
|
* Board has [dedicated pinouts](https://i.imgur.com/D0sWhyh.jpg?1) for a bluetooth module
|
||||||
|
* has pins for external power [picture](https://i.imgur.com/00VrtIp.jpg?1).
|
||||||
|
* most information comes from [reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/32oonr/gh60_pcb_for_your_custom_keyboard/)
|
@ -0,0 +1,3 @@
|
|||||||
|
VIRTSER_ENABLE = yes
|
||||||
|
# Not enough interupts, so something has to go
|
||||||
|
MOUSEKEY_ENABLE = no
|
@ -0,0 +1,324 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "sendchar.h"
|
||||||
|
#include "virtser.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
#define TXBOLT 3 // TxBolt Steno Virtual Serial
|
||||||
|
#define TXBOLT2 4 // TxBolt Steno Virtual Serial Alternative Layout
|
||||||
|
|
||||||
|
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 | | TX | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | BOLT |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | 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 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | 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_EQL, 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, 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,
|
||||||
|
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(TXBOLT), 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,
|
||||||
|
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 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||||
|
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||||
|
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | RESET | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |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, 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
|
||||||
|
),
|
||||||
|
// TxBolt Codes
|
||||||
|
#define Sl 0b00000001
|
||||||
|
#define Tl 0b00000010
|
||||||
|
#define Kl 0b00000100
|
||||||
|
#define Pl 0b00001000
|
||||||
|
#define Wl 0b00010000
|
||||||
|
#define Hl 0b00100000
|
||||||
|
#define Rl 0b01000001
|
||||||
|
#define Al 0b01000010
|
||||||
|
#define Ol 0b01000100
|
||||||
|
#define X 0b01001000
|
||||||
|
#define Er 0b01010000
|
||||||
|
#define Ur 0b01100000
|
||||||
|
#define Fr 0b10000001
|
||||||
|
#define Rr 0b10000010
|
||||||
|
#define Pr 0b10000100
|
||||||
|
#define Br 0b10001000
|
||||||
|
#define Lr 0b10010000
|
||||||
|
#define Gr 0b10100000
|
||||||
|
#define Tr 0b11000001
|
||||||
|
#define Sr 0b11000010
|
||||||
|
#define Dr 0b11000100
|
||||||
|
#define Zr 0b11001000
|
||||||
|
#define NM 0b11010000
|
||||||
|
#define GRPMASK 0b11000000
|
||||||
|
#define GRP0 0b00000000
|
||||||
|
#define GRP1 0b01000000
|
||||||
|
#define GRP2 0b10000000
|
||||||
|
#define GRP3 0b11000000
|
||||||
|
/* Keymap 3: TxBolt (Serial)
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | BKSPC | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | T | P | H | * |------| |------| * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | K | W | R | * | | | | * | R | B | G | S | Z |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | A | O |------| |------| E | U |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// TxBolt over Serial
|
||||||
|
[TXBOLT] = KEYMAP(
|
||||||
|
KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO,
|
||||||
|
KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X),
|
||||||
|
KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X), KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
M(Al), M(Ol), KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM),
|
||||||
|
M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr),
|
||||||
|
KC_NO, M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, M(Er), M(Ur)
|
||||||
|
),
|
||||||
|
/* Keymap 4: TxBolt (Serial) Alternative
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | S | T | P | H | * | | | | * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | K | W | R | * |------| |------| * | R | B | G | S | Z |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | A | O | | E | U | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// TxBolt over Serial
|
||||||
|
[TXBOLT2] = KEYMAP(
|
||||||
|
KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO,
|
||||||
|
KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X), KC_NO,
|
||||||
|
KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, M(Al), M(Ol),
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO,
|
||||||
|
// right hand
|
||||||
|
KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM),
|
||||||
|
KC_TRNS, M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr),
|
||||||
|
M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
M(Er), M(Ur), KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO,
|
||||||
|
KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t chord[4] = {0,0,0,0};
|
||||||
|
uint8_t pressed_count = 0;
|
||||||
|
|
||||||
|
void send_chord(void)
|
||||||
|
{
|
||||||
|
for(uint8_t i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if(chord[i])
|
||||||
|
virtser_send(chord[i]);
|
||||||
|
}
|
||||||
|
virtser_send(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
// We need to track keypresses in all modes, in case the user
|
||||||
|
// changes mode whilst pressing other keys.
|
||||||
|
if (record->event.pressed)
|
||||||
|
pressed_count++;
|
||||||
|
else
|
||||||
|
pressed_count--;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t grp = (id & GRPMASK) >> 6;
|
||||||
|
chord[grp] |= id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (pressed_count == 0) {
|
||||||
|
send_chord();
|
||||||
|
chord[0] = chord[1] = chord[2] = chord[3] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,92 @@
|
|||||||
|
# ErgoDox EZ Steno Configuration
|
||||||
|
|
||||||
|
This layout has a layer that uses the TxBolt Stenograph protocol over a Virtual Serial port. It requires something like Plover in order to function.
|
||||||
|
|
||||||
|
In Plover, you can select TX Bolt as the Stenotype Machine, and find the COM port that was assigned. In this way, your regular keyboard will still function normally, and you can switch back and forth between the Steno and Keyboard layers.
|
||||||
|
|
||||||
|
<pre><code>
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Del | Q | W | E | R | T | L1 | | TX | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | BOLT |------+------+------+------+------+--------|
|
||||||
|
* | BkSp | 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 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | App | LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space|Backsp|------| |------| Tab |Enter |
|
||||||
|
* | |ace | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
/* 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 | \ | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | . | 0 | = | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
/* Keymap 2: Media keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | RESET | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
/* Keymap 3: TxBolt (Serial)
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | BKSPC | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | T | P | H | * |------| |------| * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | S | K | W | R | * | | | | * | R | B | G | S | Z |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | A | O |------| |------| E | U |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
</code></pre>
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 89 KiB |
@ -0,0 +1,10 @@
|
|||||||
|
These are notes on how to build and deploy the firmware to Ez, but they are
|
||||||
|
from before the qmk restructuring.
|
||||||
|
|
||||||
|
cd qmk_firmware/keyboard/ergodox_ez
|
||||||
|
make KEYMAP=jafo
|
||||||
|
cp ergodox_ez.hex keymaps/jafo/
|
||||||
|
/tmp/teensy.64bit
|
||||||
|
Open hex keymap file
|
||||||
|
Program
|
||||||
|
Upload
|
After Width: | Height: | Size: 175 KiB |
@ -0,0 +1,183 @@
|
|||||||
|
#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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Grv | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | = | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Esc/Cmd| A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||||
|
* |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||||
|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Grv/L1| '" | Del | Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* |Ctrl/Esc| Alt| | 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_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
|
GUI_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(MDIA),
|
||||||
|
LT(SYMB,KC_GRV),KC_QUOT, KC_DELT, KC_LEFT,KC_RGHT,
|
||||||
|
CTL_T(KC_ESC), KC_LALT,
|
||||||
|
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_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||||
|
TG(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_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, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| LEFT | DOWN | UP | RIGHT| | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | Lclk | Mclk | 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_BTN1, KC_BTN3, 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, 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;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,20 @@
|
|||||||
|
# ErgoDox EZ "jafo" Configuration
|
||||||
|
|
||||||
|
This is a layout based on the ErgoDox Ez default layout, but with some
|
||||||
|
customizations I made for my use-case. I use Linux, vi and the i3 window
|
||||||
|
manager, so I made these changes:
|
||||||
|
|
||||||
|
- Arrow keys laid out in vi positions in media layer.
|
||||||
|
|
||||||
|
- Esc (tap) and Win (held) to the left of A. i3 uses Win key for navigation
|
||||||
|
and having that be symmetric on the left and right makes it easier.
|
||||||
|
|
||||||
|
- Grave accent below equals, I was having a hard time using ~
|
||||||
|
|
||||||
|
- Layer 2 switch below the L1 switch, so I can go into a mode where I get
|
||||||
|
arrow keys under my vi motion fingers.
|
||||||
|
|
||||||
|
- Making the Ctrl (held) and Esc (tap) on my thumbs symmetric. Not sure I
|
||||||
|
need that with the Esc left of A and Ctrl on the Z and / keys when held...
|
||||||
|
|
||||||
|
![Jafo](jafo_highres.png)
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 120 KiB |
@ -1,27 +1,27 @@
|
|||||||
[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
|
[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
|
||||||
[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
|
[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
|
||||||
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#737373",a:7},"",{c:"#99de2a",a:4},"F16"],
|
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#737373",a:7},"",{c:"#99de2a",a:4},"F16"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#c6c600",w:1.5},"\n\nShift\n\n\n\n\nLock"],
|
||||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
|
[{y:-0.375,x:3.5,c:"#0066cc"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
|
||||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nUpLeft",{x:1},"Mouse\n\n\n\n\n\nUpRgt",{x:8.5,c:"#ffb063"},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
|
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nUpLeft",{x:1},"Mouse\n\n\n\n\n\nUpRgt",{x:8.5,c:"#1e8fff"},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
|
||||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#e6e067"},"Print\n\n\n\n\n\nScreen"],
|
[{y:-0.875,x:5.5,c:"#9977ee"},"Vol\n\n\n\n\n\nUp",{c:"#1e8fff",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#9977ee"},"Print\n\n\n\n\n\nScreen"],
|
||||||
[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#e6e067",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#ff0000",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#000000",t:"#3f68ff",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#9977ee",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#3f68ff",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#ff8500",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"],
|
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"],
|
||||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nDown",{x:6.5},"Num\n\n\n\n\n\nLock"],
|
[{y:-0.875,x:5.5,c:"#9977ee"},"Vol\n\n\n\n\n\nDown",{x:6.5},"Num\n\n\n\n\n\nLock"],
|
||||||
[{y:-0.875,c:"#2277ff",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#e6e067"},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#2277ff",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#9977ee",t:"#000000"},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#c6c600",t:"#007d00",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
|
||||||
[{y:-0.625,x:6.5,c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
|
[{y:-0.625,x:6.5,c:"#1e8fff",t:"#000000",h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.75,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
[{y:-0.75,x:3.5,c:"#0066cc"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#ffb063"},"End",{x:1},"Page\n\n\n\n\n\nDown"],
|
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#1e8fff"},"End",{x:1},"Page\n\n\n\n\n\nDown"],
|
||||||
[{y:-0.875,x:5.5,c:"#e6e067"},"Mute",{x:6.5,c:"#737373",a:7},""],
|
[{y:-0.875,x:5.5,c:"#9977ee"},"Mute",{x:6.5,c:"#737373",a:7},""],
|
||||||
[{y:-0.875,c:"#2277ff",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
[{y:-0.875,c:"#c6c600",t:"#9e0000",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",t:"#000000",a:7},"",{x:14.5},"",{c:"#c6c600",t:"#9e0000",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
|
||||||
[{y:-0.375,x:3.5,c:"#ff8500"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#ffb063",fa:[0,0,0,1]},"Delete\n\n\nOption"],
|
[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#1e8fff",fa:[0,0,0,1]},"Delete\n\n\nOption"],
|
||||||
[{y:-0.875,x:2.5,c:"#ff8500"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#ffb063"},"Insert\n\n\nCmd",{x:1,c:"#77aaff"},"Hyper"],
|
[{y:-0.875,x:2.5,c:"#0066cc"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#1e8fff"},"Insert\n\n\nCmd",{x:1,c:"#dddd77"},"Hyper"],
|
||||||
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"],
|
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"],
|
||||||
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ccbb00"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
|
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#6633ee"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
|
||||||
[{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"],
|
[{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"],
|
||||||
[{x:2},"Home\n\n\nBrowser"],
|
[{x:2},"Home\n\n\nBrowser"],
|
||||||
[{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"],
|
[{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"],
|
||||||
[{x:-3,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ccbb00",h:2},"Stop\n\n\nAudio",{h:2},"Play\n\n\nAudio\n\n\nPause"],
|
[{x:-3,c:"#9977ee"},"Vol\n\n\n\n\n\nUp",{c:"#6633ee",h:2},"Stop\n\n\nAudio",{h:2},"Play\n\n\nAudio\n\n\nPause"],
|
||||||
[{x:-3,c:"#e6e067"},"Vol\n\n\n\n\n\nDown"]
|
[{x:-3,c:"#9977ee"},"Vol\n\n\n\n\n\nDown"]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 99 KiB |
@ -0,0 +1,312 @@
|
|||||||
|
/*
|
||||||
|
* About this keymap:
|
||||||
|
*
|
||||||
|
* The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak
|
||||||
|
* software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner
|
||||||
|
* keys. I've decided to continue using this layout with my ErgoDox.
|
||||||
|
*
|
||||||
|
* The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional
|
||||||
|
* keys as shown in the diagrams. The Colemak layout is merely an adaptation of that.
|
||||||
|
*
|
||||||
|
* I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck
|
||||||
|
* layouts.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _DV 0 // Dvorak layer
|
||||||
|
#define _QW 1 // Qwerty layer
|
||||||
|
#define _CM 2 // Colemak layer
|
||||||
|
#define _MD 3 // Media Layer
|
||||||
|
#define _KP 4 // Keypad Layer
|
||||||
|
|
||||||
|
// Macro name shortcuts
|
||||||
|
#define DVORAK M(_DV)
|
||||||
|
#define QWERTY M(_QW)
|
||||||
|
#define COLEMAK M(_CM)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Layer 0 : Dvorak
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | [ |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | - |
|
||||||
|
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
||||||
|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | LCTL | LALT | | RALT | RCTL |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | BkSp | Del |------| |------| Enter| Space|
|
||||||
|
* | | | End | | PgDn | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
[_DV] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX,
|
||||||
|
KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_MD),
|
||||||
|
KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC, KC_DEL, KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC,
|
||||||
|
XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
|
||||||
|
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||||
|
MO(_KP), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, KC_SLSH, KC_EQL, KC_RGUI,
|
||||||
|
KC_RALT, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Layer 1: QWERTY
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||||
|
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | LCTL | LALT | | RALT | RCTL |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | BkSp | Del |------| |------| Enter| Space|
|
||||||
|
* | | | End | | PgDn | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[_QW] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX,
|
||||||
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD),
|
||||||
|
KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC, KC_DEL, KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
MO(_KP), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI,
|
||||||
|
KC_LALT, KC_LCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Layer 2 : Colemak
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | BkSpc | A | R | S | T | D |------| |------| H | N | E | I | O | ' |
|
||||||
|
* |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | LCTL | LALT | | RALT | RCTL |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | BkSp | Del |------| |------| Enter| Space|
|
||||||
|
* | | | End | | PgDn | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[_CM] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||||
|
KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX,
|
||||||
|
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MD),
|
||||||
|
KC_LGUI, KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC, KC_DEL, KC_END,
|
||||||
|
// right hand
|
||||||
|
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
XXXXXXX, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||||
|
KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
MO(_KP), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI,
|
||||||
|
KC_LALT, KC_LCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Layer 3 : Media layer
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | PrSc | ScLk | Paus | | | | | | Mute | Vol- | Vol+ | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |Dvorak|Qwerty|Colemk| | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[_MD] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
|
_______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, DVORAK, QWERTY, COLEMAK, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
// right hand
|
||||||
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
|
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
|
||||||
|
KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Layer 4 : Keypad layer
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Power | | | | | | | | | | NmLk | KP = | KP / | KP * | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Sleep | | | | | | | | | | KP 7 | KP 8 | KP 9 | KP - | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | KP 0 | | KP . |KP Ent| |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[_KP] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_PWR, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_SLEP, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_WAKE, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______,
|
||||||
|
_______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______,
|
||||||
|
_______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
|
||||||
|
_______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
|
||||||
|
KC_P0, _______, KC_PDOT, KC_PENT, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case _DV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_DV);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _QW:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QW);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _CM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_CM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 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,122 @@
|
|||||||
|
# Xyverz's ErgoDox EZ Keymap
|
||||||
|
|
||||||
|
## About this keymap:
|
||||||
|
|
||||||
|
The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my ErgoDox.
|
||||||
|
|
||||||
|
The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional keys as shown in the diagrams. The Colemak layout is merely an adaptation of that.
|
||||||
|
|
||||||
|
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
|
||||||
|
|
||||||
|
## Still to do:
|
||||||
|
|
||||||
|
* Need to figure out a better position for the ESC key.
|
||||||
|
* Come up with a function for the empty keys shown in the alpha layers below.
|
||||||
|
* Fix the CapsLock, NumLock, and ScrLck LEDs.
|
||||||
|
|
||||||
|
### Layer 0: Dvorak layer
|
||||||
|
|
||||||
|
,--------------------------------------------------.,--------------------------------------------------.
|
||||||
|
| ] | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | [ |
|
||||||
|
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
||||||
|
| Tab | ' | , | . | Y | Y | || | F | G | C | R | L | \ |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| CapsLk | A | O | E | U | I |------||------| D | H | T | N | S | - |
|
||||||
|
|--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | X | || | B | M | W | V | Z | RShift |
|
||||||
|
`--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------'
|
||||||
|
| LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| LCtr | LAlt || Ralt | RCtr |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | Home || PgUp | | |
|
||||||
|
| BkSp | Del |------||------| Enter| Space|
|
||||||
|
| | | End || PgDn | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
|
||||||
|
### Layer 1: QWERTY layer
|
||||||
|
|
||||||
|
,--------------------------------------------------.,--------------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | E | R | T | || | Y | U | I | O | P | \ |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| CapsLk | A | S | D | F | G |------||------| H | J | K | L | ; | ' |
|
||||||
|
|--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B | || | N | M | , | . | / | RShift |
|
||||||
|
`--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------'
|
||||||
|
| LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| LCtr | LAlt || Ralt | RCtr |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | Home || PgUp | | |
|
||||||
|
| BkSp | Del |------||------| Enter| Space|
|
||||||
|
| | | End || PgDn | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
|
||||||
|
### Keymap 2: Colemak layer
|
||||||
|
|
||||||
|
,--------------------------------------------------.,--------------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | F | P | G | || | J | L | U | Y | ; | \ |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| BkSpc | A | R | S | T | D |------||------| H | N | E | I | O | ' |
|
||||||
|
|--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B | || | K | M | , | . | / | RShift |
|
||||||
|
`--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------'
|
||||||
|
| LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| LCtr | LAlt || Ralt | RCtr |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | Home || PgUp | | |
|
||||||
|
| BkSp | Del |------||------| Enter| Space|
|
||||||
|
| | | End || PgDn | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
|
||||||
|
### layer 3 : Media layer
|
||||||
|
|
||||||
|
,--------------------------------------------------.,--------------------------------------------------.
|
||||||
|
| TEENSY | F1 | F2 | F3 | F4 | F5 | F11 || F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||||
|
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
||||||
|
| | | PrSc | ScLk | Paus | | || | | Mute | Vol- | Vol+ | | |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| | | | | | |------||------| Stop | Prev | Play | Next | Sel | |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| | |Dvorak|Qwerty|Colemk| | || | | | | | | |
|
||||||
|
`--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| | || | |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | || | | |
|
||||||
|
| | |------||------| | |
|
||||||
|
| | | || | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Keymap 4: Keypad layer
|
||||||
|
|
||||||
|
,--------------------------------------------------.,--------------------------------------------------.
|
||||||
|
| Power | | | | | | || | | NmLk | KP = | KP / | KP * | |
|
||||||
|
|--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
|
||||||
|
| Sleep | | | | | | || | | KP 7 | KP 8 | KP 9 | KP - | |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| Wake | | | | | |------||------| | KP 4 | KP 5 | KP 6 | KP + | |
|
||||||
|
|--------+------+------+------+------+------| || |------+------+------+------+------+--------|
|
||||||
|
| | | | | | | || | | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||||
|
`--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | KP 0 | | KP . |KP Ent| |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| | || | |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | || | | |
|
||||||
|
| | |------||------| | |
|
||||||
|
| | | || | | |
|
||||||
|
`--------------------'`--------------------'
|
@ -0,0 +1,71 @@
|
|||||||
|
# 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=512
|
||||||
|
|
||||||
|
# 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 ?= yes # 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 ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
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 0x6660
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER ME
|
||||||
|
#define PRODUCT MinOrca
|
||||||
|
#define DESCRIPTION Tiny Whale
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* MinOrca PCB default pin-out */
|
||||||
|
#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 = yes # 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.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* bootmagic salt key */
|
||||||
|
#define BOOTMAGIC_KEY_SALT KC_ESC
|
||||||
|
|
||||||
|
/* skip bootmagic and eeconfig */
|
||||||
|
#define BOOTMAGIC_KEY_SKIP KC_SPACE
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,44 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "minorca.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = { /* Base */
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
|
||||||
|
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_ENT },
|
||||||
|
{KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 },
|
||||||
|
{KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO }
|
||||||
|
},
|
||||||
|
[1] = { /* First */
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT },
|
||||||
|
{KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI },
|
||||||
|
{KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 },
|
||||||
|
{KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO }
|
||||||
|
},
|
||||||
|
[2] = { /* Second */
|
||||||
|
{KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT },
|
||||||
|
{KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT },
|
||||||
|
{KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 },
|
||||||
|
{KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO }
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_MOMENTARY(1), // to First overlay
|
||||||
|
[1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,5 @@
|
|||||||
|
# The Default Minorca Layout
|
||||||
|
|
||||||
|
Copied from https://github.com/pancinteractive/qmk_firmware/blob/master/keyboard/minorca_mkV/keymaps/default/keymap.c
|
||||||
|
|
||||||
|
It looks incomplete.
|
@ -0,0 +1,23 @@
|
|||||||
|
# How to add your own keymap
|
||||||
|
|
||||||
|
Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`:
|
||||||
|
|
||||||
|
_[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author]
|
||||||
|
|
||||||
|
\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
|
||||||
|
|
||||||
|
and contain the following files:
|
||||||
|
|
||||||
|
* `keymap.c`
|
||||||
|
* `readme.md` *recommended*
|
||||||
|
* `config.h` *optional*, found automatically when compiling
|
||||||
|
* `Makefile` *optional*, found automatically when compling
|
||||||
|
|
||||||
|
When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format:
|
||||||
|
|
||||||
|
* **folder_name** description
|
||||||
|
|
||||||
|
# List of Minorca keymaps
|
||||||
|
|
||||||
|
* **default** default Minorca layout
|
||||||
|
* **rgb** layout with WS2812b control
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 = yes # 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,20 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* bootmagic salt key */
|
||||||
|
#define BOOTMAGIC_KEY_SALT KC_ESC
|
||||||
|
|
||||||
|
/* skip bootmagic and eeconfig */
|
||||||
|
#define BOOTMAGIC_KEY_SKIP KC_SPACE
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D5
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 13 // Number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
#endif
|
After Width: | Height: | Size: 71 KiB |
@ -0,0 +1,65 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "minorca.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _TB 3
|
||||||
|
|
||||||
|
// Macro name shortcuts
|
||||||
|
#define QWERTY M(_QWERTY)
|
||||||
|
#define LOWER M(_LOWER)
|
||||||
|
#define RAISE M(_RAISE)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = { /* Qwerty */
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT},
|
||||||
|
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)},
|
||||||
|
{KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_RAISE] = {
|
||||||
|
{S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)},
|
||||||
|
{KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT},
|
||||||
|
{KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_LOWER] = {
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS},
|
||||||
|
{KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT},
|
||||||
|
{KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_TB] = { /* Tab */
|
||||||
|
{KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS},
|
||||||
|
{KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT},
|
||||||
|
{BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB),
|
||||||
|
[1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
|
||||||
|
[2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
|
||||||
|
[3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
|
||||||
|
};
|
@ -0,0 +1,25 @@
|
|||||||
|
#RGB backlight for MinOrca
|
||||||
|
|
||||||
|
![wiring](example.jpg)
|
||||||
|
|
||||||
|
Example of adding WS2812b LEDs to a MinOrca.
|
||||||
|
|
||||||
|
http://www.40percent.club/2016/08/tiny-whale.html
|
||||||
|
|
||||||
|
The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key.
|
||||||
|
|
||||||
|
* Tab + Z Toggle on/off
|
||||||
|
* Tab + X Mode
|
||||||
|
* Tab + C Hue+
|
||||||
|
* Tab + V Hue-
|
||||||
|
* Tab + B Saturation+
|
||||||
|
* Tab + N Saturation-
|
||||||
|
* Tab + M Brightness+
|
||||||
|
* Tab + , Brightness-
|
||||||
|
|
||||||
|
Example wiring:
|
||||||
|
|
||||||
|
WS2812 data pin is connected to D5
|
||||||
|
|
||||||
|
![wiring](wiring1.jpg)
|
||||||
|
![wiring closeup](wiring2.jpg)
|
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 93 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
#include "minorca.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef MINORCA_H
|
||||||
|
#define MINORCA_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,33 @@
|
|||||||
|
minorca keyboard firmware
|
||||||
|
======================
|
||||||
|
Handwired 40% keyboard
|
||||||
|
|
||||||
|
http://www.panc.co/blog/minorcasebright-information-page
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
|
||||||
|
|
||||||
|
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`.
|
||||||
|
|
||||||
|
### 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 file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
|
||||||
|
```
|
||||||
|
$ make KEYMAP=[default|jack|<name>]
|
||||||
|
```
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
||||||
|
|
||||||
|
### Notable forks (which some of the keymap files are from)
|
||||||
|
- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck)
|
||||||
|
- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c)
|
||||||
|
- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck)
|
||||||
|
- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid)
|
@ -0,0 +1 @@
|
|||||||
|
SRC += action_pseudo_lut.c
|
@ -0,0 +1,142 @@
|
|||||||
|
#include "quantum.h"
|
||||||
|
#include "action_pseudo_lut.h"
|
||||||
|
|
||||||
|
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Pseudo layout action.
|
||||||
|
* This action converts a keycode in order to output the character according to the keymap you specified
|
||||||
|
* still your keyboard layout recognized wrongly on your OS.
|
||||||
|
* Memo: Using other layer keymap to get keycode
|
||||||
|
*/
|
||||||
|
void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) {
|
||||||
|
static uint8_t prev_shift;
|
||||||
|
uint16_t keycode;
|
||||||
|
uint16_t pseudo_keycode;
|
||||||
|
|
||||||
|
/* get keycode from keymap you specified */
|
||||||
|
keycode = keymap_key_to_keycode(base_keymap_id, record->event.key);
|
||||||
|
|
||||||
|
prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
|
||||||
|
|
||||||
|
if (record->event.pressed) {
|
||||||
|
/* when magic commands entered, keycode does not converted */
|
||||||
|
if (IS_COMMAND()) {
|
||||||
|
if (prev_shift) {
|
||||||
|
add_shift_bit(keycode);
|
||||||
|
}
|
||||||
|
register_code(keycode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prev_shift) {
|
||||||
|
pseudo_keycode = convert_keycode(keymap, keycode, true);
|
||||||
|
dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
|
||||||
|
add_shift_bit(keycode);
|
||||||
|
|
||||||
|
if (IS_LSFT(pseudo_keycode)) {
|
||||||
|
register_code(QK_LSFT ^ pseudo_keycode);
|
||||||
|
} else {
|
||||||
|
/* delete shift mod temporarily */
|
||||||
|
del_mods(prev_shift);
|
||||||
|
send_keyboard_report();
|
||||||
|
register_code(pseudo_keycode);
|
||||||
|
add_mods(prev_shift);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pseudo_keycode = convert_keycode(keymap, keycode, false);
|
||||||
|
dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
|
||||||
|
|
||||||
|
if (IS_LSFT(pseudo_keycode)) {
|
||||||
|
add_weak_mods(MOD_BIT(KC_LSFT));
|
||||||
|
send_keyboard_report();
|
||||||
|
register_code(QK_LSFT ^ pseudo_keycode);
|
||||||
|
/* on Windows, prevent key repeat to avoid unintended output */
|
||||||
|
unregister_code(QK_LSFT ^ pseudo_keycode);
|
||||||
|
del_weak_mods(MOD_BIT(KC_LSFT));
|
||||||
|
send_keyboard_report();
|
||||||
|
} else {
|
||||||
|
register_code(pseudo_keycode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (get_shift_bit(keycode)) {
|
||||||
|
del_shift_bit(keycode);
|
||||||
|
pseudo_keycode = convert_keycode(keymap, keycode, true);
|
||||||
|
} else {
|
||||||
|
pseudo_keycode = convert_keycode(keymap, keycode, false);
|
||||||
|
}
|
||||||
|
dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode);
|
||||||
|
|
||||||
|
if (IS_LSFT(pseudo_keycode)) {
|
||||||
|
unregister_code(QK_LSFT ^ pseudo_keycode);
|
||||||
|
} else {
|
||||||
|
unregister_code(pseudo_keycode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded)
|
||||||
|
{
|
||||||
|
uint16_t pseudo_keycode;
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_A ... KC_CAPSLOCK:
|
||||||
|
#if defined(__AVR__)
|
||||||
|
if (shift_modded) {
|
||||||
|
pseudo_keycode = pgm_read_word(&keymap[keycode][1]);
|
||||||
|
} else {
|
||||||
|
pseudo_keycode = pgm_read_word(&keymap[keycode][0]);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (shift_modded) {
|
||||||
|
pseudo_keycode = keymap[keycode][1];
|
||||||
|
} else {
|
||||||
|
pseudo_keycode = keymap[keycode][0];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/* if undefined, use got keycode as it is */
|
||||||
|
if (pseudo_keycode == 0x00) {
|
||||||
|
if (shift_modded) {
|
||||||
|
pseudo_keycode = S(keycode);
|
||||||
|
} else {
|
||||||
|
pseudo_keycode = keycode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (shift_modded) {
|
||||||
|
pseudo_keycode = S(keycode);
|
||||||
|
} else {
|
||||||
|
pseudo_keycode = keycode;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return pseudo_keycode;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t get_shift_bit(uint16_t keycode) {
|
||||||
|
if ((keycode >> 3) < SHIFT_BIT_SIZE) {
|
||||||
|
return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7));
|
||||||
|
} else {
|
||||||
|
dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void add_shift_bit(uint16_t keycode) {
|
||||||
|
if ((keycode >> 3) < SHIFT_BIT_SIZE) {
|
||||||
|
send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7));
|
||||||
|
} else {
|
||||||
|
dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void del_shift_bit(uint16_t keycode) {
|
||||||
|
if ((keycode >> 3) < SHIFT_BIT_SIZE) {
|
||||||
|
send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7));
|
||||||
|
} else {
|
||||||
|
dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef ACTION_PSEUDO_LUT_H
|
||||||
|
#define ACTION_PSEUDO_LUT_H
|
||||||
|
|
||||||
|
#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key
|
||||||
|
|
||||||
|
#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT)
|
||||||
|
|
||||||
|
void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]);
|
||||||
|
uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool);
|
||||||
|
|
||||||
|
uint8_t get_shift_bit(uint16_t);
|
||||||
|
void add_shift_bit(uint16_t);
|
||||||
|
void del_shift_bit(uint16_t);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef CONFIG_SHELA_H
|
||||||
|
#define CONFIG_SHELA_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 230
|
||||||
|
|
||||||
|
#define ONESHOT_TAP_TOGGLE 2
|
||||||
|
#define ONESHOT_TIMEOUT 2000
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,179 @@
|
|||||||
|
/*
|
||||||
|
* HHKB Pro 2 US Layout for shela
|
||||||
|
*/
|
||||||
|
#include "hhkb.h"
|
||||||
|
#include "keymap_jis2us.h"
|
||||||
|
#include "action_pseudo_lut.h"
|
||||||
|
|
||||||
|
enum keymap_layout {
|
||||||
|
BASE = 0,
|
||||||
|
PSEUDO_US,
|
||||||
|
DVORAK,
|
||||||
|
MOUSE,
|
||||||
|
TENKEY,
|
||||||
|
HHKB,
|
||||||
|
SPACE_FN,
|
||||||
|
};
|
||||||
|
|
||||||
|
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 | [ | ] | \ |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
* |LAlt | LGui | SpaceFN | RGui |RAlt |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[BASE] =
|
||||||
|
KEYMAP(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_GRV, 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,KC_ENT, \
|
||||||
|
OSM(MOD_LSFT),KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_FN0, \
|
||||||
|
KC_LALT,KC_LGUI, KC_FN2, KC_RGUI,KC_RALT),
|
||||||
|
|
||||||
|
/* Layer 1: Pseudo US Layout Layer */
|
||||||
|
[PSEUDO_US] =
|
||||||
|
KEYMAP(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, \
|
||||||
|
KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, \
|
||||||
|
KC_LCTL,KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, \
|
||||||
|
OSM(MOD_LSFT),KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT,KC_FN0, \
|
||||||
|
KC_LGUI,KC_FN3, KC_FN2, KC_FN4 ,KC_RGUI),
|
||||||
|
|
||||||
|
/* Layer 2: Dvorak Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BSp |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | Control | A | O | E | U | I | D | H | T | N | S | - | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn0 |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
* |LAlt | LGui | SpaceFN | RGui |RAlt |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[DVORAK] =
|
||||||
|
KEYMAP(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC,KC_RBRC,KC_GRV, KC_BSPC, \
|
||||||
|
KC_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,KC_EQL, KC_BSLS, \
|
||||||
|
KC_LCTL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,KC_ENT, \
|
||||||
|
KC_LSFT,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,KC_FN0, \
|
||||||
|
KC_LALT,KC_LGUI, KC_FN2, KC_RGUI,KC_RALT),
|
||||||
|
|
||||||
|
/* Layer 3: Mouse layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | MwL | MwD | MwU | MwR | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | McL | McD | McU | McR | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | Mb1 | Mb2 | Mb3 | | | | Fn0 |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
* | | | Mb1 | | |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[MOUSE] =
|
||||||
|
KEYMAP(KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_TRNS, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,KC_NO, KC_NO, KC_TRNS, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1,KC_BTN2,KC_BTN3,KC_NO, KC_NO, KC_TRNS,KC_FN0, \
|
||||||
|
KC_TRNS,KC_TRNS, KC_BTN1, KC_TRNS,KC_TRNS),
|
||||||
|
|
||||||
|
/* Layer 4: Tenkey layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | | | | | | | | | | / | * | - | | BSp |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | 7 | 8 | 9 | + | |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | 4 | 5 | 6 | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | 1 | 2 | 3 | + | Fn0 |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
* | | | SpaceFN | 0 | . |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[TENKEY] =
|
||||||
|
KEYMAP(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS,KC_PAST,KC_PMNS,KC_NO, KC_BSPC, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7,KC_KP_8,KC_KP_9,KC_PPLS,KC_NO, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4,KC_KP_5,KC_KP_6,KC_PENT, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1,KC_KP_2,KC_KP_3,KC_PPLS,KC_FN0, \
|
||||||
|
KC_TRNS,KC_TRNS, KC_FN2, KC_KP_0,KC_PDOT),
|
||||||
|
|
||||||
|
/* Layer 5: HHKB mode (HHKB Fn)
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | Caps | Fn5 | Fn6 | Fn7 | Fn8 | Fn9 | | | Psc | Slk | Pus | Up | | BSp |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | + | - | End | PgD | Dow | | |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
* | | | | | |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[HHKB] =
|
||||||
|
KEYMAP(KC_PWR, 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_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_UP, KC_TRNS,KC_BSPC, \
|
||||||
|
KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_PENT, \
|
||||||
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS, \
|
||||||
|
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
|
||||||
|
|
||||||
|
/* Layer 6: SpaceFN
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | End | Up | Hom | | | | Hom | Up | End | Psc | Slk | Pau | Ins |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | Lef | Dow | Rig | PgU | | PgU | Lef | Dow | Rig | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------|
|
||||||
|
* | | | | PgD | | Spc | PgD | ` | ~ | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
* | | | | | |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[SPACE_FN] =
|
||||||
|
KEYMAP(KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, \
|
||||||
|
KC_TRNS,KC_END, KC_UP, KC_HOME,KC_NO, KC_NO, KC_NO, KC_HOME,KC_UP, KC_END, KC_PSCR,KC_SLCK,KC_PAUS,KC_INS, \
|
||||||
|
KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_PGUP,KC_NO, KC_PGUP,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_NO, KC_TRNS, \
|
||||||
|
KC_TRNS,KC_NO, KC_NO, KC_PGDN,KC_NO, KC_SPC, KC_PGDN,KC_GRV, KC_TILD,KC_NO, KC_NO, KC_TRNS,KC_NO, \
|
||||||
|
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* user defined action function
|
||||||
|
*/
|
||||||
|
enum function_id {
|
||||||
|
PSEUDO_US_FUNCTION,
|
||||||
|
};
|
||||||
|
|
||||||
|
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
case PSEUDO_US_FUNCTION:
|
||||||
|
action_pseudo_lut(record, BASE, keymap_jis2us);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fn action definition
|
||||||
|
*/
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_MOMENTARY(HHKB),
|
||||||
|
[1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION),
|
||||||
|
[2] = ACTION_LAYER_TAP_KEY(SPACE_FN, KC_SPACE),
|
||||||
|
[3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN),
|
||||||
|
[4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA),
|
||||||
|
[5] = ACTION_DEFAULT_LAYER_SET(BASE),
|
||||||
|
[6] = ACTION_DEFAULT_LAYER_SET(PSEUDO_US),
|
||||||
|
[7] = ACTION_DEFAULT_LAYER_SET(MOUSE),
|
||||||
|
[8] = ACTION_DEFAULT_LAYER_SET(TENKEY),
|
||||||
|
[9] = ACTION_DEFAULT_LAYER_SET(DVORAK),
|
||||||
|
};
|
@ -0,0 +1,32 @@
|
|||||||
|
#ifndef KEYMAP_JIS2US_H
|
||||||
|
#define KEYMAP_JIS2US_H
|
||||||
|
|
||||||
|
/* keymap for convert from JIS to US */
|
||||||
|
const uint16_t PROGMEM keymap_jis2us[][2] = {
|
||||||
|
[KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */
|
||||||
|
|
||||||
|
[KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */
|
||||||
|
[KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */
|
||||||
|
[KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */
|
||||||
|
[KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */
|
||||||
|
[KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */
|
||||||
|
[KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */
|
||||||
|
[KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */
|
||||||
|
[KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */
|
||||||
|
[KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */
|
||||||
|
[KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */
|
||||||
|
[KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */
|
||||||
|
[KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */
|
||||||
|
[KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */
|
||||||
|
[KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */
|
||||||
|
[KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */
|
||||||
|
[KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */
|
||||||
|
[KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */
|
||||||
|
[KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */
|
||||||
|
[KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */
|
||||||
|
[KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */
|
||||||
|
[KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */
|
||||||
|
[KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,14 @@
|
|||||||
|
# Shela's HHKB Layout
|
||||||
|
|
||||||
|
Layer 0: US Layout
|
||||||
|
Layer 1: Pseudo US Layout
|
||||||
|
Layer 2: Dvorak Layout
|
||||||
|
Layer 3: Mouse
|
||||||
|
Layer 4: Tenkey
|
||||||
|
Layer 5: HHKB Fn Key
|
||||||
|
Layer 6: SpaceFN
|
||||||
|
|
||||||
|
## Pseudo US Layout
|
||||||
|
|
||||||
|
On japanese Windows, HHKB Professional 2 US layout model recognized wrongly as JIS layout without changing OS settings.
|
||||||
|
But, you can use HHKB like a US layout keyboard as it is.
|
@ -0,0 +1,17 @@
|
|||||||
|
# Workman dead with spacefn (kc60 @ QMK)
|
||||||
|
|
||||||
|
## Layout reference
|
||||||
|
![workman dead with spacefn](./kc60-wm-dead.png)
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
To build this keymap, simply run `make KEYMAP=workman-dead`.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
* the default layout is `workman` (try it out, it's awesome!), but it can be changed to `qwerty` with the `rebel` key (the function layer won't change though)
|
||||||
|
* `comma` acts as a dead key, that means tapping/holding it will activate the **oneshot** `dead key` layer (marked red in the reference)
|
||||||
|
* hold `space` to access the `function` layer (marked blue in the reference)
|
||||||
|
* hold `tab` to activate the mouse layer
|
||||||
|
* the `function` layer contains mostly osx specific shortcuts
|
||||||
|
* on the right side of the bottom row `alt` and `super` are switched compared to a standard layout
|
After Width: | Height: | Size: 114 KiB |
@ -0,0 +1,183 @@
|
|||||||
|
#include "kc60.h"
|
||||||
|
|
||||||
|
#define _WM 0
|
||||||
|
#define _QW 1
|
||||||
|
#define _DK 2
|
||||||
|
#define _FUN 3
|
||||||
|
#define _MS 4
|
||||||
|
|
||||||
|
#define _______ KC_NO
|
||||||
|
#define XXXXXXX KC_TRNS
|
||||||
|
|
||||||
|
#define _DK_ACT 0
|
||||||
|
#define _DK_REL 1
|
||||||
|
#define _KC_COMS 2
|
||||||
|
#define _KC_CENT 3
|
||||||
|
|
||||||
|
#define DK_ACT M(_DK_ACT) // activate dead key layer
|
||||||
|
#define DK_REL M(_DK_REL) // release dead key layer
|
||||||
|
#define KC_COMS M(_KC_COMS) // comma + space
|
||||||
|
#define KC_CENT M(_KC_CENT) // comma + enter
|
||||||
|
#define KC_TABM LT(_MS, KC_TAB) // press for tab, hold for mouse layer
|
||||||
|
#define KC_SPFN LT(_FUN, KC_SPC) // press for space, hold for function layer (aka spacefn)
|
||||||
|
#define KC_DFQW DF(_QW) // set default layer to qwerty
|
||||||
|
#define KC_DFWM DF(_WM) // set default layer to workman
|
||||||
|
#define KC_CMDQ LGUI(KC_Q) // command + q
|
||||||
|
#define KC_CMDD LGUI(KC_D) // command + d
|
||||||
|
#define KC_CMDA LGUI(KC_A) // command + a
|
||||||
|
#define KC_CMDS LGUI(KC_S) // command + s
|
||||||
|
#define KC_CMDZ LGUI(KC_Z) // command + z
|
||||||
|
#define KC_CMDX LGUI(KC_X) // command + x
|
||||||
|
#define KC_CMDC LGUI(KC_C) // command + c
|
||||||
|
#define KC_CMDV LGUI(KC_V) // command + v
|
||||||
|
#define KC_CSTB S(RCTL(KC_TAB)) // shift + control + tab
|
||||||
|
#define KC_C_TB RCTL(KC_TAB) // control + tab
|
||||||
|
#define KC_C_LF RCTL(KC_LEFT) // control + left
|
||||||
|
#define KC_C_RT RCTL(KC_RGHT) // control + right
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
// Workman
|
||||||
|
/*
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab/M| Q| D| R| W| B| J| F| U| P| ;| [| ]| \ |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | A| S| H| T| G| Y| N| E| O| I| '| Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| M| C| V| K| L| ,| .| /| Shift |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | Alt | GUI | Space/FN | Alt | GUI | Ctrl | qwerty |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_WM] = KEYMAP( /* Workman */
|
||||||
|
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_TABM, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, KC_ENT, \
|
||||||
|
KC_LSFT, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DK_ACT, KC_DOT, KC_SLSH, _______, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, KC_RALT, KC_RGUI, KC_RCTL, KC_DFQW),
|
||||||
|
|
||||||
|
// QWERTY
|
||||||
|
/*
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab/M| Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | Alt | GUI | Space/FN | Alt | GUI | Ctrl | workman |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QW] = KEYMAP( /* QWERTY */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||||
|
KC_TABM, 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, _______, KC_ENT, \
|
||||||
|
KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DK_ACT, KC_DOT, KC_SLSH, _______, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, KC_RALT, KC_RGUI, KC_RCTL, KC_DOWN),
|
||||||
|
|
||||||
|
// dead key layer
|
||||||
|
/*
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | Bsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | %| &| ?| +| @| $| _| [| ]| !| ~| ^| |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | #| (| =| 0| {| }| 1| *| )| -| `| Return |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | 6| 7| 8| 9| || \| 2| 3| 4| 5| |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | Alt | GUI | , | Alt | GUI | Ctrl | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DK] = KEYMAP( /* dead key layer */
|
||||||
|
XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, \
|
||||||
|
XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, KC_TILD, KC_CIRC, _______, \
|
||||||
|
_______, KC_HASH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, KC_GRV, _______, KC_CENT, \
|
||||||
|
_______, _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, DK_REL, KC_4, KC_5, _______, _______, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_COMS, KC_RALT, KC_RGUI, KC_RCTL, _______),
|
||||||
|
|
||||||
|
// function layer
|
||||||
|
/*
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Del |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Esc | Cq| Cd|cstb|ctb| | |pgd| up|pgu| | | |ins |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Ca| Cs|clt|crt| | | lt| dw| rt|home|end| Bsp |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Cz| Cx| | Cc| Cv| V-| V+|mute| | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl | Alt | GUI | | Alt | GUI | Ctrl | Reset |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUN] = KEYMAP( /* function layer */
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||||
|
KC_ESC, KC_CMDQ, KC_CMDD, KC_CSTB, KC_C_TB, _______, _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_INS, \
|
||||||
|
KC_LSFT, KC_CMDA, KC_CMDS, KC_C_LF, KC_C_RT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, KC_END, _______, KC_BSPC, \
|
||||||
|
KC_LSFT, _______, KC_CMDZ, KC_CMDX, _______, KC_CMDC, KC_CMDV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_RALT, KC_RGUI, KC_RCTL, RESET),
|
||||||
|
|
||||||
|
// mouse layer
|
||||||
|
/*
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | |fast|med|slow| | | | | up| | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | lt| dw| rt| rc| | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | lc | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_MS] = KEYMAP( /* mouse layer */
|
||||||
|
XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN2, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, KC_BTN1, _______, _______, _______, _______),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case _KC_COMS:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(COMM), T(SPC), END); // comma + space
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _KC_CENT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return MACRO(T(COMM), T(ENT), END); // comma + enter
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _DK_ACT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || keyboard_report->mods & MOD_BIT(KC_RSFT)) { // act as comma when shift is pressed (eg <)
|
||||||
|
register_code(KC_COMM);
|
||||||
|
} else { // activate oneshot dead key layer otherwise
|
||||||
|
layer_on(_DK);
|
||||||
|
set_oneshot_layer(_DK, ONESHOT_START);
|
||||||
|
}
|
||||||
|
} else { // make sure to deactive dead key layer on key release
|
||||||
|
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||||
|
unregister_code(KC_COMM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _DK_REL:
|
||||||
|
if (record->event.pressed) { // act as 3 on keypress
|
||||||
|
register_code(KC_3);
|
||||||
|
} else { // make sure to deactive dead key layer on key release
|
||||||
|
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||||
|
unregister_code(KC_3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,77 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= yes # 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 ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += matrix.c led.c
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
||||||
|
|
@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
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 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Costar
|
||||||
|
#define PRODUCT Majestouch
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 18
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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, D5 }
|
||||||
|
//#define MATRIX_COL_PINS { F1, F0, B0 }
|
||||||
|
//#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,51 @@
|
|||||||
|
#include "kitten_paw.h"
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
DEFAULT,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[DEFAULT] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
#include "kitten_paw.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
#ifndef KITTEN_PAW_H
|
||||||
|
#define KITTEN_PAW_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
// The first section contains all of the arguements
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
/*
|
||||||
|
Matrix col/row mapping
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
| J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
|
||||||
|
`----' `-------------------' `-------------------' `-------------------' `--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------. ,-------------------.
|
||||||
|
| J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
|
||||||
|
|-------------------------------------------------------------------------| |--------------| |-------------------|
|
||||||
|
| J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
|
||||||
|
|-------------------------------------------------------------------------| '--------------' |-------------- |
|
||||||
|
| O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
|
||||||
|
|-------------------------------------------------------------------------| ,----. |-------------------|
|
||||||
|
| N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------. |-------------- |
|
||||||
|
| A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
|
||||||
|
`-------------------------------------------------------------------------' `--------------' `-------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
|
||||||
|
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \
|
||||||
|
{ KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \
|
||||||
|
{KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \
|
||||||
|
{KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \
|
||||||
|
{ KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \
|
||||||
|
{ KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \
|
||||||
|
{KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \
|
||||||
|
{ KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "stdint.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
/* LED pin configuration
|
||||||
|
*
|
||||||
|
* Scroll Lock PC5
|
||||||
|
* Caps Lock PC6
|
||||||
|
* Num Lock PB7
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void led_set(uint8_t usb_led) {
|
||||||
|
DDRB |= (1<<7);
|
||||||
|
DDRC |= (1<<5) | (1<<6);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
PORTC &= ~(1<<6);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<6);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
PORTB &= ~(1<<7);
|
||||||
|
else
|
||||||
|
PORTB |= (1<<7);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
PORTC &= ~(1<<5);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<5);
|
||||||
|
}
|
@ -0,0 +1,164 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||||
|
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static uint8_t read_rows(void);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
|
||||||
|
inline uint8_t matrix_rows(void) {
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline uint8_t matrix_cols(void) {
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Column pin configuration
|
||||||
|
*
|
||||||
|
* col: 0 1 2 3 4 5 6 7
|
||||||
|
* pin: PC7 PD5 PD3 PD1 PC2 PD6 PD4 PD2
|
||||||
|
*
|
||||||
|
* Rrr pin configuration
|
||||||
|
*
|
||||||
|
* These rrrs uses one 74HC154 4 to 16 bit demultiplexer (low
|
||||||
|
* active), together with 2 rrrs driven directly from the micro
|
||||||
|
* controller, to control the 18 rrrs. The rrrs are driven from
|
||||||
|
* pins B6,5,4,3,2,1,0.
|
||||||
|
*/
|
||||||
|
void matrix_init(void) {
|
||||||
|
DDRC &= ~0b10000100; // Row input pins
|
||||||
|
DDRD &= ~0b01111110;
|
||||||
|
PORTC |= 0b10000100;
|
||||||
|
PORTD |= 0b01111110;
|
||||||
|
|
||||||
|
DDRB |= 0b01111111; // Column output pins
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_col(col);
|
||||||
|
_delay_us(3);
|
||||||
|
uint8_t rows = read_rows();
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = rows & (1<<row);
|
||||||
|
if (prev_bit != curr_bit) {
|
||||||
|
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||||
|
debouncing = DEBOUNCING_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing) {
|
||||||
|
_delay_ms(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void) {
|
||||||
|
if (debouncing)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void) {
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop32(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint8_t read_rows(void) {
|
||||||
|
return
|
||||||
|
(PINC&(1<<7) ? 0 : (1<<0)) |
|
||||||
|
(PIND&(1<<5) ? 0 : (1<<1)) |
|
||||||
|
(PIND&(1<<3) ? 0 : (1<<2)) |
|
||||||
|
(PIND&(1<<1) ? 0 : (1<<3)) |
|
||||||
|
(PINC&(1<<2) ? 0 : (1<<4)) |
|
||||||
|
(PIND&(1<<2) ? 0 : (1<<5)) |
|
||||||
|
(PIND&(1<<4) ? 0 : (1<<6)) |
|
||||||
|
(PIND&(1<<6) ? 0 : (1<<7));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
switch (col) {
|
||||||
|
case 0: PORTB = (PORTB & ~0b01111111) | 0b01100100; break;
|
||||||
|
case 1: PORTB = (PORTB & ~0b01111111) | 0b01101100; break;
|
||||||
|
case 2: PORTB = (PORTB & ~0b01111111) | 0b01100010; break;
|
||||||
|
case 3: PORTB = (PORTB & ~0b01111111) | 0b01111010; break;
|
||||||
|
case 4: PORTB = (PORTB & ~0b01111111) | 0b01100110; break;
|
||||||
|
case 5: PORTB = (PORTB & ~0b01111111) | 0b01110110; break;
|
||||||
|
case 6: PORTB = (PORTB & ~0b01111111) | 0b01101110; break;
|
||||||
|
case 7: PORTB = (PORTB & ~0b01111111) | 0b01111110; break;
|
||||||
|
case 8: PORTB = (PORTB & ~0b01111111) | 0b01000001; break;
|
||||||
|
case 9: PORTB = (PORTB & ~0b01111111) | 0b00100001; break;
|
||||||
|
case 10: PORTB = (PORTB & ~0b01111111) | 0b01101010; break;
|
||||||
|
case 11: PORTB = (PORTB & ~0b01111111) | 0b01110010; break;
|
||||||
|
case 12: PORTB = (PORTB & ~0b01111111) | 0b01111100; break;
|
||||||
|
case 13: PORTB = (PORTB & ~0b01111111) | 0b01110100; break;
|
||||||
|
case 14: PORTB = (PORTB & ~0b01111111) | 0b01111000; break;
|
||||||
|
case 15: PORTB = (PORTB & ~0b01111111) | 0b01110000; break;
|
||||||
|
case 16: PORTB = (PORTB & ~0b01111111) | 0b01100000; break;
|
||||||
|
case 17: PORTB = (PORTB & ~0b01111111) | 0b01101000; break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
kitten_paw keyboard firmware
|
||||||
|
======================
|
||||||
|
This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies.
|
||||||
|
Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies).
|
||||||
|
|
||||||
|
NKRO doesn't work at the moment, I don't know if I will take the time to find out how to fix this, so far 6KRO is enough for me.
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/kitten_paw 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`.
|
||||||
|
|
||||||
|
### 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 `keymap` option like:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make keymap=[default|jack|<name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
|
@ -0,0 +1,104 @@
|
|||||||
|
#include "phantom.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
|
||||||
|
// 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 _QW 0
|
||||||
|
#define _DV 1
|
||||||
|
#define _CM 2
|
||||||
|
#define _FL 3
|
||||||
|
|
||||||
|
// Macro name shortcuts
|
||||||
|
#define QWERTY M(_QW)
|
||||||
|
#define DVORAK M(_DV)
|
||||||
|
#define COLEMAK M(_CM)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QW] = { /* Layer 0: Qwerty */
|
||||||
|
{KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS},
|
||||||
|
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN},
|
||||||
|
{KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_DV] = { /* Layer 1: Dvorak */
|
||||||
|
{KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS},
|
||||||
|
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP},
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, KC_END, KC_PGDN},
|
||||||
|
{KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, XXXXXXX, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_CM] = { /* Layer 2: Colemak */
|
||||||
|
{KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS},
|
||||||
|
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN},
|
||||||
|
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, XXXXXXX, KC_UP, XXXXXXX},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_FL] = { /* Layer 3: Functions */
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RESET, KC_MPRV, KC_MPLY, KC_MNXT},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX},
|
||||||
|
{QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum function_id {
|
||||||
|
SHIFT_ESC,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case _DV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_DV);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _QW:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QW);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _CM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_CM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the makefile.mk in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = 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.
|
||||||
|
TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,44 @@
|
|||||||
|
##Design goals:
|
||||||
|
1. Arrow keys always available.
|
||||||
|
2. As close to a to my US layout 107-key QWERTY keyboard as I could manage, (i.e. as few arbitrary decisions as possible).
|
||||||
|
3. Togglable DVORAK keyboard.
|
||||||
|
4. most frequently used things in the easiest to reach places.
|
||||||
|
5. Ability to game on it, just for fun.
|
||||||
|
|
||||||
|
My layout differs from most in the placement the ARROW keys, `ESC`, VOL keys, use of double-tap `CAPS`, and the GAME LOCK function.
|
||||||
|
|
||||||
|
I put the layer buttons in the usual spots. I originally wanted only function/symbols layer, but that proved detrimental. I use some timed press actions to save some space, but this has been accounted for, (see GAME LOCK below). I'm not fully satisfied with the current product (see NOTES below), so it may change in the future.
|
||||||
|
|
||||||
|
##Effective layers:
|
||||||
|
* Default later is obviously your letters and modifiers.
|
||||||
|
* Lower layer [NUMBER] is your numbers and punctuation.
|
||||||
|
* Upper layer [ACTION] is your symbols and actions.
|
||||||
|
* Function layer is the infrequently used function keys, layout toggle, game lock, and reset.
|
||||||
|
|
||||||
|
There is also a toggle for the DVORAK/QWERTY layers, but in normal typing this is not of concern.
|
||||||
|
|
||||||
|
###Special keys:
|
||||||
|
* `RSHFT` and `ENTER` are combined. Tap once for `ENTER` and hold for `RSHFT`. `ENTER` will be registered on release if released within 200 ms, else `RSHFT` is registered starting at 201 ms until release.
|
||||||
|
* If for some reason, this interferes with the normal usage of the `ENTER` key in any way, (some problem that may never happen), I have added a regular non-modified `ENTER` key on the same key in the [ACTION] layer.
|
||||||
|
* `LSHFT` and `CAPS` are also combined. The key works like a normal `LSHFT` unless double-tapped, in which case it counts as `CAPS`. This functionality unfortunately delays all key presses by at most 200 ms, but I have added ways to disable this both temporarily or permanently, described below.
|
||||||
|
* A failsafe `CAPS` key is on the same key in the [ACTION] layer.
|
||||||
|
* There are `UNDO`, `CUT`, `COPY`, and `PASTE` keys. This was intended to be a universal way to use these commands since in macOS cut is `⌘ + C` but in Windows it is `⌃ + C`. Unfortunately these special keys only work in Windows. ¯\\\_(ツ)\_/¯
|
||||||
|
|
||||||
|
##Game lock:
|
||||||
|
**TL;DR** the game lock toggle disables the double-tap `CAPS`, and disables `GUI` keys (WINDOWS key).
|
||||||
|
|
||||||
|
I wished for this keyboard to be fully usable in the most demanding of games. The most demanding game I know of is ARMA 3 which has a binding to practically every individual key of a 107-key keyboard. This means I need to have pretty much every key possible somewhere. I also wanted the keyboard to be responsive in games for every critical keypress. This means having a way to disable features that introduce an inherent delay to registering keys, such as double-tap.
|
||||||
|
|
||||||
|
I do not expect to see this used by the pros, but I enjoyed making it. As for use in ARMA 3, I got a little ways into the APEX campaign, but I found a few flaws. For Example, I cannot enable my HUD GPS since that requires `RCTRL`+`M` but `RCTRL` is not bound. The obvious fix is to rebind the action to a new key, but I still take this as a shortcoming of my layout.
|
||||||
|
|
||||||
|
###If you wish to disable double-tap
|
||||||
|
####Disable it temporarily
|
||||||
|
Turn on the game lock. While on, it registers as normal `LSHFT` and has no delay. Whether in game mode or not, `CAPS` is on the same key in the [ACTION] layer.
|
||||||
|
|
||||||
|
####Disable it permanently
|
||||||
|
Open the `Makefile` and set `TAP_DANCE_ENABLE = no`. I wrote the layout to compensate for this change, and no further changes to the code should be necessary. Whether or not it's disabled, `CAPS` is on the same key in the [ACTION] layer.
|
||||||
|
|
||||||
|
##Notes:
|
||||||
|
* `ALT` and `GUI` are reversed compared to the normal US layout. I will also be using my Planck on my mac, and that's the standard in the Apple ecosystem. I may add a special compiler flag in the future to swap the two.
|
||||||
|
* The DVORAK `Z` key is to the right of the `S` key instead of under it as part of a compromise I made to keep the ARROW keys available on the default layer. I prioritize the ARROW keys, so the DVORAK layout is the one to suffer.
|
||||||
|
* I also support the little tones that the default Planck layout features, identical to them too, (minus those for layouts I don't support). To enable it, open the `Makefile` and set `AUDIO_ENABLE = yes`.
|
@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
|
||||||
|
/* Tap-dance interval definition */
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define MANUFACTURER Ortholinear Keyboards
|
||||||
|
#define PRODUCT The Planck Keyboard
|
||||||
|
#define DESCRIPTION A compact ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* Planck PCB default pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
|
||||||
|
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#ifdef SUBPROJECT_rev3
|
||||||
|
#include "rev3/config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev4
|
||||||
|
#include "rev4/config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
After Width: | Height: | Size: 151 KiB |
@ -0,0 +1,258 @@
|
|||||||
|
// Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6
|
||||||
|
|
||||||
|
#include "planck.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _DVORAK 1
|
||||||
|
#define _LOCKED 2
|
||||||
|
#define _NUMBER 3
|
||||||
|
#define _ACTION 4
|
||||||
|
#define _FUNCTN 5
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
DVORAK,
|
||||||
|
NUMBER,
|
||||||
|
ACTION
|
||||||
|
};
|
||||||
|
|
||||||
|
// Key code names
|
||||||
|
#define SFT_ENT FUNC(0) // Tap for enter, hold for right shift
|
||||||
|
#define LOCK FUNC(1)
|
||||||
|
#define KC_PSTE KC_PASTE
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
#ifdef TAP_DANCE_ENABLE
|
||||||
|
#define SFT_CAP TD(0) // Left shift, double tap for caps
|
||||||
|
#endif
|
||||||
|
#ifndef TAP_DANCE_ENABLE
|
||||||
|
#define SFT_CAP KC_LSFT // Regular left shift
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Tap Dance Definitions
|
||||||
|
#ifdef TAP_DANCE_ENABLE
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Function definitions
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
|
||||||
|
[1] = ACTION_LAYER_TOGGLE(_LOCKED)
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layout definitions
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | BKSP |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |*Shift| Z | X | C | V | B | N | M | , | . | Up |SftEnt|
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Alt | Cmd | Vol- | ACTN | Space | NUMS | Vol+ | Left | Down | Left |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* DVORAK
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | ' | , | . | P | Y | F | G | C | R | L | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | A | O | E | U | I | D | H | T | N | S | Z |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | ; | Q | J | K | X | B | M | W | V | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = {
|
||||||
|
{_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______},
|
||||||
|
{_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_Z },
|
||||||
|
{_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* LOCK
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | NULL | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOCKED] = {
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* NUMBERS
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | ~ | NULL | NULL | NULL | | | _ | + | { | } | ? | / |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | ` | NULL | NULL | NULL | \ | - | = | [ | ] | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | NULL | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NUMBER] = {
|
||||||
|
{_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
|
||||||
|
{_______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH},
|
||||||
|
{_______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* ACTIONS
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | CAPS | Undo | Cut | Copy | Paste| NULL | NULL | NULL | NULL | NULL | PgUp | Enter|
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | Mute | | NULL | | NULL | Home | PgDn | End |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ACTION] = {
|
||||||
|
{_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
|
||||||
|
{_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT },
|
||||||
|
{_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
|
||||||
|
},
|
||||||
|
|
||||||
|
/* FUNCTIONS
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | NULL | NULL | NULL | NULL | NULL |QWERTY|DVORAK| NULL | NULL | NULL | NULL | NULL |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Reset| NULL | Lock | NULL | | NULL | | NULL | NULL | NULL | NULL |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUNCTN] = {
|
||||||
|
{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_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 },
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||||
|
{RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (IS_LAYER_ON(_DVORAK)) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_DVORAK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!IS_LAYER_ON(_DVORAK)) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_on(_DVORAK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case NUMBER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_NUMBER);
|
||||||
|
update_tri_layer(_NUMBER, _ACTION, _FUNCTN);
|
||||||
|
} else {
|
||||||
|
layer_off(_NUMBER);
|
||||||
|
update_tri_layer(_NUMBER, _ACTION, _FUNCTN);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ACTION:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ACTION);
|
||||||
|
update_tri_layer(_NUMBER, _ACTION, _FUNCTN);
|
||||||
|
} else {
|
||||||
|
layer_off(_ACTION);
|
||||||
|
update_tri_layer(_NUMBER, _ACTION, _FUNCTN);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,314 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "planck.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _COLEMAK 1
|
||||||
|
#define _DVORAK 2
|
||||||
|
#define _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _PLOVER 5
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
PLOVER,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT,
|
||||||
|
EXT_PLV
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | | Alt |Lower | Space |Raise |AltGr | [ | ] | \ |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, KC_LBRC, KC_RBRC, KC_BSLS}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = {
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | Home | PgDwn| PgUp | End | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |Insert|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| | | | | | | | | | Del |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = {
|
||||||
|
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||||
|
{_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END,_______,_______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______,_______,_______,_______, _______, KC_INS},
|
||||||
|
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | - | = |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | Left | Down | Up | Right| | ` |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | Mute | Vol+ | Vol- | | | |Insert|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Prev | Play | Next | Del |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = {
|
||||||
|
{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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_GRV},
|
||||||
|
{_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, KC_INS},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Plover layer (http://opensteno.org)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Exit | | | A | O | | E | U | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_PLOVER] = {
|
||||||
|
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||||
|
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||||
|
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = {
|
||||||
|
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||||
|
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||||
|
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EXT_PLV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = yes # 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.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,231 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "planck.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _COLEMAK 1
|
||||||
|
#define _DVORAK 2
|
||||||
|
#define _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _PLOVER 5
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
PLOVER,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT,
|
||||||
|
EXT_PLV
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P },
|
||||||
|
{KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
|
||||||
|
{KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
|
||||||
|
{KC_LGUI, _______, _______, KC_LALT, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI}
|
||||||
|
},
|
||||||
|
[_COLEMAK] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_DVORAK] = {
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
[_LOWER] = {
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
|
||||||
|
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END },
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
[_RAISE] = {
|
||||||
|
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
|
||||||
|
{_______, _______, _______, KC_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT},
|
||||||
|
{_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_PLOVER] = {
|
||||||
|
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||||
|
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||||
|
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
[_ADJUST] = {
|
||||||
|
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||||
|
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||||
|
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EXT_PLV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,4 @@
|
|||||||
|
# Split Layout
|
||||||
|
Inspired by TECK
|
||||||
|
|
||||||
|
[Layout](http://www.keyboard-layout-editor.com/##@_switchMount=cherry&switchBrand=gateron&switchType=KS-3-Tea&pcb:true%3B&@_c=%23e6e6e6&t=%23757575&a:7&fa@:5%3B%3B&=Esc&_a:4&fa@:5&:0&:0&:0&:0&:0&:0&:0&:0&:5%3B%3B&=%0A%0A!%0A1%0A%0A%0A%0A%0A%0AQ&=%0A%0A%2F@%0A2%0A%0A%0A%0A%0A%0AW&=%0A%0A%23%0A3%0A%0A%0A%0A%0A%0AE&=%0A%0A$%0A4%0A%0A%0A%0A%0A%0AR&=%0A%0A%25%0A5%0A%0A%0A%0A%0A%0AT&_c=%23e3b02d&a:7%3B&=Del&_c=%23e6e6e6&a:4%3B&=%0A%0A%5E%0A6%0A%0A%0A%0A%0A%0AY&=%0A%0A%2F&%0A7%0A%0A%0A%0A%0A%0AU&=%0A%0A*%0A8%0A%0A%0A%0A%0A%0AI&=%0A%0A(%0A9%0A%0A%0A%0A%0A%0AO&=%0A%0A)%0A0%0A%0A%0A%0A%0A%0AP%3B&@_a:7%3B&=Shift&_a:4%3B&=%0A%0A%0AF1%0A%0A%0A%0A%0A%0AA&=%0A%0A%0AF2%0A%0A%0A%0A%0A%0AS&=%0A%0A'%0AF3%0A%0A%0A%0A%0A%0AD&_c=%23e3b02d&n:true%3B&=%0A%0A-%0AF4%0A%0A%0A%0A%0A%0AF&_c=%23e6e6e6%3B&=%0A%0A%0AF5%0A%0A%0A%0A%0A%0AG&_c=%23e3b02d&a:7%3B&=Tab&_c=%23e6e6e6&a:4%3B&=%0A%0A%0AF6%0A%0A%0A%0A%0A%0AH&_c=%23e3b02d&n:true%3B&=%0A%0A%2F&larr%2F%3B%0AHom%0A%0A%0A%0A%0A%0AJ&_c=%23e6e6e6%3B&=%0A%0A%2F&darr%2F%3B%0APgD%0A%0A%0A%0A%0A%0AK&=%0A%0A%2F&uarr%2F%3B%0APgU%0A%0A%0A%0A%0A%0AL&=%0A%0A%2F&rarr%2F%3B%0AEnd%0A%0A%0A%0A%0A%0A%2F%3B%3B&@_a:7%3B&=Ctrl&_a:4%3B&=%0A%0A~%0AF7%0A%0A%0A%0A%0A%0AZ&=%0A%0A%60%0AF8%0A%0A%0A%0A%0A%0AX&=%0A%0A+%0AF9%0A%0A%0A%0A%0A%0AC&=%0A%0A%2F=%0AF10%0A%0A%0A%0A%0A%0AV&=%0A%0A%7C%0AF11%0A%0A%0A%0A%0A%0AB&_c=%23e3b02d&a:7%3B&=BSp&_c=%23e6e6e6&a:4%3B&=%0A%0A%5C%0AF12%0A%0A%0A%0A%0A%0AN&=%0A%0A%5B%0A%0A%0A%0A%0A%0A%0AM&=%0A%0A%5D%0A%0A%0A%0A%0A%0A%0A,&=%0A%0A%7B%0A%0A%0A%0A%0A%0A%0A.&=%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%2F%2F%3B&@_a:7%3B&=&=&=&=Alt&_c=%23e3b02d%3B&=%2F&dArr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&crarr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&uArr%2F%3B&_c=%23e6e6e6%3B&=Alt&=&=)
|
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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 = yes # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define FORCE_NKRO 1
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,215 @@
|
|||||||
|
#include "preonic.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "keymap_nordic.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum preonic_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Å |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| < | Z | X | C | V | B | N | M | . | , | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC},
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
|
||||||
|
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
|
||||||
|
{KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
|
||||||
|
{KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | @ | £ | $ | | | { | [ | ] | } | \ | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | |VolUp | | | ~ |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | |LastS |PauseP|NextS | | * |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | |VolDwn| | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | |Bspc | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = {
|
||||||
|
{_______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
|
||||||
|
{_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ! | " | # | ¤ | % | & | / | ( | ) | = | ? | Ins |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | |Mouse^| | | | |ScrlUp| | | ^ |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | > | | | | | | |ScrlDown| : | ; | _ |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | |Bspc | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = {
|
||||||
|
{LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS},
|
||||||
|
{_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
|
||||||
|
{_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
|
||||||
|
{_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
|
||||||
|
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | Reset| | | | | | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |Rsft |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |MusOn |MusOff| | | | | | | | | Reset|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = {
|
||||||
|
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||||
|
{_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT},
|
||||||
|
{_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET },
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_startup[][2] = {
|
||||||
|
{NOTE_B5, 20},
|
||||||
|
{NOTE_B6, 8},
|
||||||
|
{NOTE_DS6, 20},
|
||||||
|
{NOTE_B6, 8}
|
||||||
|
};
|
||||||
|
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
|
||||||
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,3 @@
|
|||||||
|
# Jacwib's preonic keymap.
|
||||||
|
|
||||||
|
Designed for use with a swedish language.
|
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = yes # 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.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|