1
0
Fork 0

Merge remote-tracking branch 'upstream/master' into infinity60

This commit is contained in:
jpetermans 2017-05-24 11:51:20 -07:00
commit 2dcd6c38fa
319 changed files with 9035 additions and 2071 deletions

View file

@ -1,8 +1,7 @@
FROM debian:jessie FROM debian:jessie
MAINTAINER Erik Dasque <erik@frenchguys.com> MAINTAINER Erik Dasque <erik@frenchguys.com>
RUN apt-get update RUN apt-get update && apt-get install --no-install-recommends -y build-essential \
RUN apt-get install --no-install-recommends -y build-essential \
gcc \ gcc \
unzip \ unzip \
wget \ wget \
@ -15,10 +14,8 @@ RUN apt-get install --no-install-recommends -y build-essential \
gcc-arm-none-eabi \ gcc-arm-none-eabi \
binutils-arm-none-eabi \ binutils-arm-none-eabi \
libnewlib-arm-none-eabi \ libnewlib-arm-none-eabi \
git git \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
ENV keyboard=ergodox ENV keyboard=ergodox
ENV subproject=ez ENV subproject=ez

View file

@ -21,6 +21,8 @@ override SILENT := false
ON_ERROR := error_occurred=1 ON_ERROR := error_occurred=1
BREAK_ON_ERRORS = no
STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
ROOT_DIR := $(dir $(ROOT_MAKEFILE)) ROOT_DIR := $(dir $(ROOT_MAKEFILE))
@ -462,20 +464,25 @@ endef
include $(ROOT_DIR)/message.mk include $(ROOT_DIR)/message.mk
ifeq ($(strip $(BREAK_ON_ERRORS)), yes)
HANDLE_ERROR = exit 1
else
HANDLE_ERROR = echo $$error_occurred > $(ERROR_FILE)
endif
# The empty line is important here, as it will force a new shell to be created for each 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 # Otherwise the command line will become too long with a lot of keyboards and keymaps
define RUN_COMMAND define RUN_COMMAND
+error_occurred=0;\ +error_occurred=0;\
$(COMMAND_$(SILENT_MODE)_$(COMMAND))\ $(COMMAND_$(SILENT_MODE)_$(COMMAND))\
if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
endef endef
define RUN_TEST define RUN_TEST
+error_occurred=0;\ +error_occurred=0;\
$($(TEST)_COMMAND)\ $($(TEST)_COMMAND)\
if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
endef endef
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps # Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
@ -527,14 +534,22 @@ test: test-all
.PHONY: test-clean .PHONY: test-clean
test-clean: test-all-clean test-clean: test-all-clean
ifdef SKIP_VERSION
SKIP_GIT := yes
endif
# Generate the version.h file # Generate the version.h file
ifndef SKIP_GIT ifndef SKIP_GIT
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
else else
GIT_VERSION := NA GIT_VERSION := NA
endif endif
ifndef SKIP_VERSION
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") 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_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
else
BUILD_DATE := NA
endif
include $(ROOT_DIR)/testlist.mk include $(ROOT_DIR)/testlist.mk

View file

@ -7,11 +7,11 @@ endif
include common.mk include common.mk
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP) TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
else else
TARGET ?= $(KEYBOARD)_$(KEYMAP) TARGET ?= $(KEYBOARD)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
endif endif
# Force expansion # Force expansion
@ -20,15 +20,15 @@ TARGET := $(TARGET)
MASTER ?= left MASTER ?= left
ifdef master ifdef master
MASTER = $(master) MASTER = $(master)
endif endif
ifeq ($(MASTER),right) ifeq ($(MASTER),right)
OPT_DEFS += -DMASTER_IS_ON_RIGHT OPT_DEFS += -DMASTER_IS_ON_RIGHT
else else
ifneq ($(MASTER),left) ifneq ($(MASTER),left)
$(error MASTER does not have a valid value(left/right)) $(error MASTER does not have a valid value(left/right))
endif endif
endif endif
@ -56,31 +56,31 @@ endif
# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA # We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA
ifdef MCU_FAMILY ifdef MCU_FAMILY
PLATFORM=CHIBIOS PLATFORM=CHIBIOS
else else
PLATFORM=AVR PLATFORM=AVR
endif endif
ifeq ($(PLATFORM),CHIBIOS) ifeq ($(PLATFORM),CHIBIOS)
include $(TMK_PATH)/protocol/chibios.mk include $(TMK_PATH)/protocol/chibios.mk
include $(TMK_PATH)/chibios.mk include $(TMK_PATH)/chibios.mk
OPT_OS = chibios OPT_OS = chibios
ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","") ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","")
OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h
else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","") else ifneq ("$(wildcard $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h OPT_DEFS += -include $(SUBPROJECT_PATH)/boards/$(BOARD)/bootloader_defs.h
else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","") else ifneq ("$(wildcard $(KEYBOARD_PATH)/bootloader_defs.h)","")
OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","") else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
endif endif
endif endif
CONFIG_H = $(KEYBOARD_PATH)/config.h CONFIG_H = $(KEYBOARD_PATH)/config.h
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
ifneq ("$(wildcard $(SUBPROJECT_C))","") ifneq ("$(wildcard $(SUBPROJECT_C))","")
CONFIG_H = $(SUBPROJECT_PATH)/config.h CONFIG_H = $(SUBPROJECT_PATH)/config.h
endif endif
endif endif
# Save the defines and includes here, so we don't include any keymap specific ones # Save the defines and includes here, so we don't include any keymap specific ones
@ -112,30 +112,30 @@ KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H = $(KEYMAP_PATH)/config.h CONFIG_H = $(KEYMAP_PATH)/config.h
endif endif
# # project specific files # # project specific files
SRC += $(KEYBOARD_C) \ SRC += $(KEYBOARD_C) \
$(KEYMAP_C) \ $(KEYMAP_C) \
$(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c \ $(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/process_keycode/process_leader.c $(QUANTUM_DIR)/process_keycode/process_leader.c
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
SRC += $(SUBPROJECT_C) SRC += $(SUBPROJECT_C)
endif endif
ifndef CUSTOM_MATRIX ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c SRC += $(QUANTUM_DIR)/matrix.c
endif endif
ifeq ($(strip $(API_SYSEX_ENABLE)), yes) ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
OPT_DEFS += -DAPI_SYSEX_ENABLE OPT_DEFS += -DAPI_SYSEX_ENABLE
SRC += $(QUANTUM_DIR)/api/api_sysex.c SRC += $(QUANTUM_DIR)/api/api_sysex.c
OPT_DEFS += -DAPI_ENABLE OPT_DEFS += -DAPI_ENABLE
SRC += $(QUANTUM_DIR)/api.c SRC += $(QUANTUM_DIR)/api.c
MIDI_ENABLE=yes MIDI_ENABLE=yes
endif endif
@ -144,25 +144,25 @@ MUSIC_ENABLE := 0
ifeq ($(strip $(AUDIO_ENABLE)), yes) ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE OPT_DEFS += -DAUDIO_ENABLE
MUSIC_ENABLE := 1 MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/audio/audio.c SRC += $(QUANTUM_DIR)/audio/audio.c
SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c SRC += $(QUANTUM_DIR)/audio/luts.c
endif endif
ifeq ($(strip $(MIDI_ENABLE)), yes) ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE OPT_DEFS += -DMIDI_ENABLE
MUSIC_ENABLE := 1 MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
endif endif
ifeq ($(MUSIC_ENABLE), 1) ifeq ($(MUSIC_ENABLE), 1)
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
endif endif
ifeq ($(strip $(COMBO_ENABLE)), yes) ifeq ($(strip $(COMBO_ENABLE)), yes)
OPT_DEFS += -DCOMBO_ENABLE OPT_DEFS += -DCOMBO_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
endif endif
ifeq ($(strip $(VIRTSER_ENABLE)), yes) ifeq ($(strip $(VIRTSER_ENABLE)), yes)
@ -171,65 +171,93 @@ endif
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
OPT_DEFS += -DFAUXCLICKY_ENABLE OPT_DEFS += -DFAUXCLICKY_ENABLE
SRC += $(QUANTUM_DIR)/fauxclicky.c SRC += $(QUANTUM_DIR)/fauxclicky.c
endif endif
ifeq ($(strip $(UCIS_ENABLE)), yes) ifeq ($(strip $(UCIS_ENABLE)), yes)
OPT_DEFS += -DUCIS_ENABLE OPT_DEFS += -DUCIS_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c UNICODE_COMMON = yes
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
endif endif
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
OPT_DEFS += -DUNICODEMAP_ENABLE OPT_DEFS += -DUNICODEMAP_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c UNICODE_COMMON = yes
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
endif endif
ifeq ($(strip $(UNICODE_ENABLE)), yes) ifeq ($(strip $(UNICODE_ENABLE)), yes)
OPT_DEFS += -DUNICODE_ENABLE OPT_DEFS += -DUNICODE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c UNICODE_COMMON = yes
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
endif
ifeq ($(strip $(UNICODE_COMMON)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
endif endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_ENABLE OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/light_ws2812.c SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += $(QUANTUM_DIR)/rgblight.c SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes
LED_BREATHING_TABLE = yes
endif endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
endif endif
ifeq ($(strip $(PRINTING_ENABLE)), yes) ifeq ($(strip $(PRINTING_ENABLE)), yes)
OPT_DEFS += -DPRINTING_ENABLE OPT_DEFS += -DPRINTING_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
SRC += $(TMK_DIR)/protocol/serial_uart.c SRC += $(TMK_DIR)/protocol/serial_uart.c
endif endif
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC)) SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
OPT_DEFS += $(SERIAL_DEFS) OPT_DEFS += $(SERIAL_DEFS)
VAPTH += $(SERIAL_PATH) VAPTH += $(SERIAL_PATH)
endif endif
ifneq ($(strip $(VARIABLE_TRACE)),) ifneq ($(strip $(VARIABLE_TRACE)),)
SRC += $(QUANTUM_DIR)/variable_trace.c SRC += $(QUANTUM_DIR)/variable_trace.c
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE)) OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
endif endif
endif endif
ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE = yes
endif
ifeq ($(strip $(LED_ENABLE)), yes)
CIE1931_CURVE = yes
endif
ifeq ($(strip $(CIE1931_CURVE)), yes)
OPT_DEFS += -DUSE_CIE1931_CURVE
LED_TABLES = yes
endif
ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
LED_TABLES = yes
endif
ifeq ($(strip $(LED_TABLES)), yes)
SRC += $(QUANTUM_DIR)/led_tables.c
endif
# Optimize size but this may cause error "relocation truncated to fit" # Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax #EXTRALDFLAGS = -Wl,--relax
# Search Path # Search Path
VPATH += $(KEYMAP_PATH) VPATH += $(KEYMAP_PATH)
ifneq ($(SUBPROJECT),) ifneq ($(SUBPROJECT),)
VPATH += $(SUBPROJECT_PATH) VPATH += $(SUBPROJECT_PATH)
endif endif
VPATH += $(KEYBOARD_PATH) VPATH += $(KEYBOARD_PATH)
VPATH += $(COMMON_VPATH) VPATH += $(COMMON_VPATH)
@ -243,27 +271,27 @@ EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
ifeq ($(PLATFORM),AVR) ifeq ($(PLATFORM),AVR)
ifeq ($(strip $(PROTOCOL)), VUSB) ifeq ($(strip $(PROTOCOL)), VUSB)
include $(TMK_PATH)/protocol/vusb.mk include $(TMK_PATH)/protocol/vusb.mk
else else
include $(TMK_PATH)/protocol/lufa.mk include $(TMK_PATH)/protocol/lufa.mk
endif endif
include $(TMK_PATH)/avr.mk include $(TMK_PATH)/avr.mk
endif endif
ifeq ($(strip $(VISUALIZER_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
include $(VISUALIZER_PATH)/visualizer.mk include $(VISUALIZER_PATH)/visualizer.mk
endif endif
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
$(KEYMAP_OUTPUT)_SRC := $(SRC) $(KEYMAP_OUTPUT)_SRC := $(SRC)
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC)
$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(GFXDEFS)
$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
# Default target. # Default target.

View file

@ -147,6 +147,21 @@
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \
} }
#define KEYMAP_MAX( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \
k40, k41, k42, k45, k4a, k4b, k4c, k4d \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
{k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \
}
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);

View file

@ -0,0 +1,61 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.
#include "amj60.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _DEF 0
#define _SPC 1
// dual-role shortcuts
#define SPACEDUAL LT(_SPC, KC_SPACE)
// increase readability
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _DEF: Default Layer
* ,-----------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | ~ |
* |-----------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| bspc|
* |-----------------------------------------------------------|
* |Caps | A| S| D| F| G| H| J| K| L| ;| '| Return |
* |-----------------------------------------------------------|
* |Sft | Fn0| Z| X| C| V| B| N| M| ,| .| /| Sft |Fn2|
* |-----------------------------------------------------------|
* |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl|
* `-----------------------------------------------------------'
*/
[_DEF] = KEYMAP_MAX(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, F(0), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, F(1), \
KC_LCTL, KC_LALT, KC_LGUI, SPACEDUAL, KC_RGUI, KC_RALT, KC_RCTL, F(2)),
/* Keymap 1: F-and-vim Layer, modified with Space (by holding space)
* ,-----------------------------------------------------------.
* |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
* |-----------------------------------------------------------|
* | |Paus| Up| [ | ] | | | | ( | ) | | | | Del |
* |-----------------------------------------------------------|
* | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY |
* |-----------------------------------------------------------|
* | | | | | < | > | |M0 | | | | | Vol+ | |
* |-----------------------------------------------------------|
* | | | | |Alt |Prev|Vol-|Next|
* `-----------------------------------------------------------'
*/
[_SPC] = KEYMAP_MAX(
KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
_______, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \
_______, _______, _______, _______, _______, _______, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
};

View file

@ -39,7 +39,22 @@
{k40, k41, k42, k43}, \ {k40, k41, k42, k43}, \
{k50, XXX, k52, XXX} \ {k50, XXX, k52, XXX} \
} }
#define MAXKEYMAP( \
k00, k01, k02, k03, \
k10, k11, k12, k13, \
k20, k21, k22, k23, \
k30, k31, k32, k33, \
k40, k41, k42, k43, \
k50, k51, k52, k53\
) \
{ \
{k00, k01, k02, k03}, \
{k10, k11, k12, k13}, \
{k20, k21, k22, k23}, \
{k30, k31, k32, k33}, \
{k40, k41, k42, k43}, \
{k50, k51, k52, k53} \
}
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);

View file

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

View file

@ -0,0 +1,65 @@
#include "amjpad.h"
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
* | T | G | B |Spac|
* |----|----|----|----|
* | R | F | V | Fn |
* |----|----|----|----|
* | E | D | C | OS |
* |----|----|----|----|
* | W | S | X | Alt|
* |----|----|----|----|
* | Q | A | Z | Ctl|
* |----|----|----|----|
* | Esc| Tab|Shft| Fn2|
* `-------------------'
*/
[_BL] = MAXKEYMAP(
KC_T, KC_G, KC_B, KC_SPACE,\
KC_R, KC_F, KC_V, MO(1), \
KC_E, KC_D, KC_C, KC_LGUI, \
KC_W, KC_S, KC_X, KC_LALT, \
KC_Q, KC_A, KC_Z, KC_LCTL, \
KC_TAB, KC_ESC, KC_LSHIFT, MO(1)),
/* Keymap _FL: Function Layer
* ,-------------------.
* | 5 | F5 | F11|Spac|
* |----|----|----|----|
* | 4 | F4 | F10| |
* |----|----|----|----|
* | 3 | F3 | F9 | OS |
* |----|----|----|----|
* | 2 | F2 | F8 | Alt|
* |----|----|----|----|
* | 1 | F1 | F7 | Ctl|
* |----|----|----|----|
* | ` | Del|Shft| |
* `-------------------'
*/
[_FL] = MAXKEYMAP(
KC_5, KC_F5, KC_F11, _______, \
KC_4, KC_F4, KC_F10, _______, \
KC_3, KC_F3, KC_F9, _______, \
KC_2, KC_F2, KC_F8, _______, \
KC_1, KC_F1, KC_F7, _______, \
KC_GRV,KC_DEL, _______, _______),
};

View file

@ -0,0 +1,65 @@
#include "amjpad.h"
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
* |Spac| N | H | Y |
* |----|----|----|----|
* | Fn | M | J | U |
* |----|----|----|----|
* |Left| , | K | I |
* |----|----|----|----|
* |Down| . | L | O |
* |----|----|----|----|
* | Up | / | ; | P |
* |----|----|----|----|
* |Rght| Ret| " |Bspc|
* `-------------------'
*/
[_BL] = MAXKEYMAP(
KC_SPACE, KC_N, KC_H, KC_Y, \
MO(1), KC_M, KC_J, KC_U, \
KC_LEFT, KC_COMM, KC_K, KC_I, \
KC_DOWN, KC_DOT, KC_L, KC_O, \
KC_UP, KC_SLASH, KC_SCLN, KC_P, \
KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC),
/* Keymap _FL: Function Layer
* ,-------------------.
* |Esc | F12| F6 | 6 |
* |----|----|----|----|
* | NL | M | - | 7 |
* |----|----|----|----|
* |Left| , | = | 8 |
* |----|----|----|----|
* |Down| . | [ | 9 |
* |----|----|----|----|
* | Up | / | ] | 0 |
* |----|----|----|----|
* |Rght| Ret| \ | Del|
* `-------------------'
*/
[_FL] = MAXKEYMAP(
_______, KC_F12, KC_F6, KC_6, \
_______, _______, KC_MINS, KC_7, \
_______, _______, KC_EQL, KC_8, \
_______, _______, KC_LBRC, KC_9, \
_______, _______, KC_RBRC, KC_0, \
_______, _______, KC_BSLS, KC_DEL),
};

View file

@ -255,7 +255,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
void persistant_default_layer_set(uint16_t default_layer) void persistent_default_layer_set(uint16_t default_layer)
{ {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
@ -366,7 +366,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case MACRO_QWERTY: case MACRO_QWERTY:
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_QWERTY); persistent_default_layer_set(1UL<<LAYER_QWERTY);
} }
break; break;

View file

