Fixes and updates to docs (#2611)
* Fix advanced keycode headers * Add caveat for OSM over Remote Desktop * Hopefully add better anchors to docs * Add Action code list reference * Formatting of RGB Underglow doc * Add brew update issue on macOS * Revert formatting * Revert RGB doc formatting * Make Config Options doc's sections linkable
This commit is contained in:
parent
0c665696d7
commit
07b90db897
@ -31,9 +31,8 @@ This is a C header file that is one of the first things included, and will persi
|
|||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
## `config.h` Options
|
|
||||||
|
|
||||||
### Hardware Options
|
## Hardware Options
|
||||||
* `#define VENDOR_ID 0x1234`
|
* `#define VENDOR_ID 0x1234`
|
||||||
* defines your VID, and for most DIY projects, can be whatever you want
|
* defines your VID, and for most DIY projects, can be whatever you want
|
||||||
* `#define PRODUCT_ID 0x5678`
|
* `#define PRODUCT_ID 0x5678`
|
||||||
@ -83,7 +82,7 @@ This is a C header file that is one of the first things included, and will persi
|
|||||||
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
|
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
|
||||||
* key combination that allows the use of magic commands (useful for debugging)
|
* key combination that allows the use of magic commands (useful for debugging)
|
||||||
|
|
||||||
### Features That Can Be Disabled
|
## Features That Can Be Disabled
|
||||||
|
|
||||||
If you define these options you will disable the associated feature, which can save on code size.
|
If you define these options you will disable the associated feature, which can save on code size.
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ If you define these options you will disable the associated feature, which can s
|
|||||||
* `#define NO_ACTION_FUNCTION`
|
* `#define NO_ACTION_FUNCTION`
|
||||||
* disable the action function (deprecated)
|
* disable the action function (deprecated)
|
||||||
|
|
||||||
### Features That Can Be Enabled
|
## Features That Can Be Enabled
|
||||||
|
|
||||||
If you define these options you will enable the associated feature, which may increase your code size.
|
If you define these options you will enable the associated feature, which may increase your code size.
|
||||||
|
|
||||||
@ -111,7 +110,7 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* `#define PREVENT_STUCK_MODIFIERS`
|
* `#define PREVENT_STUCK_MODIFIERS`
|
||||||
* when switching layers, this will release all mods
|
* when switching layers, this will release all mods
|
||||||
|
|
||||||
### Behaviors That Can Be Configured
|
## Behaviors That Can Be Configured
|
||||||
|
|
||||||
* `#define TAPPING_TERM 200`
|
* `#define TAPPING_TERM 200`
|
||||||
* how long before a tap becomes a hold
|
* how long before a tap becomes a hold
|
||||||
@ -139,7 +138,7 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
few ms of delay from this. But if you're doing chording on something with 3-4ms
|
few ms of delay from this. But if you're doing chording on something with 3-4ms
|
||||||
scan times? You probably want this.
|
scan times? You probably want this.
|
||||||
|
|
||||||
### RGB Light Configuration
|
## RGB Light Configuration
|
||||||
|
|
||||||
* `#define RGB_DI_PIN D7`
|
* `#define RGB_DI_PIN D7`
|
||||||
* pin the DI on the ws2812 is hooked-up to
|
* pin the DI on the ws2812 is hooked-up to
|
||||||
@ -156,7 +155,7 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* `#define RGBW_BB_TWI`
|
* `#define RGBW_BB_TWI`
|
||||||
* bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ)
|
* bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||||
|
|
||||||
### Mouse Key Options
|
## Mouse Key Options
|
||||||
|
|
||||||
* `#define MOUSEKEY_INTERVAL 20`
|
* `#define MOUSEKEY_INTERVAL 20`
|
||||||
* `#define MOUSEKEY_DELAY 0`
|
* `#define MOUSEKEY_DELAY 0`
|
||||||
@ -168,9 +167,7 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
## `rules.mk` Options
|
## Build Options
|
||||||
|
|
||||||
### Build Options
|
|
||||||
|
|
||||||
* `DEFAULT_FOLDER`
|
* `DEFAULT_FOLDER`
|
||||||
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
||||||
@ -179,7 +176,7 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
|||||||
* `LAYOUTS`
|
* `LAYOUTS`
|
||||||
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
||||||
|
|
||||||
### AVR MCU Options
|
## AVR MCU Options
|
||||||
* `MCU = atmega32u4`
|
* `MCU = atmega32u4`
|
||||||
* `F_CPU = 16000000`
|
* `F_CPU = 16000000`
|
||||||
* `ARCH = AVR8`
|
* `ARCH = AVR8`
|
||||||
@ -193,7 +190,7 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
|||||||
* `caterina`
|
* `caterina`
|
||||||
* `bootloadHID`
|
* `bootloadHID`
|
||||||
|
|
||||||
### Feature Options
|
## Feature Options
|
||||||
|
|
||||||
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
||||||
|
|
||||||
|
@ -88,3 +88,19 @@ Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong
|
|||||||
# USBaspLoader 2048
|
# USBaspLoader 2048
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
|
||||||
|
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
|
||||||
|
|
||||||
|
The solution is to remove and reinstall all affected modules.
|
||||||
|
|
||||||
|
```
|
||||||
|
brew rm avr-gcc
|
||||||
|
brew rm dfu-programmer
|
||||||
|
brew rm gcc-arm-none-eabi
|
||||||
|
brew rm avrdude
|
||||||
|
brew install avr-gcc
|
||||||
|
brew install dfu-programmer
|
||||||
|
brew install gcc-arm-none-eabi
|
||||||
|
brew install avrdude
|
||||||
|
```
|
||||||
|
@ -50,7 +50,7 @@ Once you have a good feel for how layers work and what you can do, you can get m
|
|||||||
|
|
||||||
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
||||||
|
|
||||||
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
|
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
|
||||||
|
|
||||||
# Modifier Keys
|
# Modifier Keys
|
||||||
|
|
||||||
@ -154,9 +154,11 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
|||||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||||
* `OSL(layer)` - momentary switch to *layer*.
|
* `OSL(layer)` - momentary switch to *layer*.
|
||||||
|
|
||||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
|
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L429).
|
||||||
|
|
||||||
## Permissive Hold
|
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.
|
||||||
|
|
||||||
|
# Permissive Hold
|
||||||
|
|
||||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||||
|
|
||||||
|
@ -171,6 +171,8 @@ In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which
|
|||||||
|
|
||||||
> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
|
> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
|
||||||
|
|
||||||
|
You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h).
|
||||||
|
|
||||||
#### `action_function()`
|
#### `action_function()`
|
||||||
|
|
||||||
To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.
|
To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.
|
||||||
|
Loading…
Reference in New Issue
Block a user