Merged from upstream

example_keyboards
Joshua T 8 years ago
commit 8f8d104759

3
.gitignore vendored

@ -30,4 +30,5 @@ CMakeLists.txt
.browse.VC.db*
*.stackdump
util/Win_Check_Output.txt
.vscode
.vscode
.stfolder

@ -21,8 +21,8 @@ RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
ENV keyboard=ergodox
ENV subproject=ez
ENV keymap=default
VOLUME /qmk
WORKDIR /qmk
CMD make clean ; make keyboard=${keyboard} keymap=${keymap}
WORKDIR /qmk

@ -32,11 +32,13 @@ ABS_ROOT_MAKEFILE := $(abspath $(ROOT_MAKEFILE))
ABS_STARTING_DIR := $(dir $(ABS_STARTING_MAKEFILE))
ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE))
STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR))
TEST_DIR := $(ROOT_DIR)/.build/test
BUILD_DIR := $(ROOT_DIR)/.build
TEST_DIR := $(BUILD_DIR)/test
ERROR_FILE := $(BUILD_DIR)/error_occured
MAKEFILE_INCLUDED=yes
# Helper function to process the newt element of a space separated path
# Helper function to process the newt element of a space separated path
# It works a bit like the traditional functional head tail
# so the CURRENT_PATH_ELEMENT will beome the new head
# and the PATH_ELEMENTS are the rest that are still unprocessed
@ -45,16 +47,16 @@ define NEXT_PATH_ELEMENT
$$(eval PATH_ELEMENTS := $$(wordlist 2,9999,$$(PATH_ELEMENTS)))
endef
# We change the / to spaces so that we more easily can work with the elements
# We change the / to spaces so that we more easily can work with the elements
# separately
PATH_ELEMENTS := $(subst /, ,$(STARTING_DIR))
# Initialize the path elements list for further processing
$(eval $(call NEXT_PATH_ELEMENT))
# This function sets the KEYBOARD; KEYMAP and SUBPROJECT to the correct
# This function sets the KEYBOARD; KEYMAP and SUBPROJECT to the correct
# variables depending on which directory you stand in.
# It's really a very simple if else chain, if you squint enough,
# but the makefile syntax makes it very verbose.
# It's really a very simple if else chain, if you squint enough,
# but the makefile syntax makes it very verbose.
# If we are in a subfolder of keyboards
ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
$(eval $(call NEXT_PATH_ELEMENT))
@ -109,7 +111,7 @@ endif
.DEFAULT_GOAL := all
ifneq ($(KEYMAP),)
ifeq ($(SUBPROJECT),)
# Inside a keymap folder, just build the keymap, with the
# Inside a keymap folder, just build the keymap, with the
# default subproject
.DEFAULT_GOAL := $(KEYBOARD)-$(KEYMAP)
else
@ -161,7 +163,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3
ifneq ($1,)
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,$$(firstword $1)),true)
MATCHED_ITEM := $$(firstword $1)
else
else
$$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$$(wordlist 2,9999,$1)))
endif
endif
@ -169,10 +171,10 @@ endef
# A recursive helper function for finding the longest match
# $1 The list to be checed
# It works by always removing the currently matched item from the list
# It works by always removing the currently matched item from the list
# and call itself recursively, until a match is found
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
# Stop the recursion when the list is empty
# Stop the recursion when the list is empty
ifneq ($1,)
RULE_BEFORE := $$(RULE)
$$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1))
@ -268,7 +270,7 @@ define PARSE_KEYBOARD
$$(eval $$(call PARSE_SUBPROJECT,$$(SUBPROJECT)))
# If there's no matching subproject, we assume it's the default
# This will allow you to leave the subproject part of the target out
else
else
$$(eval $$(call PARSE_SUBPROJECT,))
endif
endef
@ -283,7 +285,7 @@ endef
# When entering this, the keyboard and subproject are known, so now we need
# to determine which keymaps are going to get compiled
define PARSE_SUBPROJECT
# If we want to compile the default subproject, then we need to
# If we want to compile the default subproject, then we need to
# include the correct makefile to determine the actual name of it
CURRENT_SP := $1
ifeq ($$(CURRENT_SP),)
@ -302,7 +304,7 @@ define PARSE_SUBPROJECT
endif
endif
# The special allsp is handled later
ifneq ($$(CURRENT_SP),allsp)
ifneq ($$(CURRENT_SP),allsp)
# get a list of all keymaps
KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.)))
ifneq ($$(CURRENT_SP),)
@ -341,7 +343,7 @@ define PARSE_SUBPROJECT
endif
endef
# If we want to parse all subprojects, but the keyboard doesn't have any,
# If we want to parse all subprojects, but the keyboard doesn't have any,
# then use defaultsp instead
define PARSE_ALL_SUBPROJECTS
ifeq ($$(SUBPROJECTS),)
@ -446,7 +448,7 @@ endef
# Set the silent mode depending on if we are trying to compile multiple keyboards or not
# By default it's on in that case, but it can be overriden by specifying silent=false
# By default it's on in that case, but it can be overriden by specifying silent=false
# from the command line
define SET_SILENT_MODE
ifdef SUB_IS_SILENT
@ -460,20 +462,34 @@ endef
include $(ROOT_DIR)/message.mk
RUN_COMMAND = \
$(COMMAND_$(SILENT_MODE)_$(COMMAND))
# The empty line is important here, as it will force a new shell to be created for each command
# Otherwise the command line will become too long with a lot of keyboards and keymaps
define RUN_COMMAND
+error_occured=0;\
$(COMMAND_$(SILENT_MODE)_$(COMMAND))\
if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
endef
define RUN_TEST
+error_occured=0;\
$($(TEST)_COMMAND)\
if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
endef
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
.PHONY: $(SUBPROJECTS)
$(SUBPROJECTS): %: %-allkm
$(SUBPROJECTS): %: %-allkm
# Let's match everything, we handle all the rule parsing ourselves
.PHONY: %
%:
%:
# Check if we have the CMP tool installed
cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
# Check if the submodules are dirty, and display a warning if they are
ifndef SKIP_GIT
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
@ -481,17 +497,18 @@ $(SUBPROJECTS): %: %-allkm
*) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
esac \
done
endif
rm -f $(ERROR_FILE) > /dev/null 2>&1
$(eval $(call PARSE_RULE,$@))
$(eval $(call SET_SILENT_MODE))
# Run all the commands in the same shell, notice the + at the first line
# it has to be there to allow parallel execution of the submake
# This always tries to compile everything, even if error occurs in the middle
# But we return the error code at the end, to trigger travis failures
+error_occured=0; \
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \
if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
$(foreach TEST,$(TESTS),$($(TEST)_COMMAND)) \
if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
$(foreach TEST,$(TESTS),$(RUN_TEST))
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
# All should compile everything
.PHONY: all
@ -511,7 +528,11 @@ test: test-all
test-clean: test-all-clean
# Generate the version.h file
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
ifndef SKIP_GIT
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
else
GIT_VERSION := NA
endif
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)

@ -131,6 +131,14 @@ ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c
endif
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
OPT_DEFS += -DAPI_SYSEX_ENABLE
SRC += $(QUANTUM_DIR)/api/api_sysex.c
OPT_DEFS += -DAPI_ENABLE
SRC += $(QUANTUM_DIR)/api.c
MIDI_ENABLE=yes
endif
ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
@ -153,6 +161,11 @@ ifeq ($(strip $(UCIS_ENABLE)), yes)
UNICODE_ENABLE = yes
endif
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
OPT_DEFS += -DUNICODEMAP_ENABLE
UNICODE_ENABLE = yes
endif
ifeq ($(strip $(UNICODE_ENABLE)), yes)
OPT_DEFS += -DUNICODE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
@ -169,12 +182,26 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
endif
ifeq ($(strip $(PRINTING_ENABLE)), yes)
OPT_DEFS += -DPRINTING_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
SRC += $(TMK_DIR)/protocol/serial_uart.c
endif
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
OPT_DEFS += $(SERIAL_DEFS)
VAPTH += $(SERIAL_PATH)
endif
ifneq ($(strip $(VARIABLE_TRACE)),)
SRC += $(QUANTUM_DIR)/variable_trace.c
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
endif
endif
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
@ -186,6 +213,7 @@ endif
VPATH += $(KEYBOARD_PATH)
VPATH += $(COMMON_VPATH)
include $(TMK_PATH)/protocol.mk
include $(TMK_PATH)/common.mk
SRC += $(TMK_COMMON_SRC)

@ -23,4 +23,5 @@ COMMON_VPATH += $(QUANTUM_PATH)
COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
COMMON_VPATH += $(QUANTUM_PATH)/audio
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
COMMON_VPATH += $(QUANTUM_PATH)/api
COMMON_VPATH += $(SERIAL_PATH)

@ -84,7 +84,7 @@ KC_PAUSE KC_PAUS 48 Keyboard Pause1
KC_INSERT KC_INS 49 Keyboard Insert1
KC_HOME 4A Keyboard Home1
KC_PGUP 4B Keyboard PageUp1
KC_DELETE KC_DELETE 4C Keyboard Delete Forward
KC_DELETE KC_DEL 4C Keyboard Delete Forward
KC_END 4D Keyboard End1
KC_PGDOWN KC_PGDN 4E Keyboard PageDown1
KC_RIGHT KC_RGHT 4F Keyboard RightArrow1

@ -67,7 +67,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define RGB_DI_PIN E2
#define RGBLIGHT_TIMER
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 8 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

@ -0,0 +1,30 @@
#include "amjpad.h"
#include "led.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
led_init_ports();
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
};
void led_init_ports(void) {
// * Set our LED pins as output
DDRD |= (1<<6);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// Turn numlock on
PORTD &= ~(1<<6);
} else {
// Turn numlock off
PORTD |= (1<<6);
}
}

@ -0,0 +1,46 @@
#ifndef AMJPAD_H
#define ADMJPAD_H
#include "quantum.h"
// readability
#define XXX KC_NO
/* AMJPAD matrix layout
* ,-------------------.
* | 00 | 01 | 02 | 03 |
* |----|----|----|----|
* | 10 | 11 | 12 | 13 |
* |----|----|----|----|
* | 20 | 21 | 22 | |
* |----|----|----| 23 |
* | 30 | 31 | 32 | |
* |----|----|----|----|
* | 40 | 41 | 42 | |
* |----|----|----| 43 |
* | 50 | 52 | |
* `-------------------'
*/
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
k00, k01, k02, k03, \
k10, k11, k12, k13, \
k20, k21, k22, k23, \
k30, k31, k32, \
k40, k41, k42, k43, \
k50, k52 \
) \
{ \
{k00, k01, k02, k03}, \
{k10, k11, k12, k13}, \
{k20, k21, k22, k23}, \
{k30, k31, k32, XXX}, \
{k40, k41, k42, k43}, \
{k50, XXX, k52, XXX} \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif

@ -0,0 +1,94 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0003
#define MANUFACTURER AMJ
#define PRODUCT PAD
#define DESCRIPTION QMK keyboard firmware for AMJ PAD
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 4
// ROWS: Top to bottom, COLS: Left to right
#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5, D0 }
#define MATRIX_COL_PINS { F1, F0, E6, C7 }
#define UNUSED_PINS
#define BACKLIGHT_PIN B6
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 4
/* Underlight configuration
*/
#define RGB_DI_PIN E2
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 8 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

@ -0,0 +1,101 @@
#include "amjpad.h"
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
// Used for SHIFT_ESC
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
* |Esc |TAB |BS | = |
* |----|----|----|----|
* | NL | / | * | - |
* |----|----|----|----|
* | 7 | 8 | 9 | |
* |----|----|----| + |
* | 4 | 5 | 6 | |
* |----|----|----|----|
* | 1 | 2 | 3 | |
* |----|----|----| En |
* | 0 |./FN| |
* `-------------------'
*/
[_BL] = KEYMAP(
KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, LT(_FL,KC_PDOT)),
/* Keymap _FL: Function Layer
* ,-------------------.
* |Esc |TAB |BS | = |
* |----|----|----|----|
* | NL | / | * | - |
* |----|----|----|----|
* | 7 | 8 | 9 | |
* |----|----|----|RST |
* | 4 | 5 | 6 | |
* |----|----|----|----|
* | 1 | 2 | 3 | |
* |----|----|----| En |
* | 0 |./FN| |
* `-------------------'
*/
[_FL] = KEYMAP(
KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, RESET, \
KC_P4, KC_P5, KC_P6, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, LT(_FL,KC_PDOT)),
};
enum function_id {
SHIFT_ESC,
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(SHIFT_ESC),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t shift_esc_shift_mask;
switch (id) {
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
}
}

@ -0,0 +1,66 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID

@ -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 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Arbitrary Definitions
#define PRODUCT Planckeus
#define DESCRIPTION q.m.k. keyboard firmware for Planckeus
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 11
#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 }
#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,45 @@
#include "atreus.h"
#define BASE 0
#define SYMB 1
#define ETC 2
enum macro_id {
TEENSY,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP(
KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN,
LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H,
SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH),
KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT)
),
[SYMB] = KEYMAP(
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS,
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT,
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO,
KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS
),
[ETC] = KEYMAP(
RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME,
LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END,
KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
),
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch(id) {
case TEENSY:
break;
}
return MACRO_NONE;
};

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

@ -0,0 +1 @@
#include "atreus62.h"

@ -0,0 +1,26 @@
#ifndef ATREUS62_H
#define ATREUS62_H
#include "quantum.h"
void promicro_bootloader_jmp(bool program);
// 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
#define KEYMAP( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \
) \
{ \
{ k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \
{ k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \
}
#endif

@ -0,0 +1,83 @@
/*
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 0x6062
#define DEVICE_VER 0x0001
#define MANUFACTURER Profet
#define PRODUCT Atreus62
#define DESCRIPTION q.m.k. keyboard firmware for Atreus62
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 5
#define MATRIX_COLS 13
// wiring of each half
#define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, C6 }
#define CATERINA_BOOTLOADER
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* 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,71 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include "atreus62.h"
// 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 _DEFAULT 0
#define _NAV 1
#define _RESET 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = { /* qwerty */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
{ KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC },
{ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, 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_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC },
{ KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI }
},
[_NAV] = {
{ TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, 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_RGHT, KC_TRNS, KC_TRNS },
{ TO(_RESET), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }
},
[_RESET] = {
{ TO(_DEFAULT), KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO },
{ KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , RESET }
}
/*
[_TRNS] = {
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
{ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }
},
*/
};
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;
};