@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LW] = { /* [> LOWER <] */ [_LW] = { /* [> LOWER <] */
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
{KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LCTL, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, {KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_LCTL, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12},
{KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS} {KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS}
}}; }};
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {

View file

@ -12,78 +12,213 @@ extern keymap_config_t keymap_config;
// The underscores don't mean anything - you can have a layer called STUFF or any other name. // 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 // Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers. // entirely and just use numbers.
#define _DV 0 #define _DVORAK 0
#define _QW 1 #define _QWERTY 1
#define _CM 2 #define _COLEMAK 2
#define _L1 3 #define _DVORMAC 3
#define _L2 4 #define _LOWER 4
#define _RAISE 5
#define _ADJUST 16
// Macro name shortcuts enum planck_keycodes {
#define DVORAK M(_DV) DVORAK = SAFE_RANGE,
#define QWERTY M(_QW) QWERTY,
#define COLEMAK M(_CM) COLEMAK,
DVORMAC,
LOWER,
RAISE,
BACKLIT
};
// Adding macros to make the keymaps below much easier to read.
#define SFTSCLN SFT_T(KC_SCLN)
#define SFTSLSH SFT_T(KC_SLSH)
#define SFTZED SFT_T(KC_Z)
#define ALTENT ALT_T(KC_ENT)
#define ESCTRL CTL_T(KC_ESC)
#define TABALT ALT_T(KC_TAB)
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DV] = { /* Dvorak */ /* Dvorak Layer
{KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L }, ,----------------------------------. ,----------------------------------.
{KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S }, | ' | , | . | P | Y | | F | G | C | R | L |
{SFT_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, CTL_T(KC_DEL), KC_B, KC_M, KC_W, KC_V, SFT_T(KC_Z) }, |------+------+------+------+------| |------+------+------+------+------|
{KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_EQL} | A | O | E | U | I | | D | H | T | N | S |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|SFT/ ;| Q | J | K | X | CTRL ||Alt / | B | M | W | V |SFT/ Z|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ |
`----------------------------------' `----------------------------------' */
[_DVORAK] = {
{KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L },
{KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S },
{SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCTL, KC_B, KC_M, KC_W, KC_V, SFTZED },
{ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS}
}, },
[_QW] = { /* Qwerty */
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P }, /* QWERTY Layer
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, ,----------------------------------. ,----------------------------------.
{SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) }, | Q | W | E | R | T | | Y | U | I | O | P |
{KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_EQL} |------+------+------+------+------| |------+------+------+------+------|
| A | S | D | F | G | | H | J | K | L | ; |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|SFT/ Z| X | C | V | B | CTRL ||Alt / | N | M | , | . |SFT/ /|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ |
`----------------------------------' `----------------------------------' */
[_QWERTY] = {
{KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P },
{KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
{SFTZED, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH},
{ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS}
}, },
[_CM] = { /* Colemak */
{KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, /* Colemak Layer
{KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O }, ,----------------------------------. ,----------------------------------.
{SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_K, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) }, | Q | W | F | P | G | | J | L | U | Y | L |
{KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_EQL} |------+------+------+------+------| |------+------+------+------+------|
| A | R | S | T | D | | H | N | E | I | S |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|SFT/ Z| X | C | V | B | CTRL ||Alt / | K | M | , | . |SFT/ /|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ |
`----------------------------------' `----------------------------------'*/
[_COLEMAK] = {
{KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
{KC_A, KC_R, KC_S, KC_T, KC_D, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O },
{SFTZED, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_K, KC_M, KC_COMM, KC_DOT, SFTSLSH},
{ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS}
}, },
[_L1] = { /* LAYER 1 */
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 }, /* Dvorak Layer with Command key on left thumb instead of Control
{KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS}, ,----------------------------------. ,----------------------------------.
{KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, | ' | , | . | P | Y | | F | G | C | R | L |
{KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT } |------+------+------+------+------| |------+------+------+------+------|
| A | O | E | U | I | | D | H | T | N | S |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|SFT/ ;| Q | J | K | X | CMD ||Alt / | B | M | W | V |SFT/ Z|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ |
`----------------------------------' `----------------------------------' */
[_DVORMAC] = {
{KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L },
{KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S },
{SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, SFTZED },
{ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS}
}, },
[_L2] = { /* LAYER 2 */
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, /* LOWER Layer
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PIPE}, ,----------------------------------. ,----------------------------------.
{KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 }, | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
{KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET} |------+------+------+------+------| |------+------+------+------+------|
| CAPS | | UP | | Home | | PgDn | | + | { | } |
|------+------+------+------+------|------.,------|------+------+------+------+------|
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|------+------+------+------+------| || |------+------+------+------+------|
| ~ | | | | Del |------'`------| Ins | | | | |
`----------------------------------' `----------------------------------'*/
[_LOWER] = {
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
{KC_CAPS, _______, KC_UP, _______, KC_HOME, XXXXXXX, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR},
{_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______},
{KC_TILD, _______, _______, _______, KC_DEL, _______, KC_INS, _______, _______, _______, _______}
},
/* RAISE Layer
,----------------------------------. ,----------------------------------.
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|------+------+------+------+------| |------+------+------+------+------|
| CAPS | | UP | | Home | | PgDn | | = | [ | ] |
|------+------+------+------+------|------.,------|------+------+------+------+------|
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|------+------+------+------+------| || |------+------+------+------+------|
| ` | | | | Del |------'`------| Ins | | | | |
`----------------------------------' `----------------------------------'*/
[_RAISE] = {
{KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0 },
{KC_CAPS, _______, KC_UP, _______, KC_HOME, XXXXXXX, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC},
{_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______},
{KC_GRV, _______, _______, _______, KC_DEL, _______, KC_INS, _______, _______, _______, _______}
},
/* ADJUST Layer
,----------------------------------. ,----------------------------------.
| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|------+------+------+------+------| |------+------+------+------+------|
| F11 | | | | | | | PrSc | ScLk | Paus | F12 |
|------+------+------+------+------|------.,------|------+------+------+------+------|
| |QWERTY|COLEMK|DVORAK|DVORMC| || | | | | | |
|------+------+------+------+------| || |------+------+------+------+------|
| | | | | |------'`------| | | | | RESET|
`----------------------------------' `----------------------------------'*/
[_ADJUST] = {
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 },
{KC_F11, _______, _______, _______, _______, XXXXXXX, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12 },
{_______, QWERTY, COLEMAK, DVORAK, DVORMAC, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
} }
}; };
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) bool process_record_user(uint16_t keycode, keyrecord_t *record) {
{ switch (keycode) {
switch(id) { case QWERTY:
case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false;
break; break;
case _QW: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false;
break; break;
case _CM: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false;
break;
case DVORMAC:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORMAC);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break; break;
} }
return MACRO_NONE; return true;
}; };

View file

@ -0,0 +1,107 @@
# Xyverz's Atreus Keymap
## About this keymap:
This is the second iteration of my Atreus keymap. The first one was as close to the planck as I could get at the
time, but still very much like the original Atreus keymap. I've managed to get things working better now and have
implemented (more like copied) the RAISE/LOWER/ADJUST layers. This is a work in progress, but I think I'm closer
to a final go with this.
I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held
and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held,
and Enter/ALT on the right thumb key for all layers.
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
Recently added: Documentation, Formatting, and another Dvorak layer that has Command on the left thumb, instead of
Control.
## Still to do:
* Enjoy this revision; figure out new things later.
### Layer 0: Dvorak layer
,----------------------------------. ,----------------------------------.
| ' | , | . | P | Y | | F | G | C | R | L |
|------+------+------+------+------| |------+------+------+------+------|
| A | O | E | U | I | | D | H | T | N | S |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|Shft ;| Q | J | K | X | CTRL ||Alt / | B | M | W | V |Shft Z|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ |
`----------------------------------' `----------------------------------'
### Layer 1: QWERTY layer
,----------------------------------. ,----------------------------------.
| Q | W | E | R | T | | Y | U | I | O | P |
|------+------+------+------+------| |------+------+------+------+------|
| A | S | D | F | G | | H | J | K | L | ; |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|Shft Z| X | C | V | B | CTRL ||Alt / | N | M | , | . |Shft /|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ |
`----------------------------------' `----------------------------------'
### Keymap 2: Colemak layer
,----------------------------------. ,----------------------------------.
| Q | W | F | P | G | | J | L | U | Y | L |
|------+------+------+------+------| |------+------+------+------+------|
| A | R | S | T | D | | H | N | E | I | S |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|Shft Z| X | C | V | B | CTRL ||Alt / | K | M | , | . |Shft /|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ |
`----------------------------------' `----------------------------------'
### Keymap 3: Dvorak for Mac layout
,----------------------------------. ,----------------------------------.
| ' | , | . | P | Y | | F | G | C | R | L |
|------+------+------+------+------| |------+------+------+------+------|
| A | O | E | U | I | | D | H | T | N | S |
|------+------+------+------+------|------.,------|------+------+------+------+------|
|SFT/ ;| Q | J | K | X | CMD ||Alt / | B | M | W | V |SFT/ Z|
|------+------+------+------+------| ||Enter |------+------+------+------+------|
| Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ |
`----------------------------------' `----------------------------------'
### Keymap 4: LOWER layer
,----------------------------------. ,----------------------------------.
| ! | @ | # | $ | % | | ^ | & | * | ( | ) |
|------+------+------+------+------| |------+------+------+------+------|
| CAPS | | UP | | Home | | PgDn | | + | { | } |
|------+------+------+------+------|------.,------|------+------+------+------+------|
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|------+------+------+------+------| || |------+------+------+------+------|
| ~ | | | | Del |------'`------| Ins | | | | |
`----------------------------------' `----------------------------------'
### Keymap 5: RAISE layer
,----------------------------------. ,----------------------------------.
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|------+------+------+------+------| |------+------+------+------+------|
| CAPS | | UP | | Home | | PgDn | | = | [ | ] |
|------+------+------+------+------|------.,------|------+------+------+------+------|
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|------+------+------+------+------| || |------+------+------+------+------|
| ` | | | | Del |------'`------| Ins | | | | |
`----------------------------------' `----------------------------------'
### Keymap 6: ADJUST layer
,----------------------------------. ,----------------------------------.
| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|------+------+------+------+------| |------+------+------+------+------|
| F11 | | | | | | | PScr | SLck | Paus | F12 |
|------+------+------+------+------|------.,------|------+------+------+------+------|
| |QWERTY|COLEMK|DVORAK|DVORMC| || | | | | | |
|------+------+------+------+------| || |------+------+------+------+------|
| | | | | |------'`------| | | | | RESET|
`----------------------------------' `----------------------------------'

View file

@ -119,7 +119,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -128,25 +128,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;
case WOW: case WOW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_WOW); persistent_default_layer_set(1UL<<_WOW);
} }
return false; return false;
break; break;

View file

