diff --git a/Makefile b/Makefile index 9ef82bbd3c..0dd77d403e 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ $(eval $(call NEXT_PATH_ELEMENT)) # It's really a very simple if else chain, if you squint enough, # but the makefile syntax makes it very verbose. # If we are in a subfolder of keyboards -# +# # *** No longer needed ** # # ifeq ($(CURRENT_PATH_ELEMENT),keyboards) @@ -307,11 +307,6 @@ define PARSE_KEYBOARD KEYBOARD_FOLDER_PATH_3 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_2))) KEYBOARD_FOLDER_PATH_4 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_3))) KEYBOARD_FOLDER_PATH_5 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_4))) - KEYBOARD_FOLDER_1 := $$(notdir $$(KEYBOARD_FOLDER_PATH_1)) - KEYBOARD_FOLDER_2 := $$(notdir $$(KEYBOARD_FOLDER_PATH_2)) - KEYBOARD_FOLDER_3 := $$(notdir $$(KEYBOARD_FOLDER_PATH_3)) - KEYBOARD_FOLDER_4 := $$(notdir $$(KEYBOARD_FOLDER_PATH_4)) - KEYBOARD_FOLDER_5 := $$(notdir $$(KEYBOARD_FOLDER_PATH_5)) KEYMAPS := # get a list of all keymaps @@ -325,35 +320,35 @@ define PARSE_KEYBOARD $$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS))) KEYBOARD_LAYOUTS := - ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)","") + ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)","") LAYOUTS := - $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk) + $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk) KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS)) endif - ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)","") + ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)","") LAYOUTS := - $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk) + $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk) KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS)) endif - ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)","") + ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)","") LAYOUTS := - $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk) + $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk) KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS)) endif - ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)","") + ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)","") LAYOUTS := - $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk) + $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk) KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS)) endif - ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)","") + ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)","") LAYOUTS := - $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk) + $$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk) KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS)) endif LAYOUT_KEYMAPS := $$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.))))) - + KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS)) # if the rule after removing the start of it is empty (we haven't specified a kemap or target) diff --git a/common.mk b/common.mk index 5b49680ea1..272d170e68 100644 --- a/common.mk +++ b/common.mk @@ -3,16 +3,16 @@ include message.mk # Directory common source files exist TOP_DIR = . TMK_DIR = tmk_core -TMK_PATH = $(TOP_DIR)/$(TMK_DIR) -LIB_PATH = $(TOP_DIR)/lib +TMK_PATH = $(TMK_DIR) +LIB_PATH = lib QUANTUM_DIR = quantum -QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) +QUANTUM_PATH = $(QUANTUM_DIR) DRIVER_DIR = drivers -DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR) +DRIVER_PATH = $(DRIVER_DIR) -BUILD_DIR := $(TOP_DIR)/.build +BUILD_DIR := .build COMMON_VPATH := $(TOP_DIR) COMMON_VPATH += $(TMK_PATH) @@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras COMMON_VPATH += $(QUANTUM_PATH)/audio COMMON_VPATH += $(QUANTUM_PATH)/process_keycode COMMON_VPATH += $(QUANTUM_PATH)/api -COMMON_VPATH += $(DRIVER_PATH) \ No newline at end of file +COMMON_VPATH += $(QUANTUM_PATH)/split_common +COMMON_VPATH += $(DRIVER_PATH) diff --git a/common_features.mk b/common_features.mk index 0778f8e0f5..b78f04d2a8 100644 --- a/common_features.mk +++ b/common_features.mk @@ -197,6 +197,12 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes) include $(TMK_DIR)/protocol/usb_hid.mk endif + +ifeq ($(strip $(HD44780_ENABLE)), yes) + SRC += drivers/avr/hd44780.c + OPT_DEFS += -DHD44780_ENABLE +endif + QUANTUM_SRC:= \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ @@ -204,5 +210,17 @@ QUANTUM_SRC:= \ $(QUANTUM_DIR)/process_keycode/process_leader.c ifndef CUSTOM_MATRIX - QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c + else + QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c + endif +endif + +ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + OPT_DEFS += -DSPLIT_KEYBOARD + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ + $(QUANTUM_DIR)/split_common/split_util.c \ + $(QUANTUM_DIR)/split_common/i2c.c \ + $(QUANTUM_DIR)/split_common/serial.c endif diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 31a22315dd..a4216122a2 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -55,18 +55,22 @@ * [Userspace](feature_userspace.md) * [Keycodes](keycodes.md) - * [Backlight](feature_backlight.md#backlight-keycodes) * [Basic](keycodes_basic.md) + * [Quantum](quantum_keycodes.md) + * [Audio](feature_audio.md#audio-keycodes) + * [Backlight](feature_backlight.md#backlight-keycodes) * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) * [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) * [Mod+Key](feature_advanced_keycodes.md#modifier-keys) * [Mod Tap](feature_advanced_keycodes.md#mod-tap) + * [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - * [Quantum](quantum_keycodes.md) * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [RGB Matrix](feature_rgb_matrix.md#keycodes) * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) * [Stenography](feature_stenography.md#keycode-reference) + * [Swap Hands](feature_swap_hands.md#swap-keycodes) * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) diff --git a/docs/_summary.md b/docs/_summary.md index 318c526a85..a4216122a2 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -43,7 +43,9 @@ * [Pointing Device](feature_pointing_device.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [RGB Lighting](feature_rgblight.md) - * [Space Cadet](feature_space_cadet.md) + * [RGB Matrix](feature_rgb_matrix.md) + * [Space Cadet Shift](feature_space_cadet.md) + * [Space Cadet Shift Enter](feature_space_shift_cadet.md) * [Stenography](feature_stenography.md) * [Swap Hands](feature_swap_hands.md) * [Tap Dance](feature_tap_dance.md) @@ -53,18 +55,22 @@ * [Userspace](feature_userspace.md) * [Keycodes](keycodes.md) - * [Backlight](feature_backlight.md#backlight-keycodes) * [Basic](keycodes_basic.md) + * [Quantum](quantum_keycodes.md) + * [Audio](feature_audio.md#audio-keycodes) + * [Backlight](feature_backlight.md#backlight-keycodes) * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) * [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) * [Mod+Key](feature_advanced_keycodes.md#modifier-keys) * [Mod Tap](feature_advanced_keycodes.md#mod-tap) + * [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - * [Quantum](quantum_keycodes.md) * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [RGB Matrix](feature_rgb_matrix.md#keycodes) * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) * [Stenography](feature_stenography.md#keycode-reference) + * [Swap Hands](feature_swap_hands.md#swap-keycodes) * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) diff --git a/docs/config_options.md b/docs/config_options.md index 42b6060d69..d728a49c3e 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -126,14 +126,18 @@ If you define these options you will enable the associated feature, which may in * how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too * `#define RETRO_TAPPING` * tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release + * See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details * `#define TAPPING_TOGGLE 2` * how many taps before triggering the toggle * `#define PERMISSIVE_HOLD` * makes tap and hold keys work better for fast typers who don't want tapping term set above 500 + * See [Permissive Hold](feature_advanced_keycodes.md#permissive-hold) for details * `#define IGNORE_MOD_TAP_INTERRUPT` * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold + * See [Mod tap interrupt](feature_advanced_keycodes.md#mod-tap-interrupt) for details * `#define TAPPING_FORCE_HOLD` * makes it possible to use a dual role key as modifier shortly after having been tapped + * See [Hold after tap](feature_advanced_keycodes.md#hold-after-tap) * `#define LEADER_TIMEOUT 300` * how long before the leader key times out * `#define ONESHOT_TIMEOUT 300` @@ -175,6 +179,16 @@ If you define these options you will enable the associated feature, which may in * `#define MOUSEKEY_MAX_SPEED 7` * `#define MOUSEKEY_WHEEL_DELAY 0` +## Split Keyboard Options + +Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk + +* `#define SPLIT_HAND_PIN B7` + * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace 'B7' with the pin you are using. This is optional and you can still use the EEHANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. + +* `#define USE_I2C` + * For using I2C instead of Serial (defaults to serial) + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. @@ -228,3 +242,5 @@ Use these to enable or disable building certain features. The more you have enab * Unicode * `BLUETOOTH_ENABLE` * Enable Bluetooth with the Adafruit EZ-Key HID +* `SPLIT_KEYBOARD` + * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index a4b681ec14..f03a7121c4 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -203,3 +203,9 @@ With default settings, `a` will be sent on the first release, then `a` will be s With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap. !> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle). + +# Retro Tapping + +When you hold a dual function key, and haven't pressed anything when you release the key, normally nothing happens. However, if you enable this, if you release the key without pressing another key, it will send the original key, even if it is outside of the tapping term. + +For instance, if you're using `LT(2, KC_SPACE)`, if you hold the key, don't hit anything else and then release it, normally, nothing happens. But with `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`. diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 50e389605c..039c62cdf1 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -3,6 +3,7 @@ Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h: + Timer 1: `#define B5_AUDIO` `#define B6_AUDIO` @@ -58,6 +59,13 @@ PLAY_LOOP(my_song); It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard. +The available keycodes for audio are: + +* `AU_ON` - Turn audio mode on +* `AU_OFF` - Turn audio mode off +* `AU_TOG` - Toggle audio mode + + ## Music Mode The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. @@ -145,6 +153,23 @@ You can configure the default, min and max frequencies, the stepping and built i This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. + +## Audio Keycodes + +|Key |Aliases |Description | +|----------------|---------|----------------------------------| +|`AU_ON` | |Audio mode on | +|`AU_OFF` | |Audio mode off | +|`AU_TOG` | |Toggles Audio mode | +|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode | +|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks | +|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks | +|`CLICKY_RESET` |`CK_RST` |Resets frequency to default | +|`MU_ON` | |Turns on Music Mode | +|`MU_OFF` | |Turns off Music Mode | +|`MU_TOG` | |Toggles Music Mode | +|`MU_MOD` | |Cycles through the music modes | +