@ -0,0 +1,362 @@
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2007 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
*/
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <avr/pgmspace.h>
// Workaround for wrong definitions in "iom32u4.h".
// This should be fixed in the AVR toolchain.
#undef UHCON
#undef UHINT
#undef UHIEN
#undef UHADDR
#undef UHFNUM
#undef UHFNUML
#undef UHFNUMH
#undef UHFLEN
#undef UPINRQX
#undef UPINTX
#undef UPNUM
#undef UPRST
#undef UPCONX
#undef UPCFG0X
#undef UPCFG1X
#undef UPSTAX
#undef UPCFG2X
#undef UPIENX
#undef UPDATX
#undef TCCR2A
#undef WGM20
#undef WGM21
#undef COM2B0
#undef COM2B1
#undef COM2A0
#undef COM2A1
#undef TCCR2B
#undef CS20
#undef CS21
#undef CS22
#undef WGM22
#undef FOC2B
#undef FOC2A
#undef TCNT2
#undef TCNT2_0
#undef TCNT2_1
#undef TCNT2_2
#undef TCNT2_3
#undef TCNT2_4
#undef TCNT2_5
#undef TCNT2_6
#undef TCNT2_7
#undef OCR2A
#undef OCR2_0
#undef OCR2_1
#undef OCR2_2
#undef OCR2_3
#undef OCR2_4
#undef OCR2_5
#undef OCR2_6
#undef OCR2_7
#undef OCR2B
#undef OCR2_0
#undef OCR2_1
#undef OCR2_2
#undef OCR2_3
#undef OCR2_4
#undef OCR2_5
#undef OCR2_6
#undef OCR2_7
#define NUM_DIGITAL_PINS 30
#define NUM_ANALOG_INPUTS 12
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
#define TXLED0 PORTD |= (1<<5)
#define TXLED1 PORTD &= ~(1<<5)
#define RXLED0 PORTB |= (1<<0)
#define RXLED1 PORTB &= ~(1<<0)
static const uint8_t SDA = 2;
static const uint8_t SCL = 3;
#define LED_BUILTIN 13
// Map SPI port to 'new' pins D14..D17
static const uint8_t SS = 17;
static const uint8_t MOSI = 16;
static const uint8_t MISO = 14;
static const uint8_t SCK = 15;
// Mapping of analog pins as digital I/O
// A6-A11 share with digital pins
static const uint8_t ADC0 = 18;
static const uint8_t ADC1 = 19;
static const uint8_t ADC2 = 20;
static const uint8_t ADC3 = 21;
static const uint8_t ADC4 = 22;
static const uint8_t ADC5 = 23;
static const uint8_t ADC6 = 24; // D4
static const uint8_t ADC7 = 25; // D6
static const uint8_t ADC8 = 26; // D8
static const uint8_t ADC9 = 27; // D9
static const uint8_t ADC10 = 28; // D10
static const uint8_t ADC11 = 29; // D12
#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) 0
#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
#ifdef ARDUINO_MAIN
// On the Arduino board, digital pins are also used
// for the analog output (software PWM). Analog input
// pins are a separate set.
// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
//
// D0 PD2 RXD1/INT2
// D1 PD3 TXD1/INT3
// D2 PD1 SDA SDA/INT1
// D3# PD0 PWM8/SCL OC0B/SCL/INT0
// D4 A6 PD4 ADC8
// D5# PC6 ??? OC3A/#OC4A
// D6# A7 PD7 FastPWM #OC4D/ADC10
// D7 PE6 INT6/AIN0
//
// D8 A8 PB4 ADC11/PCINT4
// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
// D12 A11 PD6 T1/#OC4D/ADC9
// D13# PC7 PWM10 CLK0/OC4A
//
// A0 D18 PF7 ADC7
// A1 D19 PF6 ADC6
// A2 D20 PF5 ADC5
// A3 D21 PF4 ADC4
// A4 D22 PF1 ADC1
// A5 D23 PF0 ADC0
//
// New pins D14..D17 to map SPI port to digital pins
//
// MISO D14 PB3 MISO,PCINT3
// SCK D15 PB1 SCK,PCINT1
// MOSI D16 PB2 MOSI,PCINT2
// SS D17 PB0 RXLED,SS/PCINT0
//
// Connected LEDs on board for TX and RX
// TXLED D24 PD5 XCK1
// RXLED D17 PB0
// HWB PE2 HWB
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
(uint16_t) &DDRE,
(uint16_t) &DDRF,
};
const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
(uint16_t) &PORTE,
(uint16_t) &PORTF,
};
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
(uint16_t) &PINE,
(uint16_t) &PINF,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PD, // D0 - PD2
PD, // D1 - PD3
PD, // D2 - PD1
PD, // D3 - PD0
PD, // D4 - PD4
PC, // D5 - PC6
PD, // D6 - PD7
PE, // D7 - PE6
PB, // D8 - PB4
PB, // D9 - PB5
PB, // D10 - PB6
PB, // D11 - PB7
PD, // D12 - PD6
PC, // D13 - PC7
PB, // D14 - MISO - PB3
PB, // D15 - SCK - PB1
PB, // D16 - MOSI - PB2
PB, // D17 - SS - PB0
PF, // D18 - A0 - PF7
PF, // D19 - A1 - PF6
PF, // D20 - A2 - PF5
PF, // D21 - A3 - PF4
PF, // D22 - A4 - PF1
PF, // D23 - A5 - PF0
PD, // D24 - PD5
PD, // D25 / D6 - A7 - PD7
PB, // D26 / D8 - A8 - PB4
PB, // D27 / D9 - A9 - PB5
PB, // D28 / D10 - A10 - PB6
PD, // D29 / D12 - A11 - PD6
};
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(2), // D0 - PD2
_BV(3), // D1 - PD3
_BV(1), // D2 - PD1
_BV(0), // D3 - PD0
_BV(4), // D4 - PD4
_BV(6), // D5 - PC6
_BV(7), // D6 - PD7
_BV(6), // D7 - PE6
_BV(4), // D8 - PB4
_BV(5), // D9 - PB5
_BV(6), // D10 - PB6
_BV(7), // D11 - PB7
_BV(6), // D12 - PD6
_BV(7), // D13 - PC7
_BV(3), // D14 - MISO - PB3
_BV(1), // D15 - SCK - PB1
_BV(2), // D16 - MOSI - PB2
_BV(0), // D17 - SS - PB0
_BV(7), // D18 - A0 - PF7
_BV(6), // D19 - A1 - PF6
_BV(5), // D20 - A2 - PF5
_BV(4), // D21 - A3 - PF4
_BV(1), // D22 - A4 - PF1
_BV(0), // D23 - A5 - PF0
_BV(5), // D24 - PD5
_BV(7), // D25 / D6 - A7 - PD7
_BV(4), // D26 / D8 - A8 - PB4
_BV(5), // D27 / D9 - A9 - PB5
_BV(6), // D28 / D10 - A10 - PB6
_BV(6), // D29 / D12 - A11 - PD6
};
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
TIMER0B, /* 3 */
NOT_ON_TIMER,
TIMER3A, /* 5 */
TIMER4D, /* 6 */
NOT_ON_TIMER,
NOT_ON_TIMER,
TIMER1A, /* 9 */
TIMER1B, /* 10 */
TIMER0A, /* 11 */
NOT_ON_TIMER,
TIMER4A, /* 13 */
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
};
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
7, // A0 PF7 ADC7
6, // A1 PF6 ADC6
5, // A2 PF5 ADC5
4, // A3 PF4 ADC4
1, // A4 PF1 ADC1
0, // A5 PF0 ADC0
8, // A6 D4 PD4 ADC8
10, // A7 D6 PD7 ADC10
11, // A8 D8 PB4 ADC11
12, // A9 D9 PB5 ADC12
13, // A10 D10 PB6 ADC13
9 // A11 D12 PD6 ADC9
};
#endif /* ARDUINO_MAIN */
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_USBVIRTUAL Serial
#define SERIAL_PORT_HARDWARE Serial1
#define SERIAL_PORT_HARDWARE_OPEN Serial1
#endif /* Pins_Arduino_h */

@ -0,0 +1,10 @@
atreus62 keyboard firmware
======================
This firmware is for the atreus62 keyboard.
This version utilizes a Pro Micro for its controller and has a 62 key layout.
https://github.com/profet23/atreus62
TODO: More information

@ -0,0 +1,66 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# 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 ?= yes # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
NKRO_ENABLE ?= no # 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
UNICODE_ENABLE ?= yes # Unicode
#BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend

@ -26,7 +26,7 @@
/* Underlight configuration
*/
#define RGB_DI_PIN B2
#define RGBLIGHT_TIMER
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 14 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

@ -30,7 +30,7 @@
/* Underlight configuration
*/
#define RGB_DI_PIN D7
#define RGBLIGHT_TIMER
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 14 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

@ -140,7 +140,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Underlight configuration
*/
#define RGB_DI_PIN E6
//#define RGBLIGHT_TIMER
//#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 4 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

@ -4,7 +4,7 @@
#include "../../config.h"
// place overrides here
#define RGBLIGHT_TIMER
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2

@ -70,7 +70,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Underlight configuration
*/
#define RGB_DI_PIN F6
#define RGBLIGHT_TIMER
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 4 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17

@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

@ -0,0 +1 @@
#include "converter.h"

@ -0,0 +1 @@
#include "quantum.h"

@ -0,0 +1,40 @@
Keyboard converter for IBM terminal keyboard
============================================
This is a port of TMK's converter/terminal_usb to QMK.
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
Source code: https://github.com/tmk/tmk_keyboard
Article: http://geekhack.org/index.php?topic=27272.0
CONNECTION
----------
Keyboard ATMega32U4
----------------------
Data: PD2
Clock: PD5
And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
BUILD
-----
$ git clone https://github.com/tmk/tmk_keyboard.git
$ cd converter/terminal_usb
$ make
RESOURCE
--------
Soarer's Converter: http://geekhack.org/index.php?topic=17458.0
102keys(1392595): http://geekhack.org/index.php?topic=10737.0
122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html
KbdBabel: http://www.kbdbabel.org/
RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png
WinAVR: http://winavr.sourceforge.net/
EOF

@ -0,0 +1,138 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2016 Priyadi Iman Nurcahyo <priyadi@priyadi.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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6535
#define DEVICE_VER 0x0100
#define MANUFACTURER QMK
#define PRODUCT IBM Terminal Keyboard
#define DESCRIPTION USB converter for IBM Terminal Keyboard
/* matrix size */
#define MATRIX_ROWS 17 // keycode bit: 3-0
#define MATRIX_COLS 8 // keycode bit: 6-4
/* legacy keymap support */
#define USE_LEGACY_KEYMAP
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \
)
/*
* PS/2 USART configuration for ATMega32U4
*/
#ifdef PS2_USE_USART
/* XCK for clock line */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 5
/* RXD for data line */
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
#define PS2_USART_INIT() do { \
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
UCSR1C = ((1 << UMSEL10) | \
(3 << UPM10) | \
(0 << USBS1) | \
(3 << UCSZ10) | \
(0 << UCPOL1)); \
UCSR1A = 0; \
UBRR1H = 0; \
UBRR1L = 0; \
} while (0)
#define PS2_USART_RX_INT_ON() do { \
UCSR1B = ((1 << RXCIE1) | \
(1 << RXEN1)); \
} while (0)
#define PS2_USART_RX_POLL_ON() do { \
UCSR1B = (1 << RXEN1); \
} while (0)
#define PS2_USART_OFF() do { \
UCSR1C = 0; \
UCSR1B &= ~((1 << RXEN1) | \
(1 << TXEN1)); \
} while (0)
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
#define PS2_USART_RX_DATA UDR1
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
#define PS2_USART_RX_VECT USART1_RX_vect
#endif
/*
* PS/2 Interrupt configuration
*/
#ifdef PS2_USE_INT
/* uses INT1 for clock line(ATMega32U4) */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 1
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 0
#define PS2_INT_INIT() do { \
EICRA |= ((1<<ISC11) | \
(0<<ISC10)); \
} while (0)
#define PS2_INT_ON() do { \
EIMSK |= (1<<INT1); \
} while (0)
#define PS2_INT_OFF() do { \
EIMSK &= ~(1<<INT1); \
} while (0)
#define PS2_INT_VECT INT1_vect
#endif
/*
* PS/2 Busywait configuration
*/
#ifdef PS2_USE_BUSYWAIT
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 1
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 0
#endif
#endif

@ -0,0 +1,6 @@
#include "ibm_terminal.h"
// void matrix_init_kb(void) {
// matrix_init_user();
// }

@ -0,0 +1,82 @@
#ifndef IBM_TERMINAL_H
#define IBM_TERMINAL_H
#include "quantum.h"
void matrix_init_user(void);
/*
* IBM Terminal keyboard 6110345(122keys)/1392595(102keys)
* http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M
* http://www.seasip.info/VintagePC/ibm_1391406.html
*
* Keymap array:
* 8 bytes
* +---------+
* 0| |
* :| | 0x00-0x87
* ;| |
* 17| |
* +---------+
*/
#define KEYMAP( \
K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F, \
K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, \
\
K05,K06, K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66, K67,K6E,K6F, K76,K77,K7E,K84, \
K04,K0C, K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, K5C, K64,K65,K6D, K6C,K75,K7D,K7C, \
K03,K0B, K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K53,K5A, K63, K6B,K73,K74,K7B, \
K83,K0A, K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K51,K59, K61,K62,K6A, K69,K72,K7A,K79, \
K01,K09, K11, K19, K29, K39, K58, K60, K68,K70,K71,K78 \
) { \
{ KC_NO, K01, KC_NO, K03, K04, K05, K06, K07 }, \
{ K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
{ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
{ K78, K79, K7A, K7B, K7C, K7D, K7E, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO,}, \
}
/*
* IBM Terminal keyboard 1399625, 101-key
*/
#define KEYMAP_101( \
K08, K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, K57,K5F,K62, \
\
K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, K67,K6E,K6F, K76,K77,K7E,K84, \
K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5C, K64,K65,K6D, K6C,K75,K7D, \
K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K7C, \
K12, K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, K63, K69,K72,K7A, \
K11, K19, K29, K39, K58, K61,K60,K6A, K70, K71,K79 \
) { \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K07 }, \
{ K08, KC_NO, KC_NO, KC_NO, KC_NO, K0D, K0E, K0F }, \
{ KC_NO, K11, K12, KC_NO, K14, K15, K16, K17 }, \
{ KC_NO, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ KC_NO, K21, K22, K23, K24, K25, K26, K27 }, \
{ KC_NO, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
{ KC_NO, K31, K32, K33, K34, K35, K36, K37 }, \
{ KC_NO, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
{ KC_NO, K41, K42, K43, K44, K45, K46, K47 }, \
{ KC_NO, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
{ KC_NO, KC_NO, K52, KC_NO, K54, K55, K56, K57 }, \
{ K58, K59, K5A, K5B, K5C, KC_NO, K5E, K5F }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ KC_NO, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
{ KC_NO, K79, K7A, KC_NO, K7C, K7D, K7E, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO,}, \
}
#endif

@ -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 ?= no # Commands for debug and configuration
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no # Audio output on port C6
UNICODE_ENABLE ?= no # Unicode
UNICODEMAP_ENABLE ?= yes
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.
PS2_USE_USART ?= yes
API_SYSEX_ENABLE ?= no
# 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,6 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#endif

@ -0,0 +1,69 @@
/*
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/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "keycode.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "ibm_terminal.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Layer 0
KEYMAP(
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
KC_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_ESC, 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_NO, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
KC_SLCK,KC_INT4, 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_NO, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_PAUS,KC_INT5, 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_BSLS,KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM,
KC_APP, KC_INT6, KC_LSFT,KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_LEFT,KC_INT2,KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_RGUI,KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_GRV, KC_DOWN, KC_NO, KC_P0, KC_PDOT,KC_NO
),
/* 101-key keymaps
*/
/* 0: default
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
* `---' `---------------' `---------------' `---------------' `-----------'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -|
* |-----------------------------------------------------------| |-----------| |---------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| |
* |-----------------------------------------------------------| `-----------' |-----------| +|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| |
* |-----------------------------------------------------------| ,---. |---------------|
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
* |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| |
* `----' `---------------------------------------' `----' `-----------' `---------------'
*/
/*
KEYMAP_101(
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_BRK,
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_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_PPLS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT,KC_PENT
),
*/
};

@ -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 ?= no # Commands for debug and configuration
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no # Audio output on port C6
UNICODE_ENABLE ?= no # Unicode
UNICODEMAP_ENABLE ?= yes
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.
PS2_USE_USART ?= yes
API_SYSEX_ENABLE ?= no
# 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,6 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#endif

@ -0,0 +1,312 @@
/*
Copyright 2016 Priyadi Iman Nurcahyo <priyadi@priyadi.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 "keycode.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "ibm_terminal.h"
#include "action_layer.h"
// Fillers to make layering clearer
#define _______ KC_TRNS
#define XXXXXXX KC_NO
enum layers {
QWE, // qwerty
COL, // colemak
WOR, // workman
DVO, // dvorak
MOU, // mouse keys
EMO, // emoji
SYS, // system
};
enum keycodes {
// default layout switcher
LAY_QWE = SAFE_RANGE,
LAY_COL,
LAY_WOR,
LAY_DVO,
// layer switchers
LYR_SYS,
LYR_EMO,
// os switchers
OS_LIN,
OS_WIN,
OS_MAC,
};
// unicode map
enum unicode_name {
GRIN, // grinning face 😊
TJOY, // tears of joy 😂
SMILE, // grining face with smiling eyes 😁
HEART, // heart ❤
EYERT, // smiling face with heart shaped eyes 😍
CRY, // crying face 😭
SMEYE, // smiling face with smiling eyes 😊
UNAMU, // unamused 😒
KISS, // kiss 😘
HART2, // two hearts 💕
WEARY, // weary 😩
OKHND, // ok hand sign 👌
PENSV, // pensive 😔
SMIRK, // smirk 😏
RECYC, // recycle ♻
WINK, // wink 😉
THMUP, // thumb up 👍
THMDN, // thumb down 👎
PRAY, // pray 🙏
PHEW, // relieved 😌
MUSIC, // musical notes
FLUSH, // flushed 😳
CELEB, // celebration 🙌
CRY2, // crying face 😢
COOL, // smile with sunglasses 😎
NOEVS, // see no evil
NOEVH, // hear no evil
NOEVK, // speak no evil
POO, // pile of poo
EYES, // eyes
VIC, // victory hand
BHART, // broken heart
SLEEP, // sleeping face
SMIL2, // smiling face with open mouth & sweat
HUNRD, // 100
CONFU, // confused
TONGU, // face with tongue & winking eye
DISAP, // disappointed
YUMMY, // face savoring delicious food
CLAP, // hand clapping
FEAR, // face screaming in fear
HORNS, // smiling face with horns
HALO, // smiling face with halo
BYE, // waving hand
SUN, // sun
MOON, // moon
SKULL, // skull
};
const uint32_t PROGMEM unicode_map[] = {
[GRIN] = 0x1F600,
[TJOY] = 0x1F602,
[SMILE] = 0x1F601,
[HEART] = 0x2764,
[EYERT] = 0x1f60d,
[CRY] = 0x1f62d,
[SMEYE] = 0x1F60A,
[UNAMU] = 0x1F612,
[KISS] = 0x1F618,
[HART2] = 0x1F495,
[WEARY] = 0x1F629,
[OKHND] = 0x1F44C,
[PENSV] = 0x1F614,
[SMIRK] = 0x1F60F,
[RECYC] = 0x267B,
[WINK] = 0x1F609,
[THMUP] = 0x1F44D,
[THMDN] = 0x1F44E,
[PRAY] = 0x1F64F,
[PHEW] = 0x1F60C,
[MUSIC] = 0x1F3B6,
[FLUSH] = 0x1F633,
[CELEB] = 0x1F64C,
[CRY2] = 0x1F622,
[COOL] = 0x1F60E,
[NOEVS] = 0x1F648,
[NOEVH] = 0x1F649,
[NOEVK] = 0x1F64A,
[POO] = 0x1F4A9,
[EYES] = 0x1F440,
[VIC] = 0x270C,
[BHART] = 0x1F494,
[SLEEP] = 0x1F634,
[SMIL2] = 0x1F605,
[HUNRD] = 0x1F4AF,
[CONFU] = 0x1F615,
[TONGU] = 0x1F61C,
[DISAP] = 0x1F61E,
[YUMMY] = 0x1F60B,
[CLAP] = 0x1F44F,
[FEAR] = 0x1F631,
[HORNS] = 0x1F608,
[HALO] = 0x1F607,
[BYE] = 0x1F44B,
[SUN] = 0x2600,
[MOON] = 0x1F314,
[SKULL] = 0x1F480,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* qwerty */
[QWE] = KEYMAP(
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_PSCR, KC_SLCK, KC_PAUS,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
MO(EMO), MO(SYS), 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, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_MNXT, KC_VOLU, 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, XXXXXXX, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_MPLY, KC_MUTE, 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_BSLS, KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM,
KC_MPRV, KC_VOLD, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_LEFT, TG(MOU), KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LGUI, KC_APP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, XXXXXXX, KC_P0, KC_PDOT, XXXXXXX
),
/* colemak */
[COL] = KEYMAP(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, 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_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* workman */
[WOR] = KEYMAP(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, 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_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* dvorak */
[DVO] = KEYMAP(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, 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_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* system */
[SYS] = KEYMAP(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, LAY_QWE, OS_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, LAY_DVO, _______, _______, _______, _______, LAY_WOR, OS_LIN, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, LAY_COL, _______, _______, _______, OS_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* mouse keys */
[MOU] = KEYMAP(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, KC_BTN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, KC_BTN5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, _______, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
/* emoji */
[EMO] = KEYMAP(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY), X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN), X(HEART),X(BYE), X(KISS), X(CELEB),X(COOL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,X(SLEEP),X(CLAP), X(CRY), X(VIC), X(BHART),X(SUN), X(SMEYE),X(WINK), X(MOON), X(CONFU), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
/*
[XXX] = KEYMAP(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
*/
};
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) {
/* layout switcher */
case LAY_QWE:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<QWE);
}
return false;
break;
case LAY_COL:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<COL);
}
return false;
break;
case LAY_WOR:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<WOR);
}
return false;
break;
case LAY_DVO:
if (record->event.pressed) {
persistant_default_layer_set(1UL<<DVO);
}
return false;
break;
/* os switcher */
case OS_LIN:
set_unicode_input_mode(UC_LNX);
return false;
break;
case OS_WIN:
set_unicode_input_mode(UC_WINC);
return false;
break;
case OS_MAC:
set_unicode_input_mode(UC_OSX);
return false;
break;
}
return true;
}
void matrix_init_user() {
set_unicode_input_mode(UC_LNX);
}