@ -50,35 +50,28 @@ const uint16_t PROGMEM fn_actions[] = {
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed; static uint8_t mods_pressed;
static bool mod_flag;
switch (id) { switch (id) {
case 0: case 0:
/* Handle the combined Grave/Esc key /* Handle the combined Grave/Esc key
*/ */
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (record->event.pressed) { if (record->event.pressed) {
/* The key is being pressed. /* The key is being pressed.
*/ */
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (mods_pressed) { if (mods_pressed) {
mod_flag = true; register_code(KC_GRV);
add_key(KC_GRV);
send_keyboard_report();
} else { } else {
add_key(KC_ESC); register_code(KC_ESC);
send_keyboard_report();
} }
} else { } else {
/* The key is being released. /* The key is being released.
*/ */
if (mod_flag) { if (mods_pressed) {
mod_flag = false; mods_pressed = false;
del_key(KC_GRV); unregister_code(KC_GRV);
send_keyboard_report();
} else { } else {
del_key(KC_ESC); unregister_code(KC_ESC);
send_keyboard_report();
} }
} }
break; break;

View file

@ -0,0 +1,4 @@
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes

View file

@ -0,0 +1,103 @@
#include "clueboard.h"
// Helpful defines
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
#define _______ KC_TRNS
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BL 0
#define _FL 1
#define _ME 2
#define _CL 3
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: Base Layer (Default Layer)
*/
[_BL] = KEYMAP(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_HOME, \
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
_______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END),
/* Keymap _FL: Function Layer
*/
[_ME] = KEYMAP(
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \
_______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT),
/* Keymap _CL: Control layer
*/
[_CL] = KEYMAP(
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
_______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \
_______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
};
/* This is a list of user defined functions. F(N) corresponds to item N
of this list.
*/
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(0), // Calls action_function()
[1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed;
static bool mod_flag;
switch (id) {
case 0:
/* Handle the combined Grave/Esc key
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (record->event.pressed) {
/* The key is being pressed.
*/
if (mods_pressed) {
mod_flag = true;
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
/* The key is being released.
*/
if (mod_flag) {
mod_flag = false;
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
case 1:
if(record->event.pressed) {
del_key(KC_ESC);
}
break;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -0,0 +1,23 @@
```
___ _____ _ _ _ __ __ _ __
|__ \ / ____| | | | | | / / / /(_) / /
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
```
# Serubin's Clueboard Layout
This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim.
#### Base Layer
![Base Layout Image](layout-base.png)
#### Fn Layer
![Fn Layout Image](layout-fn.png)
#### Media Layer
![Media Layer Image](layout-media.png)

View file

@ -19,17 +19,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
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_NUHS, KC_ENT, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer /* Keymap _FL: Function Layer
*/ */
[_FL] = KEYMAP( [_FL] = KEYMAP(
S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
KC_LCTL, KC_LALT, KC_LGUI,MO(_FL), S(KC_SPC),S(KC_SPC), MO(_FL), KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END),
/* Keymap _CL: Control layer /* Keymap _CL: Control layer
*/ */

View file

@ -16,33 +16,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: Base Layer (Default Layer) /* Keymap _BL: Base Layer (Default Layer)
*/ */
[_BL] = KEYMAP( [_BL] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
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_NUHS, KC_ENT, \ 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_NUHS, KC_ENT, \
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
KC_LCTL,KC_LALT,KC_LGUI,MO(_FL), KC_SPC, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer /* Keymap _FL: Function Layer
*/ */
[_FL] = KEYMAP( [_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, BL_STEP, \ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, \ S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
_______,_______,_______,MO(_FL), _______,_______, MO(_FL),_______,_______,MO(_FL),KC_HOME,KC_PGDN,KC_END), KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END),
/* Keymap _CL: Control layer /* Keymap _CL: Control layer
*/ */
[_CL] = KEYMAP( [_CL] = KEYMAP(
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
_______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
_______,_______,_______,_______, _______,_______, _______,_______,_______,MO(_FL),_______, _______, _______), _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI),
}; };
/* This is a list of user defined functions. F(N) corresponds to item N
of this list.
*/
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(0), [0] = ACTION_FUNCTION(0), // Calls action_function()
}; };
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {

View file

@ -0,0 +1,181 @@
#include "clueboard.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 _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _FL 3
#define _CL 4
enum planck_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK
};
// Helpful defines
#define _______ KC_TRNS
#define XXXXXXX KC_NO
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
// Custom macros
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt)
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _QWERTY: Base Layer (Default Layer)
* ,-----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU|
* |-----------------------------------------------------------| |---|
* |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| BS| |PgD|
* |-----------------------------------------------------------| `---'
* |CtlEsc| A| S| D| F| G| H| J| K| L| ;| '| | Ent|
* |--------------------------------------------------------------.
* |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up|
* |------------------------------------------------------------------.
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _COLEMAK: Base Layer
* ,-----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU|
* |-----------------------------------------------------------| |---|
* |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD|
* |-----------------------------------------------------------| `---'
* |CtlEsc| A| R| S| T| D| H| N| E| I| O| '| | Ent|
* |--------------------------------------------------------------.
* |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up|
* |------------------------------------------------------------------.
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \
CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _DVORAK: Base Layer
* ,-----------------------------------------------------------. ,---.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU|
* |-----------------------------------------------------------| |---|
* |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD|
* |-----------------------------------------------------------| `---'
* |CtlEsc| A| O| E| U| I| D| H| T| N| S| -| | Ent|
* |--------------------------------------------------------------.
* |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up|
* |------------------------------------------------------------------.
* |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt|
* `------------------------------------------------------------------'
*/
[_DVORAK] = KEYMAP(
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \
HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, \
CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \
KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
*/
[_FL] = KEYMAP(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, \
_______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
/* Keymap _CL: Control layer
*/
[_CL] = KEYMAP(
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
_______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
_______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
};
/* This is a list of user defined functions. F(N) corresponds to item N
of this list.
*/
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(0), // Calls action_function()
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed;
static bool mod_flag;
switch (id) {
case 0:
/* Handle the combined Grave/Esc key
*/
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
if (record->event.pressed) {
/* The key is being pressed.
*/
if (mods_pressed) {
mod_flag = true;
add_key(KC_GRV);
send_keyboard_report();
} else {
add_key(KC_ESC);
send_keyboard_report();
}
} else {
/* The key is being released.
*/
if (mod_flag) {
mod_flag = false;
del_key(KC_GRV);
send_keyboard_report();
} else {
del_key(KC_ESC);
send_keyboard_report();
}
}
break;
}
}
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
}
return true;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View file

@ -0,0 +1,30 @@
```
___ _____ _ _ _ __ __ _ __
|__ \ / ____| | | | | | / / / /(_) / /
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
```
# smt Clueboard Layout (HHKB variant)
![Clueboard Layout Image](layout.png)
This is smt's HHKB variant layout, based on the default layout that comes
flashed on every Clueboard. The primary differences from the default are:
- The Backspace key is moved down into the traditional `\` position
- `\` and `` ` `` are assigned to the "split-backspace" positions
- The right Shift is split to allow for a Fn key to its right
- The modifiers on the right side now mirror the left side (`Alt`/`Super`/`Ctrl`)
For the most part, it's a straightforward and easy to follow layout. There
are a few special keys:
- The Esc key sends `Esc` when tapped, `` ` `` when `Alt`/`Super`/`Ctrl`/`Fn` is held, or `~` when `Shift` is held
- The Tab key sends `Tab` when tapped, or `Super+Ctrl+Alt+Shift` (a.k.a. [Hyper]) when held
- The key traditionally in the Caps-Lock position has been re-mapped to send `Esc` when tapped, or `Ctrl` when held
- The left Shift key sends `Enter` when tapped, or `Shift` when held
[Hyper]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/

View file

@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -266,25 +266,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
/* layout switcher */ /* layout switcher */
case LAY_QWE: case LAY_QWE:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<QWE); persistent_default_layer_set(1UL<<QWE);
} }
return false; return false;
break; break;
case LAY_COL: case LAY_COL:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<COL); persistent_default_layer_set(1UL<<COL);
} }
return false; return false;
break; break;
case LAY_WOR: case LAY_WOR:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<WOR); persistent_default_layer_set(1UL<<WOR);
} }
return false; return false;
break; break;
case LAY_DVO: case LAY_DVO:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<DVO); persistent_default_layer_set(1UL<<DVO);
} }
return false; return false;
break; break;

View file

@ -3,8 +3,8 @@
#define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0 #define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 5 #define MOUSEKEY_TIME_TO_MAX 40
#define MOUSEKEY_MAX_SPEED 2 #define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0 #define MOUSEKEY_WHEEL_DELAY 0
#define TAPPING_TOGGLE 1 #define TAPPING_TOGGLE 1
@ -34,4 +34,4 @@
#endif #endif
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ #endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */

View file

@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBW 1 #define RGBW 1
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 15
#define USB_MAX_POWER_CONSUMPTION 500 #define USB_MAX_POWER_CONSUMPTION 500

View file

@ -53,11 +53,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef DEBOUNCE #ifndef DEBOUNCE
# define DEBOUNCE 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCE;
/* matrix state(1:on, 0:off) */ /* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
// Debouncing: store for each key the number of scans until it's eligible to
// change. When scanning the matrix, ignore any changes in keys that have
// already changed in the last DEBOUNCE scans.
static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
static matrix_row_t read_cols(uint8_t row); static matrix_row_t read_cols(uint8_t row);
static void init_cols(void); static void init_cols(void);
@ -113,7 +116,9 @@ void matrix_init(void)
// initialize matrix state: all keys off // initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) { for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0; matrix[i] = 0;
matrix_debouncing[i] = 0; for (uint8_t j=0; j < MATRIX_COLS; ++j) {
debounce_matrix[i * MATRIX_COLS + j] = 0;
}
} }
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
@ -134,14 +139,36 @@ void matrix_power_up(void) {
// initialize matrix state: all keys off // initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) { for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0; matrix[i] = 0;
matrix_debouncing[i] = 0;
} }
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
matrix_timer = timer_read32(); matrix_timer = timer_read32();
matrix_scan_count = 0; matrix_scan_count = 0;
#endif #endif
}
// Returns a matrix_row_t whose bits are set if the corresponding key should be
// eligible to change in this scan.
matrix_row_t debounce_mask(uint8_t row) {
matrix_row_t result = 0;
for (uint8_t j=0; j < MATRIX_COLS; ++j) {
if (debounce_matrix[row * MATRIX_COLS + j]) {
--debounce_matrix[row * MATRIX_COLS + j];
} else {
result |= (1 << j);
}
}
return result;
}
// Report changed keys in the given row. Resets the debounce countdowns
// corresponding to each set bit in 'change' to DEBOUNCE.
void debounce_report(matrix_row_t change, uint8_t row) {
for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
if (change & (1 << i)) {
debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
}
}
} }
uint8_t matrix_scan(void) uint8_t matrix_scan(void)
@ -178,26 +205,12 @@ uint8_t matrix_scan(void)
for (uint8_t i = 0; i < MATRIX_ROWS; i++) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
select_row(i); select_row(i);
wait_us(30); // without this wait read unstable value. wait_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols(i); matrix_row_t mask = debounce_mask(i);
if (matrix_debouncing[i] != cols) { matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask);
matrix_debouncing[i] = cols; debounce_report(cols ^ matrix[i], i);
if (debouncing) { matrix[i] = cols;
debug("bounce!: "); debug_hex(debouncing); debug("\n");
}
debouncing = DEBOUNCE;
}
unselect_rows();
}
if (debouncing) { unselect_rows();
if (--debouncing) {
wait_us(1);
// this should be wait_ms(1) but has been left as-is at EZ's request
} else {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debouncing[i];
}
}
} }
matrix_scan_quantum(); matrix_scan_quantum();
@ -205,9 +218,8 @@ uint8_t matrix_scan(void)
return 1; return 1;
} }
bool matrix_is_modified(void) bool matrix_is_modified(void) // deprecated and evidently not called.
{ {
if (debouncing) return false;
return true; return true;
} }

View file

@ -74,7 +74,3 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
SLEEP_LED_ENABLE = no SLEEP_LED_ENABLE = no
API_SYSEX_ENABLE ?= no API_SYSEX_ENABLE ?= no
RGBLIGHT_ENABLE ?= yes RGBLIGHT_ENABLE ?= yes
ifndef QUANTUM_DIR
include ../../../Makefile
endif

View file

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

View file

@ -0,0 +1,107 @@
/* Copyright 2017 Fred Sundvik
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(VISUALIZER_ENABLE)
#include "animations.h"
#include "visualizer.h"
#ifdef LCD_ENABLE
#include "lcd_keyframes.h"
#endif
#ifdef LCD_BACKLIGHT_ENABLE
#include "lcd_backlight_keyframes.h"
#endif
#ifdef LED_ENABLE
#include "led_keyframes.h"
#endif
#include "visualizer_keyframes.h"
#if defined(LCD_ENABLE) && defined(LCD_BACKLIGHT_ENABLE)
// Don't worry, if the startup animation is long, you can use the keyboard like normal
// during that time
keyframe_animation_t default_startup_animation = {
.num_frames = 4,
.loop = false,
.frame_lengths = {0, 0, 0, gfxMillisecondsToTicks(5000), 0},
.frame_functions = {
lcd_keyframe_enable,
backlight_keyframe_enable,
lcd_keyframe_draw_logo,
backlight_keyframe_animate_color,
},
};
keyframe_animation_t default_suspend_animation = {
.num_frames = 4,
.loop = false,
.frame_lengths = {0, gfxMillisecondsToTicks(1000), 0, 0},
.frame_functions = {
lcd_keyframe_display_layer_text,
backlight_keyframe_animate_color,
lcd_keyframe_disable,
backlight_keyframe_disable,
},
};
#endif
#if defined(LED_ENABLE)
#define CROSSFADE_TIME 1000
#define GRADIENT_TIME 3000
keyframe_animation_t led_test_animation = {
.num_frames = 14,
.loop = true,
.frame_lengths = {
gfxMillisecondsToTicks(1000), // fade in
gfxMillisecondsToTicks(1000), // no op (leds on)
gfxMillisecondsToTicks(1000), // fade out
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in)
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
0, // mirror leds
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out)
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom
0, // normal leds
gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade
},
.frame_functions = {
led_keyframe_fade_in_all,
keyframe_no_operation,
led_keyframe_fade_out_all,
led_keyframe_crossfade,
led_keyframe_left_to_right_gradient,
led_keyframe_crossfade,
led_keyframe_top_to_bottom_gradient,
led_keyframe_mirror_orientation,
led_keyframe_crossfade,
led_keyframe_left_to_right_gradient,
led_keyframe_crossfade,
led_keyframe_top_to_bottom_gradient,
led_keyframe_normal_orientation,
led_keyframe_crossfade,
},
};
#endif
#endif

View file

@ -0,0 +1,30 @@
/* Copyright 2017 Fred Sundvik
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
#define KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_
#include "visualizer.h"
// You can use these default animations, but of course you can also write your own custom ones instead
extern keyframe_animation_t default_startup_animation;
extern keyframe_animation_t default_suspend_animation;
// An animation for testing and demonstrating the led support, should probably not be used for real world
// cases
extern keyframe_animation_t led_test_animation;
#endif /* KEYBOARDS_ERGODOX_INFINITY_ANIMATIONS_H_ */

View file

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* number of backlight levels */ /* number of backlight levels */
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
#define LED_BRIGHTNESS_LO 15 #define LED_BRIGHTNESS_LO 100
#define LED_BRIGHTNESS_HI 255 #define LED_BRIGHTNESS_HI 255
/* define if matrix has ghost */ /* define if matrix has ghost */
@ -54,6 +54,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// The visualizer needs gfx thread priorities // The visualizer needs gfx thread priorities
#define VISUALIZER_THREAD_PRIORITY (NORMAL_PRIORITY - 2) #define VISUALIZER_THREAD_PRIORITY (NORMAL_PRIORITY - 2)
#define VISUALIZER_USER_DATA_SIZE 16
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.

View file

@ -25,6 +25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "board_IS31FL3731C.h" #include "board_IS31FL3731C.h"
// Can't include led_tables from here
extern const uint8_t CIE1931_CURVE[];
/*===========================================================================*/ /*===========================================================================*/
/* Driver local definitions. */ /* Driver local definitions. */
/*===========================================================================*/ /*===========================================================================*/
@ -100,37 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS31 #define IS31
//Generated by http://jared.geek.nz/2013/feb/linear-led-pwm
const unsigned char cie[256] = {
0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
3, 4, 4, 4, 4, 4, 4, 5, 5, 5,
5, 5, 6, 6, 6, 6, 6, 7, 7, 7,
7, 8, 8, 8, 8, 9, 9, 9, 10, 10,
10, 10, 11, 11, 11, 12, 12, 12, 13, 13,
13, 14, 14, 15, 15, 15, 16, 16, 17, 17,
17, 18, 18, 19, 19, 20, 20, 21, 21, 22,
22, 23, 23, 24, 24, 25, 25, 26, 26, 27,
28, 28, 29, 29, 30, 31, 31, 32, 32, 33,
34, 34, 35, 36, 37, 37, 38, 39, 39, 40,
41, 42, 43, 43, 44, 45, 46, 47, 47, 48,
49, 50, 51, 52, 53, 54, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 70, 71, 72, 73, 74, 75, 76, 77, 79,
80, 81, 82, 83, 85, 86, 87, 88, 90, 91,
92, 94, 95, 96, 98, 99, 100, 102, 103, 105,
106, 108, 109, 110, 112, 113, 115, 116, 118, 120,
121, 123, 124, 126, 128, 129, 131, 132, 134, 136,
138, 139, 141, 143, 145, 146, 148, 150, 152, 154,
155, 157, 159, 161, 163, 165, 167, 169, 171, 173,
175, 177, 179, 181, 183, 185, 187, 189, 191, 193,
196, 198, 200, 202, 204, 207, 209, 211, 214, 216,
218, 220, 223, 225, 228, 230, 232, 235, 237, 240,
242, 245, 247, 250, 252, 255,
};
/*===========================================================================*/ /*===========================================================================*/
/* Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
@ -231,7 +204,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
uint8_t* src = PRIV(g)->frame_buffer; uint8_t* src = PRIV(g)->frame_buffer;
for (int y=0;y<GDISP_SCREEN_HEIGHT;y++) { for (int y=0;y<GDISP_SCREEN_HEIGHT;y++) {
for (int x=0;x<GDISP_SCREEN_WIDTH;x++) { for (int x=0;x<GDISP_SCREEN_WIDTH;x++) {
PRIV(g)->write_buffer[get_led_address(g, x, y)]=cie[*src]; PRIV(g)->write_buffer[get_led_address(g, x, y)]=CIE1931_CURVE[*src];
++src; ++src;
} }
} }

View file

@ -8,8 +8,6 @@
#ifndef _GDISP_LLD_BOARD_H #ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H
#include "print.h"
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6 #define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6
#define ST7565_ADC ST7565_ADC_NORMAL #define ST7565_ADC ST7565_ADC_NORMAL
#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC #define ST7565_COM_SCAN ST7565_COM_SCAN_DEC
@ -39,35 +37,49 @@
// MSB First // MSB First
// CLK Low by default // CLK Low by default
static const SPIConfig spi1config = { static const SPIConfig spi1config = {
NULL, // Operation complete callback or @p NULL.
/* HW dependent part.*/ .end_cb = NULL,
ST7565_GPIOPORT, //The chip select line port - when not using pcs.
ST7565_SS_PIN, .ssport = ST7565_GPIOPORT,
SPIx_CTARn_FMSZ(7) // brief The chip select line pad number - when not using pcs.
| SPIx_CTARn_ASC(7) .sspad=ST7565_SS_PIN,
| SPIx_CTARn_DT(7) // SPI initialization data.
| SPIx_CTARn_CSSCK(7) .tar0 =
| SPIx_CTARn_PBR(0) SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
| SPIx_CTARn_BR(7) | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns
//SPI_CR1_BR_0 | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns
| SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns
| SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2
| SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns
}; };
static bool_t st7565_is_data_mode = 1; static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
// Only the LCD is using the SPI bus, so no need to acquire
// spiAcquireBus(&SPID1);
spiSelect(&SPID1);
}
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
// Only the LCD is using the SPI bus, so no need to release
//spiReleaseBus(&SPID1);
spiUnselect(&SPID1);
}
static GFXINLINE void init_board(GDisplay *g) { static GFXINLINE void init_board(GDisplay *g) {
(void) g; (void) g;
palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL); palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL);
palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
st7565_is_data_mode = 1;
palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL); palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL);
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
palSetPadModeRaw(MOSI, ST7565_SPI_MODE); palSetPadModeRaw(MOSI, ST7565_SPI_MODE);
palSetPadModeRaw(SLCK, ST7565_SPI_MODE); palSetPadModeRaw(SLCK, ST7565_SPI_MODE);
palSetPadModeRaw(SS, ST7565_SPI_MODE); palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL);
spiInit(); spiInit();
spiStart(&SPID1, &spi1config); spiStart(&SPID1, &spi1config);
spiSelect(&SPID1); release_bus(g);
} }
static GFXINLINE void post_init_board(GDisplay *g) { static GFXINLINE void post_init_board(GDisplay *g) {
@ -84,43 +96,17 @@ static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
} }
} }
static GFXINLINE void acquire_bus(GDisplay *g) { static GFXINLINE void enter_data_mode(GDisplay *g) {
(void) g; palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
// Only the LCD is using the SPI bus, so no need to acquire
// spiAcquireBus(&SPID1);
} }
static GFXINLINE void release_bus(GDisplay *g) { static GFXINLINE void enter_cmd_mode(GDisplay *g) {
(void) g; palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN);
// Only the LCD is using the SPI bus, so no need to release
//spiReleaseBus(&SPID1);
} }
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
(void) g;
if (st7565_is_data_mode) {
// The sleeps need to be at lest 10 vs 25 ns respectively
// So let's sleep two ticks, one tick might not be enough
// if we are at the end of the tick
chThdSleep(2);
palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN);
chThdSleep(2);
st7565_is_data_mode = 0;
}
spiSend(&SPID1, 1, &cmd);
}
static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
(void) g; (void) g;
if (!st7565_is_data_mode) {
// The sleeps need to be at lest 10 vs 25 ns respectively
// So let's sleep two ticks, one tick might not be enough
// if we are at the end of the tick
chThdSleep(2);
palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
chThdSleep(2);
st7565_is_data_mode = 1;
}
spiSend(&SPID1, length, data); spiSend(&SPID1, length, data);
} }

View file

@ -20,16 +20,16 @@
/*===========================================================================*/ /*===========================================================================*/
#ifndef GDISP_SCREEN_HEIGHT #ifndef GDISP_SCREEN_HEIGHT
#define GDISP_SCREEN_HEIGHT 32 #define GDISP_SCREEN_HEIGHT 32
#endif #endif
#ifndef GDISP_SCREEN_WIDTH #ifndef GDISP_SCREEN_WIDTH
#define GDISP_SCREEN_WIDTH 128 #define GDISP_SCREEN_WIDTH 128
#endif #endif
#ifndef GDISP_INITIAL_CONTRAST #ifndef GDISP_INITIAL_CONTRAST
#define GDISP_INITIAL_CONTRAST 0 #define GDISP_INITIAL_CONTRAST 35
#endif #endif
#ifndef GDISP_INITIAL_BACKLIGHT #ifndef GDISP_INITIAL_BACKLIGHT
#define GDISP_INITIAL_BACKLIGHT 100 #define GDISP_INITIAL_BACKLIGHT 100
#endif #endif
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) #define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0)
@ -40,16 +40,16 @@
/* Driver config defaults for backward compatibility. */ /* Driver config defaults for backward compatibility. */
/*===========================================================================*/ /*===========================================================================*/
#ifndef ST7565_LCD_BIAS #ifndef ST7565_LCD_BIAS
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 #define ST7565_LCD_BIAS ST7565_LCD_BIAS_7
#endif #endif
#ifndef ST7565_ADC #ifndef ST7565_ADC
#define ST7565_ADC ST7565_ADC_NORMAL #define ST7565_ADC ST7565_ADC_NORMAL
#endif #endif
#ifndef ST7565_COM_SCAN #ifndef ST7565_COM_SCAN
#define ST7565_COM_SCAN ST7565_COM_SCAN_INC #define ST7565_COM_SCAN ST7565_COM_SCAN_INC
#endif #endif
#ifndef ST7565_PAGE_ORDER #ifndef ST7565_PAGE_ORDER
#define ST7565_PAGE_ORDER 0,1,2,3 #define ST7565_PAGE_ORDER 0,1,2,3
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -58,12 +58,24 @@
typedef struct{ typedef struct{
bool_t buffer2; bool_t buffer2;
uint8_t data_pos;
uint8_t data[16];
uint8_t ram[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8]; uint8_t ram[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8];
}PrivData; }PrivData;
// Some common routines and macros // Some common routines and macros
#define PRIV(g) ((PrivData*)g->priv) #define PRIV(g) ((PrivData*)g->priv)
#define RAM(g) (PRIV(g)->ram) #define RAM(g) (PRIV(g)->ram)
static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd) {
PRIV(g)->data[PRIV(g)->data_pos++] = cmd;
}
static GFXINLINE void flush_cmd(GDisplay* g) {
write_data(g, PRIV(g)->data, PRIV(g)->data_pos);
PRIV(g)->data_pos = 0;
}
#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); } #define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); }
#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); } #define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); }
@ -86,207 +98,232 @@ typedef struct{
*/ */
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
// The private area is the display surface. // The private area is the display surface.
g->priv = gfxAlloc(sizeof(PrivData)); g->priv = gfxAlloc(sizeof(PrivData));
PRIV(g)->buffer2 = false; PRIV(g)->buffer2 = false;
PRIV(g)->data_pos = 0;
// Initialise the board interface // Initialise the board interface
init_board(g); init_board(g);
// Hardware reset // Hardware reset
setpin_reset(g, TRUE); setpin_reset(g, TRUE);
gfxSleepMilliseconds(20); gfxSleepMilliseconds(20);
setpin_reset(g, FALSE); setpin_reset(g, FALSE);
gfxSleepMilliseconds(20); gfxSleepMilliseconds(20);
acquire_bus(g);
enter_cmd_mode(g);
acquire_bus(g); write_cmd(g, ST7565_RESET);
write_cmd(g, ST7565_DISPLAY_OFF); write_cmd(g, ST7565_LCD_BIAS);
write_cmd(g, ST7565_LCD_BIAS);
write_cmd(g, ST7565_ADC); write_cmd(g, ST7565_ADC);
write_cmd(g, ST7565_COM_SCAN); write_cmd(g, ST7565_COM_SCAN);
write_cmd(g, ST7565_RESISTOR_RATIO | 0x1);
write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST);
// turn on internal power supply (VC=1, VR=1, VF=1)
write_cmd(g, ST7565_POWER_CONTROL | 0x07);
write_cmd(g, ST7565_INVERT_DISPLAY);
write_cmd(g, ST7565_ALLON_NORMAL);
write_cmd(g, ST7565_START_LINE | 0); write_cmd(g, ST7565_START_LINE | 0);
write_cmd(g, ST7565_RMW);
write_cmd(g, ST7565_RESISTOR_RATIO | 0x6); flush_cmd(g);
// turn on voltage converter (VC=1, VR=0, VF=0)
write_cmd(g, ST7565_POWER_CONTROL | 0x04);
delay_ms(50);
// turn on voltage regulator (VC=1, VR=1, VF=0)
write_cmd(g, ST7565_POWER_CONTROL | 0x06);
delay_ms(50);
// turn on voltage follower (VC=1, VR=1, VF=1)
write_cmd(g, ST7565_POWER_CONTROL | 0x07);
delay_ms(50);
write_cmd(g, 0xE2);
write_cmd(g, ST7565_COM_SCAN);
write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST*64/101);
//write_cmd2(g, ST7565_CONTRAST, 0);
write_cmd(g, ST7565_DISPLAY_ON);
write_cmd(g, ST7565_ALLON_NORMAL);
write_cmd(g, ST7565_INVERT_DISPLAY);
write_cmd(g, ST7565_RMW);
// Finish Init // Finish Init
post_init_board(g); post_init_board(g);
// Release the bus // Release the bus
release_bus(g); release_bus(g);
/* Initialise the GDISP structure */ /* Initialise the GDISP structure */
g->g.Width = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_WIDTH;
g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Height = GDISP_SCREEN_HEIGHT;
g->g.Orientation = GDISP_ROTATE_0; g->g.Orientation = GDISP_ROTATE_0;
g->g.Powermode = powerOn; g->g.Powermode = powerOff;
g->g.Backlight = GDISP_INITIAL_BACKLIGHT; g->g.Backlight = GDISP_INITIAL_BACKLIGHT;
g->g.Contrast = GDISP_INITIAL_CONTRAST; g->g.Contrast = GDISP_INITIAL_CONTRAST;
return TRUE; return TRUE;
} }
#if GDISP_HARDWARE_FLUSH #if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay *g) { LLDSPEC void gdisp_lld_flush(GDisplay *g) {
unsigned p; unsigned p;
// Don't flush if we don't need it. // Don't flush if we don't need it.
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) if (!(g->flags & GDISP_FLG_NEEDFLUSH))
return; return;
acquire_bus(g); acquire_bus(g);
unsigned dstOffset = (PRIV(g)->buffer2 ? 4 : 0); enter_cmd_mode(g);
for (p = 0; p < 4; p++) { unsigned dstOffset = (PRIV(g)->buffer2 ? 4 : 0);
write_cmd(g, ST7565_PAGE | (p + dstOffset)); for (p = 0; p < 4; p++) {
write_cmd(g, ST7565_COLUMN_MSB | 0); write_cmd(g, ST7565_PAGE | (p + dstOffset));
write_cmd(g, ST7565_COLUMN_LSB | 0); write_cmd(g, ST7565_COLUMN_MSB | 0);
write_cmd(g, ST7565_RMW); write_cmd(g, ST7565_COLUMN_LSB | 0);
write_data(g, RAM(g) + (p*GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH); write_cmd(g, ST7565_RMW);
} flush_cmd(g);
unsigned line = (PRIV(g)->buffer2 ? 32 : 0); enter_data_mode(g);
write_cmd(g, ST7565_START_LINE | line); write_data(g, RAM(g) + (p*GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH);
PRIV(g)->buffer2 = !PRIV(g)->buffer2; enter_cmd_mode(g);
release_bus(g); }
unsigned line = (PRIV(g)->buffer2 ? 32 : 0);
write_cmd(g, ST7565_START_LINE | line);
flush_cmd(g);
PRIV(g)->buffer2 = !PRIV(g)->buffer2;
release_bus(g);
g->flags &= ~GDISP_FLG_NEEDFLUSH; g->flags &= ~GDISP_FLG_NEEDFLUSH;
} }
#endif #endif
#if GDISP_HARDWARE_DRAWPIXEL #if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y; coord_t x, y;
switch(g->g.Orientation) { switch(g->g.Orientation) {
default: default:
case GDISP_ROTATE_0: case GDISP_ROTATE_0:
x = g->p.x; x = g->p.x;
y = g->p.y; y = g->p.y;
break; break;
case GDISP_ROTATE_90: case GDISP_ROTATE_90:
x = g->p.y; x = g->p.y;
y = GDISP_SCREEN_HEIGHT-1 - g->p.x; y = GDISP_SCREEN_HEIGHT-1 - g->p.x;
break; break;
case GDISP_ROTATE_180: case GDISP_ROTATE_180:
x = GDISP_SCREEN_WIDTH-1 - g->p.x; x = GDISP_SCREEN_WIDTH-1 - g->p.x;
y = GDISP_SCREEN_HEIGHT-1 - g->p.y; y = GDISP_SCREEN_HEIGHT-1 - g->p.y;
break; break;
case GDISP_ROTATE_270: case GDISP_ROTATE_270:
x = GDISP_SCREEN_HEIGHT-1 - g->p.y; x = GDISP_SCREEN_HEIGHT-1 - g->p.y;
y = g->p.x; y = g->p.x;
break; break;
} }
if (gdispColor2Native(g->p.color) != Black) if (gdispColor2Native(g->p.color) != Black)
RAM(g)[xyaddr(x, y)] |= xybit(y); RAM(g)[xyaddr(x, y)] |= xybit(y);
else else
RAM(g)[xyaddr(x, y)] &= ~xybit(y); RAM(g)[xyaddr(x, y)] &= ~xybit(y);
g->flags |= GDISP_FLG_NEEDFLUSH; g->flags |= GDISP_FLG_NEEDFLUSH;
} }
#endif #endif
#if GDISP_HARDWARE_PIXELREAD #if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y; coord_t x, y;
switch(g->g.Orientation) { switch(g->g.Orientation) {
default: default:
case GDISP_ROTATE_0: case GDISP_ROTATE_0:
x = g->p.x; x = g->p.x;
y = g->p.y; y = g->p.y;
break; break;
case GDISP_ROTATE_90: case GDISP_ROTATE_90:
x = g->p.y; x = g->p.y;
y = GDISP_SCREEN_HEIGHT-1 - g->p.x; y = GDISP_SCREEN_HEIGHT-1 - g->p.x;
break; break;
case GDISP_ROTATE_180: case GDISP_ROTATE_180:
x = GDISP_SCREEN_WIDTH-1 - g->p.x; x = GDISP_SCREEN_WIDTH-1 - g->p.x;
y = GDISP_SCREEN_HEIGHT-1 - g->p.y; y = GDISP_SCREEN_HEIGHT-1 - g->p.y;
break; break;
case GDISP_ROTATE_270: case GDISP_ROTATE_270:
x = GDISP_SCREEN_HEIGHT-1 - g->p.y; x = GDISP_SCREEN_HEIGHT-1 - g->p.y;
y = g->p.x; y = g->p.x;
break; break;
} }
return (RAM(g)[xyaddr(x, y)] & xybit(y)) ? White : Black; return (RAM(g)[xyaddr(x, y)] & xybit(y)) ? White : Black;
} }
#endif #endif
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
uint8_t* buffer = (uint8_t*)g->p.ptr;
int linelength = g->p.cx;
for (int i = 0; i < g->p.cy; i++) {
unsigned dstx = g->p.x;
unsigned dsty = g->p.y + i;
unsigned srcx = g->p.x1;
unsigned srcy = g->p.y1 + i;
unsigned srcbit = srcy * g->p.x2 + srcx;
for(int j=0; j < linelength; j++) {
uint8_t src = buffer[srcbit / 8];
uint8_t bit = 7-(srcbit % 8);
uint8_t bitset = (src >> bit) & 1;
uint8_t* dst = &(RAM(g)[xyaddr(dstx, dsty)]);
if (bitset) {
*dst |= xybit(dsty);
}
else {
*dst &= ~xybit(dsty);
}
dstx++;
srcbit++;
}
}
g->flags |= GDISP_FLG_NEEDFLUSH;
}
#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL #if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
LLDSPEC void gdisp_lld_control(GDisplay *g) { LLDSPEC void gdisp_lld_control(GDisplay *g) {
switch(g->p.x) { switch(g->p.x) {
case GDISP_CONTROL_POWER: case GDISP_CONTROL_POWER:
if (g->g.Powermode == (powermode_t)g->p.ptr) if (g->g.Powermode == (powermode_t)g->p.ptr)
return; return;
switch((powermode_t)g->p.ptr) { switch((powermode_t)g->p.ptr) {
case powerOff: case powerOff:
case powerSleep: case powerSleep:
case powerDeepSleep: case powerDeepSleep:
acquire_bus(g); acquire_bus(g);
write_cmd(g, ST7565_DISPLAY_OFF); enter_cmd_mode(g);
release_bus(g); write_cmd(g, ST7565_DISPLAY_OFF);
break; flush_cmd(g);
case powerOn: release_bus(g);
acquire_bus(g); break;
write_cmd(g, ST7565_DISPLAY_ON); case powerOn:
release_bus(g); acquire_bus(g);
break; enter_cmd_mode(g);
default: write_cmd(g, ST7565_DISPLAY_ON);
return; flush_cmd(g);
} release_bus(g);
g->g.Powermode = (powermode_t)g->p.ptr; break;
return; default:
return;
}
g->g.Powermode = (powermode_t)g->p.ptr;
return;
case GDISP_CONTROL_ORIENTATION: case GDISP_CONTROL_ORIENTATION:
if (g->g.Orientation == (orientation_t)g->p.ptr) if (g->g.Orientation == (orientation_t)g->p.ptr)
return; return;
switch((orientation_t)g->p.ptr) { switch((orientation_t)g->p.ptr) {
/* Rotation is handled by the drawing routines */ /* Rotation is handled by the drawing routines */
case GDISP_ROTATE_0: case GDISP_ROTATE_0:
case GDISP_ROTATE_180: case GDISP_ROTATE_180:
g->g.Height = GDISP_SCREEN_HEIGHT; g->g.Height = GDISP_SCREEN_HEIGHT;
g->g.Width = GDISP_SCREEN_WIDTH; g->g.Width = GDISP_SCREEN_WIDTH;
break; break;
case GDISP_ROTATE_90: case GDISP_ROTATE_90:
case GDISP_ROTATE_270: case GDISP_ROTATE_270:
g->g.Height = GDISP_SCREEN_WIDTH; g->g.Height = GDISP_SCREEN_WIDTH;
g->g.Width = GDISP_SCREEN_HEIGHT; g->g.Width = GDISP_SCREEN_HEIGHT;
break; break;
default: default:
return; return;
} }
g->g.Orientation = (orientation_t)g->p.ptr; g->g.Orientation = (orientation_t)g->p.ptr;
return; return;
case GDISP_CONTROL_CONTRAST: case GDISP_CONTROL_CONTRAST:
if ((unsigned)g->p.ptr > 100) g->g.Contrast = (unsigned)g->p.ptr & 63;
g->p.ptr = (void *)100; acquire_bus(g);
acquire_bus(g); enter_cmd_mode(g);
write_cmd2(g, ST7565_CONTRAST, ((((unsigned)g->p.ptr)<<6)/101) & 0x3F); write_cmd2(g, ST7565_CONTRAST, g->g.Contrast);
release_bus(g); flush_cmd(g);
g->g.Contrast = (unsigned)g->p.ptr; release_bus(g);
return; return;
} }
} }
#endif // GDISP_NEED_CONTROL #endif // GDISP_NEED_CONTROL
#endif // GFX_USE_GDISP #endif // GFX_USE_GDISP

View file

@ -14,12 +14,13 @@
/* Driver hardware support. */ /* Driver hardware support. */
/*===========================================================================*/ /*===========================================================================*/
#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing #define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing
#define GDISP_HARDWARE_DRAWPIXEL TRUE #define GDISP_HARDWARE_DRAWPIXEL TRUE
#define GDISP_HARDWARE_PIXELREAD TRUE #define GDISP_HARDWARE_PIXELREAD TRUE
#define GDISP_HARDWARE_CONTROL TRUE #define GDISP_HARDWARE_CONTROL TRUE
#define GDISP_HARDWARE_BITFILLS TRUE
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO
#endif /* GFX_USE_GDISP */ #endif /* GFX_USE_GDISP */

View file

@ -34,4 +34,6 @@
#define ST7565_RESISTOR_RATIO 0x20 #define ST7565_RESISTOR_RATIO 0x20
#define ST7565_POWER_CONTROL 0x28 #define ST7565_POWER_CONTROL 0x28
#define ST7565_RESET 0xE2
#endif /* _ST7565_H */ #endif /* _ST7565_H */

View file

@ -143,7 +143,7 @@
#define GDISP_HARDWARE_DRAWPIXEL TRUE #define GDISP_HARDWARE_DRAWPIXEL TRUE
#define GDISP_HARDWARE_CLEARS FALSE #define GDISP_HARDWARE_CLEARS FALSE
#define GDISP_HARDWARE_FILLS FALSE #define GDISP_HARDWARE_FILLS FALSE
#define GDISP_HARDWARE_BITFILLS FALSE //#define GDISP_HARDWARE_BITFILLS FALSE
#define GDISP_HARDWARE_SCROLL FALSE #define GDISP_HARDWARE_SCROLL FALSE
#define GDISP_HARDWARE_PIXELREAD TRUE #define GDISP_HARDWARE_PIXELREAD TRUE
#define GDISP_HARDWARE_CONTROL TRUE #define GDISP_HARDWARE_CONTROL TRUE

View file

@ -70,10 +70,33 @@ void lcd_backlight_hal_init(void) {
RGB_PORT->PCR[BLUE_PIN] = RGB_MODE; RGB_PORT->PCR[BLUE_PIN] = RGB_MODE;
} }
static uint16_t cie_lightness(uint16_t v) {
// The CIE 1931 formula for lightness
// Y = luminance (output) 0-1
// L = lightness input 0 - 100
// Y = (L* / 902.3) if L* <= 8
// Y = ((L* + 16) / 116)^3 if L* > 8
float l = 100.0f * (v / 65535.0f);
float y = 0.0f;
if (l <= 8.0f) {
y = l / 902.3;
}
else {
y = ((l + 16.0f) / 116.0f);
y = y * y * y;
if (y > 1.0f) {
y = 1.0f;
}
}
return y * 65535.0f;
}
void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
CHANNEL_RED.CnV = r; CHANNEL_RED.CnV = cie_lightness(r);
CHANNEL_GREEN.CnV = g; CHANNEL_GREEN.CnV = cie_lightness(g);
CHANNEL_BLUE.CnV = b; CHANNEL_BLUE.CnV = cie_lightness(b);
} }
__attribute__ ((weak)) __attribute__ ((weak))
@ -103,34 +126,48 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
__attribute__ ((weak))
void ergodox_board_led_on(void){ void ergodox_board_led_on(void){
} }
__attribute__ ((weak))
void ergodox_right_led_1_on(void){ void ergodox_right_led_1_on(void){
} }
__attribute__ ((weak))
void ergodox_right_led_2_on(void){ void ergodox_right_led_2_on(void){
} }
__attribute__ ((weak))
void ergodox_right_led_3_on(void){ void ergodox_right_led_3_on(void){
} }
void ergodox_right_led_on(uint8_t led){ __attribute__ ((weak))
}
void ergodox_board_led_off(void){ void ergodox_board_led_off(void){
} }
__attribute__ ((weak))
void ergodox_right_led_1_off(void){ void ergodox_right_led_1_off(void){
} }
__attribute__ ((weak))
void ergodox_right_led_2_off(void){ void ergodox_right_led_2_off(void){
} }
__attribute__ ((weak))
void ergodox_right_led_3_off(void){ void ergodox_right_led_3_off(void){
} }
void ergodox_right_led_off(uint8_t led){ __attribute__ ((weak))
void ergodox_right_led_1_set(uint8_t n) {
}
__attribute__ ((weak))
void ergodox_right_led_2_set(uint8_t n) {
}
__attribute__ ((weak))
void ergodox_right_led_3_set(uint8_t n) {
} }
#ifdef ONEHAND_ENABLE #ifdef ONEHAND_ENABLE

View file

@ -7,13 +7,38 @@ void ergodox_board_led_on(void);
void ergodox_right_led_1_on(void); void ergodox_right_led_1_on(void);
void ergodox_right_led_2_on(void); void ergodox_right_led_2_on(void);
void ergodox_right_led_3_on(void); void ergodox_right_led_3_on(void);
void ergodox_right_led_on(uint8_t led);
inline void ergodox_right_led_on(uint8_t led) {
switch (led) {
case 0:
ergodox_right_led_1_on();
break;
case 1:
ergodox_right_led_2_on();
break;
case 2:
ergodox_right_led_3_on();
break;
}
}
void ergodox_board_led_off(void); void ergodox_board_led_off(void);
void ergodox_right_led_1_off(void); void ergodox_right_led_1_off(void);
void ergodox_right_led_2_off(void); void ergodox_right_led_2_off(void);
void ergodox_right_led_3_off(void); void ergodox_right_led_3_off(void);
void ergodox_right_led_off(uint8_t led); inline void ergodox_right_led_off(uint8_t led) {
switch (led) {
case 0:
ergodox_right_led_1_off();
break;
case 1:
ergodox_right_led_2_off();
break;
case 2:
ergodox_right_led_3_off();
break;
}
}
inline void ergodox_led_all_on(void) inline void ergodox_led_all_on(void)
{ {
@ -31,36 +56,22 @@ inline void ergodox_led_all_off(void)
ergodox_right_led_3_off(); ergodox_right_led_3_off();
} }
inline void ergodox_right_led_1_set(uint8_t n){ void ergodox_right_led_1_set(uint8_t n);
if (n) { void ergodox_right_led_2_set(uint8_t n);
ergodox_right_led_1_on(); void ergodox_right_led_3_set(uint8_t n);
} else {
ergodox_right_led_1_off();
}
}
inline void ergodox_right_led_2_set(uint8_t n){
if (n) {
ergodox_right_led_2_on();
} else {
ergodox_right_led_2_off();
}
}
inline void ergodox_right_led_3_set(uint8_t n){
if (n) {
ergodox_right_led_3_on();
} else {
ergodox_right_led_3_off();
}
}
inline void ergodox_right_led_set(uint8_t led, uint8_t n){ inline void ergodox_right_led_set(uint8_t led, uint8_t n){
if (n) { switch (led) {
ergodox_right_led_on(led); case 0:
} else { ergodox_right_led_1_set(n);
ergodox_right_led_off(led); break;
} case 1:
ergodox_right_led_2_set(n);
break;
case 2:
ergodox_right_led_3_set(n);
break;
}
} }
inline void ergodox_led_all_set(uint8_t n) { inline void ergodox_led_all_set(uint8_t n) {

View file

@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "print.h" #include "print.h"
#include "debug.h" #include "debug.h"
#include "matrix.h" #include "matrix.h"
#include "serial_link/system/serial_link.h"
/* /*

View file

@ -1,6 +1,7 @@
# project specific files # project specific files
SRC = matrix.c \ SRC = matrix.c \
led.c led.c \
animations.c
## chip/board settings ## chip/board settings
# - the next two should match the directories in # - the next two should match the directories in
@ -59,21 +60,17 @@ OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
# #
CUSTOM_MATRIX ?= yes # Custom matrix file CUSTOM_MATRIX ?= yes # Custom matrix file
SERIAL_LINK_ENABLE = yes SERIAL_LINK_ENABLE = yes
VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile VISUALIZER_ENABLE ?= yes
LCD_ENABLE ?= yes LCD_ENABLE ?= yes
LED_ENABLE ?= yes LED_ENABLE ?= no
LCD_BACKLIGHT_ENABLE ?= yes LCD_BACKLIGHT_ENABLE ?= yes
MIDI_ENABLE = no MIDI_ENABLE = no
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
ifndef QUANTUM_DIR
include ../../../Makefile
endif
ifdef LCD_ENABLE ifdef LCD_ENABLE
include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
endif endif
ifdef LED_ENABLE ifdef LED_ENABLE
include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
endif endif

View file

@ -0,0 +1,123 @@
/* Copyright 2017 Fred Sundvik
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_
#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_
// Currently we are assuming that both the backlight and LCD are enabled
// But it's entirely possible to write a custom visualizer that use only
// one of them
#ifndef LCD_BACKLIGHT_ENABLE
#error This visualizer needs that LCD backlight is enabled
#endif
#ifndef LCD_ENABLE
#error This visualizer needs that LCD is enabled
#endif
#include "visualizer.h"
#include "visualizer_keyframes.h"
#include "lcd_keyframes.h"
#include "lcd_backlight_keyframes.h"
#include "system/serial_link.h"
#include "led.h"
#include "animations.h"
static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF);
static const uint32_t initial_color = LCD_COLOR(0, 0, 0);
static bool initial_update = true;
// Feel free to modify the animations below, or even add new ones if needed
static keyframe_animation_t lcd_layer_display = {
.num_frames = 1,
.loop = false,
.frame_lengths = {gfxMillisecondsToTicks(0)},
.frame_functions = {lcd_keyframe_display_layer_and_led_states}
};
// The color animation animates the LCD color when you change layers
static keyframe_animation_t color_animation = {
.num_frames = 2,
.loop = false,
// Note that there's a 200 ms no-operation frame,
// this prevents the color from changing when activating the layer
// momentarily
.frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)},
.frame_functions = {keyframe_no_operation, backlight_keyframe_animate_color},
};
void initialize_user_visualizer(visualizer_state_t* state) {
// The brightness will be dynamically adjustable in the future
// But for now, change it here.
lcd_backlight_brightness(130);
state->current_lcd_color = initial_color;
state->target_lcd_color = logo_background_color;
initial_update = true;
start_keyframe_animation(&default_startup_animation);
}
// This function should be implemented by the keymap visualizer
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
// that the simple_visualizer assumes that you are updating
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
// stopped. This can be done by either double buffering it or by using constant strings
static void get_visualizer_layer_and_color(visualizer_state_t* state);
void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
// Add more tests, change the colors and layer texts here
// Usually you want to check the high bits (higher layers first)
// because that's the order layers are processed for keypresses
// You can for check for example:
// state->status.layer
// state->status.default_layer
// state->status.leds (see led.h for available statuses)
uint32_t prev_color = state->target_lcd_color;
const char* prev_layer_text = state->layer_text;
get_visualizer_layer_and_color(state);
if (initial_update || prev_color != state->target_lcd_color) {
start_keyframe_animation(&color_animation);
}
if (initial_update || prev_layer_text != state->layer_text) {
start_keyframe_animation(&lcd_layer_display);
}
// You can also stop existing animations, and start your custom ones here
// remember that you should normally have only one animation for the LCD
// and one for the background. But you can also combine them if you want.
}
void user_visualizer_suspend(visualizer_state_t* state) {
state->layer_text = "Suspending...";
uint8_t hue = LCD_HUE(state->current_lcd_color);
uint8_t sat = LCD_SAT(state->current_lcd_color);
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
start_keyframe_animation(&default_suspend_animation);
}
void user_visualizer_resume(visualizer_state_t* state) {
state->current_lcd_color = initial_color;
state->target_lcd_color = logo_background_color;
initial_update = true;
start_keyframe_animation(&default_startup_animation);
}
#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */

View file

@ -0,0 +1,329 @@
/*
Copyright 2016 Fred Sundvik <fsundvik@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Currently we are assuming that both the backlight and LCD are enabled
// But it's entirely possible to write a custom visualizer that use only
// one of them
#ifndef LCD_BACKLIGHT_ENABLE
#error This visualizer needs that LCD backlight is enabled
#endif
#ifndef LCD_ENABLE
#error This visualizer needs that LCD is enabled
#endif
#include "visualizer.h"
#include "visualizer_keyframes.h"
#include "lcd_keyframes.h"
#include "lcd_backlight_keyframes.h"
#include "system/serial_link.h"
#include "animations.h"
static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF);
static const uint32_t initial_color = LCD_COLOR(0, 0, 0);
static const uint32_t led_emulation_colors[4] = {
LCD_COLOR(0, 0, 0),
LCD_COLOR(255, 255, 255),
LCD_COLOR(84, 255, 255),
LCD_COLOR(168, 255, 255),
};
static uint32_t next_led_target_color = 0;
typedef enum {
LCD_STATE_INITIAL,
LCD_STATE_LAYER_BITMAP,
LCD_STATE_BITMAP_AND_LEDS,
} lcd_state_t;
static lcd_state_t lcd_state = LCD_STATE_INITIAL;
typedef struct {
uint8_t led_on;
uint8_t led1;
uint8_t led2;
uint8_t led3;
} visualizer_user_data_t;
// Don't access from visualization function, use the visualizer state instead
static visualizer_user_data_t user_data_keyboard = {
.led_on = 0,
.led1 = LED_BRIGHTNESS_HI,
.led2 = LED_BRIGHTNESS_HI,
.led3 = LED_BRIGHTNESS_HI,
};
_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE,
"Please increase the VISUALIZER_USER_DATA_SIZE");
// Feel free to modify the animations below, or even add new ones if needed
// The color animation animates the LCD color when you change layers
static keyframe_animation_t one_led_color = {
.num_frames = 1,
.loop = false,
.frame_lengths = {gfxMillisecondsToTicks(0)},
.frame_functions = {backlight_keyframe_set_color},
};
bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) {
uint32_t temp = next_led_target_color;
next_led_target_color = state->target_lcd_color;
state->target_lcd_color = temp;
return false;
}
// The color animation animates the LCD color when you change layers
static keyframe_animation_t two_led_colors = {
.num_frames = 2,
.loop = true,
.frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)},
.frame_functions = {backlight_keyframe_set_color, swap_led_target_color},
};
// The LCD animation alternates between the layer name display and a
// bitmap that displays all active layers
static keyframe_animation_t lcd_bitmap_animation = {
.num_frames = 1,
.loop = false,
.frame_lengths = {gfxMillisecondsToTicks(0)},
.frame_functions = {lcd_keyframe_display_layer_bitmap},
};
static keyframe_animation_t lcd_bitmap_leds_animation = {
.num_frames = 2,
.loop = true,
.frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)},
.frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states},
};
void initialize_user_visualizer(visualizer_state_t* state) {
// The brightness will be dynamically adjustable in the future
// But for now, change it here.
lcd_backlight_brightness(130);
state->current_lcd_color = initial_color;
state->target_lcd_color = logo_background_color;
lcd_state = LCD_STATE_INITIAL;
start_keyframe_animation(&default_startup_animation);
}
inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) {
return user_data->led_on & (1u << num);
}
static uint8_t get_led_index_master(visualizer_user_data_t* user_data) {
for (int i=0; i < 3; i++) {
if (is_led_on(user_data, i)) {
return i + 1;
}
}
return 0;
}
static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) {
uint8_t master_index = get_led_index_master(user_data);
if (master_index!=0) {
for (int i=master_index; i < 3; i++) {
if (is_led_on(user_data, i)) {
return i + 1;
}
}
}
return 0;
}
static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) {
if (is_led_on(user_data, 0) &&
is_led_on(user_data, 1) &&
is_led_on(user_data, 2)) {
return 3;
}
return 0;
}
static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) {
switch (index) {
case 1:
return user_data->led1;
case 2:
return user_data->led2;
case 3:
return user_data->led3;
}
return 0;
}
static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data;
visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data;
uint8_t new_index;
uint8_t old_index;
if (is_serial_link_master()) {
new_index = get_led_index_master(user_data_new);
old_index = get_led_index_master(user_data_old);
}
else {
new_index = get_led_index_slave(user_data_new);
old_index = get_led_index_slave(user_data_old);
}
uint8_t new_secondary_index = get_secondary_led_index(user_data_new);
uint8_t old_secondary_index = get_secondary_led_index(user_data_old);
uint8_t old_brightness = get_brightness(user_data_old, old_index);
uint8_t new_brightness = get_brightness(user_data_new, new_index);
uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index);
uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index);
if (lcd_state == LCD_STATE_INITIAL ||
new_index != old_index ||
new_secondary_index != old_secondary_index ||
new_brightness != old_brightness ||
new_secondary_brightness != old_secondary_brightness) {
if (new_secondary_index != 0) {
state->target_lcd_color = change_lcd_color_intensity(
led_emulation_colors[new_index], new_brightness);
next_led_target_color = change_lcd_color_intensity(
led_emulation_colors[new_secondary_index], new_secondary_brightness);
stop_keyframe_animation(&one_led_color);
start_keyframe_animation(&two_led_colors);
} else {
state->target_lcd_color = change_lcd_color_intensity(
led_emulation_colors[new_index], new_brightness);
stop_keyframe_animation(&two_led_colors);
start_keyframe_animation(&one_led_color);
}
}
}
static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
if (state->status.leds) {
if (lcd_state != LCD_STATE_BITMAP_AND_LEDS ||
state->status.leds != prev_status->leds ||
state->status.layer != prev_status->layer ||
state->status.default_layer != prev_status->default_layer) {
// NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case
stop_keyframe_animation(&lcd_bitmap_animation);
lcd_state = LCD_STATE_BITMAP_AND_LEDS;
// For information:
// The logic in this function makes sure that this doesn't happen, but if you call start on an
// animation that is already playing it will be restarted.
start_keyframe_animation(&lcd_bitmap_leds_animation);
}
} else {
if (lcd_state != LCD_STATE_LAYER_BITMAP ||
state->status.layer != prev_status->layer ||
state->status.default_layer != prev_status->default_layer) {
stop_keyframe_animation(&lcd_bitmap_leds_animation);
lcd_state = LCD_STATE_LAYER_BITMAP;
start_keyframe_animation(&lcd_bitmap_animation);
}
}
}
void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
// Check the status here to start and stop animations
// You might have to save some state, like the current animation here so that you can start the right
// This function is called every time the status changes
// NOTE that this is called from the visualizer thread, so don't access anything else outside the status
// This is also important because the slave won't have access to the active layer for example outside the
// status.
update_emulated_leds(state, prev_status);
update_lcd_text(state, prev_status);
}
void user_visualizer_suspend(visualizer_state_t* state) {
state->layer_text = "Suspending...";
uint8_t hue = LCD_HUE(state->current_lcd_color);
uint8_t sat = LCD_SAT(state->current_lcd_color);
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
start_keyframe_animation(&default_suspend_animation);
}
void user_visualizer_resume(visualizer_state_t* state) {
state->current_lcd_color = initial_color;
state->target_lcd_color = logo_background_color;
lcd_state = LCD_STATE_INITIAL;
start_keyframe_animation(&default_startup_animation);
}
void ergodox_board_led_on(void){
// No board led support
}
void ergodox_right_led_1_on(void){
user_data_keyboard.led_on |= (1u << 0);
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_2_on(void){
user_data_keyboard.led_on |= (1u << 1);
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_3_on(void){
user_data_keyboard.led_on |= (1u << 2);
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_board_led_off(void){
// No board led support
}
void ergodox_right_led_1_off(void){
user_data_keyboard.led_on &= ~(1u << 0);
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_2_off(void){
user_data_keyboard.led_on &= ~(1u << 1);
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_3_off(void){
user_data_keyboard.led_on &= ~(1u << 2);
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_1_set(uint8_t n) {
user_data_keyboard.led1 = n;
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_2_set(uint8_t n) {
user_data_keyboard.led2 = n;
visualizer_set_user_data(&user_data_keyboard);
}
void ergodox_right_led_3_set(uint8_t n) {
user_data_keyboard.led3 = n;
visualizer_set_user_data(&user_data_keyboard);
}

View file

@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* TL2 TL3 * TL2 TL3
* LSHFT Ü Ö Ä P Z B M , . J Shift * LSHFT Ü Ö Ä P Z B M , . J Shift
* *
* CTL ALT MO1 Win Mod4 Mod4 Win MO1 Alt CTL * CTL ALT MO1 Win Mod4 Mod4 Win MO1 ALT CTL
* *
* *
* *
@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS,
NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R,
TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT, TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT,
NEO_L2_R,KC_RGUI,MO(FMU),KC_RALT,KC_RCTL, NEO_L2_R,KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT, KC_DOWN, KC_RGHT,
KC_MINS, KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC MEH_T(KC_NO),KC_ENT,KC_SPC
@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* (TL2) (TL3) * (TL2) (TL3)
* LSHFT Ä Q R W N J M , . Shift * LSHFT Ä Q R W N J M , . Shift
* *
* CTL ALT MO1 Win MO4 M04 Win MO1 Alt CTL * CTL ALT MO1 Win MO4 M04 Win MO1 ALT CTL
* *
* *
* *
@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, DE_B, DE_A, DE_S, DE_G, DE_V, DE_Y, KC_END, DE_B, DE_A, DE_S, DE_G, DE_V, DE_Y,
DE_U, DE_MINS,DE_Z, DE_E, DE_X, NEO_L1_R, DE_U, DE_MINS,DE_Z, DE_E, DE_X, NEO_L1_R,
KC_TRNS, DE_J, DE_M, DE_COMM,DE_DOT, DE_SS, KC_RSFT, KC_TRNS, DE_J, DE_M, DE_COMM,DE_DOT, DE_SS, KC_RSFT,
MO(NHL),KC_RGUI,MO(FMU),KC_RALT,KC_RCTL, MO(NHL),KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT, KC_DOWN, KC_RGHT,
KC_MINS, KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC MEH_T(KC_NO),KC_ENT,KC_SPC
@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* (TL2) (TL3) * (TL2) (TL3)
* LSHFT Ü Ö Ä P Z B M , . J Shift * LSHFT Ü Ö Ä P Z B M , . J Shift
* *
* CTL ALT MO1 Win MO4 M04 Win MO1 Alt CTL * CTL ALT MO1 Win MO4 M04 Win MO1 ALT CTL
* *
* *
* *
@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS, KC_END, DE_K, DE_H, DE_G, DE_F, DE_Q, DE_SS,
DE_S, DE_N, DE_R, DE_T, DE_D, KC_NO, DE_S, DE_N, DE_R, DE_T, DE_D, KC_NO,
KC_TRNS, DE_B, DE_M, KC_COMM,KC_DOT, DE_J, KC_RSFT, KC_TRNS, DE_B, DE_M, KC_COMM,KC_DOT, DE_J, KC_RSFT,
MO(NHL),KC_RGUI,MO(FMU),KC_RALT,KC_RCTL, MO(NHL),KC_RGUI,MO(FMU),KC_LALT,KC_RCTL,
KC_DOWN, KC_RGHT, KC_DOWN, KC_RGHT,
KC_MINS, KC_MINS,
MEH_T(KC_NO),KC_ENT,KC_SPC MEH_T(KC_NO),KC_ENT,KC_SPC
@ -135,13 +135,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 3: F-keys, Mouse and Unicode /* Layer 3: F-keys, Mouse and Unicode
* *
* * F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
* *
* F9 F10 F11 F12 *
* *
* F5 F6 F7 F8 *
* (TL2) (TL3) * (TL2) (TL3)
* F1 F2 F3 F4 *
* *
* (MO1) (MO4) (MO4) (MO1) * (MO1) (MO4) (MO4) (MO1)
* *
@ -154,23 +154,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[FMU] = KEYMAP( [FMU] = KEYMAP(
// left hand // left hand
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS, KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS,
KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715), KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x3008),UC(0x3009),
KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),UC(0x2194),UC(0x21D4),KC_TRNS, KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MS_L, KC_MS_U, KC_MS_L, KC_MS_U,
KC_BTN1, KC_BTN1,
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// right hand // right hand
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
KC_TRNS, KC_TRNS,KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, UC(0x2194),UC(0x2190),UC(0x2192),UC(0x2191),UC(0x2193),KC_TRNS,
KC_TRNS,KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, KC_TRNS, UC(0x2713),UC(0x2715),UC(0x2022),UC(0x2236),KC_TRNS,
KC_TRNS, KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, KC_TRNS, UC(0x21D4),UC(0x21D0),UC(0x21D2),UC(0x21D1),UC(0x21D3),KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MS_D, KC_MS_R, KC_MS_D, KC_MS_R,
KC_BTN2, KC_BTN2,
KC_TRNS, KC_TRNS,KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS
), ),
/* Layer 4: Neos software layer 4 rebuilt in Hardware /* Layer 4: Neos software layer 4 rebuilt in Hardware
@ -294,11 +294,10 @@ void unicode_input_start (void) {
// Override method to use NEO_A instead of KC_A // Override method to use NEO_A instead of KC_A
uint16_t hex_to_keycode(uint8_t hex) uint16_t hex_to_keycode(uint8_t hex)
{ {
if (hex == 0x0) { if(hex == 0x0) {
return KC_0; return KC_0;
} else if (hex < 0xA) { }
return KC_1 + (hex - 0x1); else if(hex >= 0xA) {
} else {
switch(hex) { switch(hex) {
case 0xA: case 0xA:
return NEO_A; return NEO_A;
@ -316,4 +315,6 @@ uint16_t hex_to_keycode(uint8_t hex)
return KC_NO; return KC_NO;
} }
} }
return KC_1 + (hex - 0x1);
} }

View file

@ -4,10 +4,18 @@ The idea of this layout is to use it for [Neo2](http://www.neo-layout.org) but a
The main goal of the default layer is to provide a complete symmetric layout with each modifier equally placed for both hands (mirror, of course). The main goal of the default layer is to provide a complete symmetric layout with each modifier equally placed for both hands (mirror, of course).
It also features a layer for additional keys like F-keys (F1 F12), some mouse keys and (hopefully in the near future) some useful Unicode symbols. It also features a layer for additional keys like F-keys (F1 F12), some mouse keys and some useful Unicode symbols.
## Layers ## Build
```
make clean
make coderkun_neo2
```
## Keymap
0. Default layer for Neo2 0. Default layer for Neo2
1. Poor mans QWERTZ 1. Poor mans QWERTZ
@ -16,16 +24,106 @@ It also features a layer for additional keys like F-keys (F1 F12), some mous
4. Neos software layers 4 rebuilt in hardware 4. Neos software layers 4 rebuilt in hardware
## Build ### Layer 0: Default layer for Neo2
1. Enable Unicode in Makefile ┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ ` │ │ ´ │ 6 │ 7 │ 8 │ 9 │ 0 │ BKSPC │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ Y │ X │ V │ L │ C │ W │ HOM │ │ END │ K │ H │ G │ F │ Q │ ß │
├───────┼─────┼─────┼─────╆─────╅─────┤ E │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ Mod3 │ U │ I │ A │ E │ O ├─────┤ ├─────┤ S │ N │ R │ T │ D │ Mod3 │
├───────┼─────┼─────┼─────╄─────╃─────┤ TL2 │ │ TL3 ├─────╄─────╃─────┼─────┼─────┼───────┤
│ LSHFT │ Ü │ Ö │ Ä │ P │ Z │ │ │ │ B │ M │ , │ . │ J │ Shift │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ CTL │ ALT │ MO1 │ Win │ Mod4│ │ Mod4│ Win │ MO1 │ Alt │ CTL │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ ← │ ↑ │ │ ↓ │ → │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ ─ │ │ ─ │ │ │
│ SPC │ RTN ├─────┤ ├─────┤ RTN │ SPC │
│ │ │ HYP │ │ MEH │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
```
UNICODE_ENABLE = yes
```
2. Build as usual
``` ### Layer 1: Poor mans QWERTZ
make clean
make KEYMAP=coderkun_neo2 ┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
``` │ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ ` │ │ ´ │ 6 │ 7 │ 8 │ 9 │ 0 │ BKSPC │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ C │ P │ T │ F │ K │ L │ HOM │ │ END │ B │ A │ S │ G │ V │ Y │
├───────┼─────┼─────┼─────╆─────╅─────┤ E │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ Mod3 │ D │ H │ Ö │ O │ I ├─────┤ ├─────┤ U │ - │ Z │ E │ X │ Mod3 │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ LSHFT │ Ä │ Q │ R │ W │ N │ │ │ │ J │ M │ , │ . │ ẞ │ Shift │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ CTL │ ALT │ MO1 │ Win │ MO4 │ │ M04 │ Win │ MO1 │ Alt │ CTL │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ ← │ ↑ │ │ ↓ │ → │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ ─ │ │ ─ │ │ │
│ SPC │ RTN ├─────┤ ├─────┤ RTN │ SPC │
│ │ │ HYP │ │ MEH │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
### Layer 2: Poor mans Neo
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ TAB │ 1 │ 2 │ 3 │ 4 │ 5 │ ` │ │ ´ │ 6 │ 7 │ 8 │ 9 │ 0 │ BKSPC │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ Y │ X │ V │ L │ C │ W │ HOM │ │ END │ K │ H │ G │ F │ Q │ ß │
├───────┼─────┼─────┼─────╆─────╅─────┤ E │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ Mod3 │ U │ I │ A │ E │ O ├─────┤ ├─────┤ S │ N │ R │ T │ D │ Mod3 │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ LSHFT │ Ü │ Ö │ Ä │ P │ Z │ │ │ │ B │ M │ , │ . │ J │ Shift │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ CTL │ ALT │ MO1 │ Win │ MO4 │ │ M04 │ Win │ MO1 │ Alt │ CTL │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ ← │ ↑ │ │ ↓ │ → │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ ─ │ │ ─ │ │ │
│ SPC │ RTN ├─────┤ ├─────┤ RTN │ SPC │
│ │ │ HYP │ │ MEH │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
### Layer 3: F-keys, mouse keys und Unicode symbols
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ │ ┌ │ ┬ │ ┐ │ ─ │ │ │ │ │ │ ↔ │ ← │ → │ ↑ │ ↓ │ │
├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ │ ├ │ ┼ │ ┤ │ 〈 │ 〉 ├─────┤ ├─────┤ │ ✓ │ ✕ │ • │ │ │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ │ └ │ ┴ │ ┘ │ │ │ │ │ │ ⇔ │ ⇐ │ ⇒ │ ⇑ │ ⇓ │ │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ Ms← │ Ms↑ │ │ Ms↓ │ Ms→ │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ MLC │ │ MRC │ │ │
│ │ ├─────┤ ├─────┤ │ │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘
### Layer 4: Neos software layers 4 rebuilt in hardware
┌───────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬───────┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
├───────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼───────┤
│ │ PgUp│ BSpc│ ↑ │ Del │ PgDn│ │ │ │ │ 7 │ 8 │ 9 │ + │
├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
│ │ Home│ ← │ ↓ │ → │ End ├─────┤ ├─────┤ │ 4 │ 5 │ 6 │ , │ . │
├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
│ │ Esc │ Tab │ Ins │ Ret │ Undo│ │ │ │ │ 1 │ 2 │ 3 │ │ │
└─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
│ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │
└─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
│ │ │ │ │ │
┌─────┼─────┼─────┤ ├─────┼─────┼─────┐
│ │ │ │ │ │ │ │
│ │ ├─────┤ ├─────┤ │ │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┘ └─────┴─────┴─────┘

View file

@ -0,0 +1,42 @@
/*
Copyright 2017 Fred Sundvik
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "simple_visualizer.h"
// This function should be implemented by the keymap visualizer
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
// that the simple_visualizer assumes that you are updating
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
// stopped. This can be done by either double buffering it or by using constant strings
static void get_visualizer_layer_and_color(visualizer_state_t* state) {
uint8_t saturation = 60;
if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
saturation = 255;
}
if (state->status.layer & 0x4) {
state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
state->layer_text = "Media & Mouse";
}
else if (state->status.layer & 0x2) {
state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
state->layer_text = "Symbol";
}
else {
state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
state->layer_text = "Default";
}
}

View file

@ -311,12 +311,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break; break;
case SWITCH_NDS: case SWITCH_NDS:
if (record->event.pressed) { if (record->event.pressed) {
return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END); return MACRO( D(LSFT), T(F11), U(LSFT), W(255), D(LALT), T(TAB), U(LALT), END);
} }
break; break;
case OPEN_CLOSE_PAREN: case OPEN_CLOSE_PAREN:
if (record->event.pressed) { if (record->event.pressed) {
return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END); return MACRO( D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END);
} }
break; break;
case OPEN_CLOSE_BRACKET: case OPEN_CLOSE_BRACKET:
@ -326,7 +326,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break; break;
case OPEN_CLOSE_CURLY: case OPEN_CLOSE_CURLY:
if (record->event.pressed) { if (record->event.pressed) {
return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END); return MACRO( D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END);
} }
break; break;
case OPEN_CLOSE_SINGLE_QUOTE: case OPEN_CLOSE_SINGLE_QUOTE:

View file

@ -0,0 +1,331 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "keymap_nordic.h"
#include "keymap_norwegian.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // mouse keys
#define DEVL 3 // dev keys
#define MACRO_PUBLIC 10
#define MACRO_PRIVATE 11
#define MACRO_PROT 12
#define MACRO_SHARED 13
#define MACRO_CONST 14
#define MACRO_DIM 15
#define MACRO_STRING 16
#define MACRO_INT 17
#define MACRO_DEC 18
#define MACRO_BOOL 19
#define MACRO_RETURN 20
#define MACRO_NOTHING 21
#define MACRO_TODO 22
#define MACRO_SAVE 24
#define MACRO_BUILD 25
#define MACRO_DEBUG 26
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | L3 | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | - | , | . | P | Y | LT1 | | LT1 | F | G | C | R | L | Å |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | WIN | A | O | E | U | I |------| |------| D | H | T | N | S | Ä |
* |--------+------+------+------+------+------| LT2 | | LT2 |------+------+------+------+------+--------|
* | LShift | Ö | Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | CTRL | L1 |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
MO(DEVL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB),
KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA),
CTL_T(KC_NO), MO(SYMB), LALT(KC_LSFT), KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH,
TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, NO_AM,
KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE,
TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
KC_LALT, CTL_T(KC_ESC),
KC_PGUP,
KC_PGDN,KC_TAB, KC_ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | @ | { | } | [ | ] | | | | < | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | ( | ) | \ | / |------| |------| > | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | UND | CUT | COP | PAS | | | | ? | 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, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS,
KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH,
KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), 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, NO_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12,
LSFT(NO_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS,
KC_TRNS, NO_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS,
KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 3: Developer keys in vb.net
* shortened in layout beneth, for example int-> integer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| priv | publ |shared| prot | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | const| dim |return|nothin| | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[DEVL] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, M(MACRO_BOOL), M(MACRO_INT), M(MACRO_STRING), M(MACRO_DEC), M(MACRO_TODO), KC_TRNS,
M(MACRO_PRIVATE), M(MACRO_PUBLIC), M(MACRO_SHARED), M(MACRO_PROT), KC_TRNS, KC_TRNS,
KC_TRNS, M(MACRO_CONST), M(MACRO_DIM), M(MACRO_RETURN), M(MACRO_NOTHING), KC_TRNS, 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) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
case MACRO_PUBLIC:
if (record->event.pressed) {
return MACRO( T(P), T(U), T(B), T(L), T(I), T(C), T(SPACE),END);
}
break;
case MACRO_PRIVATE:
if (record->event.pressed) {
return MACRO( T(P), T(R), T(I), T(V), T(A), T(T), T(E), T(SPACE),END);
}
break;
case MACRO_PROT:
if (record->event.pressed) {
return MACRO( T(P), T(R), T(O), T(T), T(E), T(C), T(T), T(E), T(D), T(SPACE),END);
}
break;
case MACRO_SHARED:
if (record->event.pressed) {
return MACRO( T(S), T(H), T(A), T(R), T(E), T(D), T(SPACE), END);
}
break;
case MACRO_CONST:
if (record->event.pressed) {
return MACRO( T(C), T(O), T(N), T(S), T(T), T(SPACE), END);
}
break;
case MACRO_DIM:
if (record->event.pressed) {
return MACRO( T(D), T(I), T(M), T(SPACE), END);
}
break;
case MACRO_STRING:
if (record->event.pressed) {
return MACRO( T(S), T(T), T(R), T(I), T(N), T(G), T(SPACE), END);
}
break;
case MACRO_BOOL:
if (record->event.pressed) {
return MACRO( T(B), T(O), T(O), T(L), T(E), T(A), T(N), T(SPACE), END);
}
break;
case MACRO_INT:
if (record->event.pressed) {
return MACRO( T(I), T(N), T(T), T(SPACE), END);
}
break;
case MACRO_DEC:
if (record->event.pressed) {
return MACRO( T(D), T(E), T(C), T(I), T(M), T(A), T(L), T(SPACE), END);
}
break;
case MACRO_RETURN:
if (record->event.pressed) {
return MACRO( T(R), T(E), T(T), T(U),T(R),T(N), T(SPACE), END);
}
break;
case MACRO_NOTHING:
if (record->event.pressed) {
return MACRO( T(N), T(O), T(T), T(H), T(I), T(N), T(G), T(SPACE), END);
}
case MACRO_TODO:
if (record->event.pressed) {
return MACRO( KC_BSLASH, D(LSHIFT) ,T(T), T(O), T(D), T(O), KC_DOT, U(LSHIFT), T(SPACE),END);
}
break;
case MACRO_SAVE:
if (record->event.pressed) {
return MACRO( D(LCTL) ,T(S), U(LCTL),END);
}
break;
case MACRO_BUILD:
if (record->event.pressed) {
return MACRO( D(LCTL), D(LSHIFT) ,T(B), U(LSHIFT), U(LCTL),END);
}
break;
case MACRO_DEBUG:
if (record->event.pressed) {
return MACRO( KC_F5 ,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);
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;
}
};

View file

@ -0,0 +1,28 @@
# ErgoDox EZ Dvorak Programmer SWEDISH
Dvorak layout adjusted for a suitable programmer layout and swedish special characters added:
* åäö characters added
* Layout for common vb.net keywords
* Common Visual Studio commands like Save, Build, Debug
TODO:
* (Layer 4 is qwerty (for easier gaming & less fortunate keyboard users)) Like this idea, will add it later on
Known issues:
* Keymap 2 modifier has not gotten its place yet..
* Print screen, where?
## Changelog
* 2017-05-16
* Initial release
# Author
Christian Westerlund
cwesterlund @ github
Thanks to the author of keymap csharp_dev for inspiration!

View file

@ -0,0 +1,69 @@
# ErgoDox Familiar Layout
Familiar layout for those who regularly switch back and forth from ErgoDox to regular QWERTY.
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](../../../../license_GPLv3.md../../../../license_GPLv3.md) [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
## Table of Contents
- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Layers](#layers)
- [Contribute](#contribute)
- [Issues](#issues)
- [License](#license)
## Background
This layout is built to be as familiar as possible for users coming directly from a default (QWERTY US) keyboard, while gaining as much advantage as possible from the ErgoDox and QMK featureset. I use an ErgoDoxEZ at home, but I don't have a regular office (CS grad student) so I regularly use either my laptop or a default-setup lab computer; I context switch daily so this layout is meant to reduce the mental overhead as much as possible.
The default ErgoDoxEZ layout is probably more optimized as a solo daily driver - as are a lot of the others available keymaps. The focus of this layout is to get as much from the 'Dox as possible without overly disrupting long-established muscle memory.
Key features of the familiar layout:
1. QWERTY default layout.
1. International symbols layer, mapped in the US-International layout default positions, through [UCIS](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable).
1. Numpad layer on right hand.
1. Thumb cluster holds spacebar, ALT, and access to secondary layers.
1. Function-layer arrow keys in both the first-person-shooter (actually ESDF instead of WASD) and vim (HJKL) locations.
## Install
If you are on Windows or Mac, choose the proper line in [`keymap.c`](keymap.c) for [unicode/international character support](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable) (starts at line 235).
```c
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX); // Linux
//set_unicode_input_mode(UC_OSX); // Mac OSX
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
};
```
For instructions on building and installing this keymap, [go to the wiki](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox#build-dependencies). Below is the command for me; it may be different for you.
```sh
$ make ergodox-ez-familiar-teensy
```
## Usage
[![Familiar Layout](familiar.png)](http://www.keyboard-layout-editor.com/#/gists/13508a9f99cff381d58b7be6f7dcc644)
### Layers
1. Base Layer: QWERTY, with arrow keys at bottom right.
1. UCIS Layer: US-International symbols layer, plus —. Accessed by toggling the `INTL` layer using the UCIS key (bottom of left thumb cluster).
1. UCIS-Shifted Layer: Making shift work for UCIS characters. An ugly workaround. Any ideas? Accessed through holding shift while the UCIS layer is active (toggles the `INSF` layer).
1. Numpad Layer: Right hand number pad. Accessed by toggling the `NUMP` layer using the NPAD key (bottom of right thumb cluster).
1. Function Layer: F1-F12, arrows on ESDF and HJKL, media player controls. Accessed by holding either FN key (center key of each thumb cluster), which toggles the `ARRW` layer. I know, I need to work on my naming conventions.
## Contribute
[Contributor Covenant](http://contributor-covenant.org/)
I'm terrible at this; I have no background in human-computer interaction, kinesiology, or keyboard-ology. Please send comments/issues/pull requests/angry tweets/etc. If you think there is a better way to take advantage of the ErgoDox/QMK comination without straying far from 84/101-key QWERTY, I want to know it.
### Issues
1. The top two keys of the right thumb cluster are currently unused. I wanted them for screen brightness, but I haven't found a solution I like.
1. The `'`, `"`, `[`, and `]` keys are terrible to access; I want to put them somewhere else but I haven't figured out where.
1. The `INSF` layer is an ugly workaround. I should write a function for doing different things in the `INTL` layer depending on whether SHIFT is being held. Or something. Ideas?
## License
QMK is licensed ([mostly](https://github.com/qmk/qmk_firmware/issues/1038)) under the [GPLv2](blob/master/license_GPLv2.md). Accordingly, to whatever extent applicable, this keymap is licensed under the [GPLv3](../../../../license_GPLv3.md).

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View file

@ -0,0 +1,267 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
// Layers
#define BASE 0 // default layer
#define INTL 1 // international symbols
#define INSF 2 // international symbols shifted
#define NUMP 3 // numpad
#define ARRW 4 // function, media, arrow keys
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
/* layer 0 : default
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ` | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER |
* |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------|
* | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCTRL | LGUI | MENU | ' | " | | [ | ] | LEFT | DOWN | RIGHT |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | VOL- | VOL+ | | | |
* ,------|------|------| |------+------+------.
* | SPC/ |SLASH/| MUTE | |NUMLCK|WHACK/| SPC/ |
* | ALT | MO(1)|------| |------|MO(1) | ALT |
* | | | LAY3 | | LAY2 | | |
* `--------------------' `--------------------'
*/
[BASE] = KEYMAP(
// left hand
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END,
KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, S(KC_QUOT),
KC_VOLD, KC_VOLU,
KC_MUTE,
ALT_T(KC_SPC), LT(ARRW,KC_SLSH), TG(INTL),
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER,
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC,
KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT,
_______, _______,
KC_NLCK,
TG(NUMP), LT(ARRW,KC_BSLS), ALT_T(KC_SPC)
),
/* layer 1: International symbols, etc
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ´ | ¡ | ² | ³ | ¤ | | ¼ | | ½ | ¾ | | | ¥ | × | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | á | ß | ð | | |------| |------| | | | ø | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |MO(INSF)| æ | | © | | | | | | ñ | µ | ç | | |MO(INSF)|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | ¬ | ¿ | | « | » | | | |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[INTL] = KEYMAP(
// left hand
UC(0x00B4), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC),
_______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______,
_______, UC(0x00E1), UC(0x00DF), UC(0x00F0), _______, _______,
MO(INSF), UC(0x00E6), _______, UC(0x00A9), _______, _______, _______,
_______, _______, _______, UC(0x00AC), UC(0x00BF),
_______, _______,
_______,
_______, _______, _______,
// right hand
UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______,
_______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______,
_______, _______, _______, UC(0x00F8), UC(0x00B6), _______,
_______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(INSF),
UC(0x00AB), UC(0x00BB), _______, _______, _______,
_______, _______,
_______,
_______, _______, _______
),
/* layer 2 : international symbols, shifted
* This layer is an ugly workaround; it pretends that SHIFT still works normally on keys
* which don't produce an "upper case" or "shifted" international symobol.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ¨ | ¹ | | | £ | | | | | | | | | ÷ | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | Á | § | Ð | | |------| |------| | | | Ø | ° | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | Æ | | ¢ | | | | | | Ñ | | Ç | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | ¦ | | | | | | | |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[INSF] = KEYMAP(
// left hand
UC(0x00A8), UC(0x00B9), _______, _______, UC(0x00A3), _______, _______,
_______, UC(0x00C4), UC(0x00C5), UC(0x00C9), _______, UC(0x00DE), _______,
_______, UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G),
_______, UC(0x00C6), S(KC_X), UC(0x00A2), S(KC_V), S(KC_B), _______,
_______, _______, _______, UC(0x00A6), _______,
_______, _______,
_______,
_______, _______, _______,
// right hand
_______, _______, _______, _______, UC(0x2014), UC(0x00F7), _______,
_______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______,
S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______,
_______, UC(0x00D1), _______, UC(0x00C7), S(KC_DOT), _______, _______,
_______, _______, _______, _______, _______,
_______, _______,
_______,
_______, _______, _______
),
/* layer 3: numberpad
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | ( | ) | / | * | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | 7 | 8 | 9 | - | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | 1 | 2 | 3 | = | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | 0 | . | , | ENTER| |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[NUMP] = KEYMAP(
// left hand
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, _______,
_______,
_______, _______, _______,
// right hand
_______, _______, S(KC_9), S(KC_0), KC_PSLS, KC_PAST, _______,
_______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______,
_______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______,
_______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, _______,
KC_KP_0, KC_KP_DOT, KC_PCMM, KC_PENT, _______,
_______, _______,
_______,
_______, _______, _______
),
/* layer 4 : functions and arrows
* This layer is at the top so that the functions still work no matter what layers are active.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | SYSREQ |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | UP | | | | | | | | | | | INSERT |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |CAPSLOCK| | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | HOME | PGDN | END |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | PAUSE| | | |
* ,------|------|------| |------+------+------.
* | | | | |SCRLK | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[ARRW] = KEYMAP(
// left hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
_______, _______, _______, KC_UP, _______, _______, _______,
KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
_______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,
_______, KC_PAUSE,
_______,
_______, _______, _______,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SYSREQ,
_______, _______, _______, _______, _______, _______, KC_INS,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, KC_PGUP, _______,
_______, _______, KC_HOME, KC_PGDN, KC_END,
_______, _______,
KC_SLCK,
_______, _______, _______
),
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX); // Linux
//set_unicode_input_mode(UC_OSX); // Mac OSX
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
};
// 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 INTL:
case INSF:
ergodox_right_led_1_on();
break;
case NUMP:
ergodox_right_led_2_on();
break;
case ARRW:
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};

View file

@ -392,7 +392,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
case NotEq: case NotEq:
if (record->event.pressed) { if (record->event.pressed) {
return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END ); // != return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END ); // !=
} }
break; break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View file

@ -0,0 +1,187 @@
// Netable differences vs. the default firmware for the ErgoDox EZ:
// 1. The Cmd key is now on the right side, making Cmd+Space easier.
// 2. The media keys work on OSX (But not on Windows).
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LCtl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| LGui |
* |--------+------+------+------+------+------| BkSp | | Meh |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,---------------.
* | BkSp | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|LANG1 |------| |------|LANG2 |Enter |
* | /LGui| | End | | PgDn | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_BSPC,
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
KC_BSPC, KC_LGUI,
KC_HOME,
MT(MOD_LGUI, KC_SPC),KC_LANG1,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
KC_LALT, CTL_T(KC_ESC),
KC_PGUP,
KC_PGDN,KC_LANG2, KC_ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

View file

@ -0,0 +1,15 @@
# ErgoDox EZ Default Configuration
## Changelog
* Dec 2016:
* Added LED keys
* Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
* Sep 22, 2016:
* Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
* Feb 2, 2016 (V1.1):
* Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
This is what we ship with out of the factory. :) The image says it all:
![Default](default_firmware_v1.2-2.png)

View file

@ -254,7 +254,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -265,17 +265,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

View file

@ -17,7 +17,7 @@
#include "yoruian.h" #include "yoruian.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP\ [0] = KEYMAP_YORUIAN\
(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, (9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8,
ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q,
LC, U, I, A, N, SCLN, M, H, T, S, C, RC, LC, U, I, A, N, SCLN, M, H, T, S, C, RC,
@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
BSPC, RALT, P2, TAB, BSPC, RALT, P2, TAB,
NO, NO, NO, NO,
E, LSFT, NO, NO, ENT, SPC), E, LSFT, NO, NO, ENT, SPC),
[1] = KEYMAP\ [1] = KEYMAP_YORUIAN\
(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, (TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9,
TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT,
TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE,

View file

@ -18,36 +18,32 @@
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#undef KEYMAP #define KEYMAP_YORUIAN( \
#define KEYMAP\ /* Spacial positions. */ \
( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
/* Spacial positions. */ \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \ k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ k55, k56, k57, k58, \
k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \ k54, k59, \
k55, k56, k57, k58, \ k53, k52, k51, k5C, k5B, k5A) \
k54, k59, \ KEYMAP(KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, \
k53, k52, k51, k5C, k5B, k5A) \ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, \
\ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, \
/* Matrix positions. */ \ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, \
{ \ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, \
{ KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \ KC_##k55, KC_##k56, \
{ KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \ KC_##k54, \
{ KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \ KC_##k53, KC_##k52, KC_##k51, \
{ KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \ KC_##k07, KC_##k08, KC_##k09, KC_##k0A, KC_##k0B, KC_##k0C, KC_##k0D, \
{ KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \ KC_##k17, KC_##k18, KC_##k19, KC_##k1A, KC_##k1B, KC_##k1C, KC_##k1D, \
{ KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \ KC_##k28, KC_##k29, KC_##k2A, KC_##k2B, KC_##k2C, KC_##k2D, \
{ KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \ KC_##k37, KC_##k38, KC_##k39, KC_##k3A, KC_##k3B, KC_##k3C, KC_##k3D, \
{ KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \ KC_##k49, KC_##k4A, KC_##k4B, KC_##k4C, KC_##k4D, \
{ KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \ KC_##k57, KC_##k58, \
{ KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \ KC_##k59, \
{ KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \ KC_##k5C, KC_##k5B, KC_##k5A)
{ KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \
{ KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \
{ KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \
}
#define KC_ES KC_ESC #define KC_ES KC_ESC
#define KC_LC KC_LCTL #define KC_LC KC_LCTL

View file

@ -0,0 +1,23 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = 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 # unicodemap
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
TAP_DANCE_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View file

@ -0,0 +1,24 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define TAPPING_TERM 300
#define LEADER_TIMEOUT 400
#define DISABLE_SPACE_CADET_ROLLOVER
#define UNICODE_TYPE_DELAY 0
#define LSPO_KEY KC_9
#define RSPC_KEY KC_0
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
// place overrides here
#endif

View file

@ -0,0 +1,224 @@
#include "frosty_flake.h"
#include "action_layer.h"
#include "eeconfig.h"
#include "process_unicode.h"
#include "process_unicodemap.h"
#include "quantum.h"
#define _______ KC_TRNS
//declarations for tap dancing emojis
void register_hex32(uint32_t hex);
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
void cycleHands(qk_tap_dance_state_t *state, void *user_data);
void tap(uint16_t keycode){
register_code(keycode);
unregister_code(keycode);
};
//Tap Dance Declarations
enum taps{
TD_CTCPS = 0,
EMOJIS,
ANIMAL,
HAND
};
enum unicode_name { // split every five emojis
THINK = 1, // thinking face 🤔
GRIN, // grinning face 😊
SMRK, // smirk 😏
WEARY, // good shit 😩
UNAMU, // unamused 😒
SNEK, // snke 🐍
PENGUIN, // 🐧
DRAGON, // 🐉
MONKEY, // 🐒
CHICK, // 🐥
OKOK, // 👌
EFFU, // 🖕
INUP, // 👆
THUP, // 👍
THDN, // 👎
BBB, // dat B 🅱
POO, // poop 💩
HUNDR, // 100 💯
EGGPL, // EGGPLANT 🍆
WATER, // wet 💦
LIT // fire 🔥
};
enum my_macros {
NEWDESK = 0,
LEFTDESK,
RIGHTDESK,
CLOSEDESK
};
enum quick {
DISFACE = 0,
TFLIP,
TPUT,
SHRUG,
FACE,
RANDIG
};
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// Tap once for CTRL, twice for Caps Lock
[TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
[EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, NULL),
[ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, NULL),
[HAND] = ACTION_TAP_DANCE_FN_ADVANCED(cycleHands, NULL, NULL)
// Other declarations would go here, separated by commas, if you have them
};
// macros
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch(id) {
case NEWDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(D), U(LGUI), U(LCTL), U(D), END ); // NEW DESKTOP
}
break;
case LEFTDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(LEFT), U(LGUI), U(LCTL), U(LEFT), END ); // LEFT DESKTOP
}
break;
case RIGHTDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(RGHT), U(LGUI), U(LCTL), U(RGHT), END ); // RIGHT DESKTOP
}
break;
case CLOSEDESK: // this would trigger when you hit a key mapped as M(0)
if (record->event.pressed) {
return MACRO( I(1), D(LGUI), D(LCTL), D(F4), U(LGUI), U(LCTL), U(F4), END ); // CLOSE DESKTOP
}
break;
}
return MACRO_NONE;
};
// emojis in unicode
const uint32_t PROGMEM unicode_map[] = {
[THINK] = 0x1F914,
[GRIN] = 0x1F600,
[BBB] = 0x1F171,
[POO] = 0x1F4A9,
[HUNDR] = 0x1F4AF,
[SMRK] = 0x1F60F,
[WEARY] = 0x1F629,
[EGGPL] = 0x1F346,
[WATER] = 0x1F4A6,
[LIT] = 0x1F525,
[UNAMU] = 0x1F612,
[SNEK] = 0x1F40D,
[PENGUIN] = 0x1F427,
[MONKEY] = 0x1F412,
[CHICK] = 0x1F425,
[DRAGON] = 0x1F409,
[OKOK] = 0x1F44C,
[EFFU] = 0x1F595,
[INUP] = 0x1F446,
[THDN] = 0x1F44E,
[THUP] = 0x1F44D
};
// Layouts
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSPO,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
[1] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
TD(EMOJIS),TD(ANIMAL),TD(HAND),X(SMRK),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, TG(2),_______ , KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
[2] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, 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_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, KC_D, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, _______, _______, KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
};
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_TWO_KEYS(KC_A, KC_A) { // select all and copy
register_code(KC_LCTL);
tap(KC_A);
tap(KC_C);
unregister_code(KC_LCTL);
}
}
}
void matrix_init_user(void) {
_delay_ms(500);
set_unicode_input_mode(UC_WINC);
};
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count]));
unicode_input_finish();
}
else if(state->count <= 5) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count]));
unicode_input_finish();
}
};
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
unicode_input_finish();
}
else if(state->count <= 5) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
unicode_input_finish();
}
};
void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
unicode_input_finish();
}
else if(state->count <= 5) {
tap(KC_BSPC);
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
unicode_input_finish();
}
};

