Skip to content

Commit

Permalink
Merge branch 'master' into merging
Browse files Browse the repository at this point in the history
* master: (179 commits)
  Updates to noroadsleft keymap for KC60 (qmk#5127)
  [Keymap] Update to Drashna keymaps and Userspace  (qmk#5122)
  Fix ESC on Default ANSI layer (qmk#5125)
  [Keyboard] KBD19x Bootmagic Enable (lite) and other fixes (qmk#5126)
  [Keymap] Add fsck keymaps for eco, planck and preonic (qmk#5106)
  [Keyboard] Unigo66 beta pcb added, bug fixes for flashing (qmk#5108)
  [Keymap] Adding buhearns keymap (qmk#5105)
  [Keyboard] New Keyboard: Doro67 Regular PCB (qmk#5115)
  Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (qmk#5094)
  Fix travis_compiled_push.sh script issue (qmk#5114)
  [Keyboard] Added aeboards/aegis (qmk#5099)
  [Keyboard] Refactor jj4x4 to enable ortho_4x4 LAYOUT (qmk#5112)
  [Keyboard] Move Keebio boards to own folder (qmk#5109)
  [Keymap] Plain60 rgb (qmk#5104)
  [Keymap] Add Minidox keymap by dustypomerleau (qmk#5101)
  Remove AUTOGEN and fix Travis Compiled Push scripts (qmk#5077)
  Added WT75-A, refactor wilba.tech PCBs (qmk#5100)
  [Keyboard] Space65: RGB Animations on by default (qmk#5097)
  Add digital layout for KBD75 (qmk#5095)
  fix the led_matrix.h naming conflict
  ...
  • Loading branch information
tenderlove committed Feb 14, 2019
2 parents 290298b + ce465c0 commit d9ab40e
Show file tree
Hide file tree
Showing 1,596 changed files with 30,869 additions and 6,164 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.history/
.dep
*.o
*.bin
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ before_script:
- avr-gcc --version
script:
- git rev-parse --short HEAD
- make test:all AUTOGEN=false
- make test:all
- bash util/travis_build.sh
- bash util/travis_docs.sh
addons:
Expand Down
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,29 @@ $(eval $(call GET_KEYBOARDS))
# Only consider folders with makefiles, to prevent errors in case there are extra folders
#KEYBOARDS += $(patsubst $(ROOD_DIR)/keyboards/%/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))

.PHONY: list-keyboards
list-keyboards:
echo $(KEYBOARDS)
exit 0

define PRINT_KEYBOARD
$(info $(PRINTING_KEYBOARD))
endef

.PHONY: generate-keyboards-file
generate-keyboards-file:
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
exit 0

.PHONY: clean
clean:
echo -n 'Deleting .build ... '
echo -n 'Deleting .build/ ... '
rm -rf $(BUILD_DIR)
echo 'done'
exit 0
echo 'done.'

.PHONY: distclean
distclean: clean
echo -n 'Deleting *.bin and *.hex ... '
rm -f *.bin *.hex
echo 'done.'

#Compatibility with the old make variables, anything you specify directly on the command line
# always overrides the detected folders
Expand Down Expand Up @@ -548,9 +554,10 @@ endif
# it has to be there to allow parallel execution of the submake
# This always tries to compile everything, even if error occurs in the middle
# But we return the error code at the end, to trigger travis failures
$(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
# The sort at this point is to remove duplicates
$(foreach COMMAND,$(sort $(COMMANDS)),$(RUN_COMMAND))
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
$(foreach TEST,$(TESTS),$(RUN_TEST))
$(foreach TEST,$(sort $(TESTS)),$(RUN_TEST))
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;

# These no longer work because of the colon system
Expand All @@ -576,6 +583,7 @@ lib/%:
git submodule sync $?
git submodule update --init $?

.PHONY: git-submodule
git-submodule:
git submodule sync --recursive
git submodule update --init --recursive --progress
Expand Down
1 change: 1 addition & 0 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -369,5 +369,6 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
# Default target.
all: build check-size
build: elf cpfirmware
check-size: build

include $(TMK_PATH)/rules.mk
23 changes: 21 additions & 2 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,27 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif

RGB_MATRIX_ENABLE ?= no
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom

LED_MATRIX_ENABLE ?= no
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
else
OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER
SRC += $(QUANTUM_DIR)/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
endif
endif

ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
OPT_DEFS += -DIS31FL3731
COMMON_VPATH += $(DRIVER_PATH)/issi
SRC += is31fl3731-simple.c
SRC += i2c_master.c
endif

RGB_MATRIX_ENABLE ?= no
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
Expand Down Expand Up @@ -191,7 +210,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE = yes
endif
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
endif
endif
Expand Down
1 change: 1 addition & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* [Unit Testing](unit_testing.md)
* [Useful Functions](ref_functions.md)
* [Configurator Support](reference_configurator_support.md)
* [info.json Format](reference_info_json.md)

* [Features](features.md)
* [Basic Keycodes](keycodes_basic.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This is a C header file that is one of the first things included, and will persi
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
* `#define LOCKING_RESYNC_ENABLE`
* tries to keep switch state consistent with keyboard LED state
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
* `#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`
* key combination that allows the use of magic commands (useful for debugging)
* `#define USB_MAX_POWER_CONSUMPTION`
* sets the maximum power (in mA) over USB for the device (default: 500)
Expand Down
4 changes: 4 additions & 0 deletions docs/faq_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
```

### Serial device is not detected in bootloader mode on Linux
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.

## Unknown Device for DFU Bootloader

If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue.
Expand Down
121 changes: 98 additions & 23 deletions docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Additionally, if at least one right-handed modifier is specified in a Mod Tap or
# Switching and Toggling Layers
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers). When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
Expand Down Expand Up @@ -60,21 +60,21 @@ Sometimes, you might want to switch between layers in a macro or as part of a ta
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|Key |Aliases |Description |
|----------|----------------------|----------------------------------------------------|
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|Key |Aliases |Description |
|----------|-------------------------------|----------------------------------------------------|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
Expand Down Expand Up @@ -110,20 +110,20 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|Key |Aliases |Description |
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |

## Caveats

Expand Down Expand Up @@ -161,6 +161,81 @@ For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear
!> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
## Callbacks
When you'd like to perform custom logic when pressing a one shot key, there are several callbacks you can choose to implement. You could indicate changes in one shot keys by flashing an LED or making a sound, for example.
There is a callback for `OSM(mod)`. It is called whenever the state of any one shot modifier key is changed: when it toggles on, but also when it is toggled off. You can use it like this:
```c
void oneshot_mods_changed_user(uint8_t mods) {
if (mods & MOD_MASK_SHIFT) {
println("Oneshot mods SHIFT");
}
if (mods & MOD_MASK_CTRL) {
println("Oneshot mods CTRL");
}
if (mods & MOD_MASK_ALT) {
println("Oneshot mods ALT");
}
if (mods & MOD_MASK_GUI) {
println("Oneshot mods GUI");
}
if (!mods) {
println("Oneshot mods off");
}
}
```

The `mods` argument contains the active mods after the change, so it reflects the current state.

When you use One Shot Tap Toggle (by adding `#define ONESHOT_TAP_TOGGLE 2` in your `config.h` file), you may lock a modifier key by pressing it the specified amount of times. There's a callback for that, too:

```c
void oneshot_locked_mods_changed_user(uint8_t mods) {
if (mods & MOD_MASK_SHIFT) {
println("Oneshot locked mods SHIFT");
}
if (mods & MOD_MASK_CTRL) {
println("Oneshot locked mods CTRL");
}
if (mods & MOD_MASK_ALT) {
println("Oneshot locked mods ALT");
}
if (mods & MOD_MASK_GUI) {
println("Oneshot locked mods GUI");
}
if (!mods) {
println("Oneshot locked mods off");
}
}
```
Last, there is also a callback for the `OSL(layer)` one shot key:
```c
void oneshot_layer_changed_user(uint8_t layer) {
if (layer == 1) {
println("Oneshot layer 1 on");
}
if (!layer) {
println("Oneshot layer off");
}
}
```

If any one shot layer is switched off, `layer` will be zero. When you're looking to do something on any layer change instead of one shot layer changes, `layer_state_set_user` is a better callback to use.

If you are making your own keyboard, there are also `_kb` equivalent functions:

```c
void oneshot_locked_mods_changed_kb(uint8_t mods);
void oneshot_mods_changed_kb(uint8_t mods);
void oneshot_layer_changed_kb(uint8_t layer);
```
As with any callback, be sure to call the `_user` variant to allow for further customizability.
# Tap-Hold Configuration Options
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonal defaults, but that may still cause issues for some people.
Expand Down
1 change: 1 addition & 0 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |

Expand Down
4 changes: 3 additions & 1 deletion docs/feature_bootmagic.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ Additionally, you may want to specify which key to use. This is especially usef
By default, these are set to 0 and 0, which is usually the "ESC" key on a majority of keyboards.
And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key.
And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key.
!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved.
## Advanced Bootmagic Lite
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you want to add a list, then you'd use something like this:
enum combos {
AB_ESC,
JK_TAB
}
};
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
Expand Down
Loading

0 comments on commit d9ab40e

Please sign in to comment.