Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c4a744a1b | ||
|
|
f7722ef9ca | ||
|
|
76cb2b1160 | ||
|
|
5117dff6a2 | ||
|
|
e5d34fd084 | ||
|
|
bfb2f8e0a8 | ||
|
|
d8f3c28a37 | ||
|
|
eef0cb2f90 | ||
|
|
63e4ad13c8 | ||
|
|
f9e67338a4 | ||
|
|
5f9f62fb8c | ||
|
|
147bc6ec43 | ||
|
|
bea62add55 |
No files matched your search
+8
-47
@@ -244,34 +244,6 @@ else
|
|||||||
FIRMWARE_FORMAT?=hex
|
FIRMWARE_FORMAT?=hex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),CHIBIOS)
|
|
||||||
include $(TMK_PATH)/chibios.mk
|
|
||||||
OPT_OS = chibios
|
|
||||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_4)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_3)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_2)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","")
|
|
||||||
OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Find all of the config.h files and add them to our CONFIG_H define.
|
# Find all of the config.h files and add them to our CONFIG_H define.
|
||||||
CONFIG_H :=
|
CONFIG_H :=
|
||||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
||||||
@@ -307,11 +279,6 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
|
|||||||
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
|
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_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) $(KEYBOARD_PATHS)
|
|
||||||
PROJECT_CONFIG := $(CONFIG_H)
|
|
||||||
|
|
||||||
# Userspace setup and definitions
|
# Userspace setup and definitions
|
||||||
ifeq ("$(USER_NAME)","")
|
ifeq ("$(USER_NAME)","")
|
||||||
USER_NAME := $(KEYMAP)
|
USER_NAME := $(KEYMAP)
|
||||||
@@ -357,23 +324,17 @@ SRC += $(TMK_COMMON_SRC)
|
|||||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||||
|
|
||||||
ifeq ($(PLATFORM),AVR)
|
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||||
ifeq ($(strip $(PROTOCOL)), VUSB)
|
ifneq ($(strip $(PROTOCOL)),)
|
||||||
include $(TMK_PATH)/protocol/vusb.mk
|
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
||||||
else
|
else
|
||||||
include $(TMK_PATH)/protocol/lufa.mk
|
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
|
||||||
endif
|
|
||||||
include $(TMK_PATH)/avr.mk
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),ARM_ATSAM)
|
# TODO: remove this bodge?
|
||||||
include $(TMK_PATH)/arm_atsam.mk
|
PROJECT_DEFS := $(OPT_DEFS)
|
||||||
include $(TMK_PATH)/protocol/arm_atsam.mk
|
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||||
endif
|
PROJECT_CONFIG := $(CONFIG_H)
|
||||||
|
|
||||||
ifeq ($(PLATFORM),CHIBIOS)
|
|
||||||
include $(TMK_PATH)/protocol/chibios.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||||
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
|
||||||
|
|||||||
+100
-99
@@ -13,26 +13,24 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SERIAL_DIR := $(QUANTUM_DIR)/serial_link
|
|
||||||
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||||
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
|
||||||
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
QUANTUM_SRC += \
|
||||||
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
$(QUANTUM_DIR)/quantum.c \
|
||||||
COMMON_VPATH += $(SERIAL_PATH)
|
$(QUANTUM_DIR)/keymap_common.c \
|
||||||
|
$(QUANTUM_DIR)/keycode_config.c
|
||||||
|
|
||||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
|
||||||
OPT_DEFS += -DAPI_ENABLE
|
OPT_DEFS += -DAPI_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/api.c
|
|
||||||
MIDI_ENABLE=yes
|
MIDI_ENABLE=yes
|
||||||
|
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
||||||
|
SRC += $(QUANTUM_DIR)/api.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MUSIC_ENABLE := 0
|
|
||||||
|
|
||||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DAUDIO_ENABLE
|
OPT_DEFS += -DAUDIO_ENABLE
|
||||||
MUSIC_ENABLE := 1
|
MUSIC_ENABLE = yes
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
||||||
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
|
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
|
||||||
@@ -42,19 +40,15 @@ endif
|
|||||||
|
|
||||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||||
OPT_DEFS += -DMIDI_ENABLE
|
OPT_DEFS += -DMIDI_ENABLE
|
||||||
MUSIC_ENABLE := 1
|
MUSIC_ENABLE = yes
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MUSIC_ENABLE), 1)
|
MUSIC_ENABLE ?= no
|
||||||
|
ifeq ($(MUSIC_ENABLE), yes)
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DCOMBO_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(STENO_ENABLE)), yes)
|
ifeq ($(strip $(STENO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DSTENO_ENABLE
|
OPT_DEFS += -DSTENO_ENABLE
|
||||||
VIRTSER_ENABLE ?= yes
|
VIRTSER_ENABLE ?= yes
|
||||||
@@ -76,28 +70,6 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DUCIS_ENABLE
|
|
||||||
UNICODE_COMMON := yes
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DUNICODEMAP_ENABLE
|
|
||||||
UNICODE_COMMON := yes
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DUNICODE_ENABLE
|
|
||||||
UNICODE_COMMON := yes
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
|
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
|
||||||
EEPROM_DRIVER ?= vendor
|
EEPROM_DRIVER ?= vendor
|
||||||
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
||||||
@@ -245,31 +217,18 @@ ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DKEY_LOCK_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||||
OPT_DEFS += -DPRINTING_ENABLE
|
OPT_DEFS += -DPRINTING_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
|
||||||
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
|
|
||||||
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||||
|
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
||||||
|
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
||||||
|
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
||||||
|
COMMON_VPATH += $(SERIAL_PATH)
|
||||||
|
|
||||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||||
OPT_DEFS += $(SERIAL_DEFS)
|
OPT_DEFS += $(SERIAL_DEFS)
|
||||||
VAPTH += $(SERIAL_PATH)
|
VAPTH += $(SERIAL_PATH)
|
||||||
@@ -363,34 +322,16 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
|||||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(WPM_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/wpm.c
|
||||||
|
OPT_DEFS += -DWPM_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/encoder.c
|
SRC += $(QUANTUM_DIR)/encoder.c
|
||||||
OPT_DEFS += -DENCODER_ENABLE
|
OPT_DEFS += -DENCODER_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HAPTIC_ENABLE ?= no
|
|
||||||
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
|
||||||
SRC += haptic.c
|
|
||||||
OPT_DEFS += -DHAPTIC_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
|
|
||||||
SRC += DRV2605L.c
|
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
|
||||||
OPT_DEFS += -DDRV2605L
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
|
||||||
SRC += solenoid.c
|
|
||||||
OPT_DEFS += -DSOLENOID_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
|
||||||
SRC += drivers/avr/hd44780.c
|
|
||||||
OPT_DEFS += -DHD44780_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
|
ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
|
||||||
OPT_DEFS += -DVELOCIKEY_ENABLE
|
OPT_DEFS += -DVELOCIKEY_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/velocikey.c
|
SRC += $(QUANTUM_DIR)/velocikey.c
|
||||||
@@ -409,26 +350,11 @@ ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/dynamic_keymap.c
|
SRC += $(QUANTUM_DIR)/dynamic_keymap.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(LEADER_ENABLE)), yes)
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
|
|
||||||
OPT_DEFS += -DLEADER_ENABLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/dip_switch.c
|
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||||
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
|
||||||
|
|
||||||
QUANTUM_SRC:= \
|
|
||||||
$(QUANTUM_DIR)/quantum.c \
|
|
||||||
$(QUANTUM_DIR)/keymap_common.c \
|
|
||||||
$(QUANTUM_DIR)/keycode_config.c
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
||||||
|
|
||||||
CUSTOM_MATRIX ?= no
|
CUSTOM_MATRIX ?= no
|
||||||
@@ -486,6 +412,29 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
|||||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HAPTIC_ENABLE ?= no
|
||||||
|
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||||
|
SRC += haptic.c
|
||||||
|
OPT_DEFS += -DHAPTIC_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
|
||||||
|
SRC += DRV2605L.c
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
|
OPT_DEFS += -DDRV2605L
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
||||||
|
SRC += solenoid.c
|
||||||
|
OPT_DEFS += -DSOLENOID_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||||
|
SRC += drivers/avr/hd44780.c
|
||||||
|
OPT_DEFS += -DHD44780_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
||||||
OPT_DEFS += -DOLED_DRIVER_ENABLE
|
OPT_DEFS += -DOLED_DRIVER_ENABLE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/oled
|
COMMON_VPATH += $(DRIVER_PATH)/oled
|
||||||
@@ -493,10 +442,34 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
|||||||
SRC += oled_driver.c
|
SRC += oled_driver.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include $(DRIVER_PATH)/qwiic/qwiic.mk
|
||||||
|
|
||||||
|
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUCIS_ENABLE
|
||||||
|
UNICODE_COMMON := yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUNICODEMAP_ENABLE
|
||||||
|
UNICODE_COMMON := yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DUNICODE_ENABLE
|
||||||
|
UNICODE_COMMON := yes
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||||
|
endif
|
||||||
|
|
||||||
SPACE_CADET_ENABLE ?= yes
|
SPACE_CADET_ENABLE ?= yes
|
||||||
ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
||||||
OPT_DEFS += -DSPACE_CADET_ENABLE
|
OPT_DEFS += -DSPACE_CADET_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MAGIC_ENABLE ?= yes
|
MAGIC_ENABLE ?= yes
|
||||||
@@ -515,3 +488,31 @@ ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
|
||||||
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
|
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||||
|
OPT_DEFS += -DCOMBO_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||||
|
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
|
||||||
|
OPT_DEFS += -DKEY_LOCK_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(LEADER_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||||
|
OPT_DEFS += -DLEADER_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
||||||
|
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
||||||
|
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
|
||||||
|
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@@ -80,6 +80,7 @@
|
|||||||
* [Terminal](feature_terminal.md)
|
* [Terminal](feature_terminal.md)
|
||||||
* [Unicode](feature_unicode.md)
|
* [Unicode](feature_unicode.md)
|
||||||
* [Userspace](feature_userspace.md)
|
* [Userspace](feature_userspace.md)
|
||||||
|
* [WPM Calculation](feature_wpm.md)
|
||||||
|
|
||||||
* Hardware Features
|
* Hardware Features
|
||||||
* Displays
|
* Displays
|
||||||
|
|||||||
@@ -88,6 +88,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Advanced Macros
|
||||||
|
|
||||||
|
In addition to the `process_record_user()` function, is the `post_process_record_user()` function. This runs after `process_record` and can be used to do things after a keystroke has been sent. This is useful if you want to have a key pressed before and released after a normal key, for instance.
|
||||||
|
|
||||||
|
In this example, we modify most normal keypresses so that `F22` is pressed before the keystroke is normally sent, and release it __only after__ it's been released.
|
||||||
|
|
||||||
|
```c
|
||||||
|
static uint8_t f22_tracker;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_A ... KC_F21: //notice how it skips over F22
|
||||||
|
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_F22); //this means to send F22 down
|
||||||
|
f22_tracker++;
|
||||||
|
register_code(keycode);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_A ... KC_F21: //notice how it skips over F22
|
||||||
|
case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
f22_tracker--;
|
||||||
|
if (!f22_tracker) {
|
||||||
|
unregister_code(KC_F22); //this means to send F22 up
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### TAP, DOWN and UP
|
### TAP, DOWN and UP
|
||||||
|
|
||||||
You may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`.
|
You may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`.
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Word Per Minute (WPM) Calculcation
|
||||||
|
|
||||||
|
The WPM feature uses time between keystrokes to compute a rolling average words
|
||||||
|
per minute rate and makes this available for various uses.
|
||||||
|
|
||||||
|
Enable the WPM system by adding this to your `rules.mk`:
|
||||||
|
|
||||||
|
WPM_ENABLE = yes
|
||||||
|
|
||||||
|
For split keyboards using soft serial, the computed WPM
|
||||||
|
score will be available on the master AND slave half.
|
||||||
|
|
||||||
|
## Public Functions
|
||||||
|
|
||||||
|
`uint8_t get_current_wpm(void);`
|
||||||
|
This function returns the current WPM as an unsigned integer.
|
||||||
|
|
||||||
|
|
||||||
|
## Customized keys for WPM calc
|
||||||
|
|
||||||
|
By default, the WPM score only includes letters, numbers, space and some
|
||||||
|
punctuation. If you want to change the set of characters considered as part of
|
||||||
|
the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)`
|
||||||
|
and return true for any characters you would like included in the calculation,
|
||||||
|
or false to not count that particular keycode.
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# Eclipse を使った ARM デバッグ
|
# Eclipse を使った ARM デバッグ
|
||||||
|
|
||||||
<!---
|
<!---
|
||||||
original document: eae21eed7:docs/arm_debugging.md
|
original document: 0.8.58:docs/arm_debugging.md
|
||||||
git diff eae21eed7 HEAD -- docs/arm_debugging.md | cat
|
git diff 0.8.58 HEAD -- docs/arm_debugging.md | cat
|
||||||
-->
|
-->
|
||||||
|
|
||||||
このページでは、SWD アダプタとオープンソース/フリーツールを使って ARM MCU をデバッグするためのセットアップ方法について説明します。このガイドでは、GNU MCU Eclipse IDE for C/C++ Developers および OpenOCD を必要な依存関係と一緒にインストールします。
|
このページでは、SWD アダプタとオープンソース/フリーツールを使って ARM MCU をデバッグするためのセットアップ方法について説明します。このガイドでは、GNU MCU Eclipse IDE for C/C++ Developers および OpenOCD を必要な依存関係と一緒にインストールします。
|
||||||
@@ -60,7 +60,7 @@ Java は Eclipse で必要とされるため、[ここ](https://www.oracle.com/t
|
|||||||
|
|
||||||
Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、Devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。
|
Eclipse に QMK をビルドしようとするデバイスを教える必要があります。QMK フォルダを右クリック -> Properties -> C/C++ Build -> Settings を選択します。Devices タブを選択し、Devices の下から MCU の適切な種類を選択します。私の例では、STM32F303CC です。
|
||||||
|
|
||||||
この間に、Build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。
|
この間に、Build コマンドもセットアップしましょう。C/C++ Build を選択し、Behavior タブを選択します。Build コマンドのところで、`all` を必要な make コマンドに置き換えます。例えば、rev6 Planck の default キーマップの場合、これは `planck/rev6:default` になります。Apply and Close を選択します。
|
||||||
|
|
||||||
## ビルド
|
## ビルド
|
||||||
|
|
||||||
@@ -70,13 +70,13 @@ Eclipse に QMK をビルドしようとするデバイスを教える必要が
|
|||||||
|
|
||||||
### デバッガの接続
|
### デバッガの接続
|
||||||
|
|
||||||
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCU を 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
|
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCU を完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
|
||||||
|
|
||||||
注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。
|
注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。
|
||||||
|
|
||||||
### デバッガの設定
|
### デバッガの設定
|
||||||
|
|
||||||
QMK フォルダを右クリックし、Debug As -> Debug Configurations... を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは stm32f3discovery.cfg と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。
|
QMK フォルダを右クリックし、Debug As -> Debug Configurations... を選択します。ここで、GDB OpenOCD Debugging をダブルクリックします。Debugger タブを選択し、MCU に必要な設定を入力します。これを見つけるにはいじったりググったりする必要があるかもしれません。STM32F3 用のデフォルトスクリプトは `stm32f3discovery.cfg` と呼ばれます。OpenOCD に伝えるには、Config options で `-f board/stm32f3discovery.cfg` と入力します。
|
||||||
|
|
||||||
注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。
|
注意: 私の場合、この設定スクリプトはリセット操作を無効にするために編集が必要です。スクリプトの場所は、通常はパス `openocd/version/.content/scripts/board` の下の実際の実行可能フィールドの中で見つかります。ここで、私は `reset_config srst_only` を `reset_config none` に編集しました。
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ Apply and Close を選択します。
|
|||||||
|
|
||||||
キーボードをリセットしてください。
|
キーボードをリセットしてください。
|
||||||
|
|
||||||
虫アイコンをクリックし、もし全てうまく行けば Debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止するので、Play ボタンを押します。全てのデバッガのほとんどの機能は ARM MCU で動作しますが、正確な詳細については google があなたのお友達です!
|
虫アイコンをクリックし、もし全てうまく行けば Debug パースペクティブに移動します。ここでは、main 関数の最初でプログラムカウンタが停止し、Play ボタンが押されるのを待ちます。全てのデバッガのほとんどの機能は Arm MCU で動作しますが、正確な詳細については Google があなたのお友達です!
|
||||||
|
|
||||||
|
|
||||||
ハッピーデバッギング!
|
ハッピーデバッギング!
|
||||||
@@ -162,6 +162,15 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
|||||||
|
|
||||||
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
|
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
|
||||||
|
|
||||||
|
After this is called, `post_process_record()` is called, which can be used to handle additional cleanup that needs to be run after the keycode is normally handled.
|
||||||
|
|
||||||
|
* [`void post_process_record(keyrecord_t *record)`]()
|
||||||
|
* [`void post_process_record_quantum(keyrecord_t *record)`]()
|
||||||
|
* [Map this record to a keycode]()
|
||||||
|
* [`void post_process_clicky(uint16_t keycode, keyrecord_t *record)`]()
|
||||||
|
* [`void post_process_record_kb(uint16_t keycode, keyrecord_t *record)`]()
|
||||||
|
* [`void post_process_record_user(uint16_t keycode, keyrecord_t *record)`]()
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
#### Mouse Handling
|
#### Mouse Handling
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,70 @@
|
|||||||
{ k50, ___, k52, ___ } \
|
{ k50, ___, k52, ___ } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 6x4 numpad with split Plus and 0 keys
|
||||||
|
* ,-------------------.
|
||||||
|
* | 00 | 01 | 02 | 03 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 10 | 11 | 12 | 13 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 20 | 21 | 22 | 23 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 30 | 31 | 32 | 33 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 40 | 41 | 42 | |
|
||||||
|
* |----|----|----| 43 |
|
||||||
|
* | 50 | 51 | 52 | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
#define LAYOUT_numpad_6x4_split_plus_zero( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, k23, \
|
||||||
|
k30, k31, k32, k33, \
|
||||||
|
k40, k41, k42, \
|
||||||
|
k50, k51, k52, k43 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03 }, \
|
||||||
|
{ k10, k11, k12, k13 }, \
|
||||||
|
{ k20, k21, k22, k23 }, \
|
||||||
|
{ k30, k31, k32, k33 }, \
|
||||||
|
{ k40, k41, k42, k43 }, \
|
||||||
|
{ k50, k51, k52, ___ } \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 6x4 numpad with split 0 key
|
||||||
|
* ,-------------------.
|
||||||
|
* | 00 | 01 | 02 | 03 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 10 | 11 | 12 | 13 |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 20 | 21 | 22 | |
|
||||||
|
* |----|----|----| 23 |
|
||||||
|
* | 30 | 31 | 32 | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 40 | 41 | 42 | |
|
||||||
|
* |----|----|----| 43 |
|
||||||
|
* | 50 | 51 | 52 | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
#define LAYOUT_numpad_6x4_split_zero( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, \
|
||||||
|
k30, k31, k32, k23, \
|
||||||
|
k40, k41, k42, \
|
||||||
|
k50, k51, k52, k43 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03 }, \
|
||||||
|
{ k10, k11, k12, k13 }, \
|
||||||
|
{ k20, k21, k22, k23 }, \
|
||||||
|
{ k30, k31, k32, ___ }, \
|
||||||
|
{ k40, k41, k42, k43 }, \
|
||||||
|
{ k50, k51, k52, ___ } \
|
||||||
|
}
|
||||||
// Add backwards compatibility for existing keymaps
|
// Add backwards compatibility for existing keymaps
|
||||||
#define cospad_bl_led_on backlight_enable
|
#define cospad_bl_led_on backlight_enable
|
||||||
#define cospad_bl_led_off backlight_disable
|
#define cospad_bl_led_off backlight_disable
|
||||||
|
|||||||
@@ -102,6 +102,71 @@
|
|||||||
{"x":2, "y":5},
|
{"x":2, "y":5},
|
||||||
{"x":3, "y":5}
|
{"x":3, "y":5}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"LAYOUT_numpad_6x4_split_plus_zero": {
|
||||||
|
"key_count": 23,
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
{"x":3, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":3},
|
||||||
|
|
||||||
|
{"x":0, "y":4},
|
||||||
|
{"x":1, "y":4},
|
||||||
|
{"x":2, "y":4},
|
||||||
|
|
||||||
|
{"x":0, "y":5},
|
||||||
|
{"x":1, "y":5},
|
||||||
|
{"x":2, "y":5},
|
||||||
|
{"x":3, "y":4, "h":2}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_numpad_6x4_split_zero": {
|
||||||
|
"key_count": 22,
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":2, "h":2},
|
||||||
|
|
||||||
|
{"x":0, "y":4},
|
||||||
|
{"x":1, "y":4},
|
||||||
|
{"x":2, "y":4},
|
||||||
|
|
||||||
|
{"x":0, "y":5},
|
||||||
|
{"x":1, "y":5},
|
||||||
|
{"x":2, "y":5},
|
||||||
|
{"x":3, "y":4, "h":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This keymap is based on the default keymap for the cospad.
|
||||||
|
* It was adapted for the split Plus and split 0 layout focusing on the "00" key.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
DBL_ZRO = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case DBL_ZRO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode DBL_ZRO is pressed
|
||||||
|
SEND_STRING("00");
|
||||||
|
} else {
|
||||||
|
// when keycode DBL_ZRO is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BL,
|
||||||
|
_FL
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,-------------------.
|
||||||
|
* |Esc |TAB | FN | BS |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | NL | / | * | - |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 7 | 8 | 9 | ~ |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 4 | 5 | 6 | + |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 1 | 2 | 3 | |
|
||||||
|
* |----|----|----| En |
|
||||||
|
* | 0 | 00 | . | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_numpad_6x4_split_plus_zero(
|
||||||
|
KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_TILD,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_P0, DBL_ZRO, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,-------------------.
|
||||||
|
* |RGBT| | | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |RGBM|RGBP|BTOG| |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |HUD |HUI |BON | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |SAD |SAI |BOFF| |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |VAD |VAS |BSTP| |
|
||||||
|
* |----|----|----| |
|
||||||
|
* | | |RST | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_numpad_6x4_split_plus_zero(
|
||||||
|
RGB_TOG, _______, _______, _______,
|
||||||
|
RGB_MOD, RGB_M_P, BL_TOGG, _______,
|
||||||
|
RGB_HUD, RGB_HUI, BL_ON, _______,
|
||||||
|
RGB_SAD, RGB_SAI, BL_OFF, _______,
|
||||||
|
RGB_VAD, RGB_VAI, BL_STEP,
|
||||||
|
_______, _______, RESET, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This keymap is based on the default keymap for the cospad.
|
||||||
|
* It was adapted for the split 0 layout focusing on the "00" key.
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
DBL_ZRO = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case DBL_ZRO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// when keycode DBL_ZRO is pressed
|
||||||
|
SEND_STRING("00");
|
||||||
|
} else {
|
||||||
|
// when keycode DBL_ZRO is released
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BL,
|
||||||
|
_FL
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,-------------------.
|
||||||
|
* |Esc |TAB | FN | BS |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | NL | / | * | - |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 7 | 8 | 9 | |
|
||||||
|
* |----|----|----| + |
|
||||||
|
* | 4 | 5 | 6 | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* | 1 | 2 | 3 | |
|
||||||
|
* |----|----|----| En |
|
||||||
|
* | 0 | 00 | . | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_numpad_6x4_split_zero(
|
||||||
|
KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_P7, KC_P8, KC_P9,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_P0, DBL_ZRO, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,-------------------.
|
||||||
|
* |RGBT| | | |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |RGBM|RGBP|BTOG| |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |HUD |HUI |BON | |
|
||||||
|
* |----|----|----| |
|
||||||
|
* |SAD |SAI |BOFF| |
|
||||||
|
* |----|----|----|----|
|
||||||
|
* |VAD |VAS |BSTP| |
|
||||||
|
* |----|----|----| |
|
||||||
|
* | | |RST | |
|
||||||
|
* `-------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_numpad_6x4_split_zero(
|
||||||
|
RGB_TOG, _______, _______, _______,
|
||||||
|
RGB_MOD, RGB_M_P, BL_TOGG, _______,
|
||||||
|
RGB_HUD, RGB_HUI, BL_ON,
|
||||||
|
RGB_SAD, RGB_SAI, BL_OFF, _______,
|
||||||
|
RGB_VAD, RGB_VAI, BL_STEP,
|
||||||
|
_______, _______, RESET, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ; │ + │ ě │ š │ č │ ř │ ž │ ý │ á │ í │ é │ = │ ´ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ ú │ ) │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ů │ § │ ¨ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ \ │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CZ_SCLN KC_GRV // ;
|
||||||
|
#define CZ_PLUS KC_1 // +
|
||||||
|
#define CZ_ECAR KC_2 // ě
|
||||||
|
#define CZ_SCAR KC_3 // š
|
||||||
|
#define CZ_CCAR KC_4 // č
|
||||||
|
#define CZ_RCAR KC_5 // ř
|
||||||
|
#define CZ_ZCAR KC_6 // ž
|
||||||
|
#define CZ_YACU KC_7 // ý
|
||||||
|
#define CZ_AACU KC_8 // á
|
||||||
|
#define CZ_IACU KC_9 // í
|
||||||
|
#define CZ_EACU KC_0 // é
|
||||||
|
#define CZ_EQL KC_MINS // =
|
||||||
|
#define CZ_ACUT KC_EQL // ´ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define CZ_Q KC_Q // Q
|
||||||
|
#define CZ_W KC_W // W
|
||||||
|
#define CZ_E KC_E // E
|
||||||
|
#define CZ_R KC_R // R
|
||||||
|
#define CZ_T KC_T // T
|
||||||
|
#define CZ_Z KC_Y // Z
|
||||||
|
#define CZ_U KC_U // U
|
||||||
|
#define CZ_I KC_I // I
|
||||||
|
#define CZ_O KC_O // O
|
||||||
|
#define CZ_P KC_P // P
|
||||||
|
#define CZ_UACU KC_LBRC // ú
|
||||||
|
#define CZ_RPRN KC_RBRC // )
|
||||||
|
// Row 3
|
||||||
|
#define CZ_A KC_A // A
|
||||||
|
#define CZ_S KC_S // S
|
||||||
|
#define CZ_D KC_D // D
|
||||||
|
#define CZ_F KC_F // F
|
||||||
|
#define CZ_G KC_G // G
|
||||||
|
#define CZ_H KC_H // H
|
||||||
|
#define CZ_J KC_J // J
|
||||||
|
#define CZ_K KC_K // K
|
||||||
|
#define CZ_L KC_L // L
|
||||||
|
#define CZ_URNG KC_SCLN // ů
|
||||||
|
#define CZ_SECT KC_QUOT // §
|
||||||
|
#define CZ_DIAE KC_NUHS // ¨ (dead)
|
||||||
|
// Row 4
|
||||||
|
#define CZ_BSLS KC_NUBS // (backslash)
|
||||||
|
#define CZ_Y KC_Z // Y
|
||||||
|
#define CZ_X KC_X // X
|
||||||
|
#define CZ_C KC_C // C
|
||||||
|
#define CZ_V KC_V // V
|
||||||
|
#define CZ_B KC_B // B
|
||||||
|
#define CZ_N KC_N // N
|
||||||
|
#define CZ_M KC_M // M
|
||||||
|
#define CZ_COMM KC_COMM // ,
|
||||||
|
#define CZ_DOT KC_DOT // .
|
||||||
|
#define CZ_MINS KC_SLSH // -
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ° │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ % │ ˇ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ / │ ( │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ " │ ! │ ' │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ | │ │ │ │ │ │ │ │ ; │ : │ _ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CZ_RNGA S(CZ_SCLN) // ° (dead)
|
||||||
|
#define CZ_1 S(CZ_PLUS) // 1
|
||||||
|
#define CZ_2 S(CZ_ECAR) // 2
|
||||||
|
#define CZ_3 S(CZ_SCAR) // 3
|
||||||
|
#define CZ_4 S(CZ_CCAR) // 4
|
||||||
|
#define CZ_5 S(CZ_RCAR) // 5
|
||||||
|
#define CZ_6 S(CZ_ZCAR) // 6
|
||||||
|
#define CZ_7 S(CZ_YACU) // 7
|
||||||
|
#define CZ_8 S(CZ_AACU) // 8
|
||||||
|
#define CZ_9 S(CZ_IACU) // 9
|
||||||
|
#define CZ_0 S(CZ_EACU) // 0
|
||||||
|
#define CZ_PERC S(CZ_PLUS) // %
|
||||||
|
#define CZ_CARN S(CZ_ACUT) // ˇ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define CZ_SLSH S(CZ_UACU) // /
|
||||||
|
#define CZ_LPRN S(CZ_RPRN) // (
|
||||||
|
// Row 3
|
||||||
|
#define CZ_DQUO S(CZ_URNG) // "
|
||||||
|
#define CZ_EXLM S(CZ_SECT) // !
|
||||||
|
#define CZ_QUOT S(CZ_DIAE) // '
|
||||||
|
// Row 4
|
||||||
|
#define CZ_PIPE S(CZ_BSLS) // |
|
||||||
|
#define CZ_SCLN S(CZ_COMM) // ;
|
||||||
|
#define CZ_COLN S(CZ_DOT) // :
|
||||||
|
#define CZ_UNDS S(CZ_MINS) // _
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ ~ │ │ ^ │ ˘ │ │ ˛ │ ` │ ˙ │ │ ˝ │ │ ¸ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ € │ │ │ │ │ │ │ │ ÷ │ × │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ đ │ Đ │ [ │ ] │ │ │ ł │ Ł │ $ │ ß │ ¤ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ │ │ # │ & │ @ │ { │ } │ │ < │ > │ * │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CZ_TILD ALGR(CZ_PLUS) // ~
|
||||||
|
#define CZ_CIRC ALGR(CZ_SCAR) // ^ (dead)
|
||||||
|
#define CZ_BREV ALGR(CZ_CCAR) // ˘ (dead)
|
||||||
|
#define CZ_OGON ALGR(CZ_ZCAR) // ˛ (dead)
|
||||||
|
#define CZ_GRV ALGR(CZ_YACU) // ` (dead)
|
||||||
|
#define CZ_DOTA ALGR(CZ_AACU) // ˙ (dead)
|
||||||
|
#define CZ_DACU ALGR(CZ_EACU) // ˝ (dead)
|
||||||
|
#define CZ_CEDL ALGR(CZ_ACUT) // ¸ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define CZ_EURO ALGR(CZ_E) // €
|
||||||
|
#define CZ_DIV ALGR(CZ_UACU) // ÷
|
||||||
|
#define CZ_MUL ALGR(CZ_RPRN) // ×
|
||||||
|
// Row 3
|
||||||
|
#define CZ_LDST ALGR(CZ_S) // đ
|
||||||
|
#define CZ_CDST ALGR(CZ_D) // Đ
|
||||||
|
#define CZ_LBRC ALGR(CZ_F) // [
|
||||||
|
#define CZ_RBRC ALGR(CZ_G) // ]
|
||||||
|
#define CZ_LLST ALGR(CZ_K) // ł
|
||||||
|
#define CZ_CLST ALGR(CZ_L) // Ł
|
||||||
|
#define CZ_DLR ALGR(CZ_URNG) // $
|
||||||
|
#define CZ_SS ALGR(CZ_SECT) // ß
|
||||||
|
#define CZ_CURR ALGR(CZ_DIAE) // ¤
|
||||||
|
// Row 4
|
||||||
|
#define CZ_HASH ALGR(CZ_X) // #
|
||||||
|
#define CZ_AMPR ALGR(CZ_C) // &
|
||||||
|
#define CZ_AT ALGR(CZ_V) // @
|
||||||
|
#define CZ_LCBR ALGR(CZ_B) // {
|
||||||
|
#define CZ_RCBR ALGR(CZ_N) // }
|
||||||
|
#define CZ_LABK ALGR(CZ_COMM) // <
|
||||||
|
#define CZ_RABK ALGR(CZ_DOT) // >
|
||||||
|
#define CZ_ASTR ALGR(CZ_MINS) // *
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define FI_SECT KC_GRV // §
|
||||||
|
#define FI_1 KC_1 // 1
|
||||||
|
#define FI_2 KC_2 // 2
|
||||||
|
#define FI_3 KC_3 // 3
|
||||||
|
#define FI_4 KC_4 // 4
|
||||||
|
#define FI_5 KC_5 // 5
|
||||||
|
#define FI_6 KC_6 // 6
|
||||||
|
#define FI_7 KC_7 // 7
|
||||||
|
#define FI_8 KC_8 // 8
|
||||||
|
#define FI_9 KC_9 // 9
|
||||||
|
#define FI_0 KC_0 // 0
|
||||||
|
#define FI_PLUS KC_MINS // +
|
||||||
|
#define FI_ACUT KC_EQL // ´ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define FI_Q KC_Q // Q
|
||||||
|
#define FI_W KC_W // W
|
||||||
|
#define FI_E KC_E // E
|
||||||
|
#define FI_R KC_R // R
|
||||||
|
#define FI_T KC_T // T
|
||||||
|
#define FI_Y KC_Y // Y
|
||||||
|
#define FI_U KC_U // U
|
||||||
|
#define FI_I KC_I // I
|
||||||
|
#define FI_O KC_O // O
|
||||||
|
#define FI_P KC_P // P
|
||||||
|
#define FI_ARNG KC_LBRC // Å
|
||||||
|
#define FI_DIAE KC_RBRC // ¨ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define FI_A KC_A // A
|
||||||
|
#define FI_S KC_S // S
|
||||||
|
#define FI_D KC_D // D
|
||||||
|
#define FI_F KC_F // F
|
||||||
|
#define FI_G KC_G // G
|
||||||
|
#define FI_H KC_H // H
|
||||||
|
#define FI_J KC_J // J
|
||||||
|
#define FI_K KC_K // K
|
||||||
|
#define FI_L KC_L // L
|
||||||
|
#define FI_ODIA KC_SCLN // Ö
|
||||||
|
#define FI_ADIA KC_QUOT // Ä
|
||||||
|
#define FI_QUOT KC_NUHS // '
|
||||||
|
// Row 4
|
||||||
|
#define FI_LABK KC_NUBS // <
|
||||||
|
#define FI_Z KC_Z // Z
|
||||||
|
#define FI_X KC_X // X
|
||||||
|
#define FI_C KC_C // C
|
||||||
|
#define FI_V KC_V // V
|
||||||
|
#define FI_B KC_B // B
|
||||||
|
#define FI_N KC_N // N
|
||||||
|
#define FI_M KC_M // M
|
||||||
|
#define FI_COMM KC_COMM // ,
|
||||||
|
#define FI_DOT KC_DOT // .
|
||||||
|
#define FI_MINS KC_SLSH // -
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ½ │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define FI_HALF S(FI_SECT) // ½
|
||||||
|
#define FI_EXLM S(FI_1) // !
|
||||||
|
#define FI_DQUO S(FI_2) // "
|
||||||
|
#define FI_HASH S(FI_3) // #
|
||||||
|
#define FI_CURR S(FI_4) // ¤
|
||||||
|
#define FI_PERC S(FI_5) // %
|
||||||
|
#define FI_AMPR S(FI_6) // &
|
||||||
|
#define FI_SLSH S(FI_7) // /
|
||||||
|
#define FI_LPRN S(FI_8) // (
|
||||||
|
#define FI_RPRN S(FI_9) // )
|
||||||
|
#define FI_EQL S(FI_0) // =
|
||||||
|
#define FI_QUES S(FI_PLUS) // ?
|
||||||
|
#define FI_GRV S(FI_ACUT) // ` (dead)
|
||||||
|
// Row 2
|
||||||
|
#define FI_CIRC S(FI_DIAE) // ^ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define FI_ASTR S(FI_QUOT) // *
|
||||||
|
// Row 4
|
||||||
|
#define FI_RABK S(FI_LABK) // >
|
||||||
|
#define FI_SCLN S(FI_COMM) // ;
|
||||||
|
#define FI_COLN S(FI_DOT) // :
|
||||||
|
#define FI_UNDS S(FI_MINS) // _
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ \ │ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ | │ │ │ │ │ │ │ µ │ │ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define FI_AT ALGR(FI_2) // @
|
||||||
|
#define FI_PND ALGR(FI_3) // £
|
||||||
|
#define FI_DLR ALGR(FI_4) // $
|
||||||
|
#define FI_EURO ALGR(FI_5) // €
|
||||||
|
#define FI_LCBR ALGR(FI_7) // {
|
||||||
|
#define FI_LBRC ALGR(FI_8) // [
|
||||||
|
#define FI_RBRC ALGR(FI_9) // ]
|
||||||
|
#define FI_RCBR ALGR(FI_0) // }
|
||||||
|
#define FI_BSLS ALGR(FI_PLUS) // (backslash)
|
||||||
|
// Row 2
|
||||||
|
#define FI_TILD ALGR(FI_DIAE) // ~ (dead)
|
||||||
|
// Row 4
|
||||||
|
#define FI_PIPE ALGR(FI_LABK) // |
|
||||||
|
#define FI_MICR ALGR(FI_M) // µ
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ° │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ Ö │ - │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ð │ ' │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Æ │ ´ │ + │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ Þ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define IS_RNGA KC_GRV // ° (dead)
|
||||||
|
#define IS_1 KC_1 // 1
|
||||||
|
#define IS_2 KC_2 // 2
|
||||||
|
#define IS_3 KC_3 // 3
|
||||||
|
#define IS_4 KC_4 // 4
|
||||||
|
#define IS_5 KC_5 // 5
|
||||||
|
#define IS_6 KC_6 // 6
|
||||||
|
#define IS_7 KC_7 // 7
|
||||||
|
#define IS_8 KC_8 // 8
|
||||||
|
#define IS_9 KC_9 // 9
|
||||||
|
#define IS_0 KC_0 // 0
|
||||||
|
#define IS_ODIA KC_MINS // Ö
|
||||||
|
#define IS_MINS KC_EQL // -
|
||||||
|
// Row 2
|
||||||
|
#define IS_Q KC_Q // Q
|
||||||
|
#define IS_W KC_W // W
|
||||||
|
#define IS_E KC_E // E
|
||||||
|
#define IS_R KC_R // R
|
||||||
|
#define IS_T KC_T // T
|
||||||
|
#define IS_Y KC_Y // Y
|
||||||
|
#define IS_U KC_U // U
|
||||||
|
#define IS_I KC_I // I
|
||||||
|
#define IS_O KC_O // O
|
||||||
|
#define IS_P KC_P // P
|
||||||
|
#define IS_ETH KC_LBRC // Ð
|
||||||
|
#define IS_QUOT KC_RBRC // '
|
||||||
|
// Row 3
|
||||||
|
#define IS_A KC_A // A
|
||||||
|
#define IS_S KC_S // S
|
||||||
|
#define IS_D KC_D // D
|
||||||
|
#define IS_F KC_F // F
|
||||||
|
#define IS_G KC_G // G
|
||||||
|
#define IS_H KC_H // H
|
||||||
|
#define IS_J KC_J // J
|
||||||
|
#define IS_K KC_K // K
|
||||||
|
#define IS_L KC_L // L
|
||||||
|
#define IS_AE KC_SCLN // Æ
|
||||||
|
#define IS_ACUT KC_QUOT // ´ (dead)
|
||||||
|
#define IS_PLUS KC_NUHS // +
|
||||||
|
// Row 4
|
||||||
|
#define IS_LABK KC_NUBS // <
|
||||||
|
#define IS_Z KC_Z // Z
|
||||||
|
#define IS_X KC_X // X
|
||||||
|
#define IS_C KC_C // C
|
||||||
|
#define IS_V KC_V // V
|
||||||
|
#define IS_B KC_B // B
|
||||||
|
#define IS_N KC_N // N
|
||||||
|
#define IS_M KC_M // M
|
||||||
|
#define IS_COMM KC_COMM // ,
|
||||||
|
#define IS_DOT KC_DOT // .
|
||||||
|
#define IS_THRN KC_SLSH // Þ
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ¨ │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ │ _ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ ? │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define IS_DIAE S(IS_RNGA) // ¨ (dead)
|
||||||
|
#define IS_EXLM S(IS_1) // !
|
||||||
|
#define IS_DQUO S(IS_2) // "
|
||||||
|
#define IS_HASH S(IS_3) // #
|
||||||
|
#define IS_DLR S(IS_4) // $
|
||||||
|
#define IS_PERC S(IS_5) // %
|
||||||
|
#define IS_AMPR S(IS_6) // &
|
||||||
|
#define IS_SLSH S(IS_7) // /
|
||||||
|
#define IS_LPRN S(IS_8) // (
|
||||||
|
#define IS_RPRN S(IS_9) // )
|
||||||
|
#define IS_EQL S(IS_0) // =
|
||||||
|
#define IS_UNDS S(IS_MINS) // _
|
||||||
|
// Row 2
|
||||||
|
#define IS_QUES S(IS_QUOT) // ?
|
||||||
|
// Row 3
|
||||||
|
#define IS_ASTR S(IS_PLUS) // *
|
||||||
|
// Row 4
|
||||||
|
#define IS_RABK S(IS_LABK) // >
|
||||||
|
#define IS_SCLN S(IS_COMM) // ;
|
||||||
|
#define IS_COLN S(IS_DOT) // :
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ° │ │ │ │ │ │ │ { │ [ │ ] │ } │ \ │ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ @ │ │ € │ │ │ │ │ │ │ │ │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ ^ │ ` │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ | │ │ │ │ │ │ │ µ │ │ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define IS_DEG ALGR(IS_RNGA) // °
|
||||||
|
#define IS_LCBR ALGR(IS_7) // {
|
||||||
|
#define IS_LBRC ALGR(IS_8) // [
|
||||||
|
#define IS_RBRC ALGR(IS_9) // ]
|
||||||
|
#define IS_RCBR ALGR(IS_0) // }
|
||||||
|
#define IS_BSLS ALGR(IS_ODIA) // (backslash)
|
||||||
|
// Row 2
|
||||||
|
#define IS_AT ALGR(IS_Q) // @
|
||||||
|
#define IS_EURO ALGR(IS_E) // €
|
||||||
|
#define IS_TILD ALGR(IS_QUOT) // ~
|
||||||
|
// Row 3
|
||||||
|
#define IS_CIRC ALGR(IS_ACUT) // ^ (dead)
|
||||||
|
#define IS_GRV ALGR(IS_PLUS) // ` (dead)
|
||||||
|
// Row 4
|
||||||
|
#define IS_PIPE ALGR(IS_LABK) // |
|
||||||
|
#define IS_MICR ALGR(IS_M) // µ
|
||||||
@@ -22,15 +22,15 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
* │ \ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ « │ │
|
* │ \ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ « │ │
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ + │ ´ │ │
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ + │ ´ │ │
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ º │ ~ │ │
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ º │ ~ │ │
|
||||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
* │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
*/
|
*/
|
||||||
// Row 1
|
// Row 1
|
||||||
@@ -88,15 +88,15 @@
|
|||||||
|
|
||||||
/* Shifted symbols
|
/* Shifted symbols
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
* │ | │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ » │ │
|
* │ | │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ » │ │
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ * │ ` │ │
|
* │ │ │ │ │ │ │ │ │ │ │ │ * │ ` │ │
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ ª │ ^ │ │
|
* │ │ │ │ │ │ │ │ │ │ │ │ ª │ ^ │ │
|
||||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │
|
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │
|
||||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
* │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
*/
|
*/
|
||||||
// Row 1
|
// Row 1
|
||||||
@@ -127,15 +127,15 @@
|
|||||||
|
|
||||||
/* AltGr symbols
|
/* AltGr symbols
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
* │ │ │ @ │ £ │ § │ │ │ { │ [ │ ] │ } │ │ │ │
|
* │ │ │ @ │ £ │ § │ │ │ { │ [ │ ] │ } │ │ │ │
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
* │ │ │ │ € │ │ │ │ │ │ │ │ ¨ │ │ │
|
* │ │ │ │ € │ │ │ │ │ │ │ │ ¨ │ │ │
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
* │ │ │ │ │ │ │ │ │
|
* │ │ │ │ │ │ │ │ │
|
||||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
*/
|
*/
|
||||||
// Row 1
|
// Row 1
|
||||||
|
|||||||
@@ -140,15 +140,15 @@
|
|||||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
*/
|
*/
|
||||||
// Row 1
|
// Row 1
|
||||||
#define UK_BRKP ALGR(UK_GRV) // ¦
|
#define UK_BRKP ALGR(UK_GRV) // ¦
|
||||||
#define UK_EURO ALGR(UK_4) // €
|
#define UK_EURO ALGR(UK_4) // €
|
||||||
// Row 2
|
// Row 2
|
||||||
#define UK_EACU ALGR(KC_E) // É
|
#define UK_EACU ALGR(KC_E) // É
|
||||||
#define UK_UACU ALGR(KC_U) // Ú
|
#define UK_UACU ALGR(KC_U) // Ú
|
||||||
#define UK_IACU ALGR(KC_I) // Í
|
#define UK_IACU ALGR(KC_I) // Í
|
||||||
#define UK_OACU ALGR(KC_O) // Ó
|
#define UK_OACU ALGR(KC_O) // Ó
|
||||||
// Row 3
|
// Row 3
|
||||||
#define UK_AACU ALGR(KC_A) // Á
|
#define UK_AACU ALGR(KC_A) // Á
|
||||||
|
|
||||||
// DEPRECATED
|
// DEPRECATED
|
||||||
#define UK_ESC KC_ESC
|
#define UK_ESC KC_ESC
|
||||||
|
|||||||
@@ -0,0 +1,206 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||||
|
* │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define US_GRV KC_GRV // ` (dead)
|
||||||
|
#define US_1 KC_1 // 1
|
||||||
|
#define US_2 KC_2 // 2
|
||||||
|
#define US_3 KC_3 // 3
|
||||||
|
#define US_4 KC_4 // 4
|
||||||
|
#define US_5 KC_5 // 5
|
||||||
|
#define US_6 KC_6 // 6
|
||||||
|
#define US_7 KC_7 // 7
|
||||||
|
#define US_8 KC_8 // 8
|
||||||
|
#define US_9 KC_9 // 9
|
||||||
|
#define US_0 KC_0 // 0
|
||||||
|
#define US_MINS KC_MINS // -
|
||||||
|
#define US_EQL KC_EQL // =
|
||||||
|
// Row 2
|
||||||
|
#define US_Q KC_Q // Q
|
||||||
|
#define US_W KC_W // W
|
||||||
|
#define US_E KC_E // E
|
||||||
|
#define US_R KC_R // R
|
||||||
|
#define US_T KC_T // T
|
||||||
|
#define US_Y KC_Y // Y
|
||||||
|
#define US_U KC_U // U
|
||||||
|
#define US_I KC_I // I
|
||||||
|
#define US_O KC_O // O
|
||||||
|
#define US_P KC_P // P
|
||||||
|
#define US_LBRC KC_LBRC // [
|
||||||
|
#define US_RBRC KC_LBRC // ]
|
||||||
|
#define US_BSLS KC_BSLS // (backslash)
|
||||||
|
// Row 3
|
||||||
|
#define US_A KC_A // A
|
||||||
|
#define US_S KC_S // S
|
||||||
|
#define US_D KC_D // D
|
||||||
|
#define US_F KC_F // F
|
||||||
|
#define US_G KC_G // G
|
||||||
|
#define US_H KC_H // H
|
||||||
|
#define US_J KC_J // J
|
||||||
|
#define US_K KC_K // K
|
||||||
|
#define US_L KC_L // L
|
||||||
|
#define US_SCLN KC_SCLN // ;
|
||||||
|
#define US_QUOT KC_QUOT // ' (dead)
|
||||||
|
// Row 4
|
||||||
|
#define US_Z KC_Z // Z
|
||||||
|
#define US_X KC_X // X
|
||||||
|
#define US_C KC_C // C
|
||||||
|
#define US_V KC_V // V
|
||||||
|
#define US_B KC_B // B
|
||||||
|
#define US_N KC_N // N
|
||||||
|
#define US_M KC_M // M
|
||||||
|
#define US_COMM KC_COMM // ,
|
||||||
|
#define US_DOT KC_DOT // .
|
||||||
|
#define US_SLSH KC_SLSH // /
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ : │ " │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ < │ > │ ? │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define US_TILD S(US_GRV) // ~ (dead)
|
||||||
|
#define US_EXLM S(US_1) // !
|
||||||
|
#define US_AT S(US_2) // "
|
||||||
|
#define US_HASH S(US_3) // #
|
||||||
|
#define US_DLR S(US_4) // $
|
||||||
|
#define US_PERC S(US_5) // %
|
||||||
|
#define US_CIRC S(US_6) // ^
|
||||||
|
#define US_AMPR S(US_7) // &
|
||||||
|
#define US_ASTR S(US_8) // *
|
||||||
|
#define US_LPRN S(US_9) // (
|
||||||
|
#define US_RPRN S(US_0) // )
|
||||||
|
#define US_UNDS S(US_MINS) // _
|
||||||
|
#define US_PLUS S(US_EQL) // +
|
||||||
|
// Row 2
|
||||||
|
#define US_LCBR S(US_LBRC) // {
|
||||||
|
#define US_RCBR S(US_RBRC) // }
|
||||||
|
#define US_PIPE S(US_BSLS) // |
|
||||||
|
// Row 3
|
||||||
|
#define US_COLN S(US_SCLN) // :
|
||||||
|
#define US_DQUO S(US_QUOT) // " (dead)
|
||||||
|
// Row 4
|
||||||
|
#define US_LABK S(US_COMM) // <
|
||||||
|
#define US_RABK S(US_DOT) // >
|
||||||
|
#define US_QUES S(US_SLSH) // ?
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ ¡ │ ² │ ³ │ ¤ │ € │ ¼ │ ½ │ ¾ │ ‘ │ ’ │ ¥ │ × │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Ä │ Å │ É │ ® │ Þ │ Ü │ Ú │ Í │ Ó │ Ö │ « │ » │ ¬ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
|
* │ │ Á │ ß │ Ð │ │ │ │ │ │ Ø │ ¶ │ ´ │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||||
|
* │ │ Æ │ │ © │ │ │ Ñ │ µ │ Ç │ │ ¿ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define US_IEXL ALGR(US_1) // ¡
|
||||||
|
#define US_SUP2 ALGR(US_2) // ²
|
||||||
|
#define US_SUP3 ALGR(US_3) // ³
|
||||||
|
#define US_CURR ALGR(US_4) // ¤
|
||||||
|
#define US_EURO ALGR(US_5) // €
|
||||||
|
#define US_QRTR ALGR(US_6) // ¼
|
||||||
|
#define US_HALF ALGR(US_7) // ½
|
||||||
|
#define US_TQTR ALGR(US_8) // ¾
|
||||||
|
#define US_LSQU ALGR(US_9) // ‘
|
||||||
|
#define US_RSQU ALGR(US_0) // ’
|
||||||
|
#define US_YEN ALGR(US_MINS) // ¥
|
||||||
|
#define US_MUL ALGR(US_EQL) // ×
|
||||||
|
// Row 2
|
||||||
|
#define US_ADIA ALGR(US_Q) // Ä
|
||||||
|
#define US_ARNG ALGR(US_W) // Å
|
||||||
|
#define US_EACU ALGR(US_E) // É
|
||||||
|
#define US_REGD ALGR(US_R) // ®
|
||||||
|
#define US_THRN ALGR(US_T) // Þ
|
||||||
|
#define US_UDIA ALGR(US_Y) // Ü
|
||||||
|
#define US_UACU ALGR(US_U) // Ú
|
||||||
|
#define US_IACU ALGR(US_I) // Í
|
||||||
|
#define US_OACU ALGR(US_O) // Ó
|
||||||
|
#define US_ODIA ALGR(US_P) // Ö
|
||||||
|
#define US_LDAQ ALGR(US_LBRC) // «
|
||||||
|
#define US_RDAQ ALGR(US_RBRC) // »
|
||||||
|
#define US_NOT ALGR(US_BSLS) // ¬
|
||||||
|
// Row 3
|
||||||
|
#define US_AACU ALGR(US_A) // Á
|
||||||
|
#define US_SS ALGR(US_S) // ß
|
||||||
|
#define US_ETH ALGR(US_D) // Ð
|
||||||
|
#define US_OSTR ALGR(US_L) // Ø
|
||||||
|
#define US_PILC ALGR(US_SCLN) // ¶
|
||||||
|
#define US_ACUT ALGR(US_QUOT) // ´
|
||||||
|
// Row 4
|
||||||
|
#define US_AE ALGR(US_Z) // Æ
|
||||||
|
#define US_COPY ALGR(US_C) // ©
|
||||||
|
#define US_NTIL ALGR(US_N) // Ñ
|
||||||
|
#define US_MICR ALGR(US_M) // µ
|
||||||
|
#define US_CCED ALGR(US_COMM) // Ç
|
||||||
|
#define US_IQUE ALGR(US_SLSH) // ¿
|
||||||
|
|
||||||
|
/* Shift+AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ ¹ │ │ │ £ │ │ │ │ │ │ │ │ ÷ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ ¦ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
|
* │ │ │ § │ │ │ │ │ │ │ │ ° │ ¨ │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||||
|
* │ │ │ │ ¢ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define US_SUP1 S(ALGR(US_1)) // ¹
|
||||||
|
#define US_PND S(ALGR(US_4)) // £
|
||||||
|
#define US_DIV S(ALGR(US_EQL)) // ÷
|
||||||
|
// Row 2
|
||||||
|
#define US_BRKP S(ALGR(US_BSLS)) // ¦
|
||||||
|
// Row 3
|
||||||
|
#define US_SECT S(ALGR(US_S)) // §
|
||||||
|
#define US_DEG S(ALGR(US_SCLN)) // °
|
||||||
|
#define US_DIAE S(ALGR(US_QUOT)) // ¨
|
||||||
|
// Row 4
|
||||||
|
#define US_CENT S(ALGR(US_C)) // ¢
|
||||||
@@ -40,7 +40,7 @@ const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
@@ -60,7 +60,7 @@ const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Czech layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_czech.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 0, 0, 1, 0, 1),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 0, 1, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 1, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 1, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 1, 0),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 1, 0),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, CZ_SECT, CZ_URNG, CZ_X, CZ_URNG, CZ_EQL, CZ_C, CZ_DIAE,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
CZ_LPRN, CZ_LPRN, CZ_MINS, CZ_PLUS, CZ_COMM, CZ_MINS, CZ_DOT, CZ_UACU,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
CZ_EACU, CZ_PLUS, CZ_ECAR, CZ_SCAR, CZ_CCAR, CZ_RCAR, CZ_ZCAR, CZ_YACU,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
CZ_AACU, CZ_IACU, CZ_DOT, CZ_SCLN, CZ_COMM, CZ_EQL, CZ_DOT, CZ_COMM,
|
||||||
|
// @ A B C D E F G
|
||||||
|
CZ_V, CZ_A, CZ_B, CZ_C, CZ_D, CZ_E, CZ_F, CZ_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
CZ_H, CZ_I, CZ_J, CZ_K, CZ_L, CZ_M, CZ_N, CZ_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
CZ_P, CZ_Q, CZ_R, CZ_S, CZ_T, CZ_U, CZ_V, CZ_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
CZ_X, CZ_Y, CZ_Z, CZ_F, CZ_BSLS, CZ_G, CZ_SCAR, CZ_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
CZ_YACU, CZ_A, CZ_B, CZ_C, CZ_D, CZ_E, CZ_F, CZ_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
CZ_H, CZ_I, CZ_J, CZ_K, CZ_L, CZ_M, CZ_N, CZ_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
CZ_P, CZ_Q, CZ_R, CZ_S, CZ_T, CZ_U, CZ_V, CZ_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
CZ_X, CZ_Y, CZ_Z, CZ_B, CZ_BSLS, CZ_N, CZ_PLUS, KC_DEL
|
||||||
|
};
|
||||||
@@ -40,7 +40,7 @@ const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
@@ -60,7 +60,7 @@ const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Finnish layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_finnish.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 1, 0, 1, 1, 0),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, FI_1, FI_2, FI_3, FI_4, FI_5, FI_6, FI_QUOT,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
FI_8, FI_9, FI_QUOT, FI_PLUS, FI_COMM, FI_MINS, FI_DOT, FI_7,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
FI_0, FI_1, FI_2, FI_3, FI_4, FI_5, FI_6, FI_7,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
FI_8, FI_9, FI_DOT, FI_COMM, FI_LABK, FI_0, FI_LABK, FI_PLUS,
|
||||||
|
// @ A B C D E F G
|
||||||
|
FI_2, FI_A, FI_B, FI_C, FI_D, FI_E, FI_F, FI_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
FI_H, FI_I, FI_J, FI_K, FI_L, FI_M, FI_N, FI_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
FI_P, FI_Q, FI_R, FI_S, FI_T, FI_U, FI_V, FI_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
FI_X, FI_Y, FI_Z, FI_8, FI_PLUS, FI_9, FI_DIAE, FI_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
FI_ACUT, FI_A, FI_B, FI_C, FI_D, FI_E, FI_F, FI_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
FI_H, FI_I, FI_J, FI_K, FI_L, FI_M, FI_N, FI_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
FI_P, FI_Q, FI_R, FI_S, FI_T, FI_U, FI_V, FI_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
FI_X, FI_Y, FI_Z, FI_7, FI_LABK, FI_0, FI_DIAE, KC_DEL
|
||||||
|
};
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Icelandic layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_icelandic.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 0),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, IS_1, IS_2, IS_3, IS_4, IS_5, IS_6, IS_QUOT,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
IS_8, IS_9, IS_PLUS, IS_PLUS, IS_COMM, IS_MINS, IS_DOT, IS_7,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
IS_0, IS_1, IS_2, IS_3, IS_4, IS_5, IS_6, IS_7,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
IS_8, IS_9, IS_DOT, IS_COMM, IS_LABK, IS_0, IS_LABK, IS_QUOT,
|
||||||
|
// @ A B C D E F G
|
||||||
|
IS_Q, IS_A, IS_B, IS_C, IS_D, IS_E, IS_F, IS_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
IS_H, IS_I, IS_J, IS_K, IS_L, IS_M, IS_N, IS_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
IS_P, IS_Q, IS_R, IS_S, IS_T, IS_U, IS_V, IS_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
IS_X, IS_Y, IS_Z, IS_8, IS_ODIA, IS_9, IS_ACUT, IS_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
IS_PLUS, IS_A, IS_B, IS_C, IS_D, IS_E, IS_F, IS_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
IS_H, IS_I, IS_J, IS_K, IS_L, IS_M, IS_N, IS_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
IS_P, IS_Q, IS_R, IS_S, IS_T, IS_U, IS_V, IS_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
IS_X, IS_Y, IS_Z, IS_7, IS_LABK, IS_0, IS_QUOT, KC_DEL
|
||||||
|
};
|
||||||
@@ -40,7 +40,7 @@ const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
@@ -60,7 +60,7 @@ const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
@@ -60,7 +60,7 @@ const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
@@ -60,7 +60,7 @@ const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
|||||||
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0),
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
|||||||
@@ -213,6 +213,8 @@ ifneq ($(findstring STM32F103, $(MCU)),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286))
|
ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286))
|
||||||
|
PROTOCOL = LUFA
|
||||||
|
|
||||||
# Processor frequency.
|
# Processor frequency.
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
# 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
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
|||||||
@@ -17,9 +17,12 @@
|
|||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "process_combo.h"
|
#include "process_combo.h"
|
||||||
|
|
||||||
__attribute__((weak)) combo_t key_combos[COMBO_COUNT] = {
|
#ifndef COMBO_VARIABLE_LEN
|
||||||
|
__attribute__((weak)) combo_t key_combos[COMBO_COUNT] = {};
|
||||||
};
|
#else
|
||||||
|
extern combo_t key_combos[];
|
||||||
|
extern int COMBO_LEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
__attribute__((weak)) void process_combo_event(uint8_t combo_index, bool pressed) {}
|
__attribute__((weak)) void process_combo_event(uint8_t combo_index, bool pressed) {}
|
||||||
|
|
||||||
@@ -141,8 +144,11 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!is_combo_enabled()) {
|
if (!is_combo_enabled()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#ifndef COMBO_VARIABLE_LEN
|
||||||
for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) {
|
for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) {
|
||||||
|
#else
|
||||||
|
for (current_combo_index = 0; current_combo_index < COMBO_LEN; ++current_combo_index) {
|
||||||
|
#endif
|
||||||
combo_t *combo = &key_combos[current_combo_index];
|
combo_t *combo = &key_combos[current_combo_index];
|
||||||
is_combo_key |= process_single_combo(combo, keycode, record);
|
is_combo_key |= process_single_combo(combo, keycode, record);
|
||||||
no_combo_keys_pressed = no_combo_keys_pressed && NO_COMBO_KEYS_ARE_DOWN;
|
no_combo_keys_pressed = no_combo_keys_pressed && NO_COMBO_KEYS_ARE_DOWN;
|
||||||
|
|||||||
+23
-3
@@ -120,6 +120,10 @@ __attribute__((weak)) bool process_record_kb(uint16_t keycode, keyrecord_t *reco
|
|||||||
|
|
||||||
__attribute__((weak)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }
|
__attribute__((weak)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }
|
||||||
|
|
||||||
|
__attribute__((weak)) void post_process_record_kb(uint16_t keycode, keyrecord_t *record) { post_process_record_user(keycode, record); }
|
||||||
|
|
||||||
|
__attribute__((weak)) void post_process_record_user(uint16_t keycode, keyrecord_t *record) {}
|
||||||
|
|
||||||
void reset_keyboard(void) {
|
void reset_keyboard(void) {
|
||||||
clear_keyboard();
|
clear_keyboard();
|
||||||
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
|
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
|
||||||
@@ -172,9 +176,15 @@ uint16_t get_event_keycode(keyevent_t event) {
|
|||||||
return keymap_key_to_keycode(layer_switch_get_layer(event.key), event.key);
|
return keymap_key_to_keycode(layer_switch_get_layer(event.key), event.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main keycode processing function. Hands off handling to other functions,
|
/* Get keycode, and then call keyboard function */
|
||||||
* then processes internal Quantum keycodes, then processes ACTIONs.
|
void post_process_record_quantum(keyrecord_t *record) {
|
||||||
*/
|
uint16_t keycode = get_record_keycode(record);
|
||||||
|
post_process_record_kb(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Core keycode function, hands off handling to other functions,
|
||||||
|
then processes internal quantum keycodes, and then processes
|
||||||
|
ACTIONs. */
|
||||||
bool process_record_quantum(keyrecord_t *record) {
|
bool process_record_quantum(keyrecord_t *record) {
|
||||||
uint16_t keycode = get_record_keycode(record);
|
uint16_t keycode = get_record_keycode(record);
|
||||||
|
|
||||||
@@ -192,6 +202,12 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WPM_ENABLE
|
||||||
|
if (record->event.pressed) {
|
||||||
|
update_wpm(keycode);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
preprocess_tap_dance(keycode, record);
|
preprocess_tap_dance(keycode, record);
|
||||||
#endif
|
#endif
|
||||||
@@ -645,6 +661,10 @@ void matrix_scan_quantum() {
|
|||||||
encoder_read();
|
encoder_read();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WPM_ENABLE
|
||||||
|
decay_wpm();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAPTIC_ENABLE
|
#ifdef HAPTIC_ENABLE
|
||||||
haptic_task();
|
haptic_task();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ extern layer_state_t layer_state;
|
|||||||
# include "via.h"
|
# include "via.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WPM_ENABLE
|
||||||
|
# include "wpm.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Function substitutions to ease GPIO manipulation
|
// Function substitutions to ease GPIO manipulation
|
||||||
#if defined(__AVR__)
|
#if defined(__AVR__)
|
||||||
typedef uint8_t pin_t;
|
typedef uint8_t pin_t;
|
||||||
@@ -253,6 +257,8 @@ uint16_t get_event_keycode(keyevent_t event);
|
|||||||
bool process_action_kb(keyrecord_t *record);
|
bool process_action_kb(keyrecord_t *record);
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record);
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record);
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record);
|
bool process_record_user(uint16_t keycode, keyrecord_t *record);
|
||||||
|
void post_process_record_kb(uint16_t keycode, keyrecord_t *record);
|
||||||
|
void post_process_record_user(uint16_t keycode, keyrecord_t *record);
|
||||||
|
|
||||||
#ifndef BOOTMAGIC_LITE_COLUMN
|
#ifndef BOOTMAGIC_LITE_COLUMN
|
||||||
# define BOOTMAGIC_LITE_COLUMN 0
|
# define BOOTMAGIC_LITE_COLUMN 0
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ typedef struct _I2C_slave_buffer_t {
|
|||||||
# ifdef ENCODER_ENABLE
|
# ifdef ENCODER_ENABLE
|
||||||
uint8_t encoder_state[NUMBER_OF_ENCODERS];
|
uint8_t encoder_state[NUMBER_OF_ENCODERS];
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef WPM_ENABLE
|
||||||
|
uint8_t current_wpm;
|
||||||
|
# endif
|
||||||
} I2C_slave_buffer_t;
|
} I2C_slave_buffer_t;
|
||||||
|
|
||||||
static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
|
static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
|
||||||
@@ -43,6 +46,7 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
|
|||||||
# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
|
# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
|
||||||
# define I2C_KEYMAP_START offsetof(I2C_slave_buffer_t, smatrix)
|
# define I2C_KEYMAP_START offsetof(I2C_slave_buffer_t, smatrix)
|
||||||
# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
|
# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
|
||||||
|
# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
|
||||||
|
|
||||||
# define TIMEOUT 100
|
# define TIMEOUT 100
|
||||||
|
|
||||||
@@ -79,6 +83,14 @@ bool transport_master(matrix_row_t matrix[]) {
|
|||||||
encoder_update_raw(i2c_buffer->encoder_state);
|
encoder_update_raw(i2c_buffer->encoder_state);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# ifdef WPM_ENABLE
|
||||||
|
uint8_t current_wpm = get_current_wpm();
|
||||||
|
if(current_wpm != i2c_buffer->current_wpm) {
|
||||||
|
if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) {
|
||||||
|
i2c_buffer->current_wpm = current_wpm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,6 +114,10 @@ void transport_slave(matrix_row_t matrix[]) {
|
|||||||
# ifdef ENCODER_ENABLE
|
# ifdef ENCODER_ENABLE
|
||||||
encoder_state_raw(i2c_buffer->encoder_state);
|
encoder_state_raw(i2c_buffer->encoder_state);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# ifdef WPM_ENABLE
|
||||||
|
set_current_wpm(i2c_buffer->current_wpm);
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void transport_master_init(void) { i2c_init(); }
|
void transport_master_init(void) { i2c_init(); }
|
||||||
@@ -126,6 +142,9 @@ typedef struct _Serial_m2s_buffer_t {
|
|||||||
# ifdef BACKLIGHT_ENABLE
|
# ifdef BACKLIGHT_ENABLE
|
||||||
uint8_t backlight_level;
|
uint8_t backlight_level;
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef WPM_ENABLE
|
||||||
|
uint8_t current_wpm;
|
||||||
|
# endif
|
||||||
} Serial_m2s_buffer_t;
|
} Serial_m2s_buffer_t;
|
||||||
|
|
||||||
# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
|
# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
|
||||||
@@ -228,6 +247,10 @@ bool transport_master(matrix_row_t matrix[]) {
|
|||||||
encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
|
encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# ifdef WPM_ENABLE
|
||||||
|
// Write wpm to slave
|
||||||
|
serial_m2s_buffer.current_wpm = get_current_wpm();
|
||||||
|
# endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,6 +267,10 @@ void transport_slave(matrix_row_t matrix[]) {
|
|||||||
# ifdef ENCODER_ENABLE
|
# ifdef ENCODER_ENABLE
|
||||||
encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
|
encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# ifdef WPM_ENABLE
|
||||||
|
set_current_wpm(serial_m2s_buffer.current_wpm);
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -11,16 +11,6 @@ MCU = atmega32u4
|
|||||||
# ATmega328P USBasp
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = atmel-dfu
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Otherwise, delete this section
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Richard Sutherland ([email protected])
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "wpm.h"
|
||||||
|
|
||||||
|
//WPM Stuff
|
||||||
|
static uint8_t current_wpm = 0;
|
||||||
|
static uint8_t latest_wpm = 0;
|
||||||
|
static uint16_t wpm_timer = 0;
|
||||||
|
|
||||||
|
//This smoothing is 40 keystrokes
|
||||||
|
static const float wpm_smoothing = 0.0487;
|
||||||
|
|
||||||
|
void set_current_wpm(uint8_t new_wpm) { current_wpm = new_wpm; }
|
||||||
|
|
||||||
|
uint8_t get_current_wpm(void) { return current_wpm; }
|
||||||
|
|
||||||
|
bool wpm_keycode(uint16_t keycode) { return wpm_keycode_kb(keycode); }
|
||||||
|
|
||||||
|
__attribute__((weak)) bool wpm_keycode_kb(uint16_t keycode) { return wpm_keycode_user(keycode); }
|
||||||
|
|
||||||
|
__attribute__((weak)) bool wpm_keycode_user(uint16_t keycode) {
|
||||||
|
|
||||||
|
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||||
|
keycode = keycode & 0xFF;
|
||||||
|
} else if (keycode > 0xFF) {
|
||||||
|
keycode = 0;
|
||||||
|
}
|
||||||
|
if((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void update_wpm(uint16_t keycode) {
|
||||||
|
if(wpm_keycode(keycode)) {
|
||||||
|
if(wpm_timer > 0) {
|
||||||
|
latest_wpm = 60000 / timer_elapsed(wpm_timer) / 5;
|
||||||
|
current_wpm = (latest_wpm - current_wpm) * wpm_smoothing + current_wpm;
|
||||||
|
}
|
||||||
|
wpm_timer = timer_read();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void decay_wpm(void) {
|
||||||
|
if (timer_elapsed(wpm_timer) > 1000) {
|
||||||
|
current_wpm = (0 - current_wpm) * wpm_smoothing +
|
||||||
|
current_wpm;
|
||||||
|
wpm_timer = timer_read();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Richard Sutherland ([email protected])
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
bool wpm_keycode(uint16_t keycode);
|
||||||
|
bool wpm_keycode_kb(uint16_t keycode);
|
||||||
|
bool wpm_keycode_user(uint16_t keycode);
|
||||||
|
|
||||||
|
void set_current_wpm(uint8_t);
|
||||||
|
uint8_t get_current_wpm(void);
|
||||||
|
void update_wpm(uint16_t);
|
||||||
|
|
||||||
|
void decay_wpm(void);
|
||||||
@@ -24,6 +24,7 @@ endif
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
|
OPT_OS = chibios
|
||||||
CHIBIOS = $(TOP_DIR)/lib/chibios
|
CHIBIOS = $(TOP_DIR)/lib/chibios
|
||||||
CHIBIOS_CONTRIB = $(TOP_DIR)/lib/chibios-contrib
|
CHIBIOS_CONTRIB = $(TOP_DIR)/lib/chibios-contrib
|
||||||
# Startup files. Try a few different locations, for compability with old versions and
|
# Startup files. Try a few different locations, for compability with old versions and
|
||||||
@@ -49,6 +50,34 @@ PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLAT
|
|||||||
endif
|
endif
|
||||||
include $(PLATFORM_MK)
|
include $(PLATFORM_MK)
|
||||||
|
|
||||||
|
# Bootloader address
|
||||||
|
ifdef STM32_BOOTLOADER_ADDRESS
|
||||||
|
OPT_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_4)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_3)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_2)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h
|
||||||
|
else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","")
|
||||||
|
OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h
|
||||||
|
endif
|
||||||
|
|
||||||
BOARD_MK :=
|
BOARD_MK :=
|
||||||
|
|
||||||
|
|||||||
@@ -166,11 +166,6 @@ ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes)
|
|||||||
TMK_COMMON_DEFS += -DNO_ACTION_FUNCTION
|
TMK_COMMON_DEFS += -DNO_ACTION_FUNCTION
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Bootloader address
|
|
||||||
ifdef STM32_BOOTLOADER_ADDRESS
|
|
||||||
TMK_COMMON_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Search Path
|
# Search Path
|
||||||
VPATH += $(TMK_PATH)/$(COMMON_DIR)
|
VPATH += $(TMK_PATH)/$(COMMON_DIR)
|
||||||
VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)
|
VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)
|
||||||
@@ -151,6 +151,8 @@ void process_record_nocache(keyrecord_t *record) { process_record(record); }
|
|||||||
|
|
||||||
__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; }
|
__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; }
|
||||||
|
|
||||||
|
__attribute__((weak)) void post_process_record_quantum(keyrecord_t *record) {}
|
||||||
|
|
||||||
#ifndef NO_ACTION_TAPPING
|
#ifndef NO_ACTION_TAPPING
|
||||||
/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
|
/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
|
||||||
*
|
*
|
||||||
@@ -185,6 +187,11 @@ void process_record(keyrecord_t *record) {
|
|||||||
|
|
||||||
if (!process_record_quantum(record)) return;
|
if (!process_record_quantum(record)) return;
|
||||||
|
|
||||||
|
process_record_handler(record);
|
||||||
|
post_process_record_quantum(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void process_record_handler(keyrecord_t *record) {
|
||||||
action_t action = store_or_get_action(record->event.pressed, record->event.key);
|
action_t action = store_or_get_action(record->event.pressed, record->event.key);
|
||||||
dprint("ACTION: ");
|
dprint("ACTION: ");
|
||||||
debug_action(action);
|
debug_action(action);
|
||||||
@@ -988,7 +995,6 @@ bool is_tap_action(action_t action) {
|
|||||||
* FIXME: Needs documentation.
|
* FIXME: Needs documentation.
|
||||||
*/
|
*/
|
||||||
void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); }
|
void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); }
|
||||||
|
|
||||||
/** \brief Debug print (FIXME: Needs better description)
|
/** \brief Debug print (FIXME: Needs better description)
|
||||||
*
|
*
|
||||||
* FIXME: Needs documentation.
|
* FIXME: Needs documentation.
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ void process_hand_swap(keyevent_t *record);
|
|||||||
|
|
||||||
void process_record_nocache(keyrecord_t *record);
|
void process_record_nocache(keyrecord_t *record);
|
||||||
void process_record(keyrecord_t *record);
|
void process_record(keyrecord_t *record);
|
||||||
|
void process_record_handler(keyrecord_t *record);
|
||||||
|
void post_process_record_quantum(keyrecord_t *record);
|
||||||
void process_action(keyrecord_t *record, action_t action);
|
void process_action(keyrecord_t *record, action_t action);
|
||||||
void register_code(uint8_t code);
|
void register_code(uint8_t code);
|
||||||
void unregister_code(uint8_t code);
|
void unregister_code(uint8_t code);
|
||||||
|
|||||||
Reference in new issue
Block a user