Skip to content

Commit 0cc72d9

Browse files
committed
add keycodes and assembling guide
1 parent 8271bc3 commit 0cc72d9

File tree

4 files changed

+350
-12
lines changed

4 files changed

+350
-12
lines changed

docs/assembling.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Assembling
2+
3+
1. Make sure the M60 keyboard is powered off
4+
5+
2. Attach the provided 2.4GHz and NFC cabled PCB antennas to the nRF52840 M.2 module as shown in the figure below:
6+
7+
![Attaching Antennas](https://wiki.makerdiary.com/nrf52840-m2-devkit/assets/images/attaching-antennas-to-m2.webp)
8+
9+
3. Insert the module into the connector as shown in the figure below:
10+
11+
!!! Warning "Angle of Insertion"
12+
Angled insertion is allowable and preferred to minimize the insertion force. The angle of insertion is **5° ~ 25°**, **typically 20°**.
13+
14+
![Module Insertion](https://wiki.makerdiary.com/nrf52840-m2-devkit/assets/images/m2-module-insertion.png)
15+
16+
4. Secure the module using the provided mounting screw as shown in the figure below:
17+
18+
![Secure the module](https://wiki.makerdiary.com/nrf52840-m2-devkit/assets/images/secure-m2-module-screw.png)
19+

docs/keycodes.md

Lines changed: 301 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,301 @@
1+
2+
3+
Name | Description
4+
--------------|--------------------
5+
`NO` | Do nothing
6+
`TRANSPARENT` | Use the key of next active layer
7+
8+
## Bluetooth
9+
10+
Name | Description
11+
--------------|-------------------
12+
`BT0` ~ `BT9` | Switch to Bluetooth ID n (0 - 9)
13+
`BT_TOGGLE` | Toggle Bluetooth
14+
15+
## USB
16+
17+
Name | Description
18+
--------------|-------------------
19+
`USB_TOGGLE` | Toggle USB
20+
21+
!!! note
22+
When connecting the keyboard to a computer via USB, USB will be enabled automatically.
23+
When both USB and Bluetooth are enabled, USB will be used.
24+
25+
## System
26+
27+
Name | Description
28+
--------------|-----------------------------------------
29+
`BOOTLOADER` | Enter the bootloader of the keyboard
30+
`HEATMAP` | Generate heatmap (todo)
31+
`SUSPEND` | Suspend. To wake up keyboard, just press any key
32+
`SHUTDOWN` | Shutdown. Use ON/OFF button to power on the keyboard
33+
34+
## Layer & Modifier
35+
36+
+ `MODS_KEY(mods, key)` sends one or more modifier(s) + a normal key. `MODS()` is used to wrap modifiers.
37+
38+
`MODS_KEY(MODS(LCTRL), C)`, `MODS_KEY(MODS(LCTRL, LSHIFT), C)`, `MODS_KEY(MODS(LCTRL, LSHIFT, LALT), C)`
39+
40+
+ `LAYER_TOGGLE(n)` toggles layer `n`
41+
42+
+ `MACRO(n)` creates macro `n`
43+
44+
### TAP-Key
45+
46+
`TAP-Key` has 2 modes - tap (press and release quickly) and hold (long press)
47+
48+
+ `LAYER_TAP(n, key)` tap - outputs `key`, hold - turns on layer n momentary
49+
50+
+ `LAYER_TAP_TOGGLE(n)` tap - toggles layer n, hold - turns on layer n momentary
51+
52+
+ `LAYER_MODS(n, mods)` tap - outputs specified modifier(s), hold - turns on layer n momentary
53+
54+
`LAYER_MODS(1, MODS(LCTRL))`, `LAYER_MODS(1, MODS(LCTRL, LSHIFT))`
55+
56+
+ `MODS_TAP(mods, key)` tap - outputs `key`, hold - outputs specified modifier(s)
57+
58+
`MODS_TAP(MODS(LCTRL), ';')`, `MODS_TAP(MODS(LCTRL, LALT), LEFT)`
59+
60+
61+
## APP & Media
62+
63+
```
64+
AUDIO_MUTE
65+
AUDIO_VOL_UP
66+
AUDIO_VOL_DOWN
67+
TRANSPORT_NEXT_TRACK
68+
TRANSPORT_PREV_TRACK
69+
TRANSPORT_STOP
70+
TRANSPORT_STOP_EJECT
71+
TRANSPORT_PLAY_PAUSE
72+
# application launch
73+
APPLAUNCH_CC_CONFIG
74+
APPLAUNCH_EMAIL
75+
APPLAUNCH_CALCULATOR
76+
APPLAUNCH_LOCAL_BROWSER
77+
# application control
78+
APPCONTROL_SEARCH
79+
APPCONTROL_HOME
80+
APPCONTROL_BACK
81+
APPCONTROL_FORWARD
82+
APPCONTROL_STOP
83+
APPCONTROL_REFRESH
84+
APPCONTROL_BOOKMARKS
85+
# supplement for Bluegiga iWRAP HID(not supported by Windows?)
86+
APPLAUNCH_LOCK
87+
TRANSPORT_RECORD
88+
TRANSPORT_FAST_FORWARD
89+
TRANSPORT_REWIND
90+
TRANSPORT_EJECT
91+
APPCONTROL_MINIMIZE
92+
# https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/display-brightness-control
93+
DISPLAY_BRIGHTNESS_UP
94+
DISPLAY_BRIGHTNESS_DOWN
95+
```
96+
97+
## Nomal keys
98+
99+
```
100+
A
101+
B
102+
C
103+
D
104+
E
105+
F
106+
G
107+
H
108+
I
109+
J
110+
K
111+
L
112+
M
113+
N
114+
O
115+
P
116+
Q
117+
R
118+
S
119+
T
120+
U
121+
V
122+
W
123+
X
124+
Y
125+
Z
126+
127+
1
128+
2
129+
3
130+
4
131+
5
132+
6
133+
7
134+
8
135+
9
136+
0
137+
138+
ENTER
139+
ESCAPE
140+
ESC
141+
BACKSPACE
142+
TAB
143+
SPACE
144+
MINUS
145+
EQUAL
146+
LEFTBRACE
147+
RIGHTBRACE
148+
BACKSLASH
149+
HASHTILDE
150+
SEMICOLON
151+
APOSTROPHE
152+
QUOTE
153+
GRAVE
154+
COMMA
155+
DOT
156+
SLASH
157+
CAPSLOCK
158+
CAPS
159+
160+
F1
161+
F2
162+
F3
163+
F4
164+
F5
165+
F6
166+
F7
167+
F8
168+
F9
169+
F10
170+
F11
171+
F12
172+
173+
PRINTSCREEN
174+
PRTSCN
175+
SCROLLLOCK
176+
PAUSE
177+
INSERT
178+
HOME
179+
PAGEUP
180+
PGUP
181+
DELETE
182+
DEL
183+
END
184+
PAGEDOWN
185+
PGDN
186+
RIGHT
187+
LEFT
188+
DOWN
189+
UP
190+
191+
NUMLOCK
192+
KPSLASH
193+
KPASTERISK
194+
KPMINUS
195+
KPPLUS
196+
KPENTER
197+
KP1
198+
KP2
199+
KP3
200+
KP4
201+
KP5
202+
KP6
203+
KP7
204+
KP8
205+
KP9
206+
KP0
207+
KPDOT
208+
209+
# 102ND
210+
APPLICATION
211+
MENU
212+
POWER
213+
KPEQUAL
214+
215+
F13
216+
F14
217+
F15
218+
F16
219+
F17
220+
F18
221+
F19
222+
F20
223+
F21
224+
F22
225+
F23
226+
F24
227+
228+
OPEN
229+
HELP
230+
# PROPS
231+
SELECT
232+
STOP
233+
AGAIN
234+
UNDO
235+
CUT
236+
COPY
237+
PASTE
238+
FIND
239+
MUTE
240+
KPCOMMA
241+
242+
INT1
243+
INT2
244+
INT3
245+
INT4
246+
INT5
247+
INT6
248+
INT7
249+
INT8
250+
INT9
251+
252+
RO
253+
KATAKANAHIRAGANA
254+
YEN
255+
HENKAN
256+
MUHENKAN
257+
KPJPCOMMA
258+
259+
LANG1
260+
LANG2
261+
LANG3
262+
LANG4
263+
LANG5
264+
LANG6
265+
LANG7
266+
LANG8
267+
LANG9
268+
269+
HANGEUL
270+
HANJA
271+
KATAKANA
272+
HIRAGANA
273+
ZENKAKUHANKAKU
274+
275+
KPLEFTPAREN
276+
KPRIGHTPAREN
277+
278+
LEFT_CTRL
279+
LEFT_SHIFT
280+
LEFT_ALT
281+
LEFT_GUI
282+
RIGHT_CTRL
283+
RIGHT_SHIFT
284+
RIGHT_ALT
285+
RIGHT_GUI
286+
287+
LCTRL
288+
LSHIFT
289+
LALT
290+
LGUI
291+
RCTRL
292+
RSHIFT
293+
RALT
294+
RGUI
295+
296+
CTRL
297+
SHIFT
298+
ALT
299+
GUI
300+
```
301+

docs/upgrade_firmware.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
11
# Upgrade Firmware
22

33
The keyboard has a built-in bootloader to upgrade its firmware.
4-
When the bootloader is running, a USB drive named `M60Keyboard` will appear in your computer.
5-
Download the latest `.uf2` firmware, drag-n-drop the firmware into the USB drive, then wait until a new USB drive named `CIRCUITPY` appears.
4+
5+
## Check Current Firmware Version
6+
7+
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:
8+
9+
```
10+
Adafruit CircuitPython 6.0.0-alpha.1-110-g121d78ec9 on 2020-08-27; Makerdiary M60 Keyboard with nRF52840
11+
```
12+
13+
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.
14+
615

716
## Enter Bootloader
817

9-
There are several ways to run into the bootloader:
18+
There are 4 ways to run into the bootloader:
1019

11-
1. When USB is connected, press <kbd>Fn</kbd> + <kbd>b</kbd> to enter the bootloader
12-
2. When USB is connected, hold the ON/OFF button for 3 seconds to enter the bootloader
13-
3. When in Python REPL mode, run:
20+
1. When USB is connected, press <kbd>Fn</kbd> + <kbd>b</kbd> to enter the bootloader
1421

15-
```python
16-
import microcontroller as mcu
17-
mcu.on_next_reset(mcu.RunMode.BOOTLOADER)
18-
mcu.reset()
19-
```
22+
2. When USB is connected, hold the ON/OFF button for 3 seconds to enter the bootloader
2023

21-
4. When battery is not attached, hold the ON/OFF button and power on the keyboard with USB.
24+
3. When in Python REPL mode, run:
25+
26+
```python
27+
import microcontroller as mcu
28+
mcu.on_next_reset(mcu.RunMode.BOOTLOADER)
29+
mcu.reset()
30+
```
31+
32+
4. When battery is not attached, hold the ON/OFF button and power on the keyboard with USB.
33+
34+
## Upgrade
35+
36+
When the bootloader is running, a USB drive named `M60Keyboard` will appear in your computer.
37+
Download the latest `.uf2` firmware, drag-n-drop the firmware into the USB drive, then wait until a new USB drive named `CIRCUITPY` appears.

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ markdown_extensions:
130130
# Page tree
131131
nav:
132132
- Introduction: index.md
133+
- Assembling: assembling.md
133134
- Getting started: getting-started.md
134135
- Configuration: configuration.md
136+
- Keycodes: keycodes.md
135137
- Macro: macro.md
136138
- Pair-Keys: pair-keys.md
137139
- Upgrade: upgrade_firmware.md

0 commit comments

Comments
 (0)