View file

@ -0,0 +1,24 @@
# The Nikchi's keymap for frosty_flake
### FEATURING
-SPACE CADET
-Caps Lock is now LCTRL
-LCTRL is Tap(LCTRL, Caps Lock)
### LEADER KEY - RALT
COMBOS
-a,a => Select All, Copy
### FN REBINDS for Windows
```
[W] [New Desktop]
[A][S][D] [Left Desk][Delete Desk][Right Desk]
[Ins][Hom][PUp] [RW][PP][FF]
[Del][End][PDn] [MU][VD][VU]
Arrows are Mouskeys, left three mods are clicks
```

View file

@ -115,6 +115,7 @@ inline matrix_row_t matrix_get_row(uint8_t row) {
} }
void matrix_print(void) { void matrix_print(void) {
#ifndef NO_PRINT
print("\nr\\c ABCDEFGHIJKLMNOPQR\n"); print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
matrix_row_t matrix_row = matrix_get_row(row); matrix_row_t matrix_row = matrix_get_row(row);
@ -125,6 +126,7 @@ void matrix_print(void) {
} }
print("\n"); print("\n");
} }
#endif
} }
uint8_t matrix_key_count(void) { uint8_t matrix_key_count(void) {
@ -132,4 +134,4 @@ uint8_t matrix_key_count(void) {
for (uint8_t row = 0; row < MATRIX_ROWS; row++) for (uint8_t row = 0; row < MATRIX_ROWS; row++)
count += bitpop32(matrix[row]); count += bitpop32(matrix[row]);
return count; return count;
} }

View file

@ -54,8 +54,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= yes # Console for debug(+400) CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration COMMAND_ENABLE ?= no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work

View file

@ -121,7 +121,7 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -131,17 +131,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) { switch(id) {
case _DV: case _DV:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DV); persistent_default_layer_set(1UL<<_DV);
} }
break; break;
case _QW: case _QW:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QW); persistent_default_layer_set(1UL<<_QW);
} }
break; break;
case _CM: case _CM:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_CM); persistent_default_layer_set(1UL<<_CM);
} }
break; break;
} }

