]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/stenography.md
Add grave key
[qmk_firmware.git] / docs / stenography.md
1 # Stenography in QMK
2
3 [Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy).
4
5 The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
6
7 ## Plover with QWERTY Keyboard
8
9 Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
10
11 To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys.
12
13 ## Plover with Steno Protocol
14
15 Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`.
16
17 When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover.
18
19 In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
20
21 > Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
22
23 ### TX Bolt
24
25 TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
26
27 ### GeminiPR
28
29 GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories.
30
31 ## Configuring QMK for Steno
32
33 Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them.
34
35 ```Makefile
36 STENO_ENABLE = yes
37 MOUSEKEY_ENABLE = no
38 ```
39
40 In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function:
41
42 ```C
43 void matrix_init_user() {
44   steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
45 }
46 ```
47
48 Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control).
49
50 On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno!
51
52 ## Learning Stenography
53
54 * [Learn Plover!](https://sites.google.com/site/ploverdoc/)
55 * [QWERTY Steno](http://qwertysteno.com/Home/)
56 * [Steno Jig](https://joshuagrams.github.io/steno-jig/)
57 * More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
58
59 ## Keycode Reference
60
61 As defined in `keymap_steno.h`.
62
63 > Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
64
65 |GeminiPR|TX Bolt|Steno Key|
66 |--------|-------|-----------|
67 |`STN_N1`|`STN_NUM`|Number bar #1|
68 |`STN_N2`|`STN_NUM`|Number bar #2|
69 |`STN_N3`|`STN_NUM`|Number bar #3|
70 |`STN_N4`|`STN_NUM`|Number bar #4|
71 |`STN_N5`|`STN_NUM`|Number bar #5|
72 |`STN_N6`|`STN_NUM`|Number bar #6|
73 |`STN_N7`|`STN_NUM`|Number bar #7|
74 |`STN_N8`|`STN_NUM`|Number bar #8|
75 |`STN_N9`|`STN_NUM`|Number bar #9|
76 |`STN_NA`|`STN_NUM`|Number bar #A|
77 |`STN_NB`|`STN_NUM`|Number bar #B|
78 |`STN_NC`|`STN_NUM`|Number bar #C|
79 |`STN_S1`|`STN_SL`| `S-` upper|
80 |`STN_S2`|`STN_SL`| `S-` lower|
81 |`STN_TL`|`STN_TL`| `T-`|
82 |`STN_KL`|`STN_KL`| `K-`|
83 |`STN_PL`|`STN_PL`| `P-`|
84 |`STN_WL`|`STN_WL`| `W-`|
85 |`STN_HL`|`STN_HL`| `H-`|
86 |`STN_RL`|`STN_RL`| `R-`|
87 |`STN_A`|`STN_A`| `A` vowel|
88 |`STN_O`|`STN_O`| `O` vowel|
89 |`STN_ST1`|`STN_STR`| `*` upper-left |
90 |`STN_ST2`|`STN_STR`| `*` lower-left|
91 |`STN_ST3`|`STN_STR`| `*` upper-right|
92 |`STN_ST4`|`STN_STR`| `*` lower-right|
93 |`STN_E`|`STN_E`| `E` vowel|
94 |`STN_U`|`STN_U`| `U` vowel|
95 |`STN_FR`|`STN_FR`| `-F`|
96 |`STN_PR`|`STN_PR`| `-P`|
97 |`STN_RR`|`STN_RR`| `-R`|
98 |`STN_BR`|`STN_BR`| `-B`|
99 |`STN_LR`|`STN_LR`| `-L`|
100 |`STN_GR`|`STN_GR`| `-G`|
101 |`STN_TR`|`STN_TR`| `-T`|
102 |`STN_SR`|`STN_SR`| `-S`|
103 |`STN_DR`|`STN_DR`| `-D`|
104 |`STN_ZR`|`STN_ZR`| `-Z`|
105 |`STN_FN`|| (GeminiPR only)|
106 |`STN_RES1`||(GeminiPR only)|
107 |`STN_RES2`||(GeminiPR only)|
108 |`STN_PWR`||(GeminiPR only)|