Skip to content

Commit

Permalink
Merge branch 'master' into calmh
Browse files Browse the repository at this point in the history
* master: (105 commits)
  Updating Boy_314's XD75 Layout (qmk#4440)
  Moved ep40 to ep/40 for easier adding of next ep keyboard (qmk#4439)
  Update whitefox/konstantin keymap (qmk#4436)
  Unify 68keys with mf68 (qmk#4435)
  Add configurator support for luddite (qmk#4434)
  Use a single endpoint for HID reports (qmk#3951)
  Configurator support for Octagon V2 75_ansi (qmk#4426)
  serial.c update (qmk#4423)
  Docs: Supporting a keyboard in the QMK Configurator (qmk#4396)
  adding block def to ishtob's userspace (qmk#4427)
  Backlight status functions (qmk#4259)
  Fixed Unicode Support heading (qmk#4425)
  Keymap: Finex Redox keymap (qmk#4418)
  converter/m0110_usb Configurator support and readme cleanup (qmk#4421)
  Docs: Fix descriptions of KC_INT1 and KC_INT3
  Keyboard: Add 412 64 Model 00 keyboard. (qmk#4400)
  Refactoring M6-A, M6-B, Zeal60, Zeal65, WT60-A, WT65-A, WT80-A (qmk#4417)
  Remove duplicate row from Available functions table in i2c_driver doc (qmk#4416)
  converter/ibm_terminal Refactor and Configurator support (qmk#4414)
  Update Practice60 to use MT feature and revise system ticks (qmk#4413)
  ...
  • Loading branch information
calmh committed Nov 18, 2018
2 parents 1d42b5c + d9453a9 commit 357b614
Show file tree
Hide file tree
Showing 517 changed files with 20,397 additions and 4,644 deletions.
3 changes: 2 additions & 1 deletion common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ endif
ifeq ($(strip $(TERMINAL_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
OPT_DEFS += -DTERMINAL_ENABLE
OPT_DEFS += -DUSER_PRINT
endif

ifeq ($(strip $(USB_HID_ENABLE)), yes)
Expand Down Expand Up @@ -244,7 +245,7 @@ QUANTUM_SRC:= \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c

ifndef CUSTOM_MATRIX
ifneq ($(strip $(CUSTOM_MATRIX)), yes)
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
else
Expand Down
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* [Glossary](reference_glossary.md)
* [Unit Testing](unit_testing.md)
* [Useful Functions](ref_functions.md)
* [Configurator Support](reference_configurator_support.md)

* [Features](features.md)
* [Basic Keycodes](keycodes_basic.md)
Expand Down Expand Up @@ -79,6 +80,7 @@
* [Hand Wiring Guide](hand_wire.md)
* [ISP Flashing Guide](isp_flashing_guide.md)
* [ARM Debugging Guide](arm_debugging.md)
* [I2C Driver](i2c_driver.md)

* For a Deeper Understanding
* [How Keyboards Work](how_keyboards_work.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* [Glossary](reference_glossary.md)
* [Unit Testing](unit_testing.md)
* [Useful Functions](ref_functions.md)
* [Configurator Support](reference_configurator_support.md)

* [Features](features.md)
* [Basic Keycodes](keycodes_basic.md)
Expand Down Expand Up @@ -79,6 +80,7 @@
* [Hand Wiring Guide](hand_wire.md)
* [ISP Flashing Guide](isp_flashing_guide.md)
* [ARM Debugging Guide](arm_debugging.md)
* [I2C Driver](i2c_driver.md)

* For a Deeper Understanding
* [How Keyboards Work](how_keyboards_work.md)
Expand Down
38 changes: 34 additions & 4 deletions docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,15 @@ If you define these options you will enable the associated feature, which may in
* `#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
* makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the `TAPPING_TERM`
* 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
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys.
* See [Mod tap interrupt](feature_advanced_keycodes.md#ignore-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)
* See [Hold after tap](feature_advanced_keycodes.md#tapping-force-hold)
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
* `#define LEADER_TIMEOUT 300`
* how long before the leader key times out
* `#define ONESHOT_TIMEOUT 300`
Expand Down Expand Up @@ -260,3 +261,32 @@ Use these to enable or disable building certain features. The more you have enab
* Forces the keyboard to wait for a USB connection to be established before it starts up
* `NO_USB_STARTUP_CHECK`
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.

## USB Endpoint Limitations

In order to provide services over USB, QMK has to use USB endpoints.
These are a finite resource: each microcontroller has only a certain number.
This limits what features can be enabled together.
If the available endpoints are exceeded, a build error is thrown.

The following features can require separate endpoints:

* `MOUSEKEY_ENABLE`
* `EXTRAKEY_ENABLE`
* `CONSOLE_ENABLE`
* `NKRO_ENABLE`
* `MIDI_ENABLE`
* `RAW_ENABLE`
* `VIRTSER_ENABLE`

In order to improve utilisation of the endpoints, the HID features can be combined to use a single endpoint.
By default, `MOUSEKEY`, `EXTRAKEY`, and `NKRO` are combined into a single endpoint.

The base keyboard functionality can also be combined into the endpoint,
by setting `KEYBOARD_SHARED_EP = yes`.
This frees up one more endpoint,
but it can prevent the keyboard working in some BIOSes,
as they do not implement Boot Keyboard protocol switching.

Combining the mouse also breaks Boot Mouse compatibility.
The mouse can be uncombined by setting `MOUSE_SHARED_EP = no` if this functionality is required.
2 changes: 1 addition & 1 deletion docs/faq_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ For now, you need to rollback avr-gcc to 7 in brew.
```
brew uninstall --force avr-gcc
brew install avr-gcc@7
brew link avr-gcc@7
brew link --force avr-gcc@7
```
63 changes: 47 additions & 16 deletions docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|`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` |
|`ALTG(kc)`| |Hold Right Control and Alt 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` |
Expand Down Expand Up @@ -171,30 +170,56 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new
#define PERMISSIVE_HOLD
```

This makes it easier for fast typists to use dual-function keys. Without this, if you let go of a held key inside the tapping term, it won't register.
This makes tap and hold keys (like Mod Tap) work better for fast typist, or for high `TAPPING_TERM` settings.

Example: (Tapping Term = 200ms)
If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys.

- SHFT_T(KC_A) Down
- KC_X Down
- KC_X Up
- SHFT_T(KC_A) Up
For Instance:

- `SHFT_T(KC_A)` Down
- `KC_X` Down
- `KC_X` Up
- `SHFT_T(KC_A)` Up

Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).

?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.

# Ignore Mod Tap Interrupt

To enable this setting, add this to your `config.h`:

```c
#define IGNORE_MOD_TAP_INTERRUPT
```

With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
Similar to Permissive Hold, this alters how the firmware processes input for fast typist. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys.

# Mod tap interrupt
Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod).

When a dual role key used for a modifier is quickly followed by another keys, it is interpreted as held even before the tapping term elapsed. This is a problem if a key is used for example inside a rolling combo because the second key will be pressed before the first key is released.
For Instance:

For example, when trying to type the rolling combo "zx" and z being configured to send Ctrl when hold, z rapidly followed by x actually sends Ctrl-x. That's bad.
- `SHFT_T(KC_A)` Down
- `KC_X` Down
- `SHFT_T(KC_A)` Up
- `KC_X` Up

You can disable this behavior by defining `IGNORE_MOD_TAP_INTERRUPT` in `config.h`.
Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` enabled, holding both keys are required for the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold on both will still output `X` (`SHIFT`+`x`).

Note that this only concerns modifiers and not layer switching keys.

# Hold after tap
?> __Note__: This only concerns modifiers and not layer switching keys.

When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key. If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.

# Tapping Force Hold

To enable `tapping force hold`, add the following to your `config.h`:

```c
#define TAPPING_FORCE_HOLD
```

When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key.

Example:

Expand All @@ -212,6 +237,12 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo

# Retro Tapping

To enable `retro tapping`, add the following to your `config.h`:

```c
#define RETRO_TAPPING
```

Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term.

For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`.
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead.
19 changes: 11 additions & 8 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ In this handler, the value of an incrementing counter is mapped onto a precomput

## Backlight Functions

|Function |Description |
|----------|----------------------------------------------------------|
|`backlight_toggle()` |Turn the backlight on or off |
|`backlight_step()` |Cycle through backlight levels |
|`backlight_increase()` |Increase the backlight level |
|`backlight_decrease()` |Decrease the backlight level |
|`backlight_level(x)` |Sets the backlight level to specified level |
|`get_backlight_level()`|Return the current backlight level |
|Function |Description |
|----------|-----------------------------------------------------------|
|`backlight_toggle()` |Turn the backlight on or off |
|`backlight_enable()` |Turn the backlight on |
|`backlight_disable()` |Turn the backlight off |
|`backlight_step()` |Cycle through backlight levels |
|`backlight_increase()` |Increase the backlight level |
|`backlight_decrease()` |Decrease the backlight level |
|`backlight_level(x)` |Sets the backlight level to specified level |
|`get_backlight_level()` |Return the current backlight level |
|`is_backlight_enabled()`|Return whether the backlight is currently on |

### Backlight Breathing Functions

Expand Down
10 changes: 5 additions & 5 deletions docs/feature_combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ For a more complicated implementation, you can use the `process_combo_event` fun
```c
enum combo_events {
ZC_COPY,
ZV_PASTE
XV_PASTE
};

const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
const uint16_t PROGMEM paste_combo[] = {KC_Z, KC_V, COMBO_END};
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};

combo_t key_combos[COMBO_COUNT] = {
[ZC_COPY] = COMBO_ACTION(copy_combo),
[ZV_PASTE] = COMBO_ACTION(paste_combo),
[XV_PASTE] = COMBO_ACTION(paste_combo),
};

void process_combo_event(uint8_t combo_index, bool pressed) {
Expand All @@ -66,7 +66,7 @@ void process_combo_event(uint8_t combo_index, bool pressed) {
}
break;

case ZV_PASTE:
case XV_PASTE:
if (pressed) {
register_code(KC_LCTL);
register_code(KC_V);
Expand All @@ -78,7 +78,7 @@ void process_combo_event(uint8_t combo_index, bool pressed) {
}
```
This will send Ctrl+C if you hit Z and C, and Ctrl+V if you hit Z and V. But you could change this to do stuff like change layers, play sounds, or change settings.
This will send Ctrl+C if you hit Z and C, and Ctrl+V if you hit X and V. But you could change this to do stuff like change layers, play sounds, or change settings.
## Additional Configuration
Expand Down
1 change: 1 addition & 0 deletions docs/feature_rgblight.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ The following options can be used to tweak the various animations:
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |

You can also modify the speeds that the different modes animate at:

Expand Down
4 changes: 4 additions & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ QMK has a staggering number of features for building your keyboard. It can take
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it.
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
Expand Down
31 changes: 27 additions & 4 deletions docs/flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Flashing sequence:

1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
2. Wait for the OS to detect the device
4. Flash a .hex file
5. Wait for the device to reset automatically
3. Flash a .hex file
4. Wait for the device to reset automatically

or

Expand Down Expand Up @@ -106,5 +106,28 @@ Flashing sequence:

1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
2. Wait for the OS to detect the device
4. Flash a .hex file
5. Reset the device into application mode (may be done automatically)
3. Flash a .hex file
4. Reset the device into application mode (may be done automatically)

## STM32

All STM32 chips come preloaded with a factory bootloader that cannot be modified nor deleted. Some STM32 chips have bootloaders that do not come with USB programming (e.g. STM32F103) but the process is still the same.

At the moment, no `BOOTLOADER` variable is needed on `rules.mk` for STM32.

Compatible flashers:

* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (recommended command line)

Flashing sequence:

1. Enter the bootloader using any of the following methods:
* Tap the `RESET` keycode (may not work on STM32F042 devices)
* If a reset circuit is present, tap the RESET button
* Otherwise, you need to bridge BOOT0 to VCC (via BOOT0 button or bridge), short RESET to GND (via RESET button or bridge), and then let go of the BOOT0 bridge
2. Wait for the OS to detect the device
3. Flash a .bin file
* You will receive a warning about the DFU signature; Just ignore it
4. Reset the device into application mode (may be done automatically)
* If you are building from command line (e.g. `make planck/rev6:default:dfu-util`), make sure that `:leave` is passed to the `DFU_ARGS` variable inside your `rules.mk` (e.g. `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) so that your device resets after flashing
1 change: 1 addition & 0 deletions docs/getting_started_build_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
brew tap PX4/homebrew-px4
brew update
brew install avr-gcc@7
brew link --force avr-gcc@7
brew install dfu-programmer
brew install dfu-util
brew install gcc-arm-none-eabi
Expand Down
Loading

0 comments on commit 357b614

Please sign in to comment.