View file

@ -1 +0,0 @@
#include "MS-sculpt-mobile.h"

View file

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

View file

@ -7,7 +7,8 @@ Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
*/ */
#include "babblePaste.h" #include "../MS_sculpt_mobile/babblePaste.h"
#include "action_macro.h" #include "action_macro.h"
#ifdef USE_BABLPASTE #ifdef USE_BABLPASTE
@ -27,7 +28,7 @@ macro_t* switch_babble_mode( uint8_t id) {
// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 // And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
#define BABLM(ent, macro...) \ #define BABLM(ent, macro...) \
if ( ent == shortcut ) \ if ( ent == shortcut ) \
{ action_macro_play( MACRO(macro)); return MACRO_NONE; } { action_macro_play( MACRO(macro)); return MACRO_NONE; }
/* this function runs the appropriate babblepaste macro, given /* this function runs the appropriate babblepaste macro, given
@ -456,4 +457,4 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
} }
#endif #endif

View file

@ -9,9 +9,9 @@ and jeebak & algernon's keymap
*/ */
#ifndef _babblePaste_h_included__ #ifndef _babblePaste_h_included__
#define _babblePaste_h_included__ #define _babblePaste_h_included__
#include "../MS_sculpt_mobile/config.h"
#include "action_layer.h" #include "action_layer.h"
#include "quantum_keycodes.h" #include "quantum_keycodes.h"
#include "config.h"
#ifdef USE_BABLPASTE #ifdef USE_BABLPASTE

View file

@ -0,0 +1,8 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../../MS_sculpt_mobile/config.h"
// place overrides here
#endif

View file

@ -1,4 +1,4 @@
#include "MS-sculpt-mobile.h" #include "../../MS_sculpt_mobile.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* /*

View file

@ -1,7 +1,7 @@
#ifndef CONFIG_USER_H #ifndef CONFIG_USER_H
#define CONFIG_USER_H #define CONFIG_USER_H
#include "../../config.h" #include "../../../MS_sculpt_mobile/config.h"
#define USE_BABLPASTE #define USE_BABLPASTE

View file

@ -1,7 +1,7 @@
#include "MS-sculpt-mobile.h" #include "../../../MS_sculpt_mobile/babblePaste.h"
#include "../../MS_sculpt_mobile.h"
#include "action_layer.h" #include "action_layer.h"
#include "action_util.h" #include "action_util.h"
#include "babblePaste.h"
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
#include "audio.h" #include "audio.h"

View file

@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,----+----+----+----+----+----. ,----+----+----+----+----+----. //,----+----+----+----+----+----. ,----+----+----+----+----+----.
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
//|----+----+----+----+----+----| |----+----+----+----+----+----| //|----+----+----+----+----+----| |----+----+----+----+----+----|
LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----| //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
@ -147,7 +147,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

View file

@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif #endif
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
} }
@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0); PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0); PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0); PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif #endif
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;