@ -0,0 +1,33 @@
/*
Copyright 2011 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/>.
*/
#include "stdint.h"
#include "ps2.h"
#include "led.h"
void led_set(uint8_t usb_led)
{
uint8_t ps2_led = 0;
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
if (usb_led & (1<<USB_LED_NUM_LOCK))
ps2_led |= (1<<PS2_LED_NUM_LOCK);
if (usb_led & (1<<USB_LED_CAPS_LOCK))
ps2_led |= (1<<PS2_LED_CAPS_LOCK);
ps2_host_set_led(ps2_led);
}

@ -0,0 +1,237 @@
/*
Copyright 2011 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/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "util.h"
#include "debug.h"
#include "ps2.h"
#include "matrix.h"
#define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
#define print_matrix_header() print("\nr/c 01234567\n")
#define matrix_bitpop(i) bitpop(matrix[i])
#define ROW_SHIFTER ((uint8_t)1)
static void matrix_make(uint8_t code);
static void matrix_break(uint8_t code);
/*
* Matrix Array usage:
* 'Scan Code Set 3' is assigned into 17x8 cell matrix.
*
* 8bit wide
* +---------+
* 0| |
* :| | 0x00-0x87
* ;| |
* 17| |
* +---------+
*/
static uint8_t matrix[MATRIX_ROWS];
#define ROW(code) (code>>3)
#define COL(code) (code&0x07)
__attribute__ ((weak))
void matrix_init_user(void) {
}
void matrix_init(void)
{
debug_enable = true;
//debug_matrix = true;
//debug_keyboard = true;
//debug_mouse = false;
ps2_host_init();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
matrix_init_user();
return;
}
uint8_t matrix_scan(void)
{
// scan code reading states
static enum {
RESET,
RESET_RESPONSE,
KBD_ID0,
KBD_ID1,
CONFIG,
READY,
F0,
} state = RESET;
uint8_t code;
if ((code = ps2_host_recv())) {
debug("r"); debug_hex(code); debug(" ");
}
switch (state) {
case RESET:
debug("wFF ");
if (ps2_host_send(0xFF) == 0xFA) {
debug("[ack]\nRESET_RESPONSE: ");
state = RESET_RESPONSE;
}
break;
case RESET_RESPONSE:
if (code == 0xAA) {
debug("[ok]\nKBD_ID: ");
state = KBD_ID0;
} else if (code) {
debug("err\nRESET: ");
state = RESET;
}
break;
// after reset receive keyboad ID(2 bytes)
case KBD_ID0:
if (code) {
state = KBD_ID1;
}
break;
case KBD_ID1:
if (code) {
debug("\nCONFIG: ");
state = CONFIG;
}
break;
case CONFIG:
debug("wF8 ");
if (ps2_host_send(0xF8) == 0xFA) {
debug("[ack]\nREADY\n");
state = READY;
}
break;
case READY:
switch (code) {
case 0x00:
break;
case 0xF0:
state = F0;
debug(" ");
break;
default: // normal key make
if (code < 0x88) {
matrix_make(code);
} else {
debug("unexpected scan code at READY: "); debug_hex(code); debug("\n");
}
state = READY;
debug("\n");
}
break;
case F0: // Break code
switch (code) {
case 0x00:
break;
default:
if (code < 0x88) {
matrix_break(code);
} else {
debug("unexpected scan code at F0: "); debug_hex(code); debug("\n");
}
state = READY;
debug("\n");
}
break;
}
return 1;
}
inline
uint8_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
inline
static void matrix_make(uint8_t code)
{
if (!matrix_is_on(ROW(code), COL(code))) {
matrix[ROW(code)] |= 1<<COL(code);
}
}
inline
static void matrix_break(uint8_t code)
{
if (matrix_is_on(ROW(code), COL(code))) {
matrix[ROW(code)] &= ~(1<<COL(code));
}
}
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix_get_row(row) & (1<<col));
}
void matrix_print(void)
{
#if (MATRIX_COLS <= 8)
print("r/c 01234567\n");
#elif (MATRIX_COLS <= 16)
print("r/c 0123456789ABCDEF\n");
#elif (MATRIX_COLS <= 32)
print("r/c 0123456789ABCDEF0123456789ABCDEF\n");
#endif
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
#if (MATRIX_COLS <= 8)
xprintf("%02X: %08b%s\n", row, bitrev(matrix_get_row(row)),
#elif (MATRIX_COLS <= 16)
xprintf("%02X: %016b%s\n", row, bitrev16(matrix_get_row(row)),
#elif (MATRIX_COLS <= 32)
xprintf("%02X: %032b%s\n", row, bitrev32(matrix_get_row(row)),
#endif
#ifdef MATRIX_HAS_GHOST
matrix_has_ghost_in_row(row) ? " <ghost" : ""
#else
""
#endif
);
}
}
#ifdef MATRIX_HAS_GHOST
__attribute__ ((weak))
bool matrix_has_ghost_in_row(uint8_t row)
{
matrix_row_t matrix_row = matrix_get_row(row);
// No ghost exists when less than 2 keys are down on the row
if (((matrix_row - 1) & matrix_row) == 0)
return false;
// Ghost occurs when the row shares column line with other row
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
if (i != row && (matrix_get_row(i) & matrix_row))
return true;
}
return false;
}
#endif

@ -0,0 +1,72 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= no # Commands for debug and configuration
NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no # Audio output on port C6
UNICODE_ENABLE ?= no # Unicode
UNICODEMAP_ENABLE ?= yes
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.
PS2_USE_USART ?= yes
API_SYSEX_ENABLE ?= n
CUSTOM_MATRIX = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
SRC = matrix.c led.c

@ -1,10 +1,11 @@
#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
#define KEYBOARDS_ERGODOX_CONFIG_H_
#define MOUSEKEY_DELAY 100
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 3
#define MOUSEKEY_TIME_TO_MAX 10
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 5
#define MOUSEKEY_MAX_SPEED 2
#define MOUSEKEY_WHEEL_DELAY 0
#define TAPPING_TOGGLE 1

@ -2,23 +2,3 @@
#include "debug.h"
#include "action_layer.h"
// swap-hands action needs a matrix to define the swap
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
/* Left hand, matrix positions */
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
/* Right hand, matrix positions */
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
};

@ -1,3 +1,8 @@
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
RGBLIGHT_ENABLE ?= yes
MIDI_ENABLE ?= no
ifndef MAKEFILE_INCLUDED
include ../../../Makefile
endif
endif

@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../config.h"
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1307
@ -39,10 +41,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
/* ws2812 RGB LED */
#define RGB_DI_PIN D7
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 15 // Number of LEDs
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 255
#define RGBLIGHT_VAL_STEP 12
#define RGB_MIDI
#define RGBW_BB_TWI
#define RGBW 1
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
#define USB_MAX_POWER_CONSUMPTION 500
/*
* Feature disable options
* These options are also useful to firmware size reduction.

@ -16,10 +16,10 @@ void matrix_init_kb(void) {
// unused pins - C7, D4, D5, D7, E6
// set as input with internal pull-ip enabled
DDRC &= ~(1<<7);
DDRD &= ~(1<<7 | 1<<5 | 1<<4);
DDRD &= ~(1<<5 | 1<<4);
DDRE &= ~(1<<6);
PORTC |= (1<<7);
PORTD |= (1<<7 | 1<<5 | 1<<4);
PORTD |= (1<<5 | 1<<4);
PORTE |= (1<<6);
ergodox_blink_all_leds();
@ -51,6 +51,10 @@ uint8_t init_mcp23018(void) {
mcp23018_status = 0x20;
// I2C subsystem
uint8_t sreg_prev;
sreg_prev=SREG;
cli();
if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0)
i2c_initialized++;
@ -79,7 +83,30 @@ uint8_t init_mcp23018(void) {
out:
i2c_stop();
SREG=sreg_prev;
return mcp23018_status;
}
#ifdef ONEHAND_ENABLE
__attribute__ ((weak))
// swap-hands action needs a matrix to define the swap
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
/* Left hand, matrix positions */
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
/* Right hand, matrix positions */
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
};
#endif

@ -121,7 +121,7 @@ void matrix_init(void)
matrix_scan_count = 0;
#endif
matrix_init_kb();
matrix_init_quantum();
}

@ -72,6 +72,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
#
SLEEP_LED_ENABLE = no
API_SYSEX_ENABLE ?= no
RGBLIGHT_ENABLE ?= yes
ifndef QUANTUM_DIR
include ../../../Makefile

