forked from mirror/qmk_firmware
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
385454e602 | ||
|
|
7164e8eeb5 | ||
|
|
f9521ffa21 | ||
|
|
2048df8832 | ||
|
|
99f3321e26 |
@@ -173,16 +173,20 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|
||||
|
||||
All RGB keycodes are currently shared with the RGBLIGHT system:
|
||||
|
||||
* `RGB_TOG` - toggle
|
||||
* `RGB_MOD` - cycle through modes
|
||||
* `RGB_HUI` - increase hue
|
||||
* `RGB_HUD` - decrease hue
|
||||
* `RGB_SAI` - increase saturation
|
||||
* `RGB_SAD` - decrease saturation
|
||||
* `RGB_VAI` - increase value
|
||||
* `RGB_VAD` - decrease value
|
||||
* `RGB_SPI` - increase speed effect (no EEPROM support)
|
||||
* `RGB_SPD` - decrease speed effect (no EEPROM support)
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|----------|--------------------------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held |
|
||||
|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|
||||
|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|
||||
|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|
||||
|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|
||||
|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|
||||
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|
||||
|`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|
|
||||
|
||||
* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
|
||||
|
||||
## RGB Matrix Effects
|
||||
|
||||
@@ -48,12 +48,12 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|
||||
|`RGB_HUI` | |Increase hue |
|
||||
|`RGB_HUD` | |Decrease hue |
|
||||
|`RGB_SAI` | |Increase saturation |
|
||||
|`RGB_SAD` | |Decrease saturation |
|
||||
|`RGB_VAI` | |Increase value (brightness) |
|
||||
|`RGB_VAD` | |Decrease value (brightness) |
|
||||
|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|
||||
|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|
||||
|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|
||||
|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|
||||
|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|
||||
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|
||||
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|
||||
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|
||||
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
alias : {
|
||||
alias: {
|
||||
'/en/(.*)': '/$1',
|
||||
'/en-us/(.*)': '/$1',
|
||||
'/en-gb/(.*)': '/$1',
|
||||
@@ -29,7 +29,16 @@
|
||||
},
|
||||
basePath: '/',
|
||||
name: 'QMK Firmware',
|
||||
nameLink: '/',
|
||||
nameLink: {
|
||||
'/de/': '/#/de/',
|
||||
'/es/': '/#/es/',
|
||||
'/fr-fr/': '/#/fr-fr/',
|
||||
'/he-il/': '/#/he-il/',
|
||||
'/ja/': '/#/ja/',
|
||||
'/ru-ru/': '/#/ru-ru/',
|
||||
'/zh-cn/': '/#/zh-cn/',
|
||||
'/': '/#/'
|
||||
},
|
||||
repo: 'qmk/qmk_firmware',
|
||||
loadSidebar: '_summary.md',
|
||||
loadNavbar: '_langs.md',
|
||||
|
||||
@@ -389,12 +389,12 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|
||||
|`RGB_HUI` | |Increase hue |
|
||||
|`RGB_HUD` | |Decrease hue |
|
||||
|`RGB_SAI` | |Increase saturation |
|
||||
|`RGB_SAD` | |Decrease saturation |
|
||||
|`RGB_VAI` | |Increase value (brightness) |
|
||||
|`RGB_VAD` | |Decrease value (brightness) |
|
||||
|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|
||||
|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|
||||
|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|
||||
|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|
||||
|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|
||||
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|
||||
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|
||||
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|
||||
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
|
||||
@@ -407,19 +407,19 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [RGB Matrix Lighting](feature_rgb_matrix.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|----------|--------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|
||||
|`RGB_HUI` | |Increase hue |
|
||||
|`RGB_HUD` | |Decrease hue |
|
||||
|`RGB_SAI` | |Increase saturation |
|
||||
|`RGB_SAD` | |Decrease saturation |
|
||||
|`RGB_VAI` | |Increase value (brightness) |
|
||||
|`RGB_VAD` | |Decrease value (brightness) |
|
||||
|`RGB_SPI` | |Increase effect speed (does no support eeprom yet) |
|
||||
|`RGB_SPD` | |Decrease effect speed (does no support eeprom yet) |
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|----------|--------------------------------------------------------------------------------------|
|
||||
|`RGB_TOG` | |Toggle RGB lighting on or off |
|
||||
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|
||||
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held |
|
||||
|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|
||||
|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|
||||
|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|
||||
|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|
||||
|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|
||||
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|
||||
|`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](feature_thermal_printer.md)
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@ Once you've finished translating a new language, you'll also need to modify the
|
||||
'/zh-cn/': '没有结果!',
|
||||
```
|
||||
|
||||
The `nameLink` object, for setting the "QMK Firmware" heading link in the sidebar, must also be added to:
|
||||
|
||||
```js
|
||||
'/zh-cn/': '/#/zh-cn/',
|
||||
```
|
||||
|
||||
And make sure to add the language folder in the `fallbackLanguages` list, so it will properly fall back to English instead of 404ing:
|
||||
|
||||
```js
|
||||
|
||||
@@ -48,13 +48,13 @@ __attribute__((weak)) bool is_keyboard_left(void) {
|
||||
#elif defined(EE_HANDS)
|
||||
return eeconfig_read_handedness();
|
||||
#elif defined(MASTER_RIGHT)
|
||||
return !is_keyboard_master();
|
||||
return !has_usb();
|
||||
#endif
|
||||
|
||||
return is_keyboard_master();
|
||||
return has_usb();
|
||||
}
|
||||
|
||||
__attribute__((weak)) bool is_keyboard_master(void) {
|
||||
__attribute__((weak)) bool has_usb(void) {
|
||||
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
|
||||
|
||||
// only check once, as this is called often
|
||||
@@ -103,8 +103,3 @@ void split_keyboard_setup(void) {
|
||||
}
|
||||
sei();
|
||||
}
|
||||
|
||||
// backwards compat
|
||||
bool has_usb(void) {
|
||||
return is_keyboard_master();
|
||||
}
|
||||
|
||||
@@ -52,9 +52,6 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
|
||||
uint8_t action_layer, when, mod;
|
||||
|
||||
switch (keycode) {
|
||||
case KC_FN0 ... KC_FN31:
|
||||
action.code = keymap_function_id_to_action(FN_INDEX(keycode));
|
||||
break;
|
||||
case KC_A ... KC_EXSEL:
|
||||
case KC_LCTRL ... KC_RGUI:
|
||||
action.code = ACTION_KEY(keycode);
|
||||
@@ -65,9 +62,11 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
|
||||
case KC_AUDIO_MUTE ... KC_BRIGHTNESS_DOWN:
|
||||
action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode));
|
||||
break;
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
case KC_MS_UP ... KC_MS_ACCEL2:
|
||||
action.code = ACTION_MOUSEKEY(keycode);
|
||||
break;
|
||||
#endif
|
||||
case KC_TRNS:
|
||||
action.code = ACTION_TRANSPARENT;
|
||||
break;
|
||||
@@ -76,17 +75,24 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
|
||||
// Split it up
|
||||
action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key
|
||||
break;
|
||||
#ifndef NO_ACTION_FUNCTION
|
||||
case KC_FN0 ... KC_FN31:
|
||||
action.code = keymap_function_id_to_action(FN_INDEX(keycode));
|
||||
break;
|
||||
case QK_FUNCTION ... QK_FUNCTION_MAX:;
|
||||
// Is a shortcut for function action_layer, pull last 12bits
|
||||
// This means we have 4,096 FN macros at our disposal
|
||||
action.code = keymap_function_id_to_action((int)keycode & 0xFFF);
|
||||
break;
|
||||
#endif
|
||||
#ifndef NO_ACTION_MACRO
|
||||
case QK_MACRO ... QK_MACRO_MAX:
|
||||
if (keycode & 0x800) // tap macros have upper bit set
|
||||
action.code = ACTION_MACRO_TAP(keycode & 0xFF);
|
||||
else
|
||||
action.code = ACTION_MACRO(keycode & 0xFF);
|
||||
break;
|
||||
#endif
|
||||
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
||||
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
|
||||
break;
|
||||
|
||||
@@ -164,11 +164,6 @@ void reset_keyboard(void) {
|
||||
bootloader_jump();
|
||||
}
|
||||
|
||||
/* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
|
||||
* Used to ensure that the correct keycode is released if the key is released.
|
||||
*/
|
||||
static bool grave_esc_was_shifted = false;
|
||||
|
||||
/* Convert record into usable keycode via the contained event. */
|
||||
uint16_t get_record_keycode(keyrecord_t *record) { return get_event_keycode(record->event); }
|
||||
|
||||
@@ -281,6 +276,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
case RESET:
|
||||
reset_keyboard();
|
||||
return false;
|
||||
#ifndef NO_DEBUG
|
||||
case DEBUG:
|
||||
debug_enable ^= 1;
|
||||
if (debug_enable) {
|
||||
@@ -288,6 +284,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
} else {
|
||||
print("DEBUG: disabled.\n");
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
case EEPROM_RESET:
|
||||
eeconfig_init();
|
||||
@@ -308,18 +305,16 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
velocikey_toggle();
|
||||
return false;
|
||||
#endif
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#ifdef BLUETOOTH_ENABLE
|
||||
case OUT_AUTO:
|
||||
set_output(OUTPUT_AUTO);
|
||||
return false;
|
||||
case OUT_USB:
|
||||
set_output(OUTPUT_USB);
|
||||
return false;
|
||||
# ifdef BLUETOOTH_ENABLE
|
||||
case OUT_BT:
|
||||
set_output(OUTPUT_BLUETOOTH);
|
||||
return false;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -351,28 +346,60 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
case RGB_HUI:
|
||||
rgblight_increase_hue();
|
||||
if (shifted) {
|
||||
rgblight_decrease_hue();
|
||||
} else {
|
||||
rgblight_increase_hue();
|
||||
}
|
||||
return false;
|
||||
case RGB_HUD:
|
||||
rgblight_decrease_hue();
|
||||
if (shifted) {
|
||||
rgblight_increase_hue();
|
||||
} else {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
return false;
|
||||
case RGB_SAI:
|
||||
rgblight_increase_sat();
|
||||
if (shifted) {
|
||||
rgblight_decrease_sat();
|
||||
} else {
|
||||
rgblight_increase_sat();
|
||||
}
|
||||
return false;
|
||||
case RGB_SAD:
|
||||
rgblight_decrease_sat();
|
||||
if (shifted) {
|
||||
rgblight_increase_sat();
|
||||
} else {
|
||||
rgblight_decrease_sat();
|
||||
}
|
||||
return false;
|
||||
case RGB_VAI:
|
||||
rgblight_increase_val();
|
||||
if (shifted) {
|
||||
rgblight_decrease_val();
|
||||
} else {
|
||||
rgblight_increase_val();
|
||||
}
|
||||
return false;
|
||||
case RGB_VAD:
|
||||
rgblight_decrease_val();
|
||||
if (shifted) {
|
||||
rgblight_increase_val();
|
||||
} else {
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
return false;
|
||||
case RGB_SPI:
|
||||
rgblight_increase_speed();
|
||||
if (shifted) {
|
||||
rgblight_decrease_speed();
|
||||
} else {
|
||||
rgblight_increase_speed();
|
||||
}
|
||||
return false;
|
||||
case RGB_SPD:
|
||||
rgblight_decrease_speed();
|
||||
if (shifted) {
|
||||
rgblight_increase_speed();
|
||||
} else {
|
||||
rgblight_decrease_speed();
|
||||
}
|
||||
return false;
|
||||
case RGB_MODE_PLAIN:
|
||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
@@ -590,6 +617,11 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
break;
|
||||
|
||||
case GRAVE_ESC: {
|
||||
/* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise.
|
||||
* Used to ensure that the correct keycode is released if the key is released.
|
||||
*/
|
||||
static bool grave_esc_was_shifted = false;
|
||||
|
||||
uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)));
|
||||
|
||||
#ifdef GRAVE_ESC_ALT_OVERRIDE
|
||||
|
||||
@@ -51,6 +51,7 @@ dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows
|
||||
|
||||
# Run container and build firmware
|
||||
docker run --rm -it $usb_args \
|
||||
--user $(id -u):$(id -g) \
|
||||
-w /qmk_firmware \
|
||||
-v "$dir":/qmk_firmware \
|
||||
-e ALT_GET_KEYBOARDS=true \
|
||||
|
||||
Reference in New Issue
Block a user