mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-29 21:38:47 +02:00
Merge remote-tracking branch 'upstream/develop' into xap
This commit is contained in:
@@ -56,19 +56,19 @@ You can now define up to 32 macros in your `keymap.json` file, as used by [QMK C
|
||||
"keyboard": "handwired/my_macropad",
|
||||
"keymap": "my_keymap",
|
||||
"macros": [
|
||||
[ // first listed is MACRO_0...
|
||||
[ // first listed is QK_MACRO_0...
|
||||
{"action":"down", "keycodes": ["LSFT"]},
|
||||
"hello world1",
|
||||
{"action": "up","keycodes": ["LSFT"]}
|
||||
],
|
||||
[ // ...then MACRO_1...
|
||||
[ // ...then QK_MACRO_1...
|
||||
{"action":"tap", "keycodes": ["LCTL", "LALT", "DEL"]}
|
||||
],
|
||||
[ // ...then MACRO_2...
|
||||
[ // ...then QK_MACRO_2...
|
||||
"ding!",
|
||||
{"action":"beep"}
|
||||
],
|
||||
[ // ...and MACRO_3.
|
||||
[ // ...and QK_MACRO_3.
|
||||
{"action":"tap", "keycodes": ["F1"]},
|
||||
{"action":"delay", "duration": "1000"},
|
||||
{"action":"tap", "keycodes": ["PGDN"]}
|
||||
@@ -76,7 +76,7 @@ You can now define up to 32 macros in your `keymap.json` file, as used by [QMK C
|
||||
],
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"]
|
||||
["QK_MACRO_0", "QK_MACRO_1", "QK_MACRO_2", "QK_MACRO_3"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -124,7 +124,6 @@
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Velocikey](feature_velocikey.md)
|
||||
|
||||
* Keyboard Building
|
||||
|
||||
@@ -122,26 +122,26 @@ There is a way to support custom keycodes: if the logic for a custom keycode is
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3
|
||||
CUSTOM_1 = SAFE_RANGE,
|
||||
CUSTOM_2,
|
||||
CUSTOM_3
|
||||
};
|
||||
...
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
case CUSTOM_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
SEND_STRING("This is custom keycode #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
case CUSTOM_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
SEND_STRING("This is custom keycode #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
case CUSTOM_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
SEND_STRING("This is custom keycode #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -153,9 +153,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
```c
|
||||
enum keyboard_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3,
|
||||
CUSTOM_1 = SAFE_RANGE,
|
||||
CUSTOM_2,
|
||||
CUSTOM_3,
|
||||
NEW_SAFE_RANGE // Important!
|
||||
};
|
||||
```
|
||||
@@ -165,19 +165,19 @@ enum keyboard_keycodes {
|
||||
```c
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
case CUSTOM_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
SEND_STRING("This is custom keycode #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
case CUSTOM_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
SEND_STRING("This is custom keycode #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
case CUSTOM_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
SEND_STRING("This is custom keycode #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+45
-26
@@ -161,9 +161,11 @@ It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif
|
||||
|
||||
The available keycodes for audio are:
|
||||
|
||||
* `AU_ON` - Turn Audio Feature on
|
||||
* `AU_OFF` - Turn Audio Feature off
|
||||
* `AU_TOG` - Toggle Audio Feature state
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
|`QK_AUDIO_ON` |`AU_ON` |Turns on Audio Feature |
|
||||
|`QK_AUDIO_OFF` |`AU_OFF` |Turns off Audio Feature |
|
||||
|`QK_AUDIO_TOGGLE` |`AU_TOGG`|Toggles Audio state |
|
||||
|
||||
!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
|
||||
|
||||
@@ -219,6 +221,12 @@ Aka "audio effects", different ones can be enabled by setting in `config.h` thes
|
||||
`#define AUDIO_VOICES` to enable the feature, and `#define AUDIO_VOICE_DEFAULT something` to select a specific effect
|
||||
for details see quantum/audio/voices.h and .c
|
||||
|
||||
Keycodes available:
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
|`QK_AUDIO_VOICE_NEXT` |`AU_NEXT`|Cycles through the audio voices |
|
||||
|`QK_AUDIO_VOICE_PREVIOUS`|`AU_PREV`|Cycles through the audio voices in reverse |
|
||||
|
||||
## Music Mode
|
||||
|
||||
@@ -228,10 +236,14 @@ Recording is experimental due to some memory issues - if you experience some wei
|
||||
|
||||
Keycodes available:
|
||||
|
||||
* `MU_ON` - Turn music mode on
|
||||
* `MU_OFF` - Turn music mode off
|
||||
* `MU_TOG` - Toggle music mode
|
||||
* `MU_MOD` - Cycle through the music modes:
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
|`QK_MUSIC_ON` |`MU_ON` |Turns on Music Mode |
|
||||
|`QK_MUSIC_OFF` |`MU_OFF` |Turns off Music Mode |
|
||||
|`QK_MUSIC_TOGGLE` |`MU_TOGG`|Toggles Music Mode |
|
||||
|`QK_MUSIC_MODE_NEXT` |`MU_NEXT`|Cycles through the music modes |
|
||||
|
||||
Available Modes:
|
||||
* `CHROMATIC_MODE` - Chromatic scale, row changes the octave
|
||||
* `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
|
||||
* `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
|
||||
@@ -300,13 +312,16 @@ You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e
|
||||
|
||||
This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly.
|
||||
|
||||
* `CK_TOGG` - Toggles the status (will play sound if enabled)
|
||||
* `CK_ON` - Turns on Audio Click (plays sound)
|
||||
* `CK_OFF` - Turns off Audio Click (doesn't play sound)
|
||||
* `CK_RST` - Resets the frequency to the default state (plays sound at default frequency)
|
||||
* `CK_UP` - Increases the frequency of the clicks (plays sound at new frequency)
|
||||
* `CK_DOWN` - Decreases the frequency of the clicks (plays sound at new frequency)
|
||||
Keycodes available:
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
|`QK_AUDIO_CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_ON` |`CK_ON` |Turns on Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_OFF` |`CK_OFF` |Turns on Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||
|`QK_AUDIO_CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||
|`QK_AUDIO_CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||
|
||||
The feature is disabled by default, to save space. To enable it, add this to your `config.h`:
|
||||
|
||||
@@ -333,16 +348,20 @@ See [MIDI](feature_midi.md)
|
||||
|
||||
## 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 |
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
|`QK_AUDIO_ON` |`AU_ON` |Turns on Audio Feature |
|
||||
|`QK_AUDIO_OFF` |`AU_OFF` |Turns off Audio Feature |
|
||||
|`QK_AUDIO_TOGGLE` |`AU_TOGG`|Toggles Audio state |
|
||||
|`QK_AUDIO_CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_ON` |`CK_ON` |Turns on Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_OFF` |`CK_OFF` |Turns on Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||
|`QK_AUDIO_CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||
|`QK_AUDIO_CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||
|`QK_MUSIC_ON` |`MU_ON` |Turns on Music Mode |
|
||||
|`QK_MUSIC_OFF` |`MU_OFF` |Turns off Music Mode |
|
||||
|`QK_MUSIC_TOGGLE` |`MU_TOGG`|Toggles Music Mode |
|
||||
|`QK_MUSIC_MODE_NEXT` |`MU_NEXT`|Cycles through the music modes |
|
||||
|`QK_AUDIO_VOICE_NEXT` |`AU_NEXT`|Cycles through the audio voices |
|
||||
|`QK_AUDIO_VOICE_PREVIOUS`|`AU_PREV`|Cycles through the audio voices in reverse |
|
||||
|
||||
@@ -16,15 +16,15 @@ BACKLIGHT_ENABLE = yes
|
||||
|
||||
Once enabled, the following keycodes below can be used to change the backlight level.
|
||||
|
||||
|Key |Description |
|
||||
|---------|-----------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set the backlight to max brightness|
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
| Key | Aliases | Description |
|
||||
|---------------------------------|-----------|-------------------------------------|
|
||||
| `QK_BACKLIGHT_TOGGLE` | `BL_TOGG` | Turn the backlight on or off |
|
||||
| `QK_BACKLIGHT_STEP` | `BL_STEP` | Cycle through backlight levels |
|
||||
| `QK_BACKLIGHT_ON` | `BL_ON` | Set the backlight to max brightness |
|
||||
| `QK_BACKLIGHT_OFF` | `BL_OFF` | Turn the backlight off |
|
||||
| `QK_BACKLIGHT_UP` | `BL_UP` | Increase the backlight level |
|
||||
| `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
|
||||
| `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |
|
||||
|
||||
## Functions :id=functions
|
||||
|
||||
|
||||
+10
-10
@@ -199,7 +199,7 @@ x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||
y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
||||
```
|
||||
|
||||
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
||||
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
||||
|
||||
As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define LED_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset.
|
||||
|
||||
@@ -221,14 +221,14 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
||||
|
||||
All LED matrix keycodes are currently shared with the [Backlight feature](feature_backlight.md).
|
||||
|
||||
|Key |Description |
|
||||
|---------|-----------------------------|
|
||||
|`BL_TOGG`|Toggle LED Matrix on or off |
|
||||
|`BL_STEP`|Cycle through modes |
|
||||
|`BL_ON` |Turn on LED Matrix |
|
||||
|`BL_OFF` |Turn off LED Matrix |
|
||||
|`BL_INC` |Increase the brightness level|
|
||||
|`BL_DEC` |Decrease the brightness level|
|
||||
| Key | Aliases | Description |
|
||||
|-------------------------|-----------|-------------------------------|
|
||||
| `QK_BACKLIGHT_TOGGLE` | `BL_TOGG` | Toggle LED Matrix on or off |
|
||||
| `QK_BACKLIGHT_STEP` | `BL_STEP` | Cycle through modes |
|
||||
| `QK_BACKLIGHT_ON` | `BL_ON` | Turn on LED Matrix |
|
||||
| `QK_BACKLIGHT_OFF` | `BL_OFF` | Turn off LED Matrix |
|
||||
| `QK_BACKLIGHT_UP` | `BL_UP` | Increase the brightness level |
|
||||
| `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the brightness level |
|
||||
|
||||
## LED Matrix Effects :id=led-matrix-effects
|
||||
|
||||
@@ -439,7 +439,7 @@ Where `28` is an unused index from `eeconfig.h`.
|
||||
|
||||
### Indicators :id=indicators
|
||||
|
||||
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that:
|
||||
If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `led_matrix_indicators_kb` or `led_matrix_indicators_user` function for that:
|
||||
```c
|
||||
bool led_matrix_indicators_kb(void) {
|
||||
if (!led_matrix_indicators_user()) {
|
||||
|
||||
@@ -33,7 +33,7 @@ You can define up to 32 macros in a `keymap.json` file, as used by [Configurator
|
||||
],
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"]
|
||||
["QK_MACRO_0", "QK_MACRO_1", "QK_MACRO_2", "QK_MACRO_3"]
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -52,7 +52,7 @@ If you type in a language other than English, or use a non-QWERTY layout like Co
|
||||
],
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
["MACRO_0"]
|
||||
["QK_MACRO_0"]
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -199,7 +199,7 @@ 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 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.
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# Thermal Printer
|
||||
|
||||
<!-- FIXME: Describe thermal printers support here. -->
|
||||
|
||||
## Thermal Printer Keycodes
|
||||
|
||||
|Key |Description |
|
||||
|-----------|----------------------------------------|
|
||||
|`PRINT_ON` |Start printing everything the user types|
|
||||
|`PRINT_OFF`|Stop printing everything the user types |
|
||||
+31
-36
@@ -233,19 +233,23 @@ See also: [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
||||
|
||||
See also: [Audio](feature_audio.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|----------------------------------|
|
||||
|`AU_ON` | |Turns on Audio Feature |
|
||||
|`AU_OFF` | |Turns off Audio Feature |
|
||||
|`AU_TOG` | |Toggles Audio state |
|
||||
|`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 |
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|-------------------------------------------|
|
||||
|`QK_AUDIO_ON` |`AU_ON` |Turns on Audio Feature |
|
||||
|`QK_AUDIO_OFF` |`AU_OFF` |Turns off Audio Feature |
|
||||
|`QK_AUDIO_TOGGLE` |`AU_TOGG`|Toggles Audio state |
|
||||
|`QK_AUDIO_CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_ON` |`CK_ON` |Turns on Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_OFF` |`CK_OFF` |Turns on Audio clicky mode |
|
||||
|`QK_AUDIO_CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||
|`QK_AUDIO_CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||
|`QK_AUDIO_CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||
|`QK_MUSIC_ON` |`MU_ON` |Turns on Music Mode |
|
||||
|`QK_MUSIC_OFF` |`MU_OFF` |Turns off Music Mode |
|
||||
|`QK_MUSIC_TOGGLE` |`MU_TOGG`|Toggles Music Mode |
|
||||
|`QK_MUSIC_MODE_NEXT` |`MU_NEXT`|Cycles through the music modes |
|
||||
|`QK_AUDIO_VOICE_NEXT` |`AU_NEXT`|Cycles through the audio voices |
|
||||
|`QK_AUDIO_VOICE_PREVIOUS`|`AU_PREV`|Cycles through the audio voices in reverse |
|
||||
|
||||
## Auto Shift :id=auto-shift
|
||||
|
||||
@@ -274,15 +278,15 @@ See also: [Autocorrect](feature_autocorrect.md)
|
||||
|
||||
See also: [Backlighting](feature_backlight.md)
|
||||
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
| Key | Aliases | Description |
|
||||
|---------------------------------|-----------|-------------------------------------|
|
||||
| `QK_BACKLIGHT_TOGGLE` | `BL_TOGG` | Turn the backlight on or off |
|
||||
| `QK_BACKLIGHT_STEP` | `BL_STEP` | Cycle through backlight levels |
|
||||
| `QK_BACKLIGHT_ON` | `BL_ON` | Set the backlight to max brightness |
|
||||
| `QK_BACKLIGHT_OFF` | `BL_OFF` | Turn the backlight off |
|
||||
| `QK_BACKLIGHT_UP` | `BL_UP` | Increase the backlight level |
|
||||
| `QK_BACKLIGHT_DOWN` | `BL_DOWN` | Decrease the backlight level |
|
||||
| `QK_BACKLIGHT_TOGGLE_BREATHING` | `BL_BRTG` | Toggle backlight breathing |
|
||||
|
||||
## Bluetooth :id=bluetooth
|
||||
|
||||
@@ -669,11 +673,11 @@ See also: [Mod-Tap](mod_tap.md)
|
||||
|
||||
See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term)
|
||||
|
||||
| Key | Description |
|
||||
|-------------|------------------------------------------------------------------------------------------------------------------------|
|
||||
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds |
|
||||
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
| Key | Aliases | Description |
|
||||
|-------------------------------|---------|-------------------------------------------------------------------------------------------|
|
||||
|`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
|
||||
|`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
|`QK_DYNAMIC_TAPPING_TERM_DOWN` |`DT_DOWN`| Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
|
||||
## RGB Lighting :id=rgb-lighting
|
||||
|
||||
@@ -718,15 +722,6 @@ See also: [RGB Matrix Lighting](feature_rgb_matrix.md)
|
||||
|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
|
||||
|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
|
||||
|
||||
## Thermal Printer :id=thermal-printer
|
||||
|
||||
See also: [Thermal Printer](feature_thermal_printer.md)
|
||||
|
||||
|Key |Description |
|
||||
|-----------|----------------------------------------|
|
||||
|`PRINT_ON` |Start printing everything the user types|
|
||||
|`PRINT_OFF`|Stop printing everything the user types |
|
||||
|
||||
## US ANSI Shifted Symbols :id=us-ansi-shifted-symbols
|
||||
|
||||
See also: [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md)
|
||||
|
||||
+5
-5
@@ -42,11 +42,11 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
`DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly.
|
||||
|
||||
| Key | Description |
|
||||
|-------------|------------------------------------------------------------------------------------------------------------------------|
|
||||
| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds |
|
||||
| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
| Key | Aliases | Description |
|
||||
|-------------------------------|---------|-------------------------------------------------------------------------------------------|
|
||||
|`QK_DYNAMIC_TAPPING_TERM_PRINT`|`DT_PRNT`| Types the current tapping term, in milliseconds |
|
||||
|`QK_DYNAMIC_TAPPING_TERM_UP` |`DT_UP` | Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
|`QK_DYNAMIC_TAPPING_TERM_DOWN` |`DT_DOWN`| Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) |
|
||||
|
||||
Set the tapping term as usual with `#define TAPPING_TERM <value>` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board.
|
||||
|
||||
|
||||
@@ -159,7 +159,6 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
||||
* [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_unicodemap.c#L42)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_ucis.c#L70)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_leader.c#L48)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_auto_shift.c#L353)
|
||||
* [`bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_dynamic_tapping_term.c#L35)
|
||||
* [`bool process_space_cadet(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/325da02e57fe7374e77b82cb00360ba45167e25c/quantum/process_keycode/process_space_cadet.c#L123)
|
||||
|
||||
@@ -127,26 +127,26 @@ enum layer_names {
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3
|
||||
CUSTOM_1 = SAFE_RANGE,
|
||||
CUSTOM_2,
|
||||
CUSTOM_3
|
||||
};
|
||||
...
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
case CUSTOM_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
SEND_STRING("This is custom keycode #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
case CUSTOM_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
SEND_STRING("This is custom keycode #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
case CUSTOM_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
SEND_STRING("This is custom keycode #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -158,9 +158,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
```c
|
||||
enum keyboard_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3,
|
||||
CUSTOM_1 = SAFE_RANGE,
|
||||
CUSTOM_2,
|
||||
CUSTOM_3,
|
||||
NEW_SAFE_RANGE // 重要!
|
||||
};
|
||||
```
|
||||
@@ -170,19 +170,19 @@ enum keyboard_keycodes {
|
||||
```c
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
case CUSTOM_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
SEND_STRING("This is custom keycode #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
case CUSTOM_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
SEND_STRING("This is custom keycode #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
case CUSTOM_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
SEND_STRING("This is custom keycode #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user