@ -38,7 +38,6 @@ void init_serial_link_hal(void) {
// Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced
// Which will reduce the brightness range
#define PRESCALAR_DEFINE 0
#ifdef VISUALIZER_ENABLE
void lcd_backlight_hal_init(void) {
// Setup Backlight
SIM->SCGC6 |= SIM_SCGC6_FTM0;
@ -76,7 +75,6 @@ void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
CHANNEL_GREEN.CnV = g;
CHANNEL_BLUE.CnV = b;
}
#endif
__attribute__ ((weak))
void matrix_init_user(void) {
@ -92,6 +90,10 @@ void matrix_init_kb(void) {
// runs once when the firmware starts up
matrix_init_user();
// The backlight always has to be initialized, otherwise it will stay lit
#ifndef VISUALIZER_ENABLE
lcd_backlight_hal_init();
#endif
}
void matrix_scan_kb(void) {

@ -21,29 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void led_set(uint8_t usb_led) {
// The LCD backlight functionality conflicts with this simple
// red backlight
#if !defined(LCD_BACKLIGHT_ENABLE) && defined(STATUS_LED_ENABLE)
// PTC1: LCD Backlight Red(0:on/1:off)
GPIOC->PDDR |= (1<<1);
PORTC->PCR[1] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
GPIOC->PCOR |= (1<<1);
} else {
GPIOC->PSOR |= (1<<1);
}
#elif !defined(LCD_BACKLIGHT_ENABLE)
//TODO: Add led emulation if there's no customized visualization
(void)usb_led;
GPIOC->PDDR |= (1<<1);
PORTC->PCR[1] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
GPIOC->PSOR |= (1<<1);
GPIOC->PDDR |= (1<<2);
PORTC->PCR[2] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
GPIOC->PSOR |= (1<<2);
GPIOC->PDDR |= (1<<3);
PORTC->PCR[3] |= PORTx_PCRn_DSE | PORTx_PCRn_MUX(1);
GPIOC->PSOR |= (1<<3);
#else
(void)usb_led;
#endif
}

@ -63,6 +63,8 @@ VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
LCD_ENABLE ?= yes
LED_ENABLE ?= yes
LCD_BACKLIGHT_ENABLE ?= yes
MIDI_ENABLE = no
RGBLIGHT_ENABLE = no
ifndef QUANTUM_DIR
include ../../../Makefile

@ -1,3 +1,47 @@
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
## v1.10
*2016-12-28*
### Miscellaneous
* `µ` can now be entered with UCIS.
* `™` can now be entered with UCIS.
### Tools
* `tools/hid-commands` can now find Banshee, and prefers it over Kodi.
* `tools/hid-commands` can now find Chrome too, not juts Chromium.
## v1.9
*2016-10-16*
### Overall changes
* `F12` was replaced by an `Fx` key, that activate the **Media** layer as a one-shot layer, and also `Alt` as a one-shot modifier.
### Base layer changes
* The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap.
### Miscellaneous
* `π` can now be entered with UCIS.
* `🐁` can now be entered with UCIS.
### Tools
* The `tools/layer-notify` tool was removed, it was an example, which I don't use.
#### `tools/hid-commands`
* Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty.
* Will attempt to re-program the keyboard when receiving a `reflash` command.
* No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs.
* The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice.
## v1.8
*2016-10-03*
@ -13,7 +57,7 @@
### Miscellaneous
* Fixed the [Steno](#steno-layer) toggle key.
* Fixed the **Steno** toggle key.
## v1.7
@ -21,9 +65,9 @@
### Overall changes
* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
* The number row has been completely rearranged on both the **Base** and the **ADORE** layers.
* The number/function key behavior was changed: function keys are now on the **Media**.
* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers.
* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers.
* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped.
* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it.
@ -59,13 +103,13 @@
### Base layer changes
* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`.
* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`.
* The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`.
* The `Apps` key has been replaced by `F12`.
* The `-`/`_` is no longer a tap-dance key.
### ADORE layer changes
* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations.
* Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations.
### Miscellaneous changes
@ -84,9 +128,9 @@
* The **1HAND** layer has been removed.
* A `Delete` key is now available on the right thumb cluster.
* The [ADORE](#adore-layer) layer received a major update, see the layout image above.
* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer).
* The **ADORE** layer received a major update, see the layout image above.
* It is now possible to enable automatic logging for the **ADORE** layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
* The `~` key and the `Media Next/Prev` key have been swapped on the **Base** layer.
* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
* There is some experimental support for entering Unicode symbols.
@ -104,33 +148,33 @@
*2016-07-06*
* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.
* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are.
* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now.
* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a *heatmap* out of the logs.
* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the **Base** layer for an image that shows where arrows are.
* The **experimental** layer has been redone, and is now called **ADORE**, and as such, can be enabled by `LEAD a` now.
* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
## v1.2
*2016-06-22*
* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows).
* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with certain operating systems.
* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the **Base** and the **experimental** layers.
* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
* `LEAD v` types the firmware version, and the keymap version.
* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
* The **Steno** layer gained a few more `#` and `*` keys, to make it easier on my fingers.
## v1.1
*2016-06-14*
* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
* A [Steno](#steno-layer) layer was added, to be used with Plover.
* A **Steno** layer was added, to be used with Plover.
* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
* `LEAD y` types `\o/`.
* Some keys on the [Base](#base-layer) layer have been moved around:
* Some keys on the **Base** layer have been moved around:
- `?` moved to the left pinky, left of `Q`.
- `=` shifted one row down, but `F11` stayed where it was.
- `-` on the left half was replaced by `Tab`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

@ -64,6 +64,9 @@ enum {
A_8,
A_9,
A_0,
// Fx
Fx,
};
/* Fn keys */
@ -86,14 +89,13 @@ enum {
CT_RBP,
CT_TMUX,
CT_TPS,
CT_SR,
};
/* States & timers */
uint16_t gui_timer = 0;
uint16_t kf_timers[12];
#if KEYLOGGER_ENABLE
# ifdef AUTOLOG_ENABLE
bool log_enable = true;
@ -103,6 +105,7 @@ bool log_enable = false;
#endif
bool time_travel = false;
bool skip_leds = false;
static uint8_t is_adore = 0;
@ -113,13 +116,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ |
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
* | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow |
* |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
* | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop |
* | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop/Reset|
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | : | | - | | | | |
* `-----------------------------------' `-----------------------------------'
@ -144,10 +147,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
,KC_BSPC,F(F_SFT),KC_ESC
// right hand
,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,TD(CT_SR)
,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,OSL(NMDIA),KC_DEL
@ -158,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 1: Adore layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ |
* |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
@ -189,7 +192,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
,KC_BSPC,F(F_SFT),KC_ESC
// right hand
,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV
,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO
@ -342,7 +345,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 5: Navigation & Media layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | |
* | | F9 | F7 | F5 | F3 | F1 |ScrLCK| | | F10 | F2 | F4 | F6 | F8 | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
@ -362,7 +365,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[NMDIA] = KEYMAP(
// left hand
KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO
KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,LGUI(KC_L)
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@ -372,7 +375,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
,KC_NO ,KC_NO ,KC_TRNS
// right hand
,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
,KC_TRNS ,KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@ -611,6 +614,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
toggle_steno(record->event.pressed);
break;
/* Fx */
case Fx:
if (record->event.pressed) {
set_oneshot_mods (MOD_LALT);
layer_on (NMDIA);
set_oneshot_layer (NMDIA, ONESHOT_START);
} else {
clear_oneshot_layer_state (ONESHOT_PRESSED);
}
break;
/* GUI & AppSel */
case A_GUI:
if (record->event.pressed) {
@ -770,7 +784,7 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u
if (state->count >= 2) {
kc = KC_Z;
}
register_code(KC_LALT);
register_code(KC_SPC);
unregister_code(KC_SPC);
@ -780,6 +794,56 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u
unregister_code(kc);
}
static void
_td_sr_each (qk_tap_dance_state_t *state, void *user_data) {
skip_leds = true;
switch (state->count) {
case 1:
ergodox_right_led_3_on ();
break;
case 2:
ergodox_right_led_2_on ();
break;
case 3:
ergodox_right_led_1_on ();
break;
case 4:
ergodox_right_led_3_off ();
wait_ms (50);
ergodox_right_led_2_off ();
wait_ms (50);
ergodox_right_led_1_off ();
break;
}
}
static void
_td_sr_finished (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_code (KC_MSTP);
}
if (state->count >= 4) {
uprintf("CMD:reflash\n");
wait_ms (1000);
reset_keyboard ();
reset_tap_dance (state);
}
}
static void
_td_sr_reset (qk_tap_dance_state_t *state, void *user_data) {
ergodox_right_led_1_off ();
wait_ms (50);
ergodox_right_led_2_off ();
wait_ms (50);
ergodox_right_led_3_off ();
if (state->count == 1) {
unregister_code (KC_MSTP);
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
,[CT_TA] = {
@ -790,77 +854,75 @@ qk_tap_dance_action_t tap_dance_actions[] = {
,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
,[CT_SR] = ACTION_TAP_DANCE_FN_ADVANCED (_td_sr_each, _td_sr_finished, _td_sr_reset)
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
static uint32_t prev_layer_state;
uint8_t layer = biton32(layer_state);
bool is_arrow = false;
static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
if (layer_state != prev_layer_state) {
prev_layer_state = layer_state;
if (layer_lookup[layer])
uprintf("LAYER: %s\n", layer_lookup[layer]);
}
if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
unregister_code (KC_LGUI);
if (layer == HUN) {
ergodox_right_led_2_on();
ergodox_right_led_3_on();
} else if (layer == NMDIA) {
ergodox_right_led_1_on();
ergodox_right_led_2_on();
} else if (layer == PLVR) {
ergodox_right_led_1_on ();
ergodox_right_led_2_on ();
ergodox_right_led_3_on ();
} else if (layer == ADORE) {
ergodox_right_led_1_on ();
ergodox_right_led_2_on ();
ergodox_right_led_3_on ();
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
if (!skip_leds) {
if (layer == HUN) {
ergodox_right_led_2_on();
ergodox_right_led_3_on();
} else if (layer == NMDIA) {
ergodox_right_led_1_on();
ergodox_right_led_2_on();
} else if (layer == PLVR) {
ergodox_right_led_1_on ();
ergodox_right_led_2_on ();
ergodox_right_led_3_on ();
} else if (layer == ADORE) {
ergodox_right_led_1_on ();
ergodox_right_led_2_on ();
ergodox_right_led_3_on ();
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
}
}
if (layer_state & (1UL << ARRW)) {
ergodox_right_led_1_on ();
ergodox_right_led_3_on ();
if (!skip_leds) {
ergodox_right_led_1_on ();
ergodox_right_led_3_on ();
}
is_arrow = true;
}
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
ergodox_right_led_1_on ();
} else {
ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
ergodox_right_led_1_off ();
}
if (!skip_leds) {
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
ergodox_right_led_1_on ();
} else {
ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
ergodox_right_led_1_off ();
}
if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
ergodox_right_led_2_on ();
} else {
ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE)
ergodox_right_led_2_off ();
}
if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
ergodox_right_led_2_on ();
} else {
ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE)
ergodox_right_led_2_off ();
}
if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
ergodox_right_led_3_on ();
} else {
ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
ergodox_right_led_3_off ();
if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
ergodox_right_led_3_on ();
} else {
ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
ergodox_right_led_3_off ();
}
}
LEADER_DICTIONARY() {
@ -974,7 +1036,11 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
UCIS_SYM("snowman", 0x2603),
UCIS_SYM("coffee", 0x2615),
UCIS_SYM("heart", 0x2764),
UCIS_SYM("bolt", 0x26a1)
UCIS_SYM("bolt", 0x26a1),
UCIS_SYM("pi", 0x03c0),
UCIS_SYM("mouse", 0x1f401),
UCIS_SYM("micro", 0x00b5),
UCIS_SYM("tm", 0x2122)
);
bool process_record_user (uint16_t keycode, keyrecord_t *record) {

@ -43,6 +43,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout.
* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode.
* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle.
* The **Fx** key is one-shot, and activates the **Media** layer, along with a one-shot `Alt`.
* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap.
* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`.
@ -93,12 +94,7 @@ Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers
Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes.
The currently supported symbols are:
- `snowman`: ☃
- `kiss`: 😙
- `rofl`: 🤣
- `poop`: 💩
For the list of supported symbols, please see the source.
This is an experimental feature, and may or may not work reliably.

@ -65,7 +65,7 @@
"x": 4.5,
"f": 3
},
"F12",
"Fx",
{
"a": 4,
"f": 3,

@ -65,7 +65,7 @@
"x": 4.5,
"f": 3
},
"F12",
"Fx",
{
"a": 4,
"f": 3,

@ -16,7 +16,8 @@ _cmd_appsel () {
}
cmd_appsel_music () {
wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \
wmctrl -x -a banshee || wmctrl -x -a kodi || true
xdotool key Escape
}
@ -25,7 +26,7 @@ cmd_appsel_slack () {
}
cmd_appsel_emacs () {
_cmd_appsel emacs24
_cmd_appsel emacs
}
cmd_appsel_term () {
@ -33,10 +34,14 @@ cmd_appsel_term () {
}
cmd_appsel_chrome () {
_cmd_appsel chromium
_cmd_appsel chrom
}
cmd_appsel_start () {
if [ ! -z "${DISABLE_APPSEL_START}" ]; then
return
fi
APPSEL_START=$(date +%s)
if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
return
@ -46,6 +51,10 @@ cmd_appsel_start () {
-i /usr/share/icons/Adwaita/24x24/devices/video-display.png
}
cmd_reflash () {
teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
}
cmd_help () {
cat <<EOF
Use the source, Luke!
@ -69,5 +78,3 @@ while read l; do
cmd_${cmd}
fi
done

@ -1,12 +0,0 @@
#!/bin/sh
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
sudo "${HL}" | grep --line-buffered LAYER: | \
(while read line; do
case $line in
LAYER:*)
layer="$(echo $(echo $line | cut -d: -f2-))"
notify-send -i mark-location-symbolic "Switched to layer: $layer"
;;
esac
done)

@ -0,0 +1,17 @@
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 = no # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,12 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define FORCE_NKRO
#define PREVENT_STUCK_MODIFIERS
#undef TAPPING_TERM
#undef IGNORE_MOD_TAP_INTERRUPT
#endif

@ -0,0 +1,107 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define ETC 2 // etc
enum macro_id {
TEENSY,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP,
CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN,
KC_GRV, KC_DEL, KC_DEL, KC_LALT, GUI_T(KC_TAB),
KC_NO, KC_NO,
KC_NO,
LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS,
KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT,
KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT),
KC_NO, KC_NO,
KC_NO,
KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC)
),
[SYMB] = KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
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_BSLS,
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS,
KC_TILD, KC_AMPR, KC_AMPR, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_NO,
KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_NO,
KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS,
KC_0, KC_NO, KC_DOT, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
[ETC] = KEYMAP(
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS,
KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_TRNS,
KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, KC_NO,
KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO,
KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch(id) {
case TEENSY:
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) {
};
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
break;
}
};

@ -0,0 +1,9 @@
# Having a file like this allows you to override Makefile definitions
# for your own particular keymap
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

@ -1,21 +1,23 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_bepo.h"
#include "keymap_french.h"
#define BASE 0 // default layer
#define QWER 1 // qwerty compat layer
#define SQWER 2 // shifted qwerty compat layer
#define AQWER 3 // alted qwerty compat layer
#define FNAV 4 // function / navigation keys
#define NUM 5 // numeric keypad keys
#define MSE 6 // mouse keys
// keymaps
#define BEPO 0 // default layer, for bepo compatible systems
#define QW_B 1 // bepo to qwerty base compat layer, for qwerty systems
#define QW_A 2 // bepo with altgr key to qwerty compat layer
#define QW_S 3 // bepo with shift key to qwerty compat layer
#define AZ_B 4 // bepo to azerty base compat layer, for azerty systems
#define AZ_A 5 // bepo with altgr key to azerty compat layer
#define AZ_S 6 // bepo with shift key to azerty compat layer
#define FNAV 7 // function / navigation / mouse layer
#define NUMK 8 // numeric keypad layer
#define KP_00 0
#define CA_Fx 1
// macros
#define KP_00 0 // keypad "double 0"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base layer
/* Keymap 0: default layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | $ | " | < | > | ( | ) |Delete| |ScroLo| @ | + | - | / | * | = |
@ -26,22 +28,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | E_CIRC |A_GRAV| Y | X | . | K | | | | ' | Q | G | H | F | C_CEDIL|
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* |QWERTY| |LSuper| LCtrl| LAlt| |Escape| L_Mse| | |Insert| | AltGr| RCtrl|RSuper|PrntSc| Pause|
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | | L_Num| | CA_Fx| | |
* | | |L_NumK| |L_NumK| | |
* | Space|LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[BASE] = KEYMAP(
[BEPO] = KEYMAP(
// Left hand
BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL,
BP_PERCENT, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC,
BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA,
BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, KC_TAB,
TG(QWER), KC_NO, KC_LGUI, KC_LCTL, KC_LALT,
KC_ESC, MO(MSE),
MO(NUM),
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
DF(BEPO), DF(QW_B),
MO(NUMK),
KC_SPC, KC_LSHIFT, MO(FNAV),
// Right hand
KC_SLCK, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL,
@ -49,10 +51,10 @@ TG(QWER), KC_NO, KC_LGUI, KC_LCTL, KC_LALT,
BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
KC_NUMLOCK, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
BP_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_NO, KC_INS,
M(CA_Fx),
DF(AZ_B), DF(BEPO),
MO(NUMK),
MO(FNAV), KC_RSHIFT, KC_ENTER),
/* Keymap 1: QWERTY system compatibility layer
/* Keymap 1: bepo to qwerty base compat layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | $ | " | < | > | ( | ) |Delete| |ScroLo| @ | + | - | / | * | = |
@ -63,33 +65,70 @@ MO(FNAV), KC_RSHIFT, KC_ENTER),
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | e | a | y | x | . | k | | | | ' | q | g | h | f | c |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* | BEPO | |LSuper| LCtrl| LAlt| |Escape| L_Mse| | |Insert| | AltGr| RCtrl|RSuper|PrntSc| Pause|
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | | L_Num| | | | |
* | | |L_NumK| |L_NumK| | |
* | Space|LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[QWER] = KEYMAP(
[QW_B] = KEYMAP(
// Left hand
KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, KC_DEL,
KC_PERCENT, KC_B, KC_E, KC_P, KC_O, KC_E, KC_BSPC,
KC_W, KC_A, KC_U, KC_I, KC_E, KC_COMMA,
KC_E, KC_A, KC_Y, KC_X, KC_DOT, KC_K, KC_TAB,
KC_TRNS, KC_NO, KC_LGUI, KC_LCTL, KC_LALT,
KC_ESC, MO(MSE),
MO(NUM),
KC_SPC, MO(SQWER), MO(FNAV),
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_SPC, MO(QW_S), KC_TRNS,
// Right hand
KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL,
KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C,
MO(AQWER), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_NO, KC_INS,
MO(QW_A), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, MO(QW_S), KC_ENTER),
/* Keymap 2: bepo with altgr key to qwerty compat layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | $ | " | < | > | [ | ] |Delete| |ScroLo| @ | + | - | / | * | = |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | % | | | e | & | o | e |Backsp| |CapsLo| ^ | v | d | l | j | z |
* |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
* | w | a | u | i | | , |------| |------| c | t | s | r | n | m |
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | e | \ | { | } | . | ~ | | | | ' | q | g | h | f | c |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | |L_NumK| |L_NumK| | |
* | _ |LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[QW_A] = KEYMAP(
// Left hand
KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL,
KC_PERCENT, KC_PIPE, KC_E, KC_AMPR, KC_O, KC_E, KC_BSPC,
KC_W, KC_A, KC_U, KC_I, RALT(KC_5), KC_COMMA,
KC_E, KC_BSLASH, KC_LCBR, KC_RCBR, KC_DOT, KC_TILDE, KC_TAB,
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_UNDS, MO(QW_S), KC_TRNS,
// Right hand
KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL,
KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C,
KC_TRNS, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
MO(FNAV), MO(SQWER), KC_ENTER),
/* Keymap 2: QWERTY shifted system compatibility layer
KC_TRNS, MO(QW_S), KC_ENTER),
/* Keymap 3: bepo with shift key to qwerty compat layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | # | 1 | 2 | 3 | 4 | 5 |Delete| |ScroLo| 6 | 7 | 8 | 9 | 0 | = |
@ -100,20 +139,20 @@ MO(FNAV), MO(SQWER), KC_ENTER),
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | E | A | Y | X | : | K | | | | ? | Q | G | H | F | C |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* | BEPO | |LSuper| LCtrl| LAlt| |Escape| L_Mse| | |Insert| | AltGr| RCtrl|RSuper|PrntSc| Pause|
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | | L_Num| | | | |
* | | |L_NumK| |L_NumK| | |
* | Space|LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[SQWER] = KEYMAP(
[QW_S] = KEYMAP(
// Left hand
KC_HASH, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
KC_GRV, S(KC_B), S(KC_E), S(KC_P), S(KC_O), S(KC_E), KC_TRNS,
S(KC_W), S(KC_A), S(KC_U), S(KC_I), S(KC_E), KC_SCOLON,
S(KC_E), S(KC_A), S(KC_Y), S(KC_X), KC_COLON, S(KC_K), S(KC_TAB),
KC_TRNS, KC_TRNS, S(KC_LGUI), S(KC_LCTL), S(KC_LALT),
S(KC_ESC), S(KC_INS), S(KC_LGUI), S(KC_LCTL), S(KC_LALT),
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
@ -126,51 +165,125 @@ KC_TRNS, KC_TRNS, S(KC_LGUI), S(KC_LCTL), S(KC_LALT),
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
/* Keymap 3: QWERTY alted system compatibility layer
/* Keymap 4: bepo to azerty base compat layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | $ | " | < | > | ( | ) |Delete| |ScroLo| @ | + | - | / | * | = |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | % | b |e_acut| p | o |e_grav|Backsp| |CapsLo| ^ | v | d | l | j | z |
* |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
* | w | a | u | i | e | , |------| |------| c | t | s | r | n | m |
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | e |a_grav| y | x | . | k | | | | ' | q | g | h | f | c_cedil|
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | |L_NumK| |L_NumK| | |
* | Space|LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[AZ_B] = KEYMAP(
// Left hand
FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LPRN, FR_RPRN, KC_DEL,
FR_PERC, KC_B, FR_EACU, KC_P, KC_O, FR_EGRV, KC_BSPC,
FR_W, FR_A, KC_U, KC_I, KC_E, FR_COMM,
KC_E, FR_AGRV, KC_Y, KC_X, FR_DOT, KC_K, KC_TAB,
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_SPC, MO(AZ_S), KC_TRNS,
// Right hand
KC_SLCK, FR_AT, FR_PLUS, FR_MINS, FR_SLSH, FR_ASTR, FR_EQL,
KC_CAPSLOCK, KC_LBRC, KC_V, KC_D, KC_L, KC_J, FR_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, FR_M,
KC_NUMLOCK, FR_APOS, FR_Q, KC_G, KC_H, KC_F, FR_CCED,
MO(AZ_A), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, MO(AZ_S), KC_ENTER),
/* Keymap 5: bepo with altgr key to azerty compat layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | $ | " | < | > | [ | ] |Delete| |ScroLo| @ | + | - | / | * | = |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | % | | | e | & | o | e |Backsp| |CapsLo| ^ | v | d | l | j | z |
* |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
* | w | a | u | i | | , |------| |------| c | t | s | r | n | m |
* | w | a |u_grav| trem | | , |------| |------| c | t | s | r | n | m |
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | e | \ | { | } | . | ~ | | | | ' | q | g | h | f | c |
* | / | \ | { | } | . | ~ | | | | ' | q | g | h | f | c |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* | BEPO | |LSuper| LCtrl| LAlt| |Escape| L_Mse| | |Insert| | AltGr| RCtrl|RSuper|PrntSc| Pause|
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | | L_Num| | | | |
* | | |L_NumK| |L_NumK| | |
* | _ |LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[AQWER] = KEYMAP(
[AZ_A] = KEYMAP(
// Left hand
KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL,
KC_PERCENT, KC_PIPE, KC_E, KC_AMPR, KC_O, KC_E, KC_BSPC,
KC_W, KC_A, KC_U, KC_I, RALT(KC_5), KC_COMMA,
KC_E, KC_BSLASH, KC_LCBR, KC_RCBR, KC_DOT, KC_TILDE, KC_TAB,
KC_TRNS, KC_NO, KC_LGUI, KC_LCTL, KC_LALT,
KC_ESC, MO(MSE),
MO(NUM),
KC_UNDS, MO(SQWER), MO(FNAV),
FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LBRC, FR_RBRC, KC_DEL,
FR_PERC, FR_PIPE, FR_EACU, FR_AMP, KC_O, FR_EGRV, KC_BSPC,
FR_W, FR_A, FR_UGRV, S(KC_LBRC), FR_EURO, FR_COMM,
FR_SLSH, FR_BSLS, FR_LCBR, FR_RCBR, FR_DOT, FR_TILD, KC_TAB,
KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT,
KC_TRNS, KC_TRNS,
KC_TRNS,
FR_UNDS, MO(AZ_S), KC_TRNS,
// Right hand
KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL,
KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, KC_M,
KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C,
KC_SLCK, FR_AT, FR_PLUS, FR_MINS, FR_SLSH, FR_ASTR, FR_EQL,
KC_CAPSLOCK, KC_LBRC, KC_V, KC_D, KC_L, KC_J, FR_Z,
KC_C, KC_T, KC_S, KC_R, KC_N, FR_M,
KC_NUMLOCK, FR_APOS, FR_Q, KC_G, KC_H, KC_F, FR_CCED,
KC_TRNS, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE,
KC_NO, KC_INS,
KC_TRNS, KC_TRNS,
KC_TRNS,
MO(FNAV), MO(SQWER), KC_ENTER),
/* Keymap 4: function / navigation layer
KC_TRNS, MO(AZ_S), KC_ENTER),
/* Keymap 6: bepo with shift key to azerty compat layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | # | 1 | 2 | 3 | 4 | 5 |Delete| |ScroLo| 6 | 7 | 8 | 9 | 0 | ° |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | ` | B | E | P | O | E |Backsp| |CapsLo| ! | V | D | L | J | Z |
* |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
* | W | A | U | I | E | ; |------| |------| C | T | S | R | N | M |
* |--------+------+------+------+------+------| Tab | | NumLo|------+------+------+------+------+--------|
* | E | A | Y | X | : | K | | | | ? | Q | G | H | F | C |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* |Escape|Insert|LSuper| LCtrl| LAlt| | BEPO |QWERTY| |AZERTY| BEPO | | AltGr| RCtrl|RSuper|PrntSc| Pause|
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | |L_NumK| |L_NumK| | |
* | Space|LShift|------| |------|RShift|Enter |
* | | |L_FNav| |L_FNav| | |
* `--------------------' `--------------------'
*/
[AZ_S] = KEYMAP(
// Left hand
FR_HASH, FR_1, FR_2, FR_3, FR_4, FR_5, KC_TRNS,
FR_GRV, S(KC_B), S(KC_E), S(KC_P), S(KC_O), S(KC_E), KC_TRNS,
S(FR_W), S(FR_A), S(KC_U), S(KC_I), S(KC_E), FR_SCLN,
S(KC_E), S(FR_A), S(KC_Y), S(KC_X), FR_COLN, S(KC_K), S(KC_TAB),
S(KC_ESC), S(KC_INS), S(KC_LGUI), S(KC_LCTL), S(KC_LALT),
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// Right hand
KC_TRNS, FR_6, FR_7, FR_8, FR_9, FR_0, FR_OVRR,
KC_TRNS, FR_EXLM, S(KC_V), S(KC_D), S(KC_L), S(KC_J), S(FR_Z),
S(KC_C), S(KC_T), S(KC_S), S(KC_R), S(KC_N), S(FR_M),
KC_TRNS, FR_QUES, S(FR_Q), S(KC_G), S(KC_H), S(KC_F), S(KC_C),
S(KC_RALT), S(KC_RCTL), S(KC_RGUI), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
/* Keymap 7: function / navigation / mouse layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 |VolMut| | | F6 | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | |VolDwn| | | PgUp | Home | Up | End | F11 | |
* | | Next |LClick| Up |RClick| WhUp |VolDwn| | | PgUp | Home | Up | End | F11 | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| PgDn | Left | Down | Right| F12 | |
* | | Prev | Left | Down | Right|WhDown|------| |------| PgDn | Left | Down | Right| F12 | |
* |--------+------+------+------+------+------| VolUp| | |------+------+------+------+------+--------|
* | | Undo | Cut | Copy | Paste| | | | | | | | | | |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
@ -184,12 +297,12 @@ MO(FNAV), MO(SQWER), KC_ENTER),
[FNAV] = KEYMAP(
// Left hand
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MUTE,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_MS_BTN5, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_VOLU,
KC_NO, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN,
KC_NO, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_NO, KC_VOLD,
KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_NO,
KC_NO,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_NO, KC_TRNS, KC_TRNS,
// Right hand
KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO,
@ -197,91 +310,52 @@ KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_PGDOWN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F12, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_NO),
/* Keymap 5: numeric layer, sends keypad codes
/* Keymap 8: numeric keypad layer, sends keypad codes
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | + | - | / | * | |
* | | | | | | | | | | | NumLo| / | * | - | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | 7 | 8 | 9 | | |
* | | | | | | | | | | | 7 | 8 | 9 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | 4 | 5 | 6 | | |
* | | | | | | |------| |------| | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | 1 | 2 | 3 | | |
* | | | | | | | | | | | 1 | 2 | 3 | Enter| |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* | | | | | | | | | | | | | 0 | 00 | . | | |
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | | | | | | |
* | | |------| |------| | Enter|
* | | | | | | | |
* `--------------------' `--------------------'
*/
[NUM] = KEYMAP(
// Left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_NO,
KC_TRNS,
KC_NO, KC_TRNS, KC_NO,
// Right hand
KC_NO, KC_NO, KC_KP_PLUS, KC_KP_MINUS, KC_KP_SLASH, KC_KP_ASTERISK, KC_NO,
KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_NO, KC_NO,
KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_NO, KC_NO,
KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_NO, KC_NO,
KC_KP_0, M(KP_00), KC_KP_COMMA, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_TRNS, KC_KP_ENTER),
/* Keymap 6: mouse layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | |LClick| Up |RClick| WhUp | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | Left | Down | Right|WhDown| |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
* | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | 0 | 00 | . | Enter| |
* `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[MSE] = KEYMAP(
[NUMK] = KEYMAP(
// Left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_TRNS,
KC_NO,
KC_NO, KC_TRNS, KC_NO,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_NO, KC_TRNS, KC_TRNS,
// Right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_NO,
KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_TRNS, KC_NO)
};
const uint16_t PROGMEM fn_actions[] = {
KC_NO, KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO,
KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_NO,
KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_NO,
KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_NO,
KC_KP_0, M(KP_00), KC_KP_COMMA, KC_KP_ENTER, KC_NO,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_NO)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
// keypad "double 0"
case KP_00:
if (record->event.pressed) {
return MACRO( T(KP_0), D(KP_0), END );
@ -289,23 +363,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO( U(KP_0), END );
}
break;
case CA_Fx:
if (record->event.pressed) {
layer_on(FNAV);
return MACRO( D(LALT), D(LCTL), END );
} else {
layer_off(FNAV);
return MACRO( U(LCTL), U(LALT), END );
}
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) {
};

@ -23,12 +23,12 @@ La touche "Tab" est placée comme sur la TypeMatrix 2020.
Meilleure symétrie et accessibilité que la TypeMatrix 2030 : les touches "W" et "%" ont dû être déplacées du côté gauche en raison du nombre de touches de l'ErgoDox, mais l'auriculaire droit ne gère maintenant que deux colonnes de touches au lieu de trois. La touche "Ê" redevient accessible sur la même rangée que les autres lettres, comme sur un clavier classique en disposition bépo. Les lettres, chiffres et symboles sont tous regroupés sur 4 lignes et 6 colonnes pour chaque main, et la première rangée de lettres à la main gauche conserve une identité visuelle "BÉPO".
Touche de fonction permettant de saisir les touches F1 à F12, les touches F1 à F10 sont placées de façon logique par rapport aux chiffres 1 à 0. Cette même touche permet l'accès aux touches directionnelles sans déplacer la main droite. Les touches "Home" et "End" sont placées de la même façon que sur une TypeMatrix 2030 par rapport aux touches directionnelles. Les touches "Page Up" et "Page Down" sont également accessibles facilement sans déplacer la main droite. Les fonctions "VolUp" et "VolDown" sont placées comme sur la TypeMatrix 2030, avec la fonction "Mute" juste au dessus. Les fonctions "Undo", "Cut", "Copy" et "Paste" sont placées côte à côte comme elles le seraient sur un clavier QWERTY en combinaison avec la touche "Ctrl" (à l'emplacement des lettres "Z", "X", "C" et "V"). Par rapport au layout "SpaceFN", l'utilisation d'une touche de fonction dédiée au pouce permet de ne pas ajouter de latence, et la touche espace reste compatible avec les jeux (action au moment de l'appui et possibilité d'appui long).
Touche de fonction permettant de saisir les touches F1 à F12, les touches F1 à F10 sont placées de façon logique par rapport aux chiffres 1 à 0. Cette même touche permet l'accès aux touches directionnelles sans déplacer la main droite et d'effectuer des actions souris avec uniquement la main gauche. Les touches "Home" et "End" sont placées de la même façon que sur une TypeMatrix 2030 par rapport aux touches directionnelles. Les touches "Page Up" et "Page Down" sont également accessibles facilement sans déplacer la main droite. Les fonctions "VolUp" et "VolDown" sont placées comme sur la TypeMatrix 2030, avec la fonction "Mute" juste au dessus. Les fonctions "Undo", "Cut", "Copy" et "Paste" sont placées côte à côte comme elles le seraient sur un clavier QWERTY en combinaison avec la touche "Ctrl" (à l'emplacement des lettres "Z", "X", "C" et "V"). Par rapport au layout "SpaceFN", l'utilisation d'une touche de fonction dédiée au pouce permet de ne pas ajouter de latence, et la touche espace reste compatible avec les jeux (action au moment de l'appui et possibilité d'appui long).
Touche de fonction permettant l'accès au pavé numérique comme sur la TypeMatrix 2030, mais sans avoir à déplacer la main droite : avec les doigts sur la rangée de repos, possibilité de saisir les chiffres "4", "5" et "6" comme sur un pavé numérique classique. Le double "0" de la TypeMatrix a été conservé, et gagne une possibilité de répétition en simples "0".
L'appui sur une touche permet de basculer en mode BEPO sur un système configuré pour un clavier QWERTY. Cette compatibilité n'est pas parfaite (pas encore de gestion des accents mais ça devrait être faisable avec une disposition en qwerty international, et les combinaisons de touches ne sont pas toutes supportées puisque le clavier traduit déjà certaines touches en combinaisons) mais reste pratique pour une saisie de texte occasionnelle.
Touche permettant de basculer en mode BEPO sur un système configuré pour un clavier QWERTY. Cette compatibilité n'est pas parfaite (pas encore de gestion des accents mais ça devrait être faisable avec une disposition en qwerty international, et les combinaisons de touches ne sont pas toutes supportées puisque le clavier traduit déjà certaines touches en combinaisons) mais reste pratique pour une saisie de texte occasionnelle et pour des accès BIOS ou console en QWERTY.
TODO : couche de compatibilité pour utiliser la disposition BÉPO sur un système configuré pour un clavier AZERTY.
Touche permettant de basculer en mode BEPO sur un système configuré pour un clavier AZERTY. Cette compatibilité n'est pas parfaite (pas de gestion des caractères non présents sur le clavier AZERTY, et les combinaisons de touches ne sont pas toutes supportées puisque le clavier traduit déjà certaines touches en combinaisons) mais reste pratique pour une saisie de texte occasionnelle et pour faire du bureau à distance vers un système Windows sans BEPO.
> Olivier Smedts <olivier@gid0.org>

@ -0,0 +1,6 @@
SUBPROJECT_DEFAULT = ez
TAP_DANCE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,216 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
//Tap Dance Declarations
enum {
TD_U_LBRC = 0,
TD_I_RBRC,
};
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_U_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_U, KC_LBRC),
[TD_I_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_RBRC)
};
//Macro Declarations
static uint16_t sunds_timer;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | _ | x | x | _ | Esc | Hypr | Home | | End | Hypr | [ | ] | `~ | `~ | Bks |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* |Ctrl/Tab| Q | W | E | R | T | Up | | PgUp | Y | U | I | O | P | Ctrl |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Cmd/"' | A | S | D | F | G |------| |------| H | J | K | L | ;: |Cmd/Entr|
* |--------+------+------+------+------+------| Down | | PgDn |------+------+------+------+------+--------|
* | Shft | Z | X | C | V | B | | | | N | M | ,< | .> | /? | Shft |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Alt | x | x | x | Left | |Right | Bks | x | x | Alt |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* |Teensy| VolUp| | Play | Del |
* ,------|------|------| |------+--------+------.
* | | | VolDn| | Next | | |
* |Sp/~L1| L2 |------| |------| L2 |'"/~L1|
* | | | Mute | | Prev | | |
* `--------------------' `----------------------'
*/
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME,
CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP,
M(1), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN,
KC_LALT, KC_1, KC_1, KC_1, KC_LEFT,
RESET, KC_VOLU,
KC_VOLD,
LT(SYMB, KC_SPC), TG(MDIA), KC_MUTE,
// right hand
KC_END, ALL_T(KC_NO), KC_LBRC, KC_RBRC, KC_GRV, KC_GRV, KC_BSPC,
KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCTRL,
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_ENT),
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_RGHT, KC_BSPC, KC_1, KC_1, KC_RALT,
KC_MPLY, KC_DEL,
KC_MNXT,
KC_MPRV, TG(MDIA), LT(SYMB, KC_QUOT)
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | ^ | [ | ( | { | | | | = | 7 | 8 | 9 | 0 | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | & | $ | ] | ) | } |------| |------| + | 4 | 5 | 6 | * | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | \ | @ | # | % | | | | | | - | 1 | 2 | 3 | / | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | 0 | 0 | . | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS, KC_EXLM, KC_CIRC, KC_LBRC, KC_LPRN, KC_LCBR, KC_TRNS,
KC_TRNS, KC_AMPR, KC_DLR, KC_RBRC, KC_RPRN, KC_RCBR,
KC_TRNS, KC_BSLS, KC_AT, KC_HASH, KC_PERC, KC_PIPE, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, KC_TRNS,
KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS,
KC_0, KC_0, KC_DOT, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* |Version | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | WhDn | WhUp | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | R-Ck | L-Ck | |------| |------| MsLt | MsDn | MsUp | MsRt | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_WH_U, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
case 1:
if (record->event.pressed) {
sunds_timer = timer_read();
register_code (KC_LGUI);
} else {
if (timer_elapsed (sunds_timer) < TAPPING_TERM) {
unregister_code (KC_LGUI);
register_code (KC_LSFT);
register_code (KC_QUOT);
unregister_code (KC_QUOT);
unregister_code (KC_LSFT);
register_code (KC_LGUI);
}
unregister_code (KC_LGUI);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_3_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
ergodox_right_led_1_on ();
}
};

@ -0,0 +1,273 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#define NAVG 3 // navigation
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
VRSN,
RGB_SLD
};
// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?)
// TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc/L3 | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | =/L3 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab/L1 | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \/L1 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LCtrl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ctrl/'|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | App | Home | | PgUp | Ins |
* ,------|------|------| |------+--------+------.
* | | | End | | PgDn | | |
* | Space| TAB |------| |------| BSPC |Enter |
* | | | [ | | ] | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_LCTL, 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_RALT,KC_LALT,
ALT_T(KC_APP), KC_HOME,
KC_END,
KC_SPC,KC_TAB,KC_LBRC,
// right hand
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, LT(NAVG,KC_EQL),
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS),
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT),
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD),
KC_PGUP, KC_INS,
KC_PGDN,
KC_RBRC,KC_BSPC, KC_ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| DEL | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_DEL, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | VER | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | up | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | left | down | right| |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// NAVIGATION
[NAVG] = KEYMAP(
KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_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_MPRV, 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
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
case 1:
if (record->event.pressed) { // For resetting EEPROM
eeconfig_init();
}
break;
}
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
break;
case RGB_SLD:
if (record->event.pressed) {
#ifdef RGBLIGHT_ENABLE
rgblight_mode(1);
#endif
}
return false;
break;
}
return true;
}
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
case 4:
ergodox_right_led_1_on(); // TODO: Make a fourth layer
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};

