Merge branch 'master' into coderkun_neo2
@ -0,0 +1,226 @@
|
||||
ifndef VERBOSE
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
include common.mk
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP)
|
||||
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)_$(SUBPROJECT)
|
||||
else
|
||||
TARGET ?= $(KEYBOARD)_$(KEYMAP)
|
||||
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD)
|
||||
endif
|
||||
|
||||
# Force expansion
|
||||
TARGET := $(TARGET)
|
||||
|
||||
|
||||
MASTER ?= left
|
||||
ifdef master
|
||||
MASTER = $(master)
|
||||
endif
|
||||
|
||||
ifeq ($(MASTER),right)
|
||||
OPT_DEFS += -DMASTER_IS_ON_RIGHT
|
||||
else
|
||||
ifneq ($(MASTER),left)
|
||||
$(error MASTER does not have a valid value(left/right))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
KEYBOARD_PATH := keyboards/$(KEYBOARD)
|
||||
KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_C))","")
|
||||
include $(KEYBOARD_PATH)/rules.mk
|
||||
else
|
||||
$(error "$(KEYBOARD_C)" does not exist)
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT)
|
||||
SUBPROJECT_C := $(SUBPROJECT_PATH)/$(SUBPROJECT).c
|
||||
ifneq ("$(wildcard $(SUBPROJECT_C))","")
|
||||
OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
|
||||
include $(SUBPROJECT_PATH)/rules.mk
|
||||
else
|
||||
$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
|
||||
endif
|
||||
endif
|
||||
|
||||
# We can assume a ChibiOS target When MCU_FAMILY is defined, since it's not used for LUFA
|
||||
ifdef MCU_FAMILY
|
||||
PLATFORM=CHIBIOS
|
||||
else
|
||||
PLATFORM=AVR
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
include $(TMK_PATH)/protocol/chibios.mk
|
||||
include $(TMK_PATH)/chibios.mk
|
||||
OPT_OS = chibios
|
||||
ifneq ("$(wildcard $(SUBPROJECT_PATH)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(SUBPROJECT_PATH)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(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)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH)/bootloader_defs.h
|
||||
else ifneq ("$(wildcard $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||
OPT_DEFS += -include $(KEYBOARD_PATH)/boards/$(BOARD)/bootloader_defs.h
|
||||
endif
|
||||
endif
|
||||
|
||||
CONFIG_H = $(KEYBOARD_PATH)/config.h
|
||||
ifneq ($(SUBPROJECT),)
|
||||
ifneq ("$(wildcard $(SUBPROJECT_C))","")
|
||||
CONFIG_H = $(SUBPROJECT_PATH)/config.h
|
||||
endif
|
||||
endif
|
||||
|
||||
# Save the defines and includes here, so we don't include any keymap specific ones
|
||||
PROJECT_DEFS := $(OPT_DEFS)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
|
||||
PROJECT_CONFIG := $(CONFIG_H)
|
||||
|
||||
MAIN_KEYMAP_PATH := $(KEYBOARD_PATH)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_C := $(MAIN_KEYMAP_PATH)/keymap.c
|
||||
SUBPROJ_KEYMAP_PATH := $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
|
||||
SUBPROJ_KEYMAP_C := $(SUBPROJ_KEYMAP_PATH)/keymap.c
|
||||
ifneq ("$(wildcard $(SUBPROJ_KEYMAP_C))","")
|
||||
-include $(SUBPROJ_KEYMAP_PATH)/Makefile
|
||||
KEYMAP_C := $(SUBPROJ_KEYMAP_C)
|
||||
KEYMAP_PATH := $(SUBPROJ_KEYMAP_PATH)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","")
|
||||
-include $(MAIN_KEYMAP_PATH)/Makefile
|
||||
KEYMAP_C := $(MAIN_KEYMAP_C)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH)
|
||||
else
|
||||
$(error "$(MAIN_KEYMAP_C)/keymap.c" does not exist)
|
||||
endif
|
||||
|
||||
|
||||
# Object files directory
|
||||
# To put object files in current directory, use a dot (.), do NOT make
|
||||
# this an empty or blank macro!
|
||||
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
|
||||
|
||||
|
||||
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||
CONFIG_H = $(KEYMAP_PATH)/config.h
|
||||
endif
|
||||
|
||||
# # project specific files
|
||||
SRC += $(KEYBOARD_C) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
SRC += $(SUBPROJECT_C)
|
||||
endif
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
SRC += $(QUANTUM_DIR)/matrix.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
OPT_DEFS += -DMIDI_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||
OPT_DEFS += $(SERIAL_DEFS)
|
||||
VAPTH += $(SERIAL_PATH)
|
||||
endif
|
||||
|
||||
# Optimize size but this may cause error "relocation truncated to fit"
|
||||
#EXTRALDFLAGS = -Wl,--relax
|
||||
|
||||
# Search Path
|
||||
VPATH += $(KEYMAP_PATH)
|
||||
ifneq ($(SUBPROJECT),)
|
||||
VPATH += $(SUBPROJECT_PATH)
|
||||
endif
|
||||
VPATH += $(KEYBOARD_PATH)
|
||||
VPATH += $(COMMON_VPATH)
|
||||
|
||||
|
||||
include $(TMK_PATH)/common.mk
|
||||
SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
include $(TMK_PATH)/protocol/lufa.mk
|
||||
include $(TMK_PATH)/avr.mk
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
||||
VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer
|
||||
include $(VISUALIZER_PATH)/visualizer.mk
|
||||
endif
|
||||
|
||||
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
||||
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
||||
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
||||
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
|
||||
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC)
|
||||
$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS)
|
||||
$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
all: build sizeafter
|
||||
|
||||
# Change the build target to build a HEX file or a library.
|
||||
build: elf hex
|
||||
#build: elf hex eep lss sym
|
||||
#build: lib
|
||||
|
||||
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
@ -0,0 +1,57 @@
|
||||
ifndef VERBOSE
|
||||
.SILENT:
|
||||
endif
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
include common.mk
|
||||
|
||||
TARGET=test/$(TEST)
|
||||
|
||||
GTEST_OUTPUT = $(BUILD_DIR)/gtest
|
||||
|
||||
TEST_OBJ = $(BUILD_DIR)/test_obj
|
||||
|
||||
OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
|
||||
|
||||
GTEST_INC := \
|
||||
$(LIB_PATH)/googletest/googletest/include\
|
||||
$(LIB_PATH)/googletest/googlemock/include\
|
||||
|
||||
GTEST_INTERNAL_INC :=\
|
||||
$(LIB_PATH)/googletest/googletest\
|
||||
$(LIB_PATH)/googletest/googlemock
|
||||
|
||||
$(GTEST_OUTPUT)_SRC :=\
|
||||
googletest/src/gtest-all.cc\
|
||||
googletest/src/gtest_main.cc\
|
||||
googlemock/src/gmock-all.cc
|
||||
|
||||
$(GTEST_OUTPUT)_DEFS :=
|
||||
$(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC)
|
||||
|
||||
LDFLAGS += -lstdc++ -lpthread -shared-libgcc
|
||||
CREATE_MAP := no
|
||||
|
||||
VPATH +=\
|
||||
$(LIB_PATH)/googletest\
|
||||
$(LIB_PATH)/googlemock
|
||||
|
||||
all: elf
|
||||
|
||||
VPATH += $(COMMON_VPATH)
|
||||
|
||||
include $(TMK_PATH)/common.mk
|
||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||
|
||||
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
||||
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
||||
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
||||
|
||||
include $(TMK_PATH)/native.mk
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
||||
|
||||
$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
|
||||
$(shell mkdir -p $(TEST_OBJ) 2>/dev/null)
|
||||
|
@ -0,0 +1,26 @@
|
||||
include message.mk
|
||||
|
||||
# Directory common source files exist
|
||||
TOP_DIR = .
|
||||
TMK_DIR = tmk_core
|
||||
TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
|
||||
LIB_PATH = $(TOP_DIR)/lib
|
||||
|
||||
QUANTUM_DIR = quantum
|
||||
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
|
||||
|
||||
BUILD_DIR := $(TOP_DIR)/.build
|
||||
|
||||
SERIAL_DIR := $(QUANTUM_DIR)/serial_link
|
||||
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
||||
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
||||
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
||||
|
||||
COMMON_VPATH := $(TOP_DIR)
|
||||
COMMON_VPATH += $(TMK_PATH)
|
||||
COMMON_VPATH += $(QUANTUM_PATH)
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||
COMMON_VPATH += $(SERIAL_PATH)
|
@ -1,70 +1,3 @@
|
||||
|
||||
|
||||
# Target file name (without extension).
|
||||
|
||||
# project specific files
|
||||
SRC = led.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u2
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,66 @@
|
||||
|
||||
|
||||
# Target file name (without extension).
|
||||
|
||||
# project specific files
|
||||
SRC = led.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u2
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
@ -1,70 +1,3 @@
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870)
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,66 @@
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870)
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
@ -1,74 +1,3 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,70 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
@ -1,73 +1,3 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,69 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
@ -0,0 +1,48 @@
|
||||
#include "atreus.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 _QW 0
|
||||
#define _RS 1
|
||||
#define _LW 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = { /* Qwerty */
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
|
||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
|
||||
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
|
||||
},
|
||||
[_RS] = { /* [> RAISE <] */
|
||||
{KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
||||
{KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
||||
{KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS},
|
||||
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
|
||||
},
|
||||
[_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_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET}
|
||||
}};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,96 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
|
||||
/* Make Overloaded Keys switch faster */
|
||||
#define TAPPING_TERM 150
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Technomancy
|
||||
#define PRODUCT Atreus
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 11
|
||||
|
||||
// Change this to how you wired your keyboard
|
||||
// COLS: Left to right, ROWS: Top to bottom
|
||||
#if defined(ATREUS_ASTAR)
|
||||
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
||||
#if defined(PCBDOWN)
|
||||
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
||||
#else
|
||||
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
||||
#endif
|
||||
# define UNUSED_PINS
|
||||
#elif defined(ATREUS_TEENSY2)
|
||||
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
||||
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
||||
# define UNUSED_PINS
|
||||
#endif
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@ -0,0 +1,61 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include "atreus.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 BASE 0
|
||||
#define NUMS 1
|
||||
#define MOUS 2
|
||||
|
||||
// Some quick aliases, just to make it look pretty
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP( /* Qwerty */
|
||||
KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,
|
||||
KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN ,
|
||||
SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT),
|
||||
KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ),
|
||||
|
||||
[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */
|
||||
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC,
|
||||
KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC,
|
||||
_______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______,
|
||||
_______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[MOUS] = KEYMAP( /* Mouse and Media Keys */
|
||||
KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4,
|
||||
KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3,
|
||||
KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2,
|
||||
_______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1)
|
||||
};
|
||||
|
||||
|
||||
// I prefer this layer switching strategy to the TG and MO functions.
|
||||
// so that I can get out of mouse mode just by tapping/holding my base layer FN key.
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0
|
||||
[NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
|
||||
[MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,66 @@
|
||||
// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer.
|
||||
|
||||
#include "atreus.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_colemak.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
#define ALPH 0
|
||||
#define NUMS 1
|
||||
#define CURS 2
|
||||
#define SYMB 3
|
||||
#define FKEY 4
|
||||
|
||||
// Some handy macros to keep the keymaps clean and easier to maintain
|
||||
#define KM_SAVE LGUI(CM_S)
|
||||
#define KM_CLSE LGUI(CM_W)
|
||||
#define KM_OPEN LGUI(CM_O)
|
||||
|
||||
#define KM_COPY LGUI(KC_C)
|
||||
#define KM_CUT LGUI(KC_X)
|
||||
#define KM_PAST LGUI(KC_V)
|
||||
#define KM_UNDO LGUI(KC_Z)
|
||||
#define KM_REDO LGUI(LSFT(KC_Z))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[ALPH] = {
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P},
|
||||
{KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN},
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
|
||||
{KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL}
|
||||
},
|
||||
[NUMS] = {
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH},
|
||||
{KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR},
|
||||
{KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS}
|
||||
},
|
||||
[CURS] = {
|
||||
{KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS},
|
||||
{KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS},
|
||||
{KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[SYMB] = {
|
||||
{KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC},
|
||||
{KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD},
|
||||
{KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC},
|
||||
{KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[FKEY] = {
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
}};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {}
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,45 @@
|
||||
Jeremy's Atreus Key Mapping
|
||||
===========================
|
||||
|
||||
I am a programmer by trade that suffers from the beginning stages of RSI. As a programmer I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, for me. I made heavy use of momentary layer toggling.
|
||||
|
||||
My layout is also geared toward a software based Colemak mapping. I would like it to be hardware, but I use my Laptop on the go frequently and thus my laptop keyboard. I have moved the keycaps to reflect the Colemak layout. My laptop is a MacBook Pro (2015).
|
||||
|
||||
## Main Layers
|
||||
|
||||
1. [Letters](http://www.keyboard-layout-editor.com/#/gists/6861cb9df09ce78efaddf8aa7471e3ac)
|
||||
2. [Symbols](http://www.keyboard-layout-editor.com/#/gists/8956a18b508a78e93b9c38ec3fcccaa5)
|
||||
3. [Navigation](http://www.keyboard-layout-editor.com/#/gists/6ed492b714a7f54eb1c5de09b87fd8c4)
|
||||
4. [Numbers](http://www.keyboard-layout-editor.com/#/gists/399ceb5624e8388e48a3a5eacac8e973)
|
||||
5. [Function Keys](http://www.keyboard-layout-editor.com/#/gists/7fd7dc24c7048316f3724b1893c64e89)
|
||||
|
||||
## Notes
|
||||
|
||||
### General
|
||||
|
||||
Some characters can be accessed multiple ways. This was done because you may be in a given layer, such as numbers, where when doing math, you may need quick access to the parentheses characters for grouping. This prevents some layer switching.
|
||||
|
||||
I own an ErgoDox and plan on porting this as a base layer, then using the extra keys the ErgoDox provides accordingly. My goal, though, is to be fully functional on this base setup and build everything into muscle memory.
|
||||
|
||||
### Symbol Layer
|
||||
|
||||
1. I placed characters that deal with an if statement close together, such as !, & and |.
|
||||
2. All matching brace/bracket characters are together as well.
|
||||
|
||||
### Number Layer
|
||||
|
||||
1. Everything I did was a compromise when trying to mimic a ten-key. I did the best I could.
|
||||
2. Operators are duplicated on the right and left. I do not find it comfortable to use my pinky much, so I tend to use my left hand for +, -, * and / but those were also placed on the right hand to mimic the ten-key.
|
||||
3. Parentheses were added for typing on the calculator.
|
||||
|
||||
### Cursor Layer
|
||||
|
||||
1. It includes basic audio controls because they didn't really fit anywhere else
|
||||
2. It contains basic file manipulation. I'm not sure that was a good idea. I do save all the time, but Cmd+S isn't exactly hard.
|
||||
3. It contains the backspace and delete keys right on top of the left and right arrows.
|
||||
4. Cmd and Opt keys are duplicated. This makes for very easy navigation, for example on a Mac, Opt+Left/Right moves word by word. It also backspaces or deletes word by word.
|
||||
|
||||
### Function Layer
|
||||
|
||||
1. Almost all other layers I saw grouped the F keys into a bunch of three. This only gives nine function keys in order if you attempt to stay as close to the home row as possible. I went with a group of four, which gives all twelve function keys to the right hand, one row below and above the home row.
|
||||
2. I duplicated the Command and Option keys the same as on the cursor layer. This makes it dead easy to hit modified function keys such as Cmd+Opt+F5. It's also easy to toss in a Shift modifier in there with the right thumb since the bottom row is preserved.
|
@ -0,0 +1,82 @@
|
||||
|
||||
|
||||
ifdef TEENSY2
|
||||
OPT_DEFS += -DATREUS_TEENSY2
|
||||
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
|
||||
else
|
||||
OPT_DEFS += -DATREUS_ASTAR
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
|
||||
endif
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
USB ?= /dev/cu.usbmodem1411
|
||||
|
||||
upload: build
|
||||
$(ATREUS_UPLOAD_COMMAND)
|
@ -0,0 +1,67 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
@ -1,14 +1,5 @@
|
||||
SUBPROJECT_DEFAULT = stm32_f072_onekey
|
||||
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control
|
||||
CONSOLE_ENABLE ?= yes # Console for debug
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,8 @@
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control
|
||||
CONSOLE_ENABLE ?= yes # Console for debug
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file
|
@ -1,41 +1,3 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F0xx
|
||||
# linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F072xB
|
||||
# startup code to use
|
||||
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f0xx
|
||||
# it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = ST_STM32F072B_DISCOVERY
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m0
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 6
|
||||
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||
# a custom board definition that you plan to reuse).
|
||||
# If you're not setting it here, leave it commented out.
|
||||
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
# This also requires a patch to chibios:
|
||||
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,41 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F0xx
|
||||
# linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F072xB
|
||||
# startup code to use
|
||||
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f0xx
|
||||
# it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = ST_STM32F072B_DISCOVERY
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m0
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 6
|
||||
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||
# a custom board definition that you plan to reuse).
|
||||
# If you're not setting it here, leave it commented out.
|
||||
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
# This also requires a patch to chibios:
|
||||
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
@ -1,52 +1,3 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
# GENERIC STM32F103C8T6 board - stm32duino bootloader
|
||||
OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
|
||||
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
||||
BOARD = GENERIC_STM32_F103
|
||||
|
||||
# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
|
||||
# OPT_DEFS =
|
||||
# MCU_LDSCRIPT = STM32F103x8
|
||||
# BOARD = GENERIC_STM32_F103
|
||||
|
||||
# MAPLE MINI
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
|
||||
# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader
|
||||
# BOARD = MAPLEMINI_STM32_F103
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F1xx
|
||||
# linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# startup code to use
|
||||
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f1xx
|
||||
# it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m3
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||
# a custom board definition that you plan to reuse).
|
||||
# If you're not setting it here, leave it commented out.
|
||||
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
# This also requires a patch to chibios:
|
||||
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,52 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
# GENERIC STM32F103C8T6 board - stm32duino bootloader
|
||||
OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
|
||||
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
||||
BOARD = GENERIC_STM32_F103
|
||||
|
||||
# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD)
|
||||
# OPT_DEFS =
|
||||
# MCU_LDSCRIPT = STM32F103x8
|
||||
# BOARD = GENERIC_STM32_F103
|
||||
|
||||
# MAPLE MINI
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000
|
||||
# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader
|
||||
# BOARD = MAPLEMINI_STM32_F103
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F1xx
|
||||
# linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# startup code to use
|
||||
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f1xx
|
||||
# it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m3
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||
# a custom board definition that you plan to reuse).
|
||||
# If you're not setting it here, leave it commented out.
|
||||
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
# This also requires a patch to chibios:
|
||||
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
@ -1,49 +1,3 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
||||
MCU_FAMILY = KINETIS
|
||||
MCU_SERIES = KL2x
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
||||
# - LDSCRIPT =
|
||||
# - MKL26Z64 for Teensy LC
|
||||
# - MK20DX128 for Teensy 3.0
|
||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
||||
MCU_LDSCRIPT = MKL26Z64
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
# - STARTUP =
|
||||
# - kl2x for Teensy LC
|
||||
# - k20x5 for Teensy 3.0
|
||||
# - k20x7 for Teensy 3.1 and 3.2
|
||||
MCU_STARTUP = kl2x
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# - BOARD =
|
||||
# - PJRC_TEENSY_LC for Teensy LC
|
||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
||||
BOARD = PJRC_TEENSY_LC
|
||||
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m0plus
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
||||
ARMV = 6
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,49 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
||||
MCU_FAMILY = KINETIS
|
||||
MCU_SERIES = KL2x
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
||||
# - LDSCRIPT =
|
||||
# - MKL26Z64 for Teensy LC
|
||||
# - MK20DX128 for Teensy 3.0
|
||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
||||
MCU_LDSCRIPT = MKL26Z64
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
# - STARTUP =
|
||||
# - kl2x for Teensy LC
|
||||
# - k20x5 for Teensy 3.0
|
||||
# - k20x7 for Teensy 3.1 and 3.2
|
||||
MCU_STARTUP = kl2x
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# - BOARD =
|
||||
# - PJRC_TEENSY_LC for Teensy LC
|
||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
||||
BOARD = PJRC_TEENSY_LC
|
||||
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m0plus
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
||||
ARMV = 6
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
@ -1,109 +1,5 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SUBPROJECT_DEFAULT = rev2
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change to no to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -1,5 +1,3 @@
|
||||
BACKLIGHT_ENABLE = no
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,5 @@
|
||||
BACKLIGHT_ENABLE = no
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
@ -1,5 +1,3 @@
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,5 @@
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,103 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
@ -0,0 +1,70 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870)
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality by default
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= yes # Audio output on port C6
|
@ -1,70 +1,3 @@
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
# MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
# EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
# CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
# COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable numpad's backlight functionality
|
||||
RGBLIGHT_ENABLE ?= yes
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,65 @@
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
# MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
# EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
# CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
# COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable numpad's backlight functionality
|
||||
RGBLIGHT_ENABLE ?= yes
|
||||
# MIDI_ENABLE ?= YES # MIDI controls
|
||||
# UNICODE_ENABLE ?= YES # Unicode
|
||||
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
@ -1,34 +1,5 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# That's pretty much all you need. To compile, always go make clean,
|
||||
# followed by make.
|
||||
#
|
||||
# For advanced users only:
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
SUBPROJECT_DEFAULT = ez
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
UNICODE_ENABLE ?= yes # Unicode
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
@ -0,0 +1,24 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
// swap-hands action needs a matrix to define the swap
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Left hand, matrix positions */
|
||||
{{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
|
||||
{{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
|
||||
{{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
|
||||
{{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
|
||||
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
|
||||
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
|
||||
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
|
||||
/* Right hand, matrix positions */
|
||||
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
|
||||
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
|
||||
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
|
||||
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
|
||||
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
|
||||
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
|
||||
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
||||
};
|
||||
|
@ -1,76 +1,3 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# That's pretty much all you need. To compile, always go make clean,
|
||||
# followed by make.
|
||||
#
|
||||
# For advanced users only:
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# # project specific files
|
||||
SRC = twimaster.c \
|
||||
matrix.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
ifndef MAKEFILE_INCLUDED
|
||||
include ../../../Makefile
|
||||
endif
|
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,183 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | 1 | 2 | Home | | PgUp | 3 | 4 |
|
||||
* |------|------|------| |------|--------|------|
|
||||
* | Space| BkSp | End | | PgDn | Tab |Enter |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP_80( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_1, KC_2, KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,KC_3, KC_4,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* |------|------|------| |------|------|------|
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP_80(
|
||||
// left hand
|
||||
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,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, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+----------.
|
||||
* | | | | | | | |
|
||||
* |------|------|------| |------|------|----------|
|
||||
* | | | | | | |BrwserBack|
|
||||
* `--------------------' `------------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP_80(
|
||||
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, 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_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
# ErgoDox 80 Default Configuration
|
||||
|
||||
This is based on the default Ergodox EZ keymap.
|
||||
The difference is that this keymap supports 80 key layouts.
|
||||
If you own an 80 key Ergodox, use this as an example to get your desired keymap.
|
||||
|
||||
**NOTE:** This layout is not physically supported by the Ergodox EZ.
|
||||
|
||||
|
||||
![Default80](ergodox80.png)
|
@ -0,0 +1,78 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# That's pretty much all you need. To compile, always go make clean,
|
||||
# followed by make.
|
||||
#
|
||||
# For advanced users only:
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# # project specific files
|
||||
SRC = twimaster.c \
|
||||
matrix.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
|
||||
SLEEP_LED_ENABLE = no
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
@ -0,0 +1,77 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
||||
# - For Infinity KB, SERIES = K20x
|
||||
MCU_FAMILY = KINETIS
|
||||
MCU_SERIES = K20x
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
||||
# - LDSCRIPT =
|
||||
# - MKL26Z64 for Teensy LC
|
||||
# - MK20DX128 for Teensy 3.0
|
||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
||||
# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader
|
||||
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
||||
MCU_LDSCRIPT = MK20DX256BLDR8
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
# - STARTUP =
|
||||
# - kl2x for Teensy LC
|
||||
# - k20x5 for Teensy 3.0 and Infinity 60%
|
||||
# - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox
|
||||
MCU_STARTUP = k20x7
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# - BOARD =
|
||||
# - PJRC_TEENSY_LC for Teensy LC
|
||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
||||
# - MCHCK_K20 for Infinity KB
|
||||
#BOARD = MCHCK_K20
|
||||
BOARD = PJRC_TEENSY_3_1
|
||||
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
||||
ARMV = 7
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
CUSTOM_MATRIX ?= yes # Custom matrix file
|
||||
SERIAL_LINK_ENABLE = yes
|
||||
VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
|
||||
LCD_ENABLE ?= yes
|
||||
LED_ENABLE ?= yes
|
||||
LCD_BACKLIGHT_ENABLE ?= yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../Makefile
|
||||
endif
|
||||
|
||||
ifdef LCD_ENABLE
|
||||
include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
|
||||
endif
|
||||
|
||||
ifdef LED_ENABLE
|
||||
include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
|
||||
endif
|
After Width: | Height: | Size: 1.4 MiB |
@ -0,0 +1,183 @@
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A/L2 | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LS/PO |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RS/PC |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
|
||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| left | down | up | down | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | |Brwser|
|
||||
* | Lclk | Rclk |------| |------| |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_BTN1, KC_BTN2, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_WBAK
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
@ -0,0 +1,11 @@
|
||||
# ErgoDox EZ Absenth Configuration
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
* Sept. 14, 2016 (V0.2):
|
||||
* Added Space Cadet to Left and Right Shift. Pressing Left shift with no other key adds an "(" and pressing Right shift with no other key adds an ")"
|
||||
* Sept. 8, 2016 (V0.1):
|
||||
* Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer.
|
||||
|
||||
![Absenth](absenth_highres.png)
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 136 KiB |
@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cmd_wm () {
|
||||
WIN="$(xdotool getactivewindow)"
|
||||
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
|
||||
xdotool windowsize ${WIN} 100% 100%
|
||||
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
|
||||
}
|
||||
|
||||
_cmd_appsel () {
|
||||
wmctrl -x -a $1 || true
|
||||
xdotool key Escape
|
||||
}
|
||||
|
||||
cmd_appsel_music () {
|
||||
wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
|
||||
xdotool key Escape
|
||||
}
|
||||
|
||||
cmd_appsel_slack () {
|
||||
_cmd_appsel slack
|
||||
}
|
||||
|
||||
cmd_appsel_emacs () {
|
||||
_cmd_appsel emacs24
|
||||
}
|
||||
|
||||
cmd_appsel_term () {
|
||||
_cmd_appsel gnome-terminal
|
||||
}
|
||||
|
||||
cmd_appsel_chrome () {
|
||||
_cmd_appsel chromium
|
||||
}
|
||||
|
||||
cmd_help () {
|
||||
cat <<EOF
|
||||
Use the source, Luke!
|
||||
EOF
|
||||
}
|
||||
|
||||
while read l; do
|
||||
case "$l" in
|
||||
"CMD:"*)
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
|
||||
cmd="$(echo $l | cut -d: -f2-)"
|
||||
|
||||
echo "Got command: ${cmd}"
|
||||
|
||||
if type cmd_${cmd} >/dev/null 2>&1; then
|
||||
cmd_${cmd}
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
|
||||
|
||||
sudo "${HL}" | grep --line-buffered LAYER: | \
|
||||
(while read line; do
|
||||
case $line in
|
||||
LAYER:*)
|
||||
layer="$(echo $(echo $line | cut -d: -f2-))"
|
||||
notify-send -i mark-location-symbolic "Switched to layer: $layer"
|
||||
;;
|
||||
esac
|
||||
done)
|
@ -1,145 +1,339 @@
|
||||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import argparse
|
||||
import time
|
||||
|
||||
from math import floor
|
||||
from os.path import dirname
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
from blessings import Terminal
|
||||
|
||||
cr_coord_map = [
|
||||
[
|
||||
# Row 0
|
||||
[ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2],
|
||||
[ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6],
|
||||
],
|
||||
[
|
||||
# Row 1
|
||||
[ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2],
|
||||
[ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6],
|
||||
],
|
||||
[
|
||||
# Row 2
|
||||
[12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ],
|
||||
[ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6],
|
||||
],
|
||||
[
|
||||
# Row 3
|
||||
[17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0],
|
||||
[13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6],
|
||||
],
|
||||
[
|
||||
# Row 4
|
||||
[20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [],
|
||||
[19, 4], [18, 2], [19, 6], [20, 4], [20, 6],
|
||||
],
|
||||
[
|
||||
# Row 5
|
||||
[ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2],
|
||||
[24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ],
|
||||
],
|
||||
]
|
||||
|
||||
def set_attr_at(j, b, n, attr, fn, val):
|
||||
blk = j[b][n]
|
||||
if attr in blk:
|
||||
blk[attr] = fn(blk[attr], val)
|
||||
class Heatmap(object):
|
||||
coords = [
|
||||
[
|
||||
# Row 0
|
||||
[ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2],
|
||||
[ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6],
|
||||
],
|
||||
[
|
||||
# Row 1
|
||||
[ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2],
|
||||
[ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6],
|
||||
],
|
||||
[
|
||||
# Row 2
|
||||
[12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ],
|
||||
[ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6],
|
||||
],
|
||||
[
|
||||
# Row 3
|
||||
[17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0],
|
||||
[13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6],
|
||||
],
|
||||
[
|
||||
# Row 4
|
||||
[20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [],
|
||||
[19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [], [], [], []
|
||||
],
|
||||
[
|
||||
# Row 5
|
||||
[ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2],
|
||||
[24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ],
|
||||
],
|
||||
]
|
||||
|
||||
def set_attr_at(self, block, n, attr, fn, val):
|
||||
blk = self.heatmap[block][n]
|
||||
if attr in blk:
|
||||
blk[attr] = fn(blk[attr], val)
|
||||
else:
|
||||
blk[attr] = fn(None, val)
|
||||
|
||||
def coord(self, col, row):
|
||||
return self.coords[row][col]
|
||||
|
||||
@staticmethod
|
||||
def set_attr(orig, new):
|
||||
return new
|
||||
|
||||
def set_bg(self, coords, color):
|
||||
(block, n) = coords
|
||||
self.set_attr_at(block, n, "c", self.set_attr, color)
|
||||
#self.set_attr_at(block, n, "g", self.set_attr, False)
|
||||
|
||||
def set_tap_info(self, coords, count, cap):
|
||||
(block, n) = coords
|
||||
def _set_tap_info(o, _count, _cap):
|
||||
ns = 4 - o.count ("\n")
|
||||
return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100)
|
||||
|
||||
if not cap:
|
||||
cap = 1
|
||||
self.heatmap[block][n + 1] = _set_tap_info (self.heatmap[block][n + 1], count, cap)
|
||||
|
||||
@staticmethod
|
||||
def heatmap_color (v):
|
||||
colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]]
|
||||
fb = 0
|
||||
if v <= 0:
|
||||
idx1, idx2 = 0, 0
|
||||
elif v >= 1:
|
||||
idx1, idx2 = len(colors) - 1, len(colors) - 1
|
||||
else:
|
||||
val = v * (len(colors) - 1)
|
||||
idx1 = int(floor(val))
|
||||
idx2 = idx1 + 1
|
||||
fb = val - float(idx1)
|
||||
|
||||
r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0]
|
||||
g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
|
||||
b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
|
||||
|
||||
r, g, b = [x * 255 for x in (r, g, b)]
|
||||
return "#%02x%02x%02x" % (int(r), int(g), int(b))
|
||||
|
||||
def __init__(self, layout):
|
||||
self.log = {}
|
||||
self.total = 0
|
||||
self.max_cnt = 0
|
||||
self.layout = layout
|
||||
|
||||
def update_log(self, coords):
|
||||
(c, r) = coords
|
||||
if not (c, r) in self.log:
|
||||
self.log[(c, r)] = 0
|
||||
self.log[(c, r)] = self.log[(c, r)] + 1
|
||||
self.total = self.total + 1
|
||||
if self.max_cnt < self.log[(c, r)]:
|
||||
self.max_cnt = self.log[(c, r)]
|
||||
|
||||
def get_heatmap(self):
|
||||
with open("%s/heatmap-layout.%s.json" % (dirname(sys.argv[0]), self.layout), "r") as f:
|
||||
self.heatmap = json.load (f)
|
||||
|
||||
## Reset colors
|
||||
for row in self.coords:
|
||||
for coord in row:
|
||||
if coord != []:
|
||||
self.set_bg (coord, "#d9dae0")
|
||||
|
||||
for (c, r) in self.log:
|
||||
coords = self.coord(c, r)
|
||||
b, n = coords
|
||||
cap = self.max_cnt
|
||||
if cap == 0:
|
||||
cap = 1
|
||||
v = float(self.log[(c, r)]) / cap
|
||||
self.set_bg (coords, self.heatmap_color (v))
|
||||
self.set_tap_info (coords, self.log[(c, r)], self.total)
|
||||
return self.heatmap
|
||||
|
||||
def get_stats(self):
|
||||
usage = [
|
||||
# left hand
|
||||
[0, 0, 0, 0, 0],
|
||||
# right hand
|
||||
[0, 0, 0, 0, 0]
|
||||
]
|
||||
finger_map = [0, 0, 1, 2, 3, 3, 3, 1, 1, 1, 2, 3, 4, 4]
|
||||
for (c, r) in self.log:
|
||||
if r == 5: # thumb cluster
|
||||
if c <= 6: # left side
|
||||
usage[0][4] = usage[0][4] + self.log[(c, r)]
|
||||
else:
|
||||
usage[1][0] = usage[1][0] + self.log[(c, r)]
|
||||
else:
|
||||
fc = c
|
||||
hand = 0
|
||||
if fc >= 7:
|
||||
hand = 1
|
||||
fm = finger_map[fc]
|
||||
usage[hand][fm] = usage[hand][fm] + self.log[(c, r)]
|
||||
hand_usage = [0, 0]
|
||||
for f in usage[0]:
|
||||
hand_usage[0] = hand_usage[0] + f
|
||||
for f in usage[1]:
|
||||
hand_usage[1] = hand_usage[1] + f
|
||||
|
||||
total = self.total
|
||||
if total == 0:
|
||||
total = 1
|
||||
stats = {
|
||||
"total-keys": total,
|
||||
"hands": {
|
||||
"left": {
|
||||
"usage": round(float(hand_usage[0]) / total * 100, 2),
|
||||
"fingers": {
|
||||
"pinky": 0,
|
||||
"ring": 0,
|
||||
"middle": 0,
|
||||
"index": 0,
|
||||
"thumb": 0,
|
||||
}
|
||||
},
|
||||
"right": {
|
||||
"usage": round(float(hand_usage[1]) / total * 100, 2),
|
||||
"fingers": {
|
||||
"thumb": 0,
|
||||
"index": 0,
|
||||
"middle": 0,
|
||||
"ring": 0,
|
||||
"pinky": 0,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
hmap = ['left', 'right']
|
||||
fmap = ['pinky', 'ring', 'middle', 'index', 'thumb',
|
||||
'thumb', 'index', 'middle', 'ring', 'pinky']
|
||||
for hand_idx in range(len(usage)):
|
||||
hand = usage[hand_idx]
|
||||
for finger_idx in range(len(hand)):
|
||||
stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = round(float(hand[finger_idx]) / total * 100, 2)
|
||||
return stats
|
||||
|
||||
def dump_all(out_dir, heatmaps):
|
||||
stats = {}
|
||||
t = Terminal()
|
||||
t.clear()
|
||||
sys.stdout.write("\x1b[2J\x1b[H")
|
||||
|
||||
print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir))
|
||||
|
||||
keys = list(heatmaps.keys())
|
||||
keys.sort()
|
||||
|
||||
for layer in keys:
|
||||
if len(heatmaps[layer].log) == 0:
|
||||
continue
|
||||
|
||||
with open ("%s/%s.json" % (out_dir, layer), "w") as f:
|
||||
json.dump(heatmaps[layer].get_heatmap(), f)
|
||||
stats[layer] = heatmaps[layer].get_stats()
|
||||
|
||||
left = stats[layer]['hands']['left']
|
||||
right = stats[layer]['hands']['right']
|
||||
|
||||
print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer,
|
||||
total=int(stats[layer]['total-keys'] / 2)))
|
||||
print (('{t.underline} | ' + \
|
||||
'left ({l[usage]:6.2f}%) | ' + \
|
||||
'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right))
|
||||
print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \
|
||||
' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \
|
||||
' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \
|
||||
' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \
|
||||
' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \
|
||||
'').format(left=left['fingers'], right=right['fingers'], t=t))
|
||||
|
||||
def process_line(line, heatmaps, opts, stamped_log = None):
|
||||
m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line)
|
||||
if not m:
|
||||
return False
|
||||
if stamped_log is not None:
|
||||
if line.startswith("KL:"):
|
||||
print ("%10.10f %s" % (time.time(), line),
|
||||
file = stamped_log, end = '')
|
||||
else:
|
||||
print (line,
|
||||
file = stamped_log, end = '')
|
||||
stamped_log.flush()
|
||||
|
||||
(c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4))
|
||||
if (c, r) not in opts.allowed_keys:
|
||||
return False
|
||||
|
||||
heatmaps[l].update_log ((c, r))
|
||||
|
||||
return True
|
||||
|
||||
def setup_allowed_keys(opts):
|
||||
if len(opts.only_key):
|
||||
incmap={}
|
||||
for v in opts.only_key:
|
||||
m = re.search ('(\d+),(\d+)', v)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group(1)), int(m.group(2)))
|
||||
incmap[(c, r)] = True
|
||||
else:
|
||||
blk[attr] = fn(None, val)
|
||||
incmap={}
|
||||
for r in range(0, 6):
|
||||
for c in range(0, 14):
|
||||
incmap[(c, r)] = True
|
||||
|
||||
for v in opts.ignore_key:
|
||||
m = re.search ('(\d+),(\d+)', v)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group(1)), int(m.group(2)))
|
||||
del(incmap[(c, r)])
|
||||
|
||||
return incmap
|
||||
|
||||
def coord(col, row):
|
||||
return cr_coord_map[row][col]
|
||||
def main(opts):
|
||||
heatmaps = {"Dvorak": Heatmap("Dvorak"),
|
||||
"ADORE": Heatmap("ADORE")
|
||||
}
|
||||
cnt = 0
|
||||
out_dir = opts.outdir
|
||||
|
||||
def set_attr(orig, new):
|
||||
return new
|
||||
if not os.path.exists(out_dir):
|
||||
os.makedirs(out_dir)
|
||||
|
||||
def set_bg(j, (b, n), color):
|
||||
set_attr_at(j, b, n, "c", set_attr, color)
|
||||
#set_attr_at(j, b, n, "g", set_attr, False)
|
||||
opts.allowed_keys = setup_allowed_keys(opts)
|
||||
|
||||
def _set_tap_info(o, count, cap):
|
||||
ns = 4 - o.count ("\n")
|
||||
return o + "\n" * ns + "%.02f%%" % (float(count) / float(cap) * 100)
|
||||
if not opts.one_shot:
|
||||
|
||||
def set_tap_info(j, (b, n), count, cap):
|
||||
j[b][n + 1] = _set_tap_info (j[b][n + 1], count, cap)
|
||||
try:
|
||||
with open("%s/stamped-log" % out_dir, "r") as f:
|
||||
while True:
|
||||
line = f.readline()
|
||||
if not line:
|
||||
break
|
||||
if not process_line(line, heatmaps, opts):
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
|
||||
def heatmap_color (v):
|
||||
colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]]
|
||||
fb = 0
|
||||
if v <= 0:
|
||||
idx1, idx2 = 0, 0
|
||||
elif v >= 1:
|
||||
idx1, idx2 = len(colors) - 1, len(colors) - 1
|
||||
stamped_log = open ("%s/stamped-log" % (out_dir), "a+")
|
||||
else:
|
||||
val = v * (len(colors) - 1)
|
||||
idx1 = int(floor(val))
|
||||
idx2 = idx1 + 1
|
||||
fb = val - float(idx1)
|
||||
|
||||
r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0]
|
||||
g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
|
||||
b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
|
||||
|
||||
r, g, b = [x * 255 for x in r, g, b]
|
||||
return "#%02x%02x%02x" % (r, g, b)
|
||||
|
||||
# Load the keylog
|
||||
def load_keylog(fname, restrict_row):
|
||||
keylog = {}
|
||||
total = 0
|
||||
with open(fname, "r") as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
m = re.search ('KL: col=(\d+), row=(\d+)', line)
|
||||
if not m:
|
||||
continue
|
||||
(c, r) = (int(m.group (2)), int(m.group (1)))
|
||||
if restrict_row != None and r != int(restrict_row):
|
||||
stamped_log = None
|
||||
|
||||
while True:
|
||||
line = sys.stdin.readline()
|
||||
if not line:
|
||||
break
|
||||
if not process_line(line, heatmaps, opts, stamped_log):
|
||||
continue
|
||||
if (c, r) in keylog:
|
||||
keylog[(c, r)] = keylog[(c, r)] + 1
|
||||
else:
|
||||
keylog[(c, r)] = 1
|
||||
total = total + 1
|
||||
return total / 2, keylog
|
||||
|
||||
def l_flat(s):
|
||||
f = s.split("\n")
|
||||
return ", ".join (f)
|
||||
|
||||
def main(base_fn, log_fn, restrict_row = None):
|
||||
|
||||
with open(base_fn, "r") as f:
|
||||
layout = json.load (f)
|
||||
|
||||
## Reset colors
|
||||
for row in cr_coord_map:
|
||||
for col in row:
|
||||
if col != []:
|
||||
set_bg (layout, col, "#d9dae0")
|
||||
#set_attr_at (layout, col[0], col[1], "g", set_attr, True)
|
||||
|
||||
total, log = load_keylog (log_fn, restrict_row)
|
||||
max_cnt = 0
|
||||
for (c, r) in log:
|
||||
max_cnt = max(max_cnt, log[(c, r)])
|
||||
|
||||
# Create the heatmap
|
||||
for (c, r) in log:
|
||||
coords = coord(c, r)
|
||||
b, n = coords
|
||||
cap = max_cnt
|
||||
v = float(log[(c, r)]) / cap
|
||||
print >> sys.stderr, "%s => %d/%d => %f = %s" % (l_flat(layout[b][n+1]), log[(c,r)], cap, v, heatmap_color(v))
|
||||
set_bg (layout, coord(c, r), heatmap_color (v))
|
||||
set_tap_info (layout, coord (c, r), log[(c, r)], total)
|
||||
|
||||
print json.dumps(layout)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 3:
|
||||
print """Log to Heatmap -- creates a heatmap out of keyboard logs
|
||||
cnt = cnt + 1
|
||||
|
||||
if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot:
|
||||
cnt = 0
|
||||
dump_all(out_dir, heatmaps)
|
||||
|
||||
Usage: log-to-heatmap.py base-layout.json logfile [row] >layout.json"""
|
||||
sys.exit (1)
|
||||
main(*sys.argv[1:])
|
||||
dump_all (out_dir, heatmaps)
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser (description = "keylog to heatmap processor")
|
||||
parser.add_argument ('outdir', action = 'store',
|
||||
help = 'Output directory')
|
||||
parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int,
|
||||
default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only')
|
||||
parser.add_argument ('--ignore-key', dest = 'ignore_key', action = 'append', type = str,
|
||||
default = [], help = 'Ignore the key at position (x, y)')
|
||||
parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str,
|
||||
default = [], help = 'Only include key at position (x, y)')
|
||||
parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true',
|
||||
help = 'Do not load previous data, and do not update it, either.')
|
||||
args = parser.parse_args()
|
||||
if len(args.ignore_key) and len(args.only_key):
|
||||
print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!",
|
||||
file = sys.stderr)
|
||||
sys.exit(1)
|
||||
main(args)
|
||||
|
@ -1,5 +0,0 @@
|
||||
#! /bin/sh
|
||||
WIN="$(xdotool getactivewindow)"
|
||||
wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
|
||||
xdotool windowsize ${WIN} 100% 100%
|
||||
wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
|
@ -0,0 +1,107 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
charmap = {
|
||||
'9': [[1, 0]],
|
||||
'7': [[2, 0]], '@': [[2, 5], [2, 0]],
|
||||
'5': [[3, 0]], '*': [[2, 5], [3, 0]],
|
||||
'3': [[4, 0]], '^': [[2, 5], [4, 0]],
|
||||
'1': [[5, 0]], '$': [[2, 5], [5, 0]],
|
||||
'0': [[8, 0]], '%': [[2, 5], [8, 0]],
|
||||
'2': [[9, 0]], '!': [[2, 5], [9, 0]],
|
||||
'4': [[10, 0]], '#': [[2, 5], [10, 0]],
|
||||
'6': [[11, 0]], '&': [[2, 5], [11, 0]],
|
||||
'8': [[12, 0]],
|
||||
|
||||
'`': [[0, 1]], '~': [[2, 5], [0, 1]],
|
||||
'y': [[1, 1]], 'Y': [[2, 5], [1, 1]],
|
||||
'w': [[2, 1]], 'W': [[2, 5], [2, 1]],
|
||||
'g': [[3, 1]], 'G': [[2, 5], [3, 1]],
|
||||
'l': [[4, 1]], 'L': [[2, 5], [4, 1]],
|
||||
'm': [[5, 1]], 'M': [[2, 5], [5, 1]],
|
||||
'[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]],
|
||||
']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]],
|
||||
'f': [[8, 1]], 'F': [[2, 5], [8, 1]],
|
||||
'h': [[9, 1]], 'H': [[2, 5], [9, 1]],
|
||||
'c': [[10, 1]], 'C': [[2, 5], [10, 1]],
|
||||
'p': [[11, 1]], 'P': [[2, 5], [11, 1]],
|
||||
'x': [[12, 1]], 'X': [[2, 5], [12, 1]],
|
||||
'\\': [[13, 1]], '|': [[2, 5], [13, 1]],
|
||||
|
||||
'\t': [[0, 2]],
|
||||
'a': [[1, 2]], 'A': [[2, 5], [1, 2]],
|
||||
'o': [[2, 2]], 'O': [[2, 5], [2, 2]],
|
||||
'e': [[3, 2]], 'E': [[2, 5], [3, 2]],
|
||||
'i': [[4, 2]], 'I': [[2, 5], [4, 2]],
|
||||
'u': [[5, 2]], 'U': [[2, 5], [5, 2]],
|
||||
'd': [[8, 2]], 'D': [[2, 5], [8, 2]],
|
||||
'r': [[9, 2]], 'R': [[2, 5], [9, 2]],
|
||||
't': [[10, 2]], 'T': [[2, 5], [10, 2]],
|
||||
'n': [[11, 2]], 'N': [[2, 5], [11, 2]],
|
||||
's': [[12, 2]], 'S': [[2, 5], [12, 2]],
|
||||
'=': [[13, 2]], '+': [[2, 5], [13, 2]],
|
||||
|
||||
'z': [[1, 3]], 'Z': [[2, 5], [1, 3]],
|
||||
'q': [[2, 3]], 'Q': [[2, 5], [2, 3]],
|
||||
'\'': [[3, 3]], '"': [[2, 5], [3, 3]],
|
||||
',': [[4, 3]], '<': [[2, 5], [4, 3]],
|
||||
'.': [[5, 3]], '>': [[2, 5], [5, 3]],
|
||||
'b': [[8, 3]], 'B': [[2, 5], [8, 3]],
|
||||
'k': [[9, 3]], 'K': [[2, 5], [9, 3]],
|
||||
'v': [[10, 3]], 'V': [[2, 5], [10, 3]],
|
||||
'j': [[11, 3]], 'J': [[2, 5], [11, 3]],
|
||||
'/': [[12, 3]], '?': [[2, 5], [12, 3]],
|
||||
|
||||
':': [[4, 4]], ';': [[4, 4], [4, 4]],
|
||||
'-': [[9, 4]], '_': [[2, 5], [9, 4]],
|
||||
|
||||
' ': [[10, 5]],
|
||||
'\n': [[11, 5]],
|
||||
|
||||
## Layered things
|
||||
# Hungarian
|
||||
'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]],
|
||||
'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]],
|
||||
'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]],
|
||||
'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]],
|
||||
'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]],
|
||||
'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]],
|
||||
'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]],
|
||||
'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]],
|
||||
'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]],
|
||||
}
|
||||
|
||||
def lookup_char(layer, ch):
|
||||
if ch in charmap:
|
||||
return charmap[ch]
|
||||
return None
|
||||
|
||||
def process_char(layer, ch, out=sys.stdout):
|
||||
keys = lookup_char(layer, ch)
|
||||
if not keys:
|
||||
print ("Unknown char: %s" % ch, file=sys.stderr)
|
||||
else:
|
||||
for (c, r) in keys:
|
||||
print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out)
|
||||
print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out)
|
||||
|
||||
def process_file(fn, layer, out=sys.stdout):
|
||||
with open(fn, "r") as f:
|
||||
ch = f.read(1)
|
||||
while ch:
|
||||
process_char(layer, ch, out)
|
||||
ch = f.read(1)
|
||||
|
||||
if sys.argv[1] == '-':
|
||||
out='/dev/stdin'
|
||||
else:
|
||||
out=sys.argv[1]
|
||||
|
||||
if len(sys.argv) >= 2:
|
||||
layer = 'ADORE'
|
||||
else:
|
||||
layer = sys.argv[2]
|
||||
|
||||
process_file(out, layer = layer)
|
@ -0,0 +1,14 @@
|
||||
The kastyle keymap was originally intended to remap the ErgoDox EZ to more
|
||||
closely approximate the layout of a Kinesis Advantage. Notable changes
|
||||
over the stock ErgoDox layout include:
|
||||
|
||||
* Re-arragnement of tab, enter, space, and delete to match the Kinesis
|
||||
* Addition of print screen, pause, etc. keys following the kines-ish keymap
|
||||
on L1
|
||||
* GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys
|
||||
are mapped to allow Esc on tap (good for Vi users)
|
||||
* Most notably, the addition of a momentary one-handed mode for quick and
|
||||
easy access to keys on the other half of the keyboard, e.g. while using a
|
||||
mouse in one hand, one may add text to a dialogue box with the other without
|
||||
having to reach across the keyboard or remove one's hand from the mouse.
|
||||
|
@ -0,0 +1,5 @@
|
||||
# Ergodox EZ for OS X
|
||||
|
||||
This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
|
||||
|
||||
If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/).
|
@ -0,0 +1,144 @@
|
||||
// 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 AUXI 1 // Auxiliary layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ~` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | -_ | += | Bkspc |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | Del | Y | U | I | O | P | |\ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | L1 | A | S | D | F | G |------| |------| H | J | K | L | ;: | Enter |
|
||||
* |--------+------+------+------+------+------| {[ | | }] |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | <, | >. | ?/ | "' |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | | | | Esc | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | |Power | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | | | | | |
|
||||
* | LGui | LAlt |------| |------| Bkspc |Space |
|
||||
* | | | | | Del | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1),
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_LCTL, KC_TRNS,KC_TRNS,KC_TRNS,KC_ESC,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_LGUI,KC_LALT,KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC,
|
||||
KC_DELETE, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT,
|
||||
KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_QUOT,
|
||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_PWR, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_DELETE, KC_BSPC, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Auxiliary Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | TRNS | | | Mute | VolDn| VolUp| Play | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | TRNS | |LShift| LCtrl| | |------| |------| LEFT | DOWN | UP |RIGHT | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LShift | | | | | | | | | MPrv | MNxt | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | LGui | LAlt |------| |------| Bkspc| Space|
|
||||
* | | | | | Del | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// AUXILIARY
|
||||
[AUXI] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_LSHIFT,KC_LCTL, KC_TRNS, KC_TRNS,
|
||||
KC_LSHIFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_LGUI, KC_LALT, KC_TRNS,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||
KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_PWR, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_DELETE, KC_BSPC, KC_SPC
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary)
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
};
|
After Width: | Height: | Size: 137 KiB |
@ -0,0 +1,30 @@
|
||||
# Norwegian setup with osx/pc toggle
|
||||
|
||||
## Motivation
|
||||
I wanted a Norwegian setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup.
|
||||
|
||||
## Overview
|
||||
The setup is created to be programmer friendly.
|
||||
- Most of the symbols used in code can be activated without using layers or shift key.
|
||||
- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist.
|
||||
- Navigation is prioritized, arrows below the home row.
|
||||
|
||||
## PC/Mac toggle
|
||||
The default setup is for Norwegian keyboard setting(on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard.
|
||||
|
||||
## Layers
|
||||
Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys.
|
||||
|
||||
## Tap-shift
|
||||
Tap for the next character to be shifted, hold down for regular shift.
|
||||
|
||||
## Comma dot and escape
|
||||
Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys.
|
||||
|
||||
## Numpad symbols
|
||||
+-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0.
|
||||
If you really need the norwegian symbols in a program, you can access them using the number toggle button.
|
||||
|
||||
## Layout
|
||||
|
||||
![keyboard-layout](keyboard-layout.png)
|
After Width: | Height: | Size: 95 KiB |
@ -0,0 +1,30 @@
|
||||
# Norwegian Colemak setup with osx/pc toggle
|
||||
|
||||
## Motivation
|
||||
I wanted a Norwegian Colemak setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup.
|
||||
|
||||
## Overview
|
||||
The setup is created to be programmer friendly.
|
||||
- Most of the symbols used in code can be activated without using layers or shift key.
|
||||
- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist.
|
||||
- Navigation is prioritized, arrows below the home row.
|
||||
|
||||
## PC/Mac toggle
|
||||
The default setup is for Norwegian keyboard setting(not colemak software variants) on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard.
|
||||
|
||||
## Layers
|
||||
Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys.
|
||||
|
||||
## Tap-shift
|
||||
Tap for the next character to be shifted, hold down for regular shift.
|
||||
|
||||
## Comma dot and escape
|
||||
Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys.
|
||||
|
||||
## Numpad symbols
|
||||
+-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0.
|
||||
If you really need the norwegian symbols in a program, you can access them using the number toggle button.
|
||||
|
||||
## Layout
|
||||
|
||||
![keyboard-layout](keyboard-layout.png)
|
@ -1,28 +1,41 @@
|
||||
# Roman's Layout
|
||||
|
||||
There is only one layer based on [Norman layout](https://normanlayout.info/).
|
||||
There is only one layer, and it is based on [Norman
|
||||
layout](https://normanlayout.info/).
|
||||
|
||||
Looking for multiple-layer layouts?
|
||||
|
||||
- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Symbols, arrows, plover, HJKL
|
||||
arrows](../romanzolotarev-norman-plover-osx-hjkl/)
|
||||
- [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/)
|
||||
|
||||
[![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195)
|
||||
|
||||
## Functional Keys
|
||||
## How to use Vim key
|
||||
|
||||
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
|
||||
- Tap `F2` to copy screenshot to the clipboard.
|
||||
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
|
||||
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
|
||||
|
||||
## CTRL/ESC
|
||||
|
||||
CTRL and ESC are frequently used in Vim.
|
||||
It is `CTL_T(KC_ESC)` and it works this way:
|
||||
|
||||
- Tap `CTRL/ESC` to send `ESC`.
|
||||
- Hold `CTRL/ESC` to use as `CTRL`.
|
||||
|
||||
## Activate N-rollover
|
||||
## How to activate N-rollover
|
||||
|
||||
- Hold left `SHIFT` and right `SHIFT` and then tap `N`.
|
||||
|
||||
## How to make and flash on OS X
|
||||
|
||||
First you need to install few brew packages.
|
||||
|
||||
```bash
|
||||
brew tap osx-cross/avr
|
||||
brew install dfu-programmer avr-libc teensy_loader_cli
|
||||
```
|
||||
|
||||
Then you can clone this repository, make and flash your ErgoDox.
|
||||
|
||||
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.
|
||||
```bash
|
||||
git clone https://github.com/romanzolotarev/qmk_firmware
|
||||
cd qmk_firmware/keyboards/ergodox
|
||||
# Optionally tweak ./keymaps/romanzolotarev-norman-osx/keymap.c
|
||||
SLEEP_LED_ENABLED=no KEYMAP=romanzolotarev-norman-osx make teensy
|
||||
```
|
||||
|
@ -0,0 +1,6 @@
|
||||
Section "InputClass"
|
||||
Identifier "ErgoDox EZ"
|
||||
MatchIsKeyboard "on"
|
||||
MatchProduct "ErgoDox EZ ErgoDox EZ"
|
||||
Option "XkbLayout" "ergodox_yoruian"
|
||||
EndSection
|
@ -0,0 +1,13 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
install-xorg-configuration:
|
||||
install -m 0664 90-$(KEYBOARD)-$(KEYMAP).conf \
|
||||
/etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf
|
||||
install -m 0644 $(KEYBOARD)_$(KEYMAP) \
|
||||
/usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP)
|
||||
|
||||
uninstall-xorg-configuration:
|
||||
-rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf
|
||||
-rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP)
|