View file

@ -0,0 +1,15 @@
#define COLOR_BLANK 0, 0, 0
#define COLOR_BLACK 0, 0, 0
#define COLOR_WHITE 15,15,15
#define COLOR_GRAY 7, 7, 7
#define COLOR_RED 15, 0, 0
#define COLOR_GREEN 0,15, 0
#define COLOR_BLUE 0, 0,15
#define COLOR_YELLOW 15,15, 0
#define COLOR_MAGENTA 15, 0,15
#define COLOR_CYAN 0,15,15
#define COLOR_ORANGE 15, 5, 0

View file

@ -35,12 +35,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DESCRIPTION #define DESCRIPTION
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 6 #define MATRIX_COLS 6
#define MATRIX_ROWS 9
/* default pin-out */ /* default pin-out */
#define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 } #define MATRIX_COL_PINS { F4, F1, F0, D6, D0, D1 }
#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } #define MATRIX_ROW_PINS { F5, F6, F7 }
#define TRACKPOINT_PINS { B7, B6, D7 }
#define UNUSED_PINS #define UNUSED_PINS
/* /*
@ -152,17 +153,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
#define PS2_INIT_DELAY 2000 #define PS2_MOUSE_INIT_DELAY 2000
#define BATTERY_PIN 9 #define BATTERY_PIN 9
#define BATTERY_POLL 30000 #define BATTERY_POLL 30000
#define MAX_VOLTAGE 4.2 #define MAX_VOLTAGE 4.2
#define MIN_VOLTAGE 3.2 #define MIN_VOLTAGE 3.2
#define ___ KC_NO
#define KEYMAP( \ #define KEYMAP( \
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
tp1, tp2, tp3 \
) \ ) \
{ \ { \
{k11, k12, k13, k14, k15, k16}, \ {k11, k12, k13, k14, k15, k16}, \
@ -172,25 +176,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{k17, k18, k19, k1a, k1b, k1c}, \ {k17, k18, k19, k1a, k1b, k1c}, \
{k27, k28, k29, k2a, k2b, k2c}, \ {k27, k28, k29, k2a, k2b, k2c}, \
{k37, k38, k39, k3a, k3b, k3c}, \ {k37, k38, k39, k3a, k3b, k3c}, \
{k47, k48, k49, k4a, k4b, k4c} \ {k47, k48, k49, k4a, k4b, k4c}, \
{tp1, tp2, tp3, ___, ___, ___} \
} }
#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file #ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file
enum led_sequence { enum led_sequence {
LED_IND_LINUX,
LED_IND_APPLE,
LED_IND_WINDOWS,
LED_IND_QWERTY,
LED_IND_ALT,
LED_IND_AUDIO,
LED_IND_BLUETOOTH, LED_IND_BLUETOOTH,
LED_IND_USB, LED_IND_USB,
LED_IND_BATTERY,
LED_IND_BATTERY,
LED_IND_CAPSLOCK,
LED_IND_GUI,
LED_IND_FUN, LED_IND_FUN,
LED_IND_NUM, LED_IND_NUM,
LED_IND_PUNC,
LED_IND_EMOJI, LED_IND_EMOJI,
LED_IND_GREEK,
LED_BKSP, LED_BKSP,
LED_ENT, LED_ENT,
LED_RSFT, LED_RSFT,
LED_RCTL, LED_RCTL,
LED_RGUI, LED_RALT,
LED_SLSH, LED_SLSH,
LED_SCLN, LED_SCLN,
LED_P, LED_P,
@ -198,9 +213,9 @@ enum led_sequence {
LED_O, LED_O,
LED_L, LED_L,
LED_DOT, LED_DOT,
LED_RALT, LED_RGUI,
LED_EMOJI, LED_GREEK,
LED_COMM, LED_COMM,
LED_K, LED_K,
LED_I, LED_I,
@ -219,35 +234,35 @@ enum led_sequence {
LED_TRACKPOINT2, LED_TRACKPOINT2,
LED_TRACKPOINT1, LED_TRACKPOINT1,
LED_LSPC,
LED_B,
LED_G,
LED_T, LED_T,
LED_G,
LED_B,
LED_LSPC,
LED_R,
LED_F,
LED_V,
LED_NUM, LED_NUM,
LED_V,
LED_F,
LED_R,
LED_PUNC,
LED_C,
LED_D,
LED_E, LED_E,
LED_D,
LED_W, LED_C,
LED_S, LED_EMPTY,
LED_X,
LED_LALT,
LED_LGUI, LED_LGUI,
LED_Z, LED_X,
LED_A, LED_S,
LED_Q, LED_W,
LED_Q,
LED_A,
LED_Z,
LED_LALT,
LED_TAB,
LED_ESC,
LED_LSFT,
LED_LCTL, LED_LCTL,
LED_LSFT,
LED_ESC,
LED_TAB,
LED_TOTAL LED_TOTAL
}; };
@ -261,7 +276,7 @@ enum led_sequence {
# define PS2_CLOCK_PORT PORTD # define PS2_CLOCK_PORT PORTD
# define PS2_CLOCK_PIN PIND # define PS2_CLOCK_PIN PIND
# define PS2_CLOCK_DDR DDRD # define PS2_CLOCK_DDR DDRD
# define PS2_CLOCK_BIT 1 # define PS2_CLOCK_BIT 3
# define PS2_DATA_PORT PORTD # define PS2_DATA_PORT PORTD
# define PS2_DATA_PIN PIND # define PS2_DATA_PIN PIND
# define PS2_DATA_DDR DDRD # define PS2_DATA_DDR DDRD

View file

@ -19,6 +19,8 @@ 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. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
PS2_MOUSE_ENABLE = yes PS2_MOUSE_ENABLE = yes
PS2_USE_INT = yes PS2_USE_INT = yes
FAUXCLICKY_ENABLE = yes
BLUETOOTH = AdafruitBLE
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

View file

@ -37,8 +37,8 @@ On Promethium, USB or Bluetooth output is detected on startup. If USB is connect
SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively. SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively.
On Planck, SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases.
On Promethium there are 6 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 57 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. On Promethium there are 16 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 67 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes.
On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty.

View file

@ -14,6 +14,7 @@
#define PREVENT_STUCK_MODIFIERS #define PREVENT_STUCK_MODIFIERS
#define RGBSPS_ENABLE #define RGBSPS_ENABLE
#define RGBSPS_DEMO_ENABLE
#define UNICODE_TYPE_DELAY 0 #define UNICODE_TYPE_DELAY 0

View file

@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h" #include "quantum.h"
#ifdef RGBSPS_ENABLE #ifdef RGBSPS_ENABLE
#include "rgbsps.h" #include "rgbsps.h"
#include "rgbtheme.h"
#endif #endif
#ifdef PS2_MOUSE_ENABLE #ifdef PS2_MOUSE_ENABLE
#include "ps2_mouse.h" #include "ps2_mouse.h"
@ -38,6 +39,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
#ifdef FAUXCLICKY_ENABLE #ifdef FAUXCLICKY_ENABLE
#include "fauxclicky.h" #include "fauxclicky.h"
#ifdef RGBSPS_ENABLE
#undef FAUXCLICKY_OFF
#define FAUXCLICKY_OFF do { \
fauxclicky_enabled = false; \
rgbsps_set(LED_AUDIO, COLOR_BLANK); \
fauxclicky_stop(); \
} while (0)
#undef FAUXCLICKY_ON
#define FAUXCLICKY_ON do { \
fauxclicky_enabled = true; \
rgbsps_set(LED_AUDIO, THEME_COLOR_AUDIO); \
} while (0)
#endif
#endif #endif
#include "outputselect.h" #include "outputselect.h"
#include "led.h" #include "led.h"
@ -128,9 +142,10 @@ enum planck_keycodes {
#ifndef FAUXCLICKY_ENABLE #ifndef FAUXCLICKY_ENABLE
FC_TOG, FC_TOG,
#endif #endif
#ifndef ADAFRUIT_BLE_ENABLE #ifndef MODULE_ADAFRUIT_BLE
OUT_BLE, OUT_BT,
#endif #endif
RGBDEMO,
KEYCODE_END KEYCODE_END
}; };
@ -421,19 +436,30 @@ const uint8_t PROGMEM LED_MODS[] = {
}; };
const uint8_t PROGMEM LED_FN[] = { const uint8_t PROGMEM LED_FN[] = {
LED_PUNC, LED_EMPTY,
LED_NUM, LED_NUM,
LED_FUN, LED_FUN,
LED_EMOJI LED_GREEK
}; };
const uint8_t PROGMEM LED_INDICATORS[] = { const uint8_t PROGMEM LED_INDICATORS[] = {
LED_IND_EMOJI, LED_IND_LINUX,
LED_IND_NUM, LED_IND_APPLE,
LED_IND_FUN, LED_IND_WINDOWS,
LED_IND_BATTERY, LED_IND_QWERTY,
LED_IND_USB, LED_IND_ALT,
LED_IND_AUDIO,
LED_IND_BLUETOOTH, LED_IND_BLUETOOTH,
LED_IND_USB,
LED_IND_BATTERY,
LED_IND_CAPSLOCK,
LED_IND_GUI,
LED_IND_FUN,
LED_IND_NUM,
LED_IND_PUNC,
LED_IND_EMOJI,
LED_IND_GREEK,
}; };
const uint8_t PROGMEM LED_TRACKPOINT[] = { const uint8_t PROGMEM LED_TRACKPOINT[] = {
@ -444,16 +470,37 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = {
void led_turnoff_keys(void) { void led_turnoff_keys(void) {
for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), COLOR_BLACK);
} }
for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0); rgbsps_set(pgm_read_byte(&LED_MODS[i]), COLOR_BLACK);
} }
for(uint8_t i = 0; i < COUNT(LED_FN); i++) { for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0); rgbsps_set(pgm_read_byte(&LED_FN[i]), COLOR_BLACK);
} }
} }
#ifdef RGBSPS_DEMO_ENABLE
void led_demo(void) {
rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX);
rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE);
rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS);
rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY);
rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT);
rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH);
rgbsps_set(LED_IND_USB, THEME_COLOR_USB);
rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI);
rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN);
rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM);
rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC);
rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK);
rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI);
rgbsps_send();
}
#endif
void led_reset(void) { void led_reset(void) {
switch (glow_mode) { switch (glow_mode) {
case GLOW_NONE: case GLOW_NONE:
@ -462,39 +509,55 @@ void led_reset(void) {
case GLOW_MIN: case GLOW_MIN:
led_turnoff_keys(); led_turnoff_keys();
for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 8, 8, 8); rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW1_HOME);
} }
rgbsps_set(LED_F, 15, 0, 0); rgbsps_set(LED_F, THEME_COLOR_GLOW1_HOMING);
rgbsps_set(LED_J, 15, 0, 0); rgbsps_set(LED_J, THEME_COLOR_GLOW1_HOMING);
break; break;
case GLOW_FULL: case GLOW_FULL:
for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 8, 8, 8); rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), THEME_COLOR_GLOW2_ALPHA);
} }
for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 15, 0); rgbsps_set(pgm_read_byte(&LED_MODS[i]), THEME_COLOR_GLOW2_MODS);
} }
for(uint8_t i = 0; i < COUNT(LED_FN); i++) { for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 15); rgbsps_set(pgm_read_byte(&LED_FN[i]), THEME_COLOR_GLOW2_FN);
} }
for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 15, 0, 0); rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW2_HOME);
} }
rgbsps_set(LED_F, 15, 15, 0); rgbsps_set(LED_F, THEME_COLOR_GLOW2_HOMING);
rgbsps_set(LED_J, 15, 15, 0); rgbsps_set(LED_J, THEME_COLOR_GLOW2_HOMING);
break; break;
} }
} }
void led_set_default_layer_indicator(void) {
uint8_t default_layer = biton32(default_layer_state);
if (default_layer == _QWERTY) {
rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY);
rgbsps_set(LED_IND_ALT, COLOR_BLANK);
} else {
rgbsps_set(LED_IND_QWERTY, COLOR_BLANK);
rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT);
}
rgbsps_send();
return;
}
void led_set_layer_indicator(void) { void led_set_layer_indicator(void) {
static uint8_t oldlayer = 255; static uint8_t oldlayer = 255;
rgbsps_set(LED_IND_FUN, 0, 0, 0);
// rgbsps_set(LED_IND_NUM, 0, 0, 0);
rgbsps_set(LED_IND_EMOJI, 0, 0, 0);
led_reset(); led_reset();
rgbsps_set(LED_IND_GUI, COLOR_BLANK);
rgbsps_set(LED_IND_FUN, COLOR_BLANK);
rgbsps_set(LED_IND_NUM, COLOR_BLANK);
rgbsps_set(LED_IND_PUNC, COLOR_BLANK);
rgbsps_set(LED_IND_GREEK, COLOR_BLANK);
rgbsps_set(LED_IND_EMOJI, COLOR_BLANK);
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);
if (oldlayer == layer) { if (oldlayer == layer) {
return; return;
@ -508,39 +571,72 @@ void led_set_layer_indicator(void) {
} }
switch(layer) { switch(layer) {
case _FUN: case _GUI:
rgbsps_set(LED_IND_FUN, 15, 0, 0); rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI);
break;
case _FUN:
rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN);
break;
case _NUM:
rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM);
break;
case _PUNC:
rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC);
break;
case _GREEKL:
case _GREEKU:
rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK);
break; break;
// case _NUM:
// rgbsps_set(LED_IND_NUM, 0, 0, 15);
// break;
case _EMOJI: case _EMOJI:
rgbsps_set(LED_IND_EMOJI, 15, 15, 0); rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI);
break; break;
default: default:
rgbsps_set(LED_IND_FUN, 3, 3, 3); rgbsps_set(LED_IND_GUI, THEME_COLOR_OTHERLAYER);
// rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_FUN, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_EMOJI, 3, 3, 3); rgbsps_set(LED_IND_NUM, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_PUNC, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_GREEK, THEME_COLOR_OTHERLAYER);
rgbsps_set(LED_IND_EMOJI, THEME_COLOR_OTHERLAYER);
} }
rgbsps_send(); rgbsps_send();
} }
void led_set_unicode_input_mode(void) {
rgbsps_set(LED_IND_LINUX, COLOR_BLANK);
rgbsps_set(LED_IND_APPLE, COLOR_BLANK);
rgbsps_set(LED_IND_WINDOWS, COLOR_BLANK);
switch (get_unicode_input_mode()) {
case UC_LNX:
rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX);
break;
case UC_OSX:
rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE);
break;
case UC_WIN:
case UC_WINC:
rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS);
break;
}
rgbsps_send();
}
void led_set_output_ble(void) { void led_set_output_ble(void) {
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH);
rgbsps_set(LED_IND_USB, 0, 0, 0); rgbsps_set(LED_IND_USB, COLOR_BLANK);
rgbsps_send(); rgbsps_send();
} }
void led_set_output_usb(void) { void led_set_output_usb(void) {
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0); rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK);
rgbsps_set(LED_IND_USB, 15, 15, 15); rgbsps_set(LED_IND_USB, THEME_COLOR_USB);
rgbsps_send(); rgbsps_send();
} }
void led_set_output_none(void) { void led_set_output_none(void) {
rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0); rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK);
rgbsps_set(LED_IND_USB, 0, 0, 0); rgbsps_set(LED_IND_USB, COLOR_BLANK);
rgbsps_send(); rgbsps_send();
} }
@ -549,10 +645,30 @@ void led_init(void) {
rgbsps_turnoff(); rgbsps_turnoff();
// set trackpoint color // set trackpoint color
rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); rgbsps_set(LED_TRACKPOINT1, THEME_COLOR_TP1);
rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); rgbsps_set(LED_TRACKPOINT2, THEME_COLOR_TP2);
rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); rgbsps_set(LED_TRACKPOINT3, THEME_COLOR_TP3);
// unicode input mode
led_set_unicode_input_mode();
// layer indicator
led_set_layer_indicator();
led_set_default_layer_indicator();
// clicky
#ifdef FAUXCLICKY_ENABLE
if (fauxclicky_enabled) {
rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
} else {
rgbsps_set(LED_IND_AUDIO, COLOR_BLANK);
}
#endif
rgbsps_send();
} }
#endif // RGBSPS_ENABLE #endif // RGBSPS_ENABLE
// keymaps // keymaps
@ -574,7 +690,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT ,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, 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_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL,
_______, _______, _______
), ),
/* Dvorak /* Dvorak
@ -593,7 +710,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______,
_______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
#endif #endif
@ -614,7 +732,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
#endif #endif
@ -635,7 +754,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______,
_______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______,
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
#endif #endif
@ -656,7 +776,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
#endif #endif
@ -675,7 +796,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______,
KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______,
KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______,
_______, _______, _______
), ),
/* Num /* Num
@ -690,10 +812,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_NUM] = KEYMAP( [_NUM] = KEYMAP(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______,
KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______,
_______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______ _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______,
_______, _______, _______
), ),
/* Func /* Func
@ -711,7 +834,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL,
KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______,
_______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
/* Uppercase Greek /* Uppercase Greek
@ -729,7 +853,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______,
_______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______,
_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
/* Lowercase Greek /* Lowercase Greek
@ -747,7 +872,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______,
_______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______,
_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
/* Empty /* Empty
@ -765,7 +891,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______
), ),
/* Emoji /* Emoji
@ -783,7 +910,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW),
X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS),
X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH),
X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK) X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK),
_______, _______, _______
), ),
/* GUI /* GUI
@ -801,7 +929,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX,
KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, 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,
_______, _______, _______
), ),
/* Sys /* Sys
@ -816,18 +945,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
*/ */
[_SYS] = KEYMAP( [_SYS] = KEYMAP(
XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO,
XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
_______, _______, _______
), ),
}; };
void persistant_default_layer_set(uint16_t default_layer) { void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer); eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer); default_layer_set(default_layer);
#ifdef RGBSPS_ENABLE
led_set_default_layer_indicator();
#endif
} }
#ifdef DOUBLESPACE_LAYER_ENABLE #ifdef DOUBLESPACE_LAYER_ENABLE
@ -1001,14 +1134,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// layout switchers // layout switchers
case QWERTY: case QWERTY:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY); persistent_default_layer_set(1UL<<_QWERTY);
} }
return false; return false;
break; break;
#ifdef LAYOUT_DVORAK #ifdef LAYOUT_DVORAK
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_DVORAK); persistent_default_layer_set(1UL<<_DVORAK);
} }
return false; return false;
break; break;
@ -1016,7 +1149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_COLEMAK #ifdef LAYOUT_COLEMAK
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_COLEMAK); persistent_default_layer_set(1UL<<_COLEMAK);
} }
return false; return false;
break; break;
@ -1024,7 +1157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_WORKMAN #ifdef LAYOUT_WORKMAN
case WORKMAN: case WORKMAN:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_WORKMAN); persistent_default_layer_set(1UL<<_WORKMAN);
} }
return false; return false;
break; break;
@ -1032,7 +1165,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef LAYOUT_NORMAN #ifdef LAYOUT_NORMAN
case NORMAN: case NORMAN:
if (record->event.pressed) { if (record->event.pressed) {
persistant_default_layer_set(1UL<<_NORMAN); persistent_default_layer_set(1UL<<_NORMAN);
} }
return false; return false;
break; break;
@ -1072,14 +1205,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// OS switchers // OS switchers
case LINUX: case LINUX:
set_unicode_input_mode(UC_LNX); set_unicode_input_mode(UC_LNX);
#ifdef RGBSPS_ENABLE
led_set_unicode_input_mode();
#endif
return false; return false;
break; break;
case WIN: case WIN:
set_unicode_input_mode(UC_WINC); set_unicode_input_mode(UC_WINC);
#ifdef RGBSPS_ENABLE
led_set_unicode_input_mode();
#endif
return false; return false;
break; break;
case OSX: case OSX:
set_unicode_input_mode(UC_OSX); set_unicode_input_mode(UC_OSX);
#ifdef RGBSPS_ENABLE
led_set_unicode_input_mode();
#endif
return false; return false;
break; break;
@ -1101,20 +1243,35 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// faux clicky indicator // faux clicky indicator
#ifdef FAUXCLICKY_ENABLE #ifdef FAUXCLICKY_ENABLE
case FC_TOG: case FC_TOG:
#ifdef RGBSPS_ENABLE
if (fauxclicky_enabled) {
rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO);
} else {
rgbsps_set(LED_IND_AUDIO, COLOR_BLANK);
}
rgbsps_send();
#endif
return true; return true;
break; break;
#endif #endif
#ifdef RGBSPS_DEMO_ENABLE
case RGBDEMO:
led_demo();
return false;
break;
#endif
} }
return true; return true;
} }
void set_output_user(uint8_t output) { void set_output_user(uint8_t output) {
#ifdef ADAFRUIT_BLE_ENABLE #ifdef MODULE_ADAFRUIT_BLE
switch(output) { switch(output) {
case OUTPUT_USB: case OUTPUT_USB:
led_set_output_usb(); led_set_output_usb();
break; break;
case OUTPUT_ADAFRUIT_BLE: case OUTPUT_BLUETOOTH:
led_set_output_ble(); led_set_output_ble();
break; break;
default: default:
@ -1133,12 +1290,12 @@ void matrix_init_user() {
#endif #endif
// auto detect output on init // auto detect output on init
#ifdef ADAFRUIT_BLE_ENABLE #ifdef MODULE_ADAFRUIT_BLE
uint8_t output = auto_detect_output(); uint8_t output = auto_detect_output();
if (output == OUTPUT_USB) { if (output == OUTPUT_USB) {
set_output(OUTPUT_USB); set_output(OUTPUT_USB);
} else { } else {
set_output(OUTPUT_ADAFRUIT_BLE); set_output(OUTPUT_BLUETOOTH);
} }
#endif #endif
} }
@ -1164,9 +1321,9 @@ void turn_off_capslock() {
bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK); bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
if (new_capslock ^ capslock) { // capslock state is different if (new_capslock ^ capslock) { // capslock state is different
if ((capslock = new_capslock)) { if ((capslock = new_capslock)) {
rgbsps_set(LED_IND_NUM, 15, 0, 0); rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK);
} else { } else {
rgbsps_set(LED_IND_NUM, 0, 0, 0); rgbsps_set(LED_IND_CAPSLOCK, COLOR_BLANK);
} }
rgbsps_send(); rgbsps_send();
} }

View file

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

View file

@ -0,0 +1,36 @@
#include "color.h"
#define THEME_COLOR_LINUX COLOR_WHITE
#define THEME_COLOR_APPLE COLOR_WHITE
#define THEME_COLOR_WINDOWS COLOR_WHITE
#define THEME_COLOR_QWERTY COLOR_RED
#define THEME_COLOR_ALT COLOR_RED
#define THEME_COLOR_AUDIO COLOR_GREEN
#define THEME_COLOR_BLUETOOTH 7,7,15
#define THEME_COLOR_USB COLOR_WHITE
#define THEME_COLOR_CAPSLOCK COLOR_RED
#define THEME_COLOR_GUI COLOR_MAGENTA
#define THEME_COLOR_FUN COLOR_RED
#define THEME_COLOR_NUM 7,7,15
#define THEME_COLOR_PUNC COLOR_GREEN
#define THEME_COLOR_GREEK COLOR_CYAN
#define THEME_COLOR_EMOJI COLOR_YELLOW
#define THEME_COLOR_OTHERLAYER COLOR_GRAY
#define THEME_COLOR_GLOW1_HOME COLOR_ORANGE
#define THEME_COLOR_GLOW1_HOMING COLOR_RED
#define THEME_COLOR_GLOW2_ALPHA COLOR_ORANGE
#define THEME_COLOR_GLOW2_MODS COLOR_ORANGE
#define THEME_COLOR_GLOW2_FN COLOR_ORANGE
#define THEME_COLOR_GLOW2_HOME COLOR_ORANGE
#define THEME_COLOR_GLOW2_HOMING COLOR_RED
#define THEME_COLOR_TP1 COLOR_ORANGE
#define THEME_COLOR_TP2 COLOR_RED
#define THEME_COLOR_TP3 COLOR_ORANGE

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