@ -0,0 +1,10 @@
# ErgoDox EZ 1337 configuration
Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that
some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar
with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are
unfamiliar with tiling window managers) as much as possibly.
# Changelog
- 02.01.2017 Added delete key on second layer

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

@ -7,7 +7,12 @@
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#define EPRM M(1) // Macro 1: Reset EEPROM
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
VRSN,
RGB_SLD
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
@ -44,56 +49,56 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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),
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_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),
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 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | EPRM | | | | | | | . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,---------------------------------------------------. ,--------------------------------------------------.
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | EPRM | | | | | | | . | 0 | = | |
* `-----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* |Animat| | |Toggle|Solid |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* |Bright|Bright| | | |Hue- |Hue+ |
* |ness- |ness+ |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
VRSN, 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,
EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
RGB_MOD,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
RGB_VAD,RGB_VAI,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,
RGB_TOG, RGB_SLD,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
KC_TRNS, RGB_HUD, RGB_HUI
),
/* Keymap 2: Media and mouse keys
*
@ -160,6 +165,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
break;
case RGB_SLD:
if (record->event.pressed) {
#ifdef RGBLIGHT_ENABLE
rgblight_mode(1);
#endif
}
return false;
break;
}
return true;
}
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {

@ -2,6 +2,9 @@
## Changelog
* Dec 2016:
* Added LED keys
* Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
* Sep 22, 2016:
* Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
* Feb 2, 2016 (V1.1):
@ -9,4 +12,4 @@
This is what we ship with out of the factory. :) The image says it all:
![Default](default_highres.png)
![Default](default_firmware_v1.2-2.png)

@ -0,0 +1,165 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
/******************************************************************************************
* DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/)
* Layer 1: auxiliary keys
* Layer 2: full qwerty layout
*****************************************************************************************/
// LAYERS
#define BASE 0 // dvorak layout (default)
#define AUX 1 // auxiliary keys
// MACROS
/* #define OBRACE 0 // key { or shift */
/* #define CBRACE 1 // key } or shift */
/* #define OBRACK 2 // key [ or left alt */
/* #define CBRACK 3 // key ] or left alt */
/* #define CAPS 4 // caps lock */
// LEDS
#define USB_LED_NUM_LOCK 0
#define USB_LED_CAPS_LOCK 1
#define USB_LED_SCROLL_LOCK 2
#define USB_LED_COMPOSE 3
#define USB_LED_KANA 4
// TIMERS
#define KEY_TAP_FAST 85
#define KEY_TAP_SLOW 95
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base layer
* Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? |
* |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
* | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ |
* |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------|
* | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | ~L1 | | ~L1 | | | \ / || |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | HOME | END | | LEFT | RIGHT|
* ,------|------|------| |------+--------+------.
* | BSPC | DEL | PGUP | | UP | SPACE |RETURN|
* | / | / |------| |------| / | / |
* | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
* `--------------------' `----------------------'
*
*/
[BASE] = KEYMAP(
// left hand
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
KC_TILD, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_LBRACKET,
KC_TAB, KC_A, KC_O, KC_E, SFT_T(KC_U), LT(AUX, KC_I),
SFT_T(KC_LBRC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI,
KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX),
KC_HOME, KC_END,
KC_PGUP,
CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN,
// right hand
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH,
LT(AUX, KC_D), SFT_T(KC_H), KC_T, KC_N, KC_S, KC_MINUS,
KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_RBRC),
MO(AUX), KC_NO, KC_NO, KC_BSLASH, KC_NO,
KC_LEFT, KC_RIGHT,
KC_UP,
KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC)
),
/* Keymap 1: Aux layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | VolUp | | | | | | SLEEP | PWR | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | |PSCR |------+------+------+------+------+--------|
* | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | TRANS| TRANS| | TRANS| TRANS|
* ,------|------|------| |------+------+------.
* | | | TRANS| | TRANS| | |
* |TRANS |TRANS |------| |------| TRANS| TRANS|
* | | | TRANS| | TRANS| | |
* `--------------------' `--------------------'
*/
[AUX] = KEYMAP(
// left hand
KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP,
KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO,
KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS,
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
LCTL(KC_S), LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), KC_TRNS,
KC_TRNS , KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO,
KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO,
KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS,
KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO,
KC_TRNS , KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
}

