Skip to content

Commit 421151c

Browse files
committed
Smooth out language, typo fixes, example heading
1 parent dad4d6f commit 421151c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/configuration.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Keyboard Configuration
22

33
M60 is not just a USB HID device, but also a USB storage device. Python code can be saved and executed in the keyboard. When the keyboard powers on, it will run the Python file `code.py` in its USB storage.
4-
In `code.py`, we can modify its keymap, add a macro and add a new feature to keyboard.
4+
Using `code.py`, you can modify they keyboard's keymap, and add macros, Tap-keys and more.
55

66
![](https://gitee.com/makerdiary/python-keyboard/raw/resource/img/CIRCUITPY-en.png)
77

8-
The default content of `code.py` is:
8+
An up-to-date `code.py` is included in this repository. Example content for `code.py` could be:
99

1010
```python
1111

@@ -95,11 +95,13 @@ keyboard.run()
9595

9696
```
9797

98-
`keymap` contains multiple layers of keycodes. `macro_handler` is used to handle all macros. `pairs_handler` is used to handle any pair-keys.
98+
The `keymap` variable can contains multiple layers of keycodes. The `macro_handler` is used to handle all macros. The `pairs_handler` is used to handle any pair-keys.
9999

100-
**When `code.py` is saved, the keyboard will reload it. If `code.py` has a syntax error, the keyboard will stop working. But, don't worry, it wouldn't damage the hardware. Fix the error and save it, then the keyboard will recover**
100+
**When `code.py` is saved, the keyboard will reload it. If `code.py` has a syntax error, the keyboard will stop working. But, don't worry, it wouldn't damage the hardware. Use another keyboard to fix the error and save it, then the keyboard will recover.**
101101

102-
If you know how Python works, configuring the keyboard would be very easy. If not, we have some examples to get started.
102+
## Examples
103+
104+
If you already Python, configuring the keyboard is simple. If not, here are some examples to get started.
103105

104106
1. To swap the positions of <kbd>Caps</kbd> and <kbd>LCtrl</kbd>, just swap `CAPS` and `LCTRL` in `layer 0` of `keymap`:
105107

@@ -127,7 +129,7 @@ If you know how Python works, configuring the keyboard would be very easy. If no
127129
),
128130
```
129131

130-
2. Add a new macro. Use <kbd>Fn</kbd> and <kbd>Enter</kbd> to trigger No.1 macro. Just add `MACRO(1)` to `layer 1`:
132+
3. Add a new macro. Use <kbd>Fn</kbd> and <kbd>Enter</kbd> to trigger No.1 macro. Just add `MACRO(1)` to `layer 1`:
131133

132134
```python
133135
# layer 1

0 commit comments

Comments
 (0)