Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qmk upstream merge] #1

Merged
merged 163 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
11db29b
Lint keyboard/project name (#16766)
zvecr Apr 1, 2022
1caccca
usb-usb converter: fix layout macros (#16769)
fauxpark Apr 2, 2022
4f30b7a
Automatically approve workflow runs from first time contributors (#16…
zvecr Apr 2, 2022
61bd613
Automatically approve workflow runs from first time contributors (#16…
zvecr Apr 2, 2022
27ae37d
Align action workflow filenames (#16776)
zvecr Apr 3, 2022
0c8109a
fix typo in ps2 set_defaults (#16767)
gompa Apr 3, 2022
6822101
Run auto approve only on qmk/qmk_firmware (#16786)
zvecr Apr 3, 2022
d59d60f
Hineybush H65 Layout Additions and Configurator Update (#16779)
noroadsleft Apr 4, 2022
6a156cb
Hineybush H65 Hotswap Layout Additions and Configurator Update (#16780)
noroadsleft Apr 4, 2022
8b438a9
Wavtype Foundation Layout Macro Refactor and Configurator Update (#16…
noroadsleft Apr 4, 2022
aec9942
add folders and capsule65 (#16687)
EasonQian1 Apr 5, 2022
69be0dc
Fix lineendings for eason/capsule65 (#16801)
Erovia Apr 5, 2022
c0216e9
Format code according to conventions (#16802)
qmk-bot Apr 5, 2022
2f917dd
Cutie Club Novus Layout Macro Updates (#16792)
noroadsleft Apr 5, 2022
67bb6e1
RGBKB Sol 3 rev1: Configurator Data and Readme (#16798)
noroadsleft Apr 5, 2022
563c4db
Add Iris Rev 6.1 (#16722)
nooges Apr 5, 2022
d508988
QK65 Hotswap Community Layout Support (#16793)
noroadsleft Apr 6, 2022
4a729a7
QK65 Solder Community Layout Support (#16796)
noroadsleft Apr 6, 2022
fa97854
Sandwich Keeb68 Layout Macro Rework and Configurator Data (#16803)
noroadsleft Apr 6, 2022
d198d79
Update LW-67 info.json (#16788)
Laneware Apr 7, 2022
f4c6e76
io_mini1800 Configurator Fixes (#16813)
noroadsleft Apr 7, 2022
e2ace19
Header file fixes for all keymaps (#16180)
joedinkle Apr 7, 2022
98d4112
Reduce the size of the keymap helix:fraanrosi (#16717)
mtei Apr 9, 2022
84c9d6f
[Bug] Fix matrix scan reporting interval (#16825)
nomis Apr 9, 2022
3bde05c
Change helix:froggy keymap to use split_common (#16703)
mtei Apr 11, 2022
e13ad14
GMMK Pro return false in encoder user. (#16830)
daskygit Apr 11, 2022
0524a82
Fix numbering to match the correct columns (#16831)
Paryz Apr 11, 2022
a5e4161
[Keyboard] Add userspace pdl and a handwired board (#14199)
pdl Apr 13, 2022
8cc8649
[Keyboard] Add s-ol/0xC.pad (#16057)
s-ol Apr 13, 2022
e1c777a
[Keyboard] Add Synth Labs Solo keyboard (#16103)
hongaaronc Apr 13, 2022
3f66e25
[Keyboard] add 10k (#16531)
nab-os Apr 13, 2022
2d05c7f
[Keyboard] super16 update (#16494)
ziptyze Apr 13, 2022
9a38ebc
[Keyboard] add E80-1800 PCB (#16645)
ebastler Apr 13, 2022
f3a4987
[Keyboard] add pegasus (#16701)
melonbred Apr 13, 2022
16c848c
[Keymap] Change helix:froggy_106 keymap to use split_common (#16704)
mtei Apr 13, 2022
3c3662c
[Keyboard] Adding waffling80, TKL PCB (#16726)
4pplet Apr 13, 2022
6d816d9
[Keyboard] Add ratio65 by rationalist (#16727)
4pplet Apr 13, 2022
935af9e
[Keymap] fixed oled turn-off issue for crkbd:gotham (#16748)
Thunderbird2086 Apr 13, 2022
dfe0515
[Keyboard] Add Eros by PJB (#16756)
602studios Apr 13, 2022
b8cb147
[Keymap] sinc/lickel: Use backlight keys in Fn Row (#16789)
lickel Apr 13, 2022
cf152dd
[Keyboard] Waffling60 - minor tweak, improve default behavior of caps…
4pplet Apr 13, 2022
7216243
[Keyboard] Ported ErgoDox to VIA (#16804)
ifohancroft Apr 13, 2022
e9ad400
[Keyboard] KBD67 rev1 Caps Lock LED Fix (#16790)
arprince1 Apr 13, 2022
87777d1
[Keymap] Fix snowe keymap after updates to QMK (#16777)
snowe2010 Apr 13, 2022
a8e01df
[Keyboard] correct matrix for Kay65 (#16751)
mechlovin Apr 13, 2022
3f8343e
[Keyboard] Add banime40 keyboard (#16694)
ChrisChrisLoLo Apr 13, 2022
ad981de
[Keyboard] annepro2: match default keymap to stock keycaps (#16724)
bwisn Apr 13, 2022
8430774
[Keyboard] add tiger80 keyboard (#16742)
moyi4681 Apr 13, 2022
937ffce
[Keyboard] Add Frooastboard Walnut (69% Keyboard) (#16743)
Frooastside Apr 13, 2022
973bc88
[Keymap] Add thattolleyguy keymaps (#15351)
thattolleyguy Apr 13, 2022
57466c4
[Keyboard] Add RM_Numpad (#15983)
RuckerMachine Apr 13, 2022
0272621
[Keymap] bépo layout on Lily58L (#16243)
niolang Apr 13, 2022
8580380
[Keyboard] The inaugural commit for Leeloo's firmware. (#16599)
ClicketySplit Apr 13, 2022
f3004d9
[Keyboard] Fix waffling80 - Missing comma (#16848)
waffle87 Apr 13, 2022
46c0db4
[Keyboard] Fix kay65 - Missing keycode (#16849)
waffle87 Apr 13, 2022
18e5690
Fix external flash on AVR (#16851)
leah-splitkb Apr 14, 2022
a4a67d5
Ignore VIA(L) json files (#16845)
drashna Apr 14, 2022
812f97e
[Keyboard] move/rename obro to Meridian RGB (#16828)
holtenc Apr 14, 2022
b9e1125
[Keyboard] Add via support for creatkeebs/glacier (#16747)
Timliuzhaolu Apr 14, 2022
8de4065
[Keyboard] Add avalanche (#16407)
winder Apr 14, 2022
b331c98
Resolve layout macro inconsistencies for rmkeebs/rm_numpad (#16856)
zvecr Apr 16, 2022
1cfe497
rgblight: Limit max repeat times in rgblight_blink_layer_repeat (#16860)
nomis Apr 16, 2022
7d75f88
[Keyboard] Update X-Bows Keyboard (#16765)
XBowsTech Apr 16, 2022
6d13199
Fix Xorg segfault with KeebCats PCBs (#16434)
amberstarlight Apr 16, 2022
3b6e48b
[Keyboard] Add Phase One keyboard (#16430)
moyi4681 Apr 16, 2022
a5a4597
Refine LED indicator documentation (#16304)
filterpaper Apr 17, 2022
7d60a14
Anne Pro 2 Refactor (#16864)
noroadsleft Apr 17, 2022
fdd4af9
[Keyboard] Add sandbox keyboard (#16021)
yfuku Apr 18, 2022
5fe3b9f
[Keyboard] SharkPCB release Beta compatibility (#16713)
Gondolindrim Apr 18, 2022
c6de26f
[Keyboard] Add digicarpice (#16791)
swiftrax Apr 18, 2022
8826a1d
[Keyboard] Add the Ciel (#16816)
ramonimbao Apr 18, 2022
0d67eec
Ploopy Trackball Mini: only define DPI options as needed (#16160)
alaviss Apr 18, 2022
f52f3f1
[Keyboard] Add deskpad (#15602)
h0oni Apr 18, 2022
8c91e90
[Keyboard] sandbox - fix keymaps (#16873)
waffle87 Apr 18, 2022
ad9a137
[Keyboard] Add CrimsonKeyboards' Resume1800 (#16842)
DeeDesired Apr 18, 2022
1ab1ce1
[Keyboard] Fix resume1800 - Dynamic layer count undefined (#16877)
waffle87 Apr 18, 2022
773124e
[Keyboard] Add converter/a1200/mistress1200 variant (#16634)
8bits4ever Apr 19, 2022
958600d
[Keyboard] Add Amber80 Solder & VCL65 Solder (#15945)
MaiTheSan Apr 19, 2022
bde724e
Change helix:yshrsmz keymap to use split_common (#16537)
mtei Apr 19, 2022
50ec365
[Keymap] A Colemak keymap for the crkbd keyboard (#16550)
ACortesDev Apr 19, 2022
67329cf
Add my planck layout (#13143)
Apr 19, 2022
bdd1f31
[Keyboard] New kbd 1k (#15509)
MakotoKurauchi Apr 19, 2022
1acb37d
Add initial support for the Makey Makey Classic (#16658)
Jpe230 Apr 19, 2022
9ead40d
Fix broken build for users/curry (#16492)
Thunderbird2086 Apr 19, 2022
ad31ea3
boardsource/microdox V2 (#16569)
waffle87 Apr 19, 2022
be7198c
New custom keymap for Glorious GMMK Pro ANSI layout (#16199)
gourdo1 Apr 19, 2022
499060a
Dactyl manuform 5x6 5 via (#16741)
LegoWolf Apr 19, 2022
83709e7
kin80 (#16754)
DmNosachev Apr 19, 2022
b310bf6
[Keyboard] Add notes on Iris rev6a firmware (#16878)
nooges Apr 19, 2022
580a5d2
Fixed error in config (#16895)
Jels02 Apr 20, 2022
81be7bb
Fix i2c driver doc: Incorrect name (#16898)
Jpe230 Apr 20, 2022
fb4f25c
[Keyboard] Fix kin80 default keymap (#16893)
daskygit Apr 21, 2022
1e389c7
rgblight: Fix rgblight_blink_layer when multiple layers are active (#…
nomis Apr 21, 2022
c2939bf
[Keymap] Fix build error `helix:five_rows` (#16847)
mtei Apr 21, 2022
61b3f12
Added new keyboard Gas75 (#16768)
HorrorTroll Apr 22, 2022
336791b
Keychron Q2 add Caps Lock indicator and layer RGB (#16641)
Ladduro Apr 22, 2022
912e24b
Loki65 (#16844)
yiancar Apr 22, 2022
ba8b236
[Keyboard]Remove RGB light implementation of ID67, revert the file st…
peepeetee Apr 22, 2022
83ce70c
[Docs] zh-cn document translate: git parts (#15576)
epiciskandar Apr 22, 2022
97b861d
[Keyboard] Fix Pegasus Hoof (2013) layout, matrix and pin assignment …
vpont Apr 22, 2022
d8b9796
[Keymap] Toinux's crkbd keymap and userspace (#16437)
toinux Apr 22, 2022
d64ec7c
[Keymap] Addition of new keymap for the anavi macropad8 keyboard (#16…
ioef Apr 22, 2022
56b125a
Add Dactyl_Manuform/3x5_3 (#16238)
dlford Apr 22, 2022
8020950
Added massdrop/ctrl:xanimos keymap (#16187)
xanimos Apr 22, 2022
d973734
Fix id67 RGB Matrix (#16916)
waffle87 Apr 22, 2022
857178e
[Keyboard] Add Rooboard 65 (#15294)
mrnoisytiger Apr 23, 2022
c2bf039
[Keyboard] Add missing KC_QUOT (#16925)
filterpaper Apr 24, 2022
e1f6fa5
gergoplex: small cleanup (#16928)
fauxpark Apr 24, 2022
0369fb0
Fix backslash bug (#16935)
dathtu Apr 25, 2022
7368805
Add missing dead key LUTs for sendstring headers (#16929)
fauxpark Apr 25, 2022
14d6c0b
dactyl_manuform/3x5_3: fix layout (#16944)
fauxpark Apr 26, 2022
e99d6d5
Add Ukrainian keymap header (#16947)
fauxpark Apr 27, 2022
0edc0c0
[Keyboard] Small fix for Sol3 with only a slave touch bar (#16952)
XScorpion2 Apr 28, 2022
a2a9611
[Keyboard] Add Maker Keyboards Alexa Solder PCB (#16943)
mrnoisytiger Apr 28, 2022
2275b35
[Keyboard] Add SkeletonNumPad (#16753)
skeletonkbd Apr 28, 2022
ff4a6a2
[Keymap] Add keymap for kinesis advantage (#16862)
heatxsink Apr 29, 2022
3e9fec5
[Keyboard] Solanis H87C/H88C Compatible Replacement PCBs (#16942)
mrnoisytiger Apr 29, 2022
d84a1fb
[Keyboard] RM_Numpad: Fix layout bug (#16857)
RuckerMachine Apr 29, 2022
28e1cfc
Fix fjlabs/solanis (#16965)
waffle87 Apr 29, 2022
b2d0dd2
[Keymap] Improve Pain27 default keymap readability (#16956)
hunner Apr 29, 2022
8b668a2
[Keyboard] Add gameroyadvance (#16882)
ROYMEETSWORLD May 1, 2022
66fc18c
keyboards/ryanskidmore: add rskeys100 keyboard (#15506)
ryanskidmore May 2, 2022
c03e18f
Jonavin-kb67-Reduce mem usage (#16991)
Jonavin May 3, 2022
5e6f9df
[Keymap] Introduced New layer & Improvements (#16921)
ioef May 4, 2022
7608902
[Keyboard] Add per-key RGB for Quark LP RGB variants (#16671)
npspears May 4, 2022
11e20fa
Add missing dependency for qmk setup on Fedora (#17003)
tomodachi May 5, 2022
3fbf9dc
[Keyboard] RS60 Rev2 Addition (#16988)
Xelus22 May 5, 2022
890dfeb
Add ibis PCB (#17001)
hineybush May 5, 2022
49267b1
[Bug] Fix RS60 Rev2 I2C (#17015)
Xelus22 May 6, 2022
8c23f87
Ensure .hex file output for ARM Teensys (#17014)
fauxpark May 6, 2022
5acdb4c
Sol3 fix rgb map (#17019)
Doomsdayrs May 7, 2022
76eff70
feat: add support for JJ50 VIA (#16420)
GreatWizard May 9, 2022
120d5d5
Update RMKB to support SNAP (#17042)
jaygreco May 10, 2022
796eded
converter/a1200/mistress1200: further firmware shrinking to fit on At…
8bits4ever May 10, 2022
a3e057e
Adding akira (#16982)
EugenePY May 10, 2022
615dbd6
[Keyboard] Fix led num for center_enter/qoolee (#17050)
takashicompany May 10, 2022
f3fdd6a
[Keyboard] Add Axostudio Yeti hotswap version (#16820)
str-dst May 11, 2022
371499c
[Keyboard] Momokai Tap Trio (#16463)
peepeetee May 11, 2022
214d2a3
[Keyboard] Add usable tap-hold defaults for ferris via (#16696)
filterpaper May 11, 2022
c9e336f
[Keyboard] fix tf65rgbv2 keyboard layout (#17029)
we7ee May 11, 2022
8e9a81a
KBDfans KBD75 Refactor - 2022 Edition (#17052)
noroadsleft May 11, 2022
ba59927
[Keyboard] Add subrezon/la_nc keyboard (#16833)
subrezon May 11, 2022
df9c266
[Keyboard] Update YMDK Split 64 config (#16979)
minkezhang May 11, 2022
ddba523
[Keyboard] Yakiimo PCB (#16984)
4pplet May 11, 2022
767e7db
[Keyboard] Littlefoot lx dev (#16771)
tominabox1 May 11, 2022
fa6fe11
[Keyboard] Add ano keyboard (#16885)
sauvehoo May 11, 2022
37417d5
[Keyboard] remove handwired/reddot as per #14211 (#17033)
silvinor May 11, 2022
7fd05af
[Keyboard] Revert "Fix id67 RGB Matrix (#16916)" - on IDOBAO ID67 kb …
silvinor May 12, 2022
ffa1b37
[Keyboard] Add Black E6.5 keyboard (#16807)
HorrorTroll May 12, 2022
4d1332b
[Keyboard] Cleanup zhou65 and add nz64 keyboard (#17032)
jiaxin96 May 12, 2022
d6e1de8
[Keyboard] Add Mokulua keyboard (#17055)
kylemccreery May 12, 2022
77aba32
initial (#17067)
waffle87 May 12, 2022
8a4ef2b
[Keyboard] Move M63 RGB into maker folder (#17061)
HorrorTroll May 12, 2022
c0ab4ed
Allow overriding Niv inputs in shell.nix (#16602)
ifd3f May 12, 2022
59fa34a
[Keyboard] Refactor mechwild/mokulua (#17068)
waffle87 May 12, 2022
b26ba52
[Keyboard] KBIC65 Refactor (#17066)
noroadsleft May 12, 2022
58c37c0
65_iso_split_bs Community Layout keymap bugfix (#17072)
noroadsleft May 12, 2022
c199514
[Bug] Updated Cirque Pinnacle SPI driver to read data correctly (#17074)
kylemccreery May 13, 2022
fc3d3ef
[Keyboard] Add caps and num indicators to Balance keyboard (#17075)
awkannan May 13, 2022
ffe1638
[Keyboard] H60 updates (#16999)
hineybush May 13, 2022
e5e7039
[Keymap] Contra - QWERTY US basic layout; MechWild Marcuio - EN updat…
stephondoestech May 13, 2022
3a80275
[Keyboard] Fixed info.json issue, some key got wrong pos for Gas75 (#…
HorrorTroll May 13, 2022
82828c3
[Keyboard] Add keyboard "Spreadwriter" (#17031)
takashicompany May 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Automatic Approve

on:
schedule:
- cron: "*/5 * * * *"

jobs:
automatic_approve:
runs-on: ubuntu-latest

if: github.repository == 'qmk/qmk_firmware'

steps:
- uses: mheap/automatic-approve-action@v1
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
workflows: "format.yml,lint.yml,unit_test.yml"
dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,6 @@ user_song_list.h
compile_commands.json
.clangd/
.cache/

# VIA(L) json files that don't belong in QMK repo
via*.json
6 changes: 6 additions & 0 deletions builddefs/bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,18 @@ ifeq ($(strip $(BOOTLOADER)), halfkay)
OPT_DEFS += -DBOOTLOADER_HALFKAY
BOOTLOADER_TYPE = halfkay

# Teensy 2.0
ifeq ($(strip $(MCU)), atmega32u4)
BOOTLOADER_SIZE = 512
endif
# Teensy 2.0++
ifeq ($(strip $(MCU)), at90usb1286)
BOOTLOADER_SIZE = 1024
endif
# Teensy LC, 3.x
ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK66FX1M0))
FIRMWARE_FORMAT = hex
endif
endif
ifeq ($(strip $(BOOTLOADER)), caterina)
OPT_DEFS += -DBOOTLOADER_CATERINA
Expand Down
16 changes: 16 additions & 0 deletions data/schemas/definitions.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@
"type": "number",
"min": 0.25
},
"keyboard": {
"oneOf": [
{
"type": "string",
"enum": [
"converter/numeric_keypad_IIe",
"emptystring/NQG",
"maple_computing/christmas_tree/V2017"
]
},
{
"type": "string",
"pattern": "^[0-9a-z][0-9a-z_/]*$"
}
]
},
"mcu_pin_array": {
"type": "array",
"items": {"$ref": "#/mcu_pin"}
Expand Down
1 change: 1 addition & 0 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "object",
"properties": {
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keyboard_folder": {"$ref": "qmk.definitions.v1#/keyboard"},
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"url": {
Expand Down
46 changes: 21 additions & 25 deletions docs/feature_led_indicators.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ QMK provides methods to read 5 of the LEDs defined in the HID spec:
* Kana

There are three ways to get the lock LED state:
* by specifying configuration options within `config.h`
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
* by calling `led_t host_keyboard_led_state()`
* Configuration options in `config.h`
* Implement `led_update_*` function
* Call `led_t host_keyboard_led_state()`

!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
!> The `host_keyboard_led_state()` may reflect an updated state before `led_update_user()` is called.

Two more deprecated functions exist that provide the LED state as a `uint8_t`:
Two deprecated functions that provide the LED state as `uint8_t`:

* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
* `uint8_t host_keyboard_leds()`
Expand All @@ -37,23 +37,20 @@ To configure the indicators, `#define` these in your `config.h`:

Unless you are designing your own keyboard, you generally should not need to change the above config options.

## `led_update_*()`
## LED update function

When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
When the configuration options do not provide enough flexibility, the following callbacks allow custom control of the LED behavior. These functions will be called when one of those 5 LEDs changes state:

By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
return `false` when you would prefer not to run the code in `led_update_kb()`.
* Keyboard/revision: `bool led_update_kb(led_t led_state)`
* Keymap: `bool led_update_user(led_t led_state)`

Some examples include:
Both receives LED state as a struct parameter. Returning `true` in `led_update_user()` will allow the keyboard level code in `led_update_kb()` to run as well. Returning `false` will override the keyboard level code, depending on how the keyboard level function is set up.

- overriding the LEDs to use them for something else like layer indication
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
- play a sound when an LED turns on or off.
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
?> This boolean return type of `led_update_user` allows for overriding keyboard LED controls, and is thus recommended over the void `led_set_user` function.

?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
### Example of keyboard LED update implementation

### Example `led_update_kb()` Implementation
This is a template indicator function that can be implemented on keyboard level code:

```c
bool led_update_kb(led_t led_state) {
Expand All @@ -74,9 +71,9 @@ bool led_update_kb(led_t led_state) {
}
```

### Example `led_update_user()` Implementation
### Example of user LED update implementation

This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
This is an incomplete example will play a sound if Caps Lock is turned on or off. It returns `true` to allow keyboard LED function to maintain their state.

```c
#ifdef AUDIO_ENABLE
Expand All @@ -96,18 +93,17 @@ bool led_update_user(led_t led_state) {
}
```

### `led_update_*` Function Documentation

* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
* Keymap: `bool led_update_user(led_t led_state)`
## Host keyboard LED state

## `host_keyboard_led_state()`
The `host_keyboard_led_state()` function will report the LED state returned from the host computer as `led_t`. This is useful for reading the LED state outside `led_update_*`. For example, you can get the boolean state of Caps Lock from the host with:

Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
```c
bool caps = host_keyboard_led_state().caps_lock;
```

## Setting Physical LED State

Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
Some keyboard implementations provide convenient methods for setting the state of the physical LEDs.

### Ergodox Boards

Expand Down
2 changes: 1 addition & 1 deletion docs/i2c_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Send multiple bytes to the selected I2C device.

### `i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)`

Receive multiple bytes from the selected SPI device.
Receive multiple bytes from the selected I2C device.

#### Arguments

Expand Down
1 change: 1 addition & 0 deletions docs/reference_keymap_extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ These headers are located in [`quantum/keymap_extras/`](https://github.com/qmk/q
|Swedish Pro (macOS, ISO) |`keymap_swedish_pro_osx_iso.h` | |
|Turkish (F) |`keymap_turkish_f.h` |`sendstring_turkish_f.h` |
|Turkish (Q) |`keymap_turkish_q.h` |`sendstring_turkish_q.h` |
|Ukrainian |`keymap_ukrainian.h` | |

There are also a few which are not quite language-specific, but useful if you are not using a QWERTY layout:

Expand Down
23 changes: 23 additions & 0 deletions docs/zh-cn/newbs_git_best_practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# QMK所采用的Git最佳实践

<!---
original document: 0.15.17:docs/newbs_git_best_practices.md
git diff 0.15.17 HEAD -- docs/newbs_git_best_practices.md | cat
-->

*译者注:对于git相关的部分,除广为接受的名词外,会尽量保留git命令及各种术语的英文版本,部分名词及关键部分会附带中文翻译*

## 或者讲,"怎么才能不害怕并喜欢上Git"

本节旨在以最佳方式指导新手在为QMK做贡献时获得流畅的体验。我们将进行一次完整的QMK贡献操作流程,并在部分环节中详细讲述几种便捷的方法,之后我们会故意搞砸一些东西,并教导你如何回到正轨。

该章节做了如下假设:

1. 你已有Github账号且已[fork了qmk_firmware仓库](zh-cn/getting_started_github.md)到你的账号下。
2. 已完成了[构建环境](zh-cn/newbs_getting_started.md#set-up-your-environment)及[QMK](zh-cn/newbs_getting_started.md#set-up-qmk)配置。

---

- 第一节:[在你Fork的主干上:频繁更新,不要提交](zh-cn/newbs_git_using_your_master_branch.md)
- 第二节:[解决合并冲突](zh-cn/newbs_git_resolving_merge_conflicts.md)
- 第三节:[重新同步一个脱离同步状态的Git分支](zh-cn/newbs_git_resynchronize_a_branch.md)
86 changes: 86 additions & 0 deletions docs/zh-cn/newbs_git_resolving_merge_conflicts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# 解决合并冲突

<!---
original document: 0.15.17:docs/newbs_git_resolving_merge_conflicts.md
git diff 0.15.17 HEAD -- docs/newbs_git_resolving_merge_conflicts.md | cat
-->

有时在你致力于一个较长周期才能完成的分支时,其它人提交的变更会与你提交的pull request中的变更发生冲突。我们将这种多个人编辑同一个模块同一个文件时产生的场景叫做 *合并冲突*

?> 本文中的场景基于[在你Fork的主干上:频繁更新,不要提交](zh-cn/newbs_git_using_your_master_branch.md)一文。如果你对那篇文章不熟悉,请先阅读它,再回来继续。

## 变基/衍合(rebase)


Git的*变基*操作会将提交历史中的提交节点摘除并回滚,然后统一提交到一个新节点上。在解决合并冲突时,可以通过对当前分支进行变基,来获取从分支拉取到当前时刻的所有变更。

从执行如下命令开始:

```
git fetch upstream
git rev-list --left-right --count HEAD...upstram/master
```

此处输入的 `git rev-list` 命令可以得到当前分支与QMK主干分支间的提交数量差。而先执行 `git fetch` 是为了确保我们有上游仓库(upstream repo)的最新状态。`git rev-list` 命令会返回两个数字:

```
$ git rev-list --left-right --count HEAD...upstream/master
7 35
```

第一个数字为当前分支自创建后新增的提交数量。第二个数字为当前分支创建后在 `upstream/master` 上的提交数量,而这部分就是我们当前分支上缺失的提交记录。

在我们了解了当前分支以及上游仓库的状态后,可以发起变基操作了:

```
git rebase upstream/master
```

这样可以让Git回滚该分支的提交,然后基于QMK的主干版本重新应用这些提交。

*译注:以下内容在中文Git下大同小异,且仅作为示例,不进行翻译*
```
$ git rebase upstream/master
First, rewinding head to replay your work on top of it...
Applying: Commit #1
Using index info to reconstruct a base tree...
M conflicting_file_1.txt
Falling back to patching base and 3-way merge...
Auto-merging conflicting_file_1.txt
CONFLICT (content): Merge conflict in conflicting_file_1.txt
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Commit #1

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
```

以上内容是在告诉我们有合并冲突存在,并给出了冲突所在的文件名。在编辑器中打开该文件,可以在某处发现类似如下形式的内容:

```
<<<<<<< HEAD
<p>For help with any issues, email us at support@webhost.us.</p>
=======
<p>Need help? Email support@webhost.us.</p>
>>>>>>> Commit #1
```

`<<<<<<< HEAD` 标记了合并冲突的起始行,直至 `>>>>>>> Commit #1` 标记的结束行,中间通过 `=======` 分隔开冲突双方。其中 `HEAD` 部分为QMK主干上的版本,标记了提交日志的部分为当前分支的本地提交。

由于Git存储的是*文件差异部分*而非整个文件,所以当Git无法在文件中找到一个变更发生前的内容时,就无法知道如何去进行文件变更,重新编辑一下可以解决问题。在更改完成后,保存文件。

```
<p>Need help? Email support@webhost.us.</p>
```

之后,执行:

```
git add conflicting_file_1.txt
git rebase --continue
```

Git即会记录对文件冲突做出的变更,并继续处理剩余的提交,直至全部完成。
76 changes: 76 additions & 0 deletions docs/zh-cn/newbs_git_resynchronize_a_branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 重新同步已失去同步状态的Git分支

<!---
original document: 0.15.17:docs/newbs_git_resynchronize_a_branch.md
git diff 0.15.17 HEAD -- docs/newbs_git_resynchronize_a_branch.md | cat
-->

假设你在自己的 `master` 分支之上有提交,并且想和QMK仓库进行同步,可以通过 `git pull` 拉取QMK的 `master` 分支到你的库,但同时Github也会提醒你当前分支相比 `qmk:master` 有几个领先的提交,会在你向QMK发起pr时造成麻烦。

?> 本文中的场景基于[在你Fork的主干上:频繁更新,不要提交](zh-cn/newbs_git_using_your_master_branch.md)一文。如果你对那篇文章不熟悉,请先阅读它,再回来继续。

## 备份你在自己的主干分支上的所有变更(可选)

不会有人想把有用的成果弄丢的。如果你想将你的 `master` 分支上的变更另存一份,简便的方法是直接创建一个当前“脏” `master` 分支的副本:

```
git branch old_master master
```

现在 `master` 分支拥有了一个副本分支 `old_master`。

## 重新同步分支

现在可以重新同步 `master` 分支了,这里,我们将QMK仓库设置为Git的远程仓库。通过执行 `git remote -v` 可以确认远程仓库配置,输出信息应类似于:

```
QMKuser ~/qmk_firmware (master)
$ git remote -v
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
origin https://github.com/<your_username>/qmk_firmware.git (push)
upstream https://github.com/qmk/qmk_firmware.git (fetch)
upstream https://github.com/qmk/qmk_firmware.git (push)
```

如果你只能看到一个仓库:

```
QMKuser ~/qmk_firmware (master)
$ git remote -v
origin https://github.com/qmk/qmk_firmware.git (fetch)
origin https://github.com/qmk/qmk_firmware.git (push)
```

通过如下命令添加新的远程仓库:

```
git remote add upstream https://github.com/qmk/qmk_firmware.git
```

然后,重新将 `origin` 远程仓库设置为自己的fork:

```
git remote set-url origin https://github.com/<your_username>/qmk_firmware.git
```

在两个远程仓库配置完毕后,需要从QMK的 upstream 仓库中获取到更新,执行:

```
git fetch upstream
```

此时,重新同步你的分支到QMK的版本:

```
git reset --hard upstream/master
```

以上操作会更新你的本地仓库,而你的Github远程仓库仍然处于未同步状态,通过推送,可以让其进入已同步状态。可以通过如下命令来指引Git强行覆盖掉那些仅在你远程仓库中存在的提交:

```
git push --force-with-lease
```

!> **不要**在其它使用者也会提交的分支上执行 `git push --force-with-lease`,否则会覆盖掉他人的提交。

此时你的Github fork,本地文件副本,以及QMK仓库就是一致的了。之后再进行变更([在分支上!](zh-cn/newbs_git_using_your_master_branch.md#making-changes))和提交。
Loading