@ -0,0 +1,70 @@
# Ergodox Dvorak Layout with emacs binding in mind
* Control & Alt key on the thumbs (activated if pressed with another key).
* In the same way, "U" and "R" are the shift modifier if pressed with another key.
* "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key.
* Software layout set to english.
## Keymap Layers
- L0: dvorak with some customizations (see layout below)
- L1: auxiliary keys (includes function keys, numpad...)
### Keymap 0: Base layer
Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively
<pre><code>
,--------------------------------------------------. ,--------------------------------------------------.
| | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| ~ | ' | , | . | P | Y | [ | | ] | F | G | C | H | L | / |
|--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
| Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - |
|--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------|
| {/LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | ~L1 | | ~L1 | | | \ | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| HOME | END | | LEFT | RIGHT|
,------|------|------| |------+--------+------.
| BSPC | DEL | PGUP | | UP | SPACE |RETURN|
| / | / |------| |------| / | / |
| LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
`--------------------' `----------------------'
</pre></code>
### Keymap 1: Aux layer
<pre><code>
,--------------------------------------------------. ,--------------------------------------------------.
| VolUp | | | | | | SLEEP | PWR | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
|--------+------+------+------+------+------| | |PSCR |------+------+------+------+------+--------|
| TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| TRANS| TRANS| | TRANS| TRANS|
,------|------|------| |------+------+------.
| | | TRANS| | TRANS| | |
|TRANS |TRANS |------| |------| TRANS| TRANS|
| | | TRANS| | TRANS| | |
`--------------------' `--------------------'
</pre></code>
## Generation of .hex file
> In the "qmk_firmware/keyboards/ergodox" directory.
> Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware".
> Flash with `teensy_loader` binary

@ -0,0 +1,14 @@
Dvorak support, plover support, gaming support
I'm used to the Kinesis, so originally I was just going to patch up
the thumb keys to be more familiar. But the ergodox is really well
suited to NKRO support in Plover, so I added a layer for that, and
then I remembered that dvorak can be really annoying for video
games (try to reach WASD), so I added a layer for that.
The result is probably a bit idiosyncratic, but it works for me.
(I also don't have any press/hold distinction keys, because that
confuses my fuzzy little brain.)
Contributed by seebs (seebs@seebs.net)

@ -0,0 +1,230 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define PLVR 2 // media keys
#define QWRT 3 // qwerty layer for gaming
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | \ |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | ' | , | . | P | Y | L1 | | L2 | F | G | C | R | L | / |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LGui | A | O | E | U | I |------| |------| D | H | T | N | S | - |
* |--------+------+------+------+------+------| Esc | | L3 |------+------+------+------+------+--------|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Lalt | Grv | | Left | Right| | Up | Down | [ | ] | RAlt |
* `----------------------------------' `----------------------------------'
* ,-------------. ,---------------.
* | LCtrl| Alt | | LGui | RCtrl |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* |Backsp|Delete|------| |------| Enter |Space |
* | 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_ESC,
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(SYMB),
KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ESC,
KC_LALT, KC_GRV, KC_ESC, 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_BSLS,
TG(PLVR), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
TG(QWRT),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_RALT,
KC_LGUI, KC_RCTL,
KC_PGUP,
KC_PGDN,KC_ENT, KC_SPC
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | KP7 | KP8 | KP9 | KP* | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | KP4 | KP5 | KP6 | KP+ | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | KP1 | KP2 | KP3 | KP/ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | KP. | KP0 | KP= | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// 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_P7, KC_P8, KC_P9, KC_PAST, KC_F12,
KC_DOWN, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS,
KC_TRNS, KC_AMPR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_TRNS,
KC_TRNS,KC_PDOT, KC_P0, KC_PEQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Steno for Plover from https://github.com/shayneholmes/tmk_keyboard/commit/11290f8489013018f778627db725160c745e75bd
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | 1 | 2 | 3 | 4 | 5 | | | L2 | 6 | 7 | 8 | 9 | 0 | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | q | w | e | r | t |------| |------| y | u | i | o | p | [ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | a | s | d | f | g | | | | h | j | k | l | ; | ' |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | c | v |------| |------| n | m |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[PLVR] = KEYMAP( // layout: layer 2: Steno for Plover
// left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T,
KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_FN4, KC_NO,
KC_NO,
KC_C, KC_V, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
TG(2), KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_NO, KC_N, KC_M
),
/* Keymap 3: qwerty-ish
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LGui | A | S | D | F | G |------| |------| H | J | K | L | ; | LGui |
* |--------+------+------+------+------+------| Spc | | L3 |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Lalt | Grv | '" | Left | Right| | Up | Down | [ | ] | RAlt |
* `----------------------------------' `----------------------------------'
* ,-------------. ,---------------.
* | LCtrl| LAlt | | LGui | RCtrl |
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* |Backsp|Delete|------| |------| Enter |Space |
* | ace| | End | | PgDn | | |
* `--------------------' `----------------------'
*/
[QWRT] = KEYMAP( // layer 3: qwerty for gaming
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPACE,
KC_LALT, KC_GRV, KC_QUOT, 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,
KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
TG(QWRT), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_RALT,
KC_LGUI, KC_RCTL,
KC_PGUP,
KC_PGDN,KC_ENT, KC_SPC
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};

@ -0,0 +1,8 @@
BOOTMAGIC_ENABLE=no
COMMAND_ENABLE=no
SLEEP_LED_ENABLE=no
FORCE_NKRO ?= yes
DEBUG_ENABLE = no
CONSOLE_ENABLE = no
TAP_DANCE_ENABLE = yes
MOUSEKEY_ENABLE = yes

@ -0,0 +1,29 @@
Dvorak Programmer Layout
========================
This is a dvorak-only layout. The overall philosophy is that the left hand contains a number of layer-switching shortcuts, and the right hand key codes vary based on the layer selected.
Layers
------
* BASE: this is where you type.
* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
* KEY_SEL: same as above, but every movement shift-selects.
* NUMBER: keypad layer.
* SYMBOL: all the symbols.
* BRACKET: special brackets-only layer for programming
* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
* MOUSE: use mouse keys
Updates
-------
2016/12/10:
* toggle for brackets layer is now on left thumb cluster.
2016/11/05:
* removed brackets anywhere but in brackets layer
* added mouse layer back in
* put semicolon-newline and end-newline on symbol layer
* replaced all HYPR with MEH, added more shortcut keys

@ -0,0 +1,424 @@
#include "ergodox.h"
#include "led.h"
#include "debug.h"
#include "action_layer.h"
#include "action_code.h"
#define BASE 0 // default layer
#define SHELL_NAV 1
#define KEY_NAV 3 // key navigation layer
#define KEY_SEL 4 // key selection layer
#define NUMBER 5 // number layer
#define SYMBOL 6
#define BRACKETS 7
#define SHORTCUTS 8
#define MOUSE 9
// macros
#define MC_COPY_LINE 0
#define MC_CUT_LINE 1
#define MC_PASTE_LINE 2
#define MC_NEW_SEARCH_TAB 3
#define SCREEN_TAB_LEFT 4
#define SCREEN_TAB_RIGHT 5
#define SCREEN_NEW_TAB 6
#define SWITCH_NDS 7
#define SCREEN_COPY_MODE 8
#define SCREEN_PASTE 9
#define OPEN_CLOSE_PAREN 10
#define OPEN_CLOSE_BRACKET 11
#define OPEN_CLOSE_CURLY 12
#define OPEN_CLOSE_SINGLE_QUOTE 13
#define OPEN_CLOSE_DOUBLE_QUOTE 14
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
#define SEMICOLON_NEWLINE 16
#define END_NEWLINE 17
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer
[2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer
[3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot
[4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot
[5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot
};
//Tap Dance Declarations
enum {
TD_SHIFT_CAPSLOCK = 0,
TD_BRK_LEFT = 1,
TD_BRK_RIGHT = 2
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// base layer
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
// thumb cluster
MO(BRACKETS), RCTL(KC_S),
RCTL(KC_DEL),
KC_BSPC,RCTL(KC_BSPC),KC_DEL,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS,
KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK),
// lower keys - browser tab control
RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W),
// thumb cluster
KC_HOME,KC_END,
KC_UP,
KC_DOWN,KC_ENT, KC_SPC
),
// shell navigation layer
[SHELL_NAV] = KEYMAP(
// left 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_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// bottom row
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// thumb cluster
KC_TRNS,KC_TRNS,
LALT(KC_D),
KC_TRNS,RCTL(KC_W),KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
// bottom row
M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
// thumb cluster
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
// key navigation layer
[KEY_NAV] = KEYMAP(
// left 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_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// bottom row
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// thumb cluster
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_PGDN, KC_HOME, KC_UP, KC_END, KC_PGUP, M(MC_COPY_LINE),
RCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, RCTL(KC_RIGHT), M(MC_CUT_LINE),
KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
// bottom row
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// thumb cluster
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
// key selection layer
[KEY_SEL] = KEYMAP(
// left 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_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// bottom row
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// thumb cluster
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,
RSFT(KC_PGUP), RSFT(KC_PGDN), RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), M(MC_COPY_LINE),
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), M(MC_CUT_LINE),
RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
// bottom row
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// thumb cluster
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
// number layer
[NUMBER] = KEYMAP(
// left 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_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// bottom row
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// thumb cluster
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_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_COLN, KC_TRNS,
// bottom row
KC_0, KC_DOT, KC_COMMA, KC_TRNS, KC_TRNS,
// thumb cluster
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
[SYMBOL] = KEYMAP(
// left 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_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS,
KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS,
KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
M(SEMICOLON_NEWLINE), M(END_NEWLINE),
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
[BRACKETS] = KEYMAP(
// left 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_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS, M(OPEN_CLOSE_BRACKET),M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_CURLY),KC_TRNS,KC_TRNS,
KC_TRNS, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_TRNS,
KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, 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
),
[SHORTCUTS] = KEYMAP(
// left hand
KC_NO, MEH(KC_F1), MEH(KC_F2), MEH(KC_F3), MEH(KC_F4), MEH(KC_F5), MEH(KC_F6),
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
MEH(KC_0),MEH(KC_1),
MEH(KC_2),
MEH(KC_3),MEH(KC_4),MEH(KC_5),
// right hand
MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12), M(SWITCH_NDS),
KC_TRNS, MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F),
MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L),
KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R),
MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X),
MEH(KC_6), MEH(KC_7),
MEH(KC_8),
MEH(KC_9), MEH(KC_Y), MEH(KC_Z)
),
[MOUSE] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
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_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_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_BTN1, KC_BTN2
),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case MC_COPY_LINE:
if (record->event.pressed) {
return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(C), U(LCTL), END);
}
break;
case MC_CUT_LINE:
if (record->event.pressed) {
return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(X), U(LCTL), END);
}
break;
case MC_PASTE_LINE:
if (record->event.pressed) {
return MACRO( T(END), T(ENTER), D(LCTL), T(V), U(LCTL), END);
}
break;
case MC_NEW_SEARCH_TAB:
if (record->event.pressed) {
return MACRO( D(LCTL), T(T), T(K), U(LCTL), END);
}
break;
case SCREEN_TAB_LEFT:
if (record->event.pressed) {
return MACRO( D(LCTL), T(A), U(LCTL), T(P), END);
}
break;
case SCREEN_TAB_RIGHT:
if (record->event.pressed) {
return MACRO( D(LCTL), T(A), U(LCTL), T(N), END);
}
break;
case SCREEN_NEW_TAB:
if (record->event.pressed) {
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
}
break;
case SCREEN_COPY_MODE:
if (record->event.pressed) {
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
}
break;
case SCREEN_PASTE:
if (record->event.pressed) {
return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END);
}
break;
case SWITCH_NDS:
if (record->event.pressed) {
return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END);
}
break;
case OPEN_CLOSE_PAREN:
if (record->event.pressed) {
return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END);
}
break;
case OPEN_CLOSE_BRACKET:
if (record->event.pressed) {
return MACRO( T(LBRC), T(RBRC), T(LEFT), END);
}
break;
case OPEN_CLOSE_CURLY:
if (record->event.pressed) {
return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END);
}
break;
case OPEN_CLOSE_SINGLE_QUOTE:
if (record->event.pressed) {
return MACRO( T(QUOT), T(QUOT), T(LEFT), END);
}
break;
case OPEN_CLOSE_DOUBLE_QUOTE:
if (record->event.pressed) {
return MACRO( D(LSFT), T(QUOT), T(QUOT), U(LSFT), T(LEFT), END);
}
break;
case SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND:
if (record->event.pressed) {
return MACRO( T(UP), T(HOME), D(LALT), T(D), U(LALT), END);
}
break;
case SEMICOLON_NEWLINE:
if (record->event.pressed) {
return MACRO( T(END), T(SCLN), T(ENTER), END);
}
break;
case END_NEWLINE:
if (record->event.pressed) {
return MACRO( T(END), T(ENTER), END);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
return;
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
ergodox_right_led_1_on();
} else {
ergodox_right_led_1_off();
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_SHIFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPSLOCK),
[TD_BRK_LEFT] = ACTION_TAP_DANCE_DOUBLE (KC_LPRN, KC_LCBR),
[TD_BRK_RIGHT] = ACTION_TAP_DANCE_DOUBLE (KC_RPRN, KC_RCBR)
};
// 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_2_off();
ergodox_right_led_3_off();
switch (layer) {
case NUMBER:
case SYMBOL:
ergodox_right_led_2_on();
break;
case KEY_NAV:
case KEY_SEL:
ergodox_right_led_3_on();
break;
case SHORTCUTS:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
default:
// none
break;
}
return;
};

@ -3,6 +3,8 @@
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
COMMAND_ENABLE = no # Commands for debug and configuration
RGBLIGHT_ENABLE ?= yes
MIDI_ENABLE ?= yes
ifndef QUANTUM_DIR
include ../../../../Makefile

@ -8,5 +8,6 @@
#undef LEADER_TIMEOUT
#define LEADER_TIMEOUT 300
#endif

@ -7,11 +7,17 @@
#define SYMB 1 // symbols
#define MDIA 2 // media keys
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
RGB_FF00BB // always start with RGB_
};
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 | - |
* | = | 1 | 2 | 3 | 4 | 5 |Ctrl- | | Ctrl+| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@ -33,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 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_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS),
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_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC),
@ -42,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_HOME,
KC_SPC,KC_LEAD,KC_END,
// right hand
KC_RGHT, KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS,
LCTL(KC_EQL), 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,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT),
MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,
@ -65,33 +71,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | |NxtTab|PrvTab| | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* | | | |TOG |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* |VAI |VAD |HUI | |SAI | |MOD |
* | | |------| |------| | |
* | | | | | | | |
* | | |HUD | |SAD | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
RGB_FF00BB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN),
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
RGB_HUI,
RGB_VAI,RGB_VAD,RGB_HUD,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
KC_AMPR, KC_UNDS, KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS,
KC_TRNS, KC_PIPE, KC_AT, KC_EQL, KC_PERC, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
RGB_TOG, KC_TRNS,
RGB_SAI,
RGB_SAD, KC_TRNS, RGB_MOD
),
/* Keymap 2: Media and mouse keys
*
@ -152,6 +158,24 @@ void matrix_init_user(void) {
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case RGB_FF00BB:
if (record->event.pressed) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable();
rgblight_mode(1);
rgblight_setrgb(0xff,0x00,0xbb);
#endif
}
return false;
break;
}
return true;
}
LEADER_EXTERNS();
// Runs constantly in the background, in a loop.

@ -4,6 +4,10 @@ This is my personal layout which I use to test out ideas which may or may not ma
Changelog:
## Nov 1, 2016:
* Adds dedicated text zooming keys in inner corners
## May 24, 2016:
* Implements Leader key example

@ -0,0 +1,2 @@
COMMAND_ENABLE = no # Commands for debug and configuration

@ -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
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | + | 1 | 2 | 3 | 4 | 5 | rclk | | lclk | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | = | Q | W | E | R |cmd/T |shift | |shift |cmd/Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------|
* | " | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' |
* |--------+------+------+------+------+------| ctrl | | ctrl |------+------+------+------+------+--------|
* | { | Z | X | C | V | B | [ | | ] | N | M | , | . | / | } |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | _ | ` | $ | Left | Right| | Up | Down | : | * | ! |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | < | | | | & | > |
* ,------|------|------| |------+--------+------.
* | | | # | | @ | | |
* | Space|Backsp|------| |------| Tab |Enter |
* | |ace | % | | ESC | | |
* `--------------------' `----------------------'
*/
// 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_PLUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BTN2,
KC_EQL, KC_Q, KC_W, KC_E, KC_R, GUI_T(KC_T), KC_LSPO,
KC_DQUO, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LCBR, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_LBRC),
KC_UNDS, KC_GRV, KC_DLR, KC_LEFT,KC_RGHT,
KC_LABK, KC_PIPE,
KC_HASH,
KC_SPC, KC_BSPC,KC_PERC,
// right hand
KC_BTN1, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_RSPC, GUI_T(KC_Y), KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT,
CTL_T(KC_RBRC), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RCBR,
KC_UP, KC_DOWN,KC_COLN,KC_ASTR, KC_EXLM,
KC_AMPR, KC_RABK,
KC_AT,
KC_ESC, 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
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
}
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,11 @@
# Galson keymap
Sep 26, 2016.
This is an ergonomic layout for programming for those with typing-related injuries. Key features:
- As many symbol keys as possible are accessible without shifting. These should be accessed by moving the entire hand and pressing with a strong finger.
- Arrow keys and left and right mouse clicks for mouse-free navigation when combined with head mouse or eyetracker.
- Modifier keys are dual role and relocated to positions convenient for the index finger.
- Positions are more convenient when the keyboard is vertically mounted (as it should be!)

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

@ -0,0 +1,962 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_jp.h"
static uint16_t start;
#define BASE 0 // EN layer
#define JP 1 // Japanese
#define JPXON 2 // JP + Fn
#define JPKAZARI 3 // JP + KAZARI
#define JPTOPROW 4 // JP + TOPROW
#define JPTRKZ 5 // JP + TOPROW + KAZARI
#define NUM 6 // Numbers
#define CTLSHFT 1
#define CUTCOPY 2
//kana macro definitions start here
#define JPVU 4
#define JPNU 6
#define JPKO 7
#define JPSA 8
#define JPKE 9
#define JPHE 10
#define JPSHI 11
#define JPKA 12
#define JPKI 13
#define JPSU 14
#define JPSO 15
#define JPHI 16
#define JPCHI 17
#define JPFU 18
#define JPSE 19
#define JPTSU 20
#define JPKU 21
#define JPTE 22
#define JPTA 23
#define JPTO 24
#define JPHA 25
#define JPHO 26
#define JPXKE 27
#define JPXU 28
#define JPXKA 29
#define JPXA 30
#define JPXO 31
#define JPGO 32
#define JPZA 33
#define JPGE 34
#define JPBE 35
#define JPYU 36
#define JPJI 37
#define JPGA 38
#define JPGI 39
#define JPZU 40
#define JPZO 41
#define JPBI 42
#define JPDI 43
#define JPZE 44
#define JPDU 45
#define JPGU 46
#define JPYA 47
#define JPYO 48
#define JPDE 49
#define JPDA 50
#define JPDO 51
#define JPBA 52
#define JPBO 53
#define JPRI 54
#define JPRE 55
#define JPRA 56
#define JPNA 57
#define JPNO 58
#define JPMI 59
#define JPMU 60
#define JPME 61
#define JPNE 62
#define JPMA 63
#define JPXTU 64
#define JPWA 65
#define JPRU 66
#define JPWO 67
#define JPNI 68
#define JPNN 69
#define JPMO 70
#define JPRO 71
#define JPXE 72
#define JPXI 73
#define JPXYU 74
#define JPXYA 75
#define JPXYO 76
#define JPPE 77
#define JPPU 78
#define JPPI 79
#define JPPA 80
#define JPPO 81
#define JPBU 82
// kana macro definitions end here
#define SHIFT 86
#define KAZARI 87
#define JPFN 88 //shifts to JPXON layer
#define TOJPLOUT 89
#define TOENL 90
#define TOJPL 91
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
*
* ,----------------------------------------------------. ,--------------------------------------------------.
* | En / | | ^ | % | | |Selall| | Undo | | $ | @ | LT | UP | RT |
* |----------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | D | R | W | B | Cut | | PgUP | J | F | U | P | DN | \ |
* |----------+------+------+------+------+------| Copy | | |------+------+------+------+------+--------|
* | / | A | S | H | T | G |------| |------| Y | N | E | O | I | , |
* |----------+------+------+------+------+------|Paste | | PgDN |------+------+------+------+------+--------|
* | Ctl+Shft | Z | X | M | C | V | | | | . | L | K | ' | ? | tmux |
* `----------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCtrl | LGui | Alt| _ | Esc | |MouseL|MouseR| - | ~ | Ctrl |
* `------------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* |MidMs | Del | | VolUp| Mute |
* ,------|------|------| |------+--------+------.
* | | | | | VolDn| | |
* | Space| Shift|------| |------| Backsp |Enter |
* | | | Num | | Esc | | |
* `--------------------' `----------------------'
*
*
* tmux prefix set to C-b
*
*/
// 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
M(TOJPLOUT), KC_NO, KC_EQL, LSFT(KC_5), KC_NO, KC_NO, LCTL(KC_A),
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, M(CUTCOPY),
KC_SLSH, KC_A, KC_S, KC_H, KC_T, KC_G,
M(CTLSHFT), KC_Z, KC_X, KC_M, KC_C, KC_V, LCTL(KC_V),
KC_RCTL, KC_LGUI, KC_LALT,JP_UNDS,KC_LCTL,
KC_BTN3, KC_DEL,
KC_NO,
KC_SPC,KC_LSFT,F(1),
// right hand
LCTL(KC_Z), KC_NO, LSFT(KC_4), JP_AT, KC_LEFT, KC_UP, KC_RIGHT,
KC_PGUP, KC_J, KC_F, KC_U, KC_P, KC_DOWN, LSFT(KC_3),
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_COMMA,
KC_PGDN, KC_DOT, KC_L, KC_K, LSFT(KC_7), KC_QUES, LCTL(KC_B),
KC_BTN1, KC_BTN2,KC_MINS,JP_TILD, KC_RCTL,
KC_VOLU, KC_MUTE,
KC_VOLD,
KC_SPC,KC_BSLS, KC_ENT
),
/* Keymap 1: Japanese
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | En / | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | |   nu | ko | sa | he | ke | | | | fu | se | tsu | ku | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | to | shi | ka | ki | su |------| |------| a | ha | te | ta | u | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | mu | so | hi | chi | me | | | | | ma | ho | i | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | shift| fn |------| |------| |kazari|
* | | | Num | | | | |
* `--------------------' `--------------------'
*
*
*
*/
[JP] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(JPNU), M(JPKO), M(JPSA), M(JPHE), M(JPKE), KC_TRNS,
KC_TRNS, M(JPTO), M(JPSHI), M(JPKA), M(JPKI), M(JPSU),
KC_TRNS, M(JPMU), M(JPSO), M(JPHI), M(JPCHI), M(JPME), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_NO,
M(SHIFT), M(JPFN), F(1),
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(JPFU), M(JPSE), M(JPTSU), M(JPKU), KC_TRNS, KC_TRNS,
KC_A, M(JPHA), M(JPTE), M(JPTA), KC_U, KC_TRNS,
KC_TRNS, KC_TRNS, M(JPMA), M(JPHO), KC_I, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,M(KAZARI)
),
/* Keymap 2: Japanese with Fn
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | |   | xe | | | xke | | | | xya | | xtsu | xo | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | xka | | |------| |------| xa | xyo | | | xu | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | xi | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*
*
*
*/
[JPXON] = KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, M(JPXE), KC_NO, M(JPXKE), KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, M(JPXKA), KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_TRNS, KC_TRNS,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, M(JPXYA), KC_NO, M(JPXTU), M(JPXO), KC_NO, KC_NO,
M(JPXA), M(JPXYO), M(JPXYU), KC_NO, M(JPXU), KC_NO,
KC_NO, KC_NO,KC_NO, KC_NO, M(JPXI), KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_NO
),
/* Keymap 3: Japanese with kazari
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | |   | go | za | be | ge | | | | bu | ze | du | gu | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | do | ji | ga | gi | zu |------| |------| | ba | de | da | vu | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | zo | bi | di | | | | | | | bo | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*
*
*
*/
[JPKAZARI] = KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, M(JPGO), M(JPZA), M(JPBE), M(JPGE), KC_NO,
KC_NO, M(JPDO), M(JPJI), M(JPGA), M(JPGI), M(JPZU),
KC_NO, KC_NO, M(JPZO), M(JPBI), M(JPDI), KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
M(SHIFT), KC_NO, KC_TRNS,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, M(JPBU), M(JPZE), M(JPDU), M(JPGU), KC_NO, KC_NO,
KC_NO, M(JPBA), M(JPDE), M(JPDA), M(JPVU), KC_NO,
KC_NO, KC_NO, KC_NO, M(JPBO), KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_TRNS
),
/* Keymap 4: Japanese with Toprow
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | |   | e | - | re | | | | | ya | ne | ru | o | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | ra | ri | na | no | mi |------| |------| wa | yo | yu | ni | nn | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | mo | ro | wo | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*
*
*
*/
[JPTOPROW] = KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_E, KC_MINS, M(JPRE), KC_NO, KC_NO,
KC_NO, M(JPRA), M(JPRI), M(JPNA), M(JPNO), M(JPMI),
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_TRNS, KC_NO, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, M(JPYA), M(JPNE), M(JPRU), KC_O, KC_NO, KC_NO,
M(JPWA), M(JPYO), M(JPYU), M(JPNI), M(JPNN), KC_NO,
KC_NO, KC_NO, M(JPMO), M(JPRO), M(JPWO), KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, M(KAZARI)
),
/* Keymap 5: Japanese with Toprow and Kazari
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | |   | | | pe | | | | | pu | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | pa | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | pi | | | | | | | | po | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*
*
*
*/
[JPTRKZ] = KEYMAP(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, M(JPPE),KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, M(JPPI), KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_TRNS, KC_NO, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, M(JPPU), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, M(JPPA), KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, M(JPPO), KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_TRNS
),
/* Keymap 6: Number Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | " | [ | ] | | | | | % | 7 | 8 | 9 | | F12 |
* |--------+------+------+------+------+------| ; | | |------+------+------+------+------+--------|
* | | | / | + | { | } |------| |------| ! | 4 | 5 | 6 | 0 | , |
* |--------+------+------+------+------+------| : | | & |------+------+------+------+------+--------|
* | | | * | - | ( | ) | | | | . | 1 | 2 | 3 | ? | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | # | | < | = | > | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| Back | Ent |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// Numbers
[NUM] = KEYMAP(
// left hand
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,
KC_NO, KC_NO, KC_NO, JP_DQT, KC_RBRACKET, KC_BSPC, KC_SCLN,
KC_NO, KC_NO, KC_SLSH, JP_PLUS, LSFT(KC_RBRACKET), JP_RCBR,
KC_NO, KC_NO, JP_ASTR, KC_MINS, LSFT(KC_8), LSFT(KC_9), JP_COLN,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_HASH,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_TRNS,
// right hand
KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
LSFT(KC_JYEN), KC_PERC, KC_7, KC_8, KC_9, KC_NO, KC_F12,
KC_EXLM, KC_4, KC_5, KC_6, KC_0, KC_COMM,
LSFT(KC_6), KC_DOT, KC_1, KC_2, KC_3, KC_QUES, KC_NO,
KC_LT,JP_EQL, KC_GT, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_SPC, KC_BSLS, KC_DOT
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_MOMENTARY(NUM) // FN1 - Momentary Layer 6 (Numbers)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRO only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
case CTLSHFT:
if (record->event.pressed) {
return MACRO( D(LSFT), D(LCTL), END);
} else {
return MACRO( U(LSFT), U(LCTL), END);
}
break;
case CUTCOPY:
if (record->event.pressed) {
start = timer_read();
} else {
if (timer_elapsed(start) > 150) {
return MACRO( D(LCTL), T(X), U(LCTL), END);
} else {
return MACRO( D(LCTL), T(C), U(LCTL), END);
}
}
break;
// kana macros start here
case JPVU:
if (record->event.pressed) {
return MACRO( I(1), T(V), T(U), END);
}
break;
case JPNU:
if (record->event.pressed) {
return MACRO( I(1), T(N), T(U), END);
}
break;
case JPKO:
if (record->event.pressed) {
return MACRO( I(1), T(K), T(O), END);
}
break;
case JPSA:
if (record->event.pressed) {
return MACRO( I(1), T(S), T(A), END);
}
break;
case JPKE:
if (record->event.pressed) {
return MACRO( I(1), T(K), T(E), END);
}
break;
case JPHE:
if (record->event.pressed) {
return MACRO( I(1), T(H), T(E), END);
}
break;
case JPSHI:
if (record->event.pressed) {
return MACRO( I(1), T(S), T(I), END);
}
break;
case JPKA:
if (record->event.pressed) {
return MACRO( I(1), T(K), T(A), END);
}
break;
case JPKI:
if (record->event.pressed) {
return MACRO( I(1), T(K), T(I), END);
}
break;
case JPSU:
if (record->event.pressed) {
return MACRO( I(1), T(S), T(U), END);
}
break;
case JPSO:
if (record->event.pressed) {
return MACRO( I(1), T(S), T(O), END);
}
break;
case JPHI:
if (record->event.pressed) {
return MACRO( I(1), T(H), T(I), END);
}
break;
case JPCHI:
if (record->event.pressed) {
return MACRO( I(1), T(T), T(I), END);
}
break;
case JPFU:
if (record->event.pressed) {
return MACRO( I(1), T(F), T(U), END);
}
break;
case JPSE:
if (record->event.pressed) {
return MACRO( I(1), T(S), T(E), END);
}
break;
case JPTSU:
if (record->event.pressed) {
return MACRO( I(1), T(T), T(U), END);
}
break;
case JPKU:
if (record->event.pressed) {
return MACRO( I(1), T(K), T(U), END);
}
break;
case JPTE:
if (record->event.pressed) {
return MACRO( I(1), T(T), T(E), END);
}
break;
case JPTA:
if (record->event.pressed) {
return MACRO( I(1), T(T), T(A), END);
}
break;
case JPTO:
if (record->event.pressed) {
return MACRO( I(1), T(T), T(O), END);
}
break;
case JPHA:
if (record->event.pressed) {
return MACRO( I(1), T(H), T(A), END);
}
break;
case JPHO:
if (record->event.pressed) {
return MACRO( I(1), T(H), T(O), END);
}
break;
case JPXKE:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(K), T(E), END);
}
break;
case JPXU:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(U), END);
}
break;
case JPXKA:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(K), T(A), END);
}
break;
case JPXA:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(A), END);
}
break;
case JPXO:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(O), END);
}
break;
case JPGO:
if (record->event.pressed) {
return MACRO( I(1), T(G), T(O), END);
}
break;
case JPZA:
if (record->event.pressed) {
return MACRO( I(1), T(Z), T(A), END);
}
break;
case JPGE:
if (record->event.pressed) {
return MACRO( I(1), T(G), T(E), END);
}
break;
case JPBE:
if (record->event.pressed) {
return MACRO( I(1), T(B), T(E), END);
}
break;
case JPYU:
if (record->event.pressed) {
return MACRO( I(1), T(Y), T(U), END);
}
break;
case JPJI:
if (record->event.pressed) {
return MACRO( I(1), T(J), T(I), END);
}
break;
case JPGA:
if (record->event.pressed) {
return MACRO( I(1), T(G), T(A), END);
}
break;
case JPGI:
if (record->event.pressed) {
return MACRO( I(1), T(G), T(I), END);
}
break;
case JPZU:
if (record->event.pressed) {
return MACRO( I(1), T(Z), T(U), END);
}
break;
case JPZO:
if (record->event.pressed) {
return MACRO( I(1), T(Z), T(O), END);
}
break;
case JPBI:
if (record->event.pressed) {
return MACRO( I(1), T(B), T(I), END);
}
break;
case JPDI:
if (record->event.pressed) {
return MACRO( I(1), T(D), T(I), END);
}
break;
case JPZE:
if (record->event.pressed) {
return MACRO( I(1), T(Z), T(E), END);
}
break;
case JPDU:
if (record->event.pressed) {
return MACRO( I(1), T(D), T(U), END);
}
break;
case JPGU:
if (record->event.pressed) {
return MACRO( I(1), T(G), T(U), END);
}
break;
case JPYA:
if (record->event.pressed) {
return MACRO( I(1), T(Y), T(A), END);
}
break;
case JPYO:
if (record->event.pressed) {
return MACRO( I(1), T(Y), T(O), END);
}
break;
case JPDE:
if (record->event.pressed) {
return MACRO( I(1), T(D), T(E), END);
}
break;
case JPDA:
if (record->event.pressed) {
return MACRO( I(1), T(D), T(A), END);
}
break;
case JPDO:
if (record->event.pressed) {
return MACRO( I(1), T(D), T(O), END);
}
break;
case JPBA:
if (record->event.pressed) {
return MACRO( I(1), T(B), T(A), END);
}
break;
case JPBO:
if (record->event.pressed) {
return MACRO( I(1), T(B), T(O), END);
}
break;
case JPRI:
if (record->event.pressed) {
return MACRO( I(1), T(R), T(I), END);
}
break;
case JPRE:
if (record->event.pressed) {
return MACRO( I(1), T(R), T(E), END);
}
break;
case JPRA:
if (record->event.pressed) {
return MACRO( I(1), T(R), T(A), END);
}
break;
case JPNA:
if (record->event.pressed) {
return MACRO( I(1), T(N), T(A), END);
}
break;
case JPNO:
if (record->event.pressed) {
return MACRO( I(1), T(N), T(O), END);
}
break;
case JPMI:
if (record->event.pressed) {
return MACRO( I(1), T(M), T(I), END);
}
break;
case JPMU:
if (record->event.pressed) {
return MACRO( I(1), T(M), T(U), END);
}
break;
case JPME:
if (record->event.pressed) {
return MACRO( I(1), T(M), T(E), END);
}
break;
case JPNE:
if (record->event.pressed) {
return MACRO( I(1), T(N), T(E), END);
}
break;
case JPMA:
if (record->event.pressed) {
return MACRO( I(1), T(M), T(A), END);
}
break;
case JPXTU:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(T), T(U), END);
}
break;
case JPWA:
if (record->event.pressed) {
return MACRO( I(1), T(W), T(A), END);
}
break;
case JPRU:
if (record->event.pressed) {
return MACRO( I(1), T(R), T(U), END);
}
break;
case JPWO:
if (record->event.pressed) {
return MACRO( I(1), T(W), T(O), END);
}
break;
case JPNI:
if (record->event.pressed) {
return MACRO( I(1), T(N), T(I), END);
}
break;
case JPNN:
if (record->event.pressed) {
return MACRO( I(1), T(N), T(N), END);
}
break;
case JPMO:
if (record->event.pressed) {
return MACRO( I(1), T(M), T(O), END);
}
break;
case JPRO:
if (record->event.pressed) {
return MACRO( I(1), T(R), T(O), END);
}
break;
case JPXE:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(E), END);
}
break;
case JPXI:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(I), END);
}
break;
case JPXYU:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(Y), T(U), END);
}
break;
case JPXYA:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(Y), T(A), END);
}
break;
case JPXYO:
if (record->event.pressed) {
return MACRO( I(1), T(X), T(Y), T(O), END);
}
break;
case JPPE:
if (record->event.pressed) {
return MACRO( I(1), T(P), T(E), END);
}
break;
case JPPU:
if (record->event.pressed) {
return MACRO( I(1), T(P), T(U), END);
}
break;
case JPPI:
if (record->event.pressed) {
return MACRO( I(1), T(P), T(I), END);
}
break;
case JPPA:
if (record->event.pressed) {
return MACRO( I(1), T(P), T(A), END);
}
break;
case JPPO:
if (record->event.pressed) {
return MACRO( I(1), T(P), T(O), END);
}
break;
case JPBU:
if (record->event.pressed) {
return MACRO( I(1), T(B), T(U), END);
}
break;
// kana macros end here
break;
case SHIFT:
if (record->event.pressed) {
start = timer_read();
if (layer_state == (1<<JPKAZARI)) {
layer_state = (1<<JPTOPROW)| (1<<JPTRKZ);
} else {
layer_state = (1<<JPTOPROW);
}
} else {
layer_state = (0<<JPTOPROW);
clear_keyboard_but_mods();
if (timer_elapsed(start) < 100) {
return MACRO( I(1), T(SPC), END);
}
}
break;
case KAZARI:
if (record->event.pressed) {
start = timer_read();
if (layer_state == (1<<JPTOPROW)) {
layer_state = (1<<JPKAZARI)| (1<<JPTRKZ);
} else {
layer_state = (1<<JPKAZARI);
}
break;
} else {
layer_state = (0<<JPKAZARI);
layer_state = (0<<JPTRKZ);
if (timer_elapsed(start) < 100) {
return MACRO( T(ENTER), END);
}
}
break;
case JPFN:
if (record->event.pressed) {
start = timer_read();
layer_state = (1<<JPXON);
} else {
layer_state = (0<<JPXON);
if (timer_elapsed(start) < 100) {
return MACRO( T(F7), END);
}
}
break;
case TOJPLOUT:
if (record->event.pressed) {
if (default_layer_state == (1<<JP)) {
default_layer_state = (0<<JP);
} else {
default_layer_state = (1<<JP);
}
return MACRO( T(ZKHK), END);
}
break;
/*
// TOJPL and TOENL switch keyboard language.
// The Ctrl+[] commands here load the appropriate ibus-anthy input engine via a WM shortcut
// The first key pressed in the new engine is missed, thus the space key
// TOJPLOUT works in the same way but is used for switching engines on external systems.
case TOJPL:
if (record->event.pressed) {
default_layer_state = (1<<JP);
return MACRO( D(LCTL), T(END), U(LCTL), END);
//return MACRO( D(LCTL), T(END), U(LCTL), W(250), W(250), W(250), T(SPACE), END);
}
break;
case TOENL:
if (record->event.pressed) {
default_layer_state = (1<<BASE);
return MACRO( D(LCTL), T(HOME), U(LCTL), END);
//return MACRO( D(LCTL), T(HOME), U(LCTL), W(250), W(250), W(250), T(SPACE), END);
}
break;
*/
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
uint8_t deflayer = biton32(default_layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 0:
//none
break;
// case 1:
// ergodox_right_led_2_on();
// break;
case 6:
ergodox_right_led_3_on();
break;
}
switch (deflayer) {
case 0:
ergodox_right_led_1_off();
break;
case 1:
ergodox_right_led_1_on();
break;
}
};

@ -0,0 +1,54 @@
This is a dual English-Japanese keymap that utilises a thumb-shift system for Japanese input. You can read more about this layout on my blog [here](https://ishigoya.com).
### Some Editing Necessary
The system I created this on is a Chromebook, and uses a Japanese keymap, so some of the key mappings may not be the same as those on your system. In particular, the Escape key on layer 0 is mapped to KC_LCTL.
### Layouts
------
#### English layer - layer 0
The English layout is a modified Workman layout, and is pictured below:
![English layout](img/keyboard-layout-enL.png)
Some of the punctuation keys have been moved to a separate number/symbol layer.
#### Number / Symbol layer - layer 6
The Number / Symbol layer is reachable through a ACTION_LAYER_MOMENTARY function. The blue LED is illuminated when this layer is active. It is accessible from the English or Japanese layers.
![Number layout](img/keyboard-layout-numL.png)
#### Japanese layers - layers 1-5
There are 5 layers involved in Japanese input. The TOJPLOUT macro is mapped to the En / 和 button, and switches default layer between layer 0 (English) and 1 (main Japanese layer). When layer 1 is the default layer, the red LED is on. It also outputs the ZKHK button to change the input method language.
On keypress, strings of romaji characters are output by the keyboard using macros, and these simulate the input of individual keys on a latin keyboard.
![Japanese layout](img/keyboard-layout-jpL.png)
Layer 1 is the JP layer. Keys on this layer correspond to singleton keys, or keys on the bottom row where a key is shared. For example, pressing the "ふ や" key outputs `ふ` (or "fu").
Layer 2 is the JPXON layer, and is active while holding the Fn key. This prints keys that are prefaced by "x" when writing in romaji. For example, pressing the "ふ や" key while holding the Fn key outputs `ゃ` (or "xya").
Layer 3 is the JPKAZARI layer, and is active while holding the 飾り key. This provides letters with dakuten. For example, pressing the "ふ や" key while holding the 飾り key outputs `ぶ` (or "bu").
Layer 4 is the JPTOPROW layer, and is active while holding the シフト key. Keys on this line correspond to top row keys on shared keys in the image. For example, pressing the "ふ や" key while holding the シフト key outputs `や` (or "ya").
Layer 5 is the JPTRKZ layer, and is active while holding both the シフト key and the 飾り key. This layer contains handakuten keys. For example, pressing the "ふ や" while holding both the シフト key and the 飾り key outputs `ぷ` (or "pu").
I've also separated out the #define sections and the macros required for kana for easy copying, in case anyone else should wish to make a kana-based layout.
When tapped, the シフト key acts as a space key, and the 飾り key acts as a return key. This allows them to function as 変換 and 無変換, respectively, in many IMEs.
Furthermore the Fn key, when tapped, acts as an F7 key, providing easy switching to katakana in many IMEs.
### Other features
The cut/copy button gives copy functionality on a short press, and cut functionality on a long press.
The tmux prefix button outputs Control-B.
The Control & Shift key acts as holding the control and shift keys at the same time.
SelAll outputs Control-A.
Undo outputs Control-Z.

@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | ~L1 | Alt |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
@ -35,22 +35,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS,
CTL_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, ALL_T(KC_NO),
KC_FN1, KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
MO(SYMB), KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_HOME,
KC_END,
KC_SPC, KC_LGUI, KC_FN2,
KC_SPC,KC_LGUI,MO(MDIA),
// right hand
KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, 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,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB),
KC_PGUP, CTL_T(KC_ESC),
KC_PGUP, CTL_T(KC_ESC),
KC_PGDN,
KC_FN1, KC_TAB, KC_ENT
MO(SYMB),KC_TAB, KC_ENT
),
/* Keymap 1: Symbol Layer
*

@ -0,0 +1,6 @@
RGBLIGHT_ENABLE ?= yes
MIDI_ENABLE ?= yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save