diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md
index e97f3c9..a6203cd 100644
--- a/docs/CONTRIBUTING.md
+++ b/docs/CONTRIBUTING.md
@@ -5,14 +5,14 @@ you do, please read the following guidelines.
## Got a question or problem?
-For quick questions there's no need to open an issue as you can reach us on [makerdiary/community](https://community.makerdiary.com).
+For quick questions there's no need to open an issue, because you can reach us on [makerdiary/community](https://community.makerdiary.com).
## Found a bug?
-If you found a bug in the source code, you can help us by submitting an issue to the [issue tracker](https://github.com/makerdiary/mx-keyboard/issues) in our GitHub repository. Even better, you can submit a Pull Request with a fix.
+If you find a bug in the source code, you can help us by submitting an issue to the [issue tracker](https://github.com/makerdiary/python-keyboard/issues) in our GitHub repository. Even better, you can submit a Pull Request with a fix.
## Requesting a tutorial
-If you don't see what you're looking for, you can request a tutoial by submitting an issue to our GitHub Repository. We'd love to see your feedback!
+If you don't see what you're looking for, you can request a tutorial by submitting an issue to our GitHub Repository. We'd love to see your feedback!
-
\ No newline at end of file
+
diff --git a/docs/assembling.md b/docs/assembling.md
index aa0c443..b300e8e 100644
--- a/docs/assembling.md
+++ b/docs/assembling.md
@@ -4,16 +4,13 @@
2. Attach the provided 2.4GHz and NFC cabled PCB antennas to the nRF52840 M.2 module as shown in the figure below:
- 
+ 
3. Insert the module into the connector as shown in the figure below:
- !!! Warning "Angle of Insertion"
- Angled insertion is allowable and preferred to minimize the insertion force. The angle of insertion is **5° ~ 25°**, **typically 20°**.
-
- 
+ **Warning regarding the angle of insertion: Angled insertion is allowable and is preferred to minimize the insertion force. The angle of insertion is 5° ~ 25°, typically 20°.**
+ 
4. Secure the module using the provided mounting screw as shown in the figure below:
- 
-
+ 
diff --git a/docs/assets/images/attaching-antennas-to-m2.jpg b/docs/assets/images/attaching-antennas-to-m2.jpg
new file mode 100644
index 0000000..536f6a0
Binary files /dev/null and b/docs/assets/images/attaching-antennas-to-m2.jpg differ
diff --git a/docs/backlight.md b/docs/backlight.md
new file mode 100644
index 0000000..836913a
--- /dev/null
+++ b/docs/backlight.md
@@ -0,0 +1,35 @@
+# Backlight
+
+The keboard has 64 programmable RGB LEDs. We are still working on the backlight. Before we get it done,
+you are able to customize the backlight in the `macro_handler`.
+For example, we set 9 to red color when a macro key pressed, and turn into green color
+when the macro key is released:
+
+```python
+def macro_handler(dev, n, is_down):
+ if is_down:
+ dev.backlight.pixel(9, 0xff, 0, 0)
+ else:
+ dev.backlight.pixel(9, 0, 0xff, 0)
+ dev.backlight.update()
+```
+
+`dev.backlight` provides some basic fucntions to control the RGB LEDs
+
+## Backlight APIs
++ `update()` synchronizes with its buffer.
++ `pixel(i, r, g, b)` sets the bufffer of the LED `i`
++ `set_brightness(value)` sets the global brightness of all LEDs (from 0 to 255)
+
+## Index of RGB LED
+You can find the index of an LED here.
+```
+# ESC(0) 1(1) 2(2) 3(3) 4(4) 5(5) 6(6) 7(7) 8(8) 9(9) 0(10) -(11) =(12) BACKSPACE(13)
+# TAB(27) Q(26) W(25) E(24) R(23) T(22) Y(21) U(20) I(19) O(18) P(17) [(16) ](15) \(14)
+# CAPS(28) A(29) S(30) D(31) F(32) G(33) H(34) J(35) K(36) L(37) ;(38) "(39) ENTER(40)
+#LSHIFT(52) Z(51) X(50) C(49) V(48) B(47) N(46) M(45) ,(44) .(43) /(42) RSHIFT(41)
+# LCTRL(53) LGUI(54) LALT(55) SPACE(56) RALT(57) MENU(58) Fn(59) RCTRL(60)
+```
+
+No.61 and No.62 are under the space key. No.63 is at the back of keyboard.
+
diff --git a/docs/configuration.md b/docs/configuration.md
index 1615d2a..826d920 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,11 +1,11 @@
# Keyboard Configuration
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.
-In `code.py`, we can modify its keymap, add a macro and add a new feature to keyboard.
+Using `code.py`, you can modify they keyboard's keymap, and add macros, Tap-keys and more.

-The default content of `code.py` is:
+An up-to-date `code.py` is included in this repository. Example content for `code.py` could be:
```python
@@ -95,13 +95,15 @@ keyboard.run()
```
-`keymap` contains multiple layers of keycodes. `macro_handler` is used to handle all macros. `pairs_handler` is used to handle any pair-keys.
+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.
-**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**
+**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 will not damage the hardware. Just use another keyboard to fix the error and save the file, and then the keyboard will recover.**
-If you know how Python works, configuring the keyboard would be very easy. If not, we have some examples to get started.
+## Examples
-1. To swap the positions of Caps and LCtrl, just swap `CAPS` and `LCTRL` in `layer 0` of `keymap`:
+If you already Python, configuring the keyboard is simple. If not, here are some examples to get started.
+
+1. Swap the positions of Caps and LCtrl. To do this, just swap `CAPS` and `LCTRL` in `layer 0` of `keymap`:
```python
# layer 0
@@ -114,7 +116,7 @@ If you know how Python works, configuring the keyboard would be very easy. If no
),
```
-2. Instead of D, use Caps as a Tap-key to activate navigation functions. Only need to change `layer 0` to:
+2. Use Caps as a Tap-key to activate navigation functions, instead of D. To implement this, you only need to change `layer 0` to:
```python
# layer 0
@@ -127,7 +129,7 @@ If you know how Python works, configuring the keyboard would be very easy. If no
),
```
-2. Add a new macro. Use Fn and Enter to trigger No.1 macro. Just add `MACRO(1)` to `layer 1`:
+3. Add a new macro. For example, the below uses Fn and Enter to trigger macro number 1 (the second macro, after macro number 0). Just add `MACRO(1)` to `layer 1`:
```python
# layer 1
@@ -142,7 +144,7 @@ If you know how Python works, configuring the keyboard would be very easy. If no
To define the function of the macro, please follow [the macro guide](macro.md)
-4. Use RShift, RGUI, Fn and RCtrl as Tap-keys. Tapping them outputs arrows keys (press & release quickly). Just change `layer 0` to:
+4. Use RShift, RGUI, Fn and RCtrl as Tap-keys, so that tapping them (_i.e._, quickly pressing & releasing them) outputs arrows keys. To do this, just change `layer 0` to:
```python
# layer 0
diff --git a/docs/developer_guide/hardware.md b/docs/developer_guide/hardware.md
new file mode 100644
index 0000000..130feef
--- /dev/null
+++ b/docs/developer_guide/hardware.md
@@ -0,0 +1,57 @@
+# Hardware
+
+## Specs
+| | M60 Keyboard |
+|-----------------|---------------------------------------------------------------------------------------------------------|
+| Core Module | nRF52840, Arm Cortex-M4F, 64MHz, 256KB RAM, 1MB FLASH, 8MB QSPI Flash, M.2 KEY-E |
+| Wireless | Bluetooth Low Energy 5.0, NFC |
+| USB | Type-C |
+| Layout | 60% (61 Keys) |
+| Hot-Swappable | Yes |
+| Switch Option | Cherry MX compatible Switches |
+| Backlight | 64 RGB LEDs, IS32FL3733 |
+|Battery Connector| JST 1.25mm 3-Pin |
+| RF Antennas | 2.4GHz Cabled PCB Antenna, NFC Cabled PCB Antenna |
+| Dimensions | 285 mm x 94.6 mm |
+
+
+
+## Keyboard Matrix
+The pins of 8x8 keyboard matrix:
+
+| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
+|-----|-------|-------|-------|-------|-------|-------|-------|-------|
+| ROW | P0_05 | P0_06 | P0_07 | P0_08 | P1_09 | P1_08 | P0_12 | P0_11 |
+| COL | P0_19 | P0_20 | P0_21 | P0_22 | P0_23 | P0_24 | P0_25 | P0_26 |
+
+## Power
++ When powered by USB, the keyboard is always on.
++ When powered by a battery, the keyboard is on if the ON/OFF button is pressed or pin `P0_28` outputs `0`.
+
+## Button
+The ON/OFF Button is at the back of the keyboard. It is connected to `P0_27`.
+
+## LEDs on M.2
+| LEDs | Pin |
+|--------------- | ------|
+| Red LED | P0_30 |
+| Green LED | P0_29 |
+| Blue LED | P0_31 |
+
+## RGB LEDs Matrix
+The RGB LEDs Matrix has 64 RGB LEDs and is driven by IS32FL3733.
+
+| name | Pin | note |
+|--------------- | -------| --------------|
+| Power | P1_04 | 1: on, 0: off |
+| I2C SDA | P1_05 | |
+| I2C SCL | P1_06 | |
+| Interrupt | P1_07 | |
+
+
+## Battery
+| name | Pin | note |
+|--------------- | -------| --------------|
+| Charging | P0_03 | 0: charging |
+| Voltage | P0_02 | AIN0 |
+
diff --git a/docs/developer_guide/index.md b/docs/developer_guide/index.md
new file mode 100644
index 0000000..098afc3
--- /dev/null
+++ b/docs/developer_guide/index.md
@@ -0,0 +1,19 @@
+# Dive Into Keyboard
+
+Normally, you only need to change `code.py` to configure the keyboard.
+If you are very good at Python and have a new idea which can not be implemented in `code.py`,
+you can modify [the `keyboard` library](https://github.com/makerdiary/python-keyboard/tree/main/keyboard).
+
+
+!!! Note
+ When you modify the `keyboard` library, the keyboard may stop working if there is any syntax error or other error in the code. You will need another keyboard to fix it. If you get a fatal error, you can always do a [factory reset](../factory_reset.md).
+
+By default, The CircuitPython firmware of M60 has two frozen modules - [`adafruit_ble`](https://github.com/adafruit/Adafruit_CircuitPython_BLE) and `PYKB`. `PYKB` is a frozen version of the `keyboard` library.
+
+## Use latest `keyboard` library
+1. Copy `keyboard` folder of [python-keyboard](https://github.com/makerdiary/python-keyboard/tree/main/keyboard) to the `lib` directory of the `CIRCUITPY` USB drive.
+2. Replace `from PYKB import *` to `from keyboard import *` in `code.py` of the USB drive.
+
+
+## Develop with C/C++, Rust, JerryScript, TinyGo
+The M60 keybaord also supports C/C++, Rust, JerryScript and TinyGo. To create your own firmware, read [the hardware information](hardware.md) to get started.
\ No newline at end of file
diff --git a/docs/factory_reset.md b/docs/factory_reset.md
new file mode 100644
index 0000000..cbec850
--- /dev/null
+++ b/docs/factory_reset.md
@@ -0,0 +1,7 @@
+# Factory Reset
+
+If you get a fatal error when you modify the code of keyboard, you can always do a factory reset:
+
+1. Download [factory_reset.uf2](https://gitee.com/makerdiary/python-keyboard/attach_files/469654/download), follow [the firmware upgrade guide](upgrade_firmware.md) to flash `factoary_reset.uf2`. It will erase the storage of the keyboard.
+
+2. Flash the latest firmware from [python-keyboard / firmware](https://github.com/makerdiary/python-keyboard/tree/main/firmware).
\ No newline at end of file
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 539a13a..f74dd3e 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -1,63 +1,66 @@
# Get started with M60 Keyboard
-M60 is a compact keyboard. It has a keymap composed of multiple layers, which is [similar to TMK Keyboard](https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md). By default, No.0 layer is used:
+M60 is a compact keyboard. It has a keymap composed of multiple layers, [similar to TMK Keyboard](https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md). By default, layer number 0 is used, which includes a normal key map:

## Keymap
-As the 60% keyboard lacks a lot of keys such as F1~F12 and arrow keys, Fn is used to activate a new layer.
-When holding Fn down, the following keys are activated.
+As the 60% keyboard lacks a lot of keys such as F1~F12 and arrow keys, Fn is used to activate a second layer, layer number 1.
-
-
-+ Fn + M triggers No.0 macro
-+ Fn + P suspends the keyboard when only powered by battery.
-+ Fn + B enters its bootloader (only for upgrade)
+By default, holding Fn down activates the following functions:
-Except Fn, a normal key can be used as a Tap-key, which is holding a key down to activate an alternate function.
+
-### Using B to configure Bluetooth and USB
+- Fn + M triggers No.0 macro
+- Fn + P suspends the keyboard when only powered by battery.
+- Fn + B enters its bootloader (only for used for firmware upgrades)
-B is used as a Tap-key to configure Bluetooth and USB. Taping B outputs `b` (press & release quickly). Holding B down activates another new layer. With the layer, the following functions are available:
+Except for Fn, any normal key can be used as a Tap-key. A Tap-key is a key that can be used as an ordinary key when tapped, or can be held down to activate alternate functions.
-+ B + Esc toggles Bluetooth
-+ B + 0 ~ 9 changes Bluetooth ID to switch between multiple computers and phones
-+ B + U toggles USB
+All of the default Tap-keys, including D, B, and ; can be [re-configured](configuration.md).
### Using D for Navigation
-D is also used as a Tap key for navigation functions.
+D is the default Tap-key to activate the navigation functions. Holding it activates layer number 2, which includes navigation keys:

-+ D + H → ←
-+ D + J → ↓
-+ D + K → ↑
-+ D + L → →
-+ D + U → PgUp
-+ D + N → PgDn
+- D + H → ←
+- D + J → ↓
+- D + K → ↑
+- D + L → →
+- D + U → PgUp
+- D + N → PgDn
+
+### Using B to Configure Bluetooth and USB
+
+B is the default Tap-key to configure Bluetooth and USB. Tapping B (_i.e._, pressing & releasing it quickly) outputs `b`. Holding B down activates another the Bluetooth keyboard layer, layer number 3. When the Bluetooth layer is active, the following functions are available:
+
+- B + Esc toggles Bluetooth
+- B + 0 ~ 9 changes Bluetooth ID to switch between multiple computers and phones
+- B + U toggles USB
### Using ; as Ctrl
-; is another type of Tap-key. Taping ; outputs `;`. However, holding ; down outputs `Ctrl` instead of activating a layer.
+; is a different type of Tap-key. Tapping ; outputs `;`. However, holding ; down outputs `Ctrl` instead of activating a layer.

-+ ; + c = Ctrl + c
-+ ; + v = Ctrl + v
-+ ; + x = Ctrl + x
-+ ; + a = Ctrl + a
-
+- ; + c = Ctrl + c
+- ; + v = Ctrl + v
+- ; + x = Ctrl + x
+- ; + a = Ctrl + a
## Using Pair-keys
-Simultaneously pressing two keys (interval less than 10ms) activates an alternate function.
-By default, JK are used as a pair-keys. When simultaneously pressing J and K in a text editor, it will output a pre-defined string.
+Simultaneously pressing two keys (_i.e._, pressing them in an interval of less than 10ms) activates an alternate function.
-## Setup Bluetooth
+Two sets of pair-keys are configured by default, to illustrate how to setup these keys. These include JK and UI. As shipped, simultaneously pressing J and K or U and I in a text editor will output a pre-defined string (_e.g._, "You just triggered pair keys #0").
-First, we press B + 1 to start Bluetooth advertising, and then we will see the blue LED under 1 is in breathing mode:
+## How to Setup Bluetooth
+
+First, press B + 1 to start Bluetooth advertising. You will then see the blue LED under 1 enter in "breathing" mode and flash slowly:

@@ -73,8 +76,10 @@ Choose `Bluetooth` in the `Add a device` dialog, then you will see the device `P
-When to connect the keyboard to a second computer, just use B + 2 to start connecting. From 0 to 9, the keyboard can connect to 10 bluetooth devices.
+In order to connect the keyboard to a second computer, just use B + 2 to start connecting. From 0 to 9, the keyboard can connect to 10 bluetooth devices.
+
+## Go Further
-## Go further
+We hope M60 keyboard incites ideas to make a keyboard more productive, all without having to install any third-party software or drivers on your computer.
-We hope M60 brings you an idea to make a keyboard more productive. You may have your own thoughts of configuring a keyboard. Follow [the configuring guide](configuration.md) to find what works best for you.
+If you have your own thoughts on how to best configure the keyboard, just follow [the configuration guide](configuration.md) to find what works best for you.
diff --git a/docs/index.md b/docs/index.md
index c7ad572..5d64308 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,6 @@
# M60 Mechanical Keyboard
- **En** | [中文][1]
+**En** | [中文][1]
M60 is a hot-swappable 60% Keyboard with USB, BLE 5.0 and RGB backlight. It is highly configurable and extensible.
It can run Python code saved in its USB storage, which makes it super powerful. It has very low power consumption and only needs about 160uA current when connected to a computer via Bluetooth. It is one of the lowest latency USB keyboards.
@@ -9,32 +9,36 @@ It can run Python code saved in its USB storage, which makes it super powerful.
## Features
-- BLE 5.0 Multi-pairing up to 10 devices
-- Hot-swappable
-- USB Type-C
+- Bluetooth, including BLE 5.0 multi-pairing up to 10 devices
+- Hot-swappable key switch mounts
+- USB Type-C connector
- Standard 60% layout (61 keys)
- 6KRO
-- RGB backlit
+- RGB backlight (pending software support)
- Supports Windows/macOS/Linux/iOS/Android
- Low power consumption
- All keys remappable
- Up to 32 layers
- Macros
- Pair-keys
+- Tap-keys
## Specs
-| | M60 Keyboard |
-|-----------------|-----------------------------------------------------------------------------------|
-| Core Module | nRF52840, Arm Cortex-M4F, 64MHz, 256KB RAM, 1MB FLASH, 8MB QSPI Flash, M.2 KEY-E |
-| Wireless | Bluetooth Low Energy 5.0, NFC |
-| USB | Type-C |
-| Layout | 60% (61 Keys) |
-| Hot-Swappable | Yes |
-| Switch Option | Cherry MX compatible Switches |
-| Backlight | 64 RGB LEDs, IS32FL3733 |
-|Battery Connector| JST 1.25mm 3-Pin |
-| RF Antennas | 2.4GHz Cabled PCB Antenna, NFC Cabled PCB Antenna |
-| Dimensions | 285 mm x 94.6 mm |
+| | M60 Keyboard |
+| ----------------- | -------------------------------------------------------------------------------- |
+| Core Module | nRF52840, Arm Cortex-M4F, 64MHz, 256KB RAM, 1MB FLASH, 8MB QSPI Flash, M.2 KEY-E |
+| Wireless | Bluetooth Low Energy 5.0, NFC |
+| USB | Type-C |
+| Layout | 60% (61 Keys) |
+| Hot-Swappable | Yes |
+| Switch Option | Cherry MX compatible Switches |
+| Backlight | 64 RGB LEDs, IS32FL3733 |
+| Battery Connector | JST 1.25mm 3-Pin |
+| RF Antennas | 2.4GHz Cabled PCB Antenna, NFC Cabled PCB Antenna |
+| Dimensions | 285 mm x 94.6 mm (compatible with DZ60 cases) |
+
+!!! Note
+ The M60 PCB uses a north-facing switch orientation. If you plan to use Cherry MX or low-profile keycaps, be sure to purchase key switches that are beveled on both the north and south ends. See Issue #3.
[1]: https://gitee.com/makerdiary/python-keyboard/wikis/pages
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 584960a..1d36fff 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -1,63 +1,58 @@
-
-
- Name | Description
---------------|--------------------
-`NO` | Do nothing
-`TRANSPARENT` | Use the key of next active layer
+| Name | Description |
+| ------------- | -------------------------------- |
+| `NO` | Do nothing |
+| `TRANSPARENT` | Use the key of next active layer |
## Bluetooth
- Name | Description
---------------|-------------------
-`BT0` ~ `BT9` | Switch to Bluetooth ID n (0 - 9)
-`BT_TOGGLE` | Toggle Bluetooth
+| Name | Description |
+| ------------- | -------------------------------- |
+| `BT0` ~ `BT9` | Switch to Bluetooth ID n (0 - 9) |
+| `BT_TOGGLE` | Toggle Bluetooth |
## USB
- Name | Description
---------------|-------------------
-`USB_TOGGLE` | Toggle USB
+| Name | Description |
+| ------------ | ----------- |
+| `USB_TOGGLE` | Toggle USB |
-!!! note
- When connecting the keyboard to a computer via USB, USB will be enabled automatically.
- When both USB and Bluetooth are enabled, USB will be used.
+**Note: When connecting the keyboard to a computer via USB, USB will be enabled automatically. When both USB and Bluetooth are enabled, USB will be used.**
## System
- Name | Description
---------------|-----------------------------------------
-`BOOTLOADER` | Enter the bootloader of the keyboard
-`HEATMAP` | Generate heatmap (todo)
-`SUSPEND` | Suspend. To wake up keyboard, just press any key
-`SHUTDOWN` | Shutdown. Use ON/OFF button to power on the keyboard
+| Name | Description |
+| ------------ | ---------------------------------------------------- |
+| `BOOTLOADER` | Enter the bootloader of the keyboard |
+| `HEATMAP` | Generate heatmap (todo) |
+| `SUSPEND` | Suspend. To wake up keyboard, just press any key |
+| `SHUTDOWN` | Shutdown. Use ON/OFF button to power on the keyboard |
## Layer & Modifier
-+ `MODS_KEY(mods, key)` sends one or more modifier(s) + a normal key. `MODS()` is used to wrap modifiers.
+- `MODS_KEY(mods, key)` sends one or more modifier(s) + a normal key. `MODS()` is used to wrap modifiers.
`MODS_KEY(MODS(LCTRL), C)`, `MODS_KEY(MODS(LCTRL, LSHIFT), C)`, `MODS_KEY(MODS(LCTRL, LSHIFT, LALT), C)`
-+ `LAYER_TOGGLE(n)` toggles layer `n`
+- `LAYER_TOGGLE(n)` toggles layer `n`
-+ `MACRO(n)` creates macro `n`
+- `MACRO(n)` creates macro `n`
### TAP-Key
-`TAP-Key` has 2 modes - tap (press and release quickly) and hold (long press)
+A `TAP-Key` has 2 modes - tap (press and release quickly) and hold (long press)
-+ `LAYER_TAP(n, key)` tap - outputs `key`, hold - turns on layer n momentary
+- `LAYER_TAP(n, key)` tap - outputs `key`, hold - turns on layer n momentary
-+ `LAYER_TAP_TOGGLE(n)` tap - toggles layer n, hold - turns on layer n momentary
+- `LAYER_TAP_TOGGLE(n)` tap - toggles layer n, hold - turns on layer n momentary
-+ `LAYER_MODS(n, mods)` tap - outputs specified modifier(s), hold - turns on layer n momentary
+- `LAYER_MODS(n, mods)` tap - outputs specified modifier(s), hold - turns on layer n momentary
`LAYER_MODS(1, MODS(LCTRL))`, `LAYER_MODS(1, MODS(LCTRL, LSHIFT))`
-+ `MODS_TAP(mods, key)` tap - outputs `key`, hold - outputs specified modifier(s)
+- `MODS_TAP(mods, key)` tap - outputs `key`, hold - outputs specified modifier(s)
`MODS_TAP(MODS(LCTRL), ';')`, `MODS_TAP(MODS(LCTRL, LALT), LEFT)`
-
## APP & Media
```
@@ -298,4 +293,3 @@ SHIFT
ALT
GUI
```
-
diff --git a/docs/macro.md b/docs/macro.md
index 0458a4e..27c2305 100644
--- a/docs/macro.md
+++ b/docs/macro.md
@@ -1,6 +1,6 @@
# Macro
-To setup a macro, add a macro to the keymap and define its function. For example, use Fn as No.0 macro:
+To set up a macro, add a macro to the keymap and define its function. By default, Fn is configured as macro number 0:
```python
# code.py
@@ -27,9 +27,11 @@ keyboard.macro_handler = macro_handler
keyboard.run()
```
-## Use a macro to launch the Calculator on Windows
+## Examples
-Replace the function `macro_handler` with the following code to launch the Calculator with a single keystroke.
+### Use a macro to launch the Calculator application on Windows
+
+Replace the function `macro_handler` with the following code to launch the Calculator with a single keystroke:
```python
def macro_handler(dev, n, is_down):
@@ -39,9 +41,9 @@ def macro_handler(dev, n, is_down):
dev.send_text('calc\n')
```
-## Automatic typing
+### Automatic typing
-Read a file in the USB storage and type its content automatically.
+Use the following code to read a file in the keyboard's USB storage and type its content automatically:
```python
def macro_handler(dev, n, is_down):
@@ -51,9 +53,9 @@ def macro_handler(dev, n, is_down):
dev.send_text(line)
```
-## Repeated typing
+### Repeated key strokes
-Use a macro to trigger a repeated sequence of typing until a new key is pressed.
+Use a macro to trigger a repeated sequence of key presses until a new key is pressed:
```python
def macro_handler(dev, n, is_down):
diff --git a/docs/pair-keys.md b/docs/pair-keys.md
index 27ff3b8..02d7b1e 100644
--- a/docs/pair-keys.md
+++ b/docs/pair-keys.md
@@ -1,9 +1,10 @@
# Pair-Keys
-When two keys are pressed simultaneously (interval less than 10ms), we use it to activate a pre-defined function.
-It is similar to Macro. While, pair-keys doesn't have a released event.
+They keyboard can be configured to activate a pre-defined function when two keys are pressed simultaneously (_i.e._, within an interval less than 10ms).
-For example, we use JK and UI as pair-keys.
+Like a macro, activating pair-keys triggers an immediate event. Unlike a macro, pair-keys do not have a release (key-up) event.
+
+By default, the keyboard uses JK and UI as pair-keys to trigger example functions (_e.g._, typing "You just triggered pair keys #0").
```python
# code.py
diff --git a/docs/upgrade_firmware.md b/docs/upgrade_firmware.md
index a081add..18c614f 100644
--- a/docs/upgrade_firmware.md
+++ b/docs/upgrade_firmware.md
@@ -2,18 +2,17 @@
The keyboard has a built-in bootloader to upgrade its firmware.
-## Check Current Firmware Version
+## How to Check Current Firmware Version
-To check the information of the firmware, just open the `boot_out.txt` file in the USB storage of the keyboard. The file contains the version and the compiled date of the firmware:
+To check the current version of the firmware, just open `boot_out.txt` in the USB storage device of the keyboard. This file contains the version number and the compiled date of the firmware, for example:
```
Adafruit CircuitPython 6.0.0-alpha.1-110-g121d78ec9 on 2020-08-27; Makerdiary M60 Keyboard with nRF52840
```
-If you find a newer firmware (file with `.uf2` extension) in [python-keyboard / firmware](https://github.com/makerdiary/python-keyboard/tree/zh-cn/firmware), you could do an upgrade.
+If you there is a newer firmware revision (file with `.uf2` extension) in [python-keyboard / firmware](https://github.com/makerdiary/python-keyboard/tree/zh-cn/firmware), you upgrade to the newest version by following the instructions below.
-
-## Enter Bootloader
+## How to Enter the Bootloader
There are 4 ways to run into the bootloader:
@@ -29,9 +28,9 @@ There are 4 ways to run into the bootloader:
mcu.reset()
```
-4. When battery is not attached, hold the ON/OFF button and power on the keyboard with USB.
+4. When a battery is not attached, hold the ON/OFF button and power on the keyboard with USB.
-## Upgrade
+## How to Upgrade
When the bootloader is running, a USB drive named `M60Keyboard` will appear in your computer.
-Download the latest `.uf2` firmware, drag-n-drop the firmware into the USB drive, then wait until a new USB drive named `CIRCUITPY` appears.
+Download the latest `.uf2` firmware, drag-n-drop the firmware into the USB drive, and then wait until a new USB drive named `CIRCUITPY` appears.
diff --git a/docs/where_to_buy.md b/docs/where_to_buy.md
new file mode 100644
index 0000000..9fabec3
--- /dev/null
+++ b/docs/where_to_buy.md
@@ -0,0 +1,18 @@
+# Where to Buy M60 Keyboard
+
+## Buy Online
+
+M60 keyboard is available on the following channels (click to go directly to the product):
+
+[](https://makerdiary.com/collections/frontpage/products/m60-mechanical-keyboard-pcba)
+
+
+[](https://item.taobao.com/item.htm?id=623296623963)
+
+## Bulk & Customization
+
+We are ready to customize our electronics and firmware to better meet your solution's needs. Many of our platforms are prepared for customization.
+
+If you would like to do some serious business, [drop a line](mailto:zelin@makerdiary.com) and we'll reply before you know it.
+
+
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
index e4cb1c4..315a7e8 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -22,7 +22,7 @@
site_name: M60 Keyboard
site_description: The documentation offers all you need to start using M60 Keyboard.
site_author: makerdiary
-site_url: https://wiki.makerdiary.com/python-keyboard
+site_url: https://wiki.makerdiary.com
# Repository
repo_name: makerdiary/python-keyboard
@@ -116,7 +116,7 @@ markdown_extensions:
- pymdownx.magiclink:
repo_url_shorthand: true
user: makerdiary
- repo: mx-keyboard
+ repo: python-keyboard
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.snippets:
@@ -136,7 +136,13 @@ nav:
- Keycodes: keycodes.md
- Macro: macro.md
- Pair-Keys: pair-keys.md
+ - Backlight: backlight.md
- Upgrade: upgrade_firmware.md
+ - Factory Reset: factory_reset.md
+ - Developer Guide:
+ - Dive Into Keyboard: developer_guide/index.md
+ - Hardware: developer_guide/hardware.md
+ - Where to Buy: where_to_buy.md
- Contributing: CONTRIBUTING.md
- 中文: https://gitee.com/makerdiary/python-keyboard/wikis/pages