<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STENO_PROTOCOL = txbolt</span></span></code></pre></div><p>Each byte of the packet represents a different group of steno keys. Determining the group of a certain byte of the packet is done by checking the first two bits, the remaining bits are set if the corresponding steno key was pressed for the stroke. The last set of keys (as indicated by leading <code>11</code>) needs to keep track of less keys than there are bits so one of the bits is constantly 0.</p><p>The start of a new packet can be detected by comparing the group “ID” (the two MSBs) of the current byte to that of the previously received byte. If the group “ID” of the current byte is smaller or equal to that of the previous byte, it means that the current byte is the beginning of a new packet.</p><p>The format of TX Bolt packets is shown below.</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>00HWPKTS 01UE*OAR 10GLBPRF 110#ZDST</span></span></code></pre></div><p>Examples of steno strokes and the associated packet:</p><ul><li><code>EUBG</code> = <code>01110000 10101000</code></li><li><code>WAZ</code> = <code>00010000 01000010 11001000</code></li><li><code>PHAPBGS</code> = <code>00101000 01000010 10101100 11000010</code></li></ul><h3id="geminipr"tabindex="-1">GeminiPR <aclass="header-anchor"href="#geminipr"aria-label="Permalink to "GeminiPR {#geminipr}""></a></h3><p>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 differentiating between top and bottom <code>S-</code>, and supporting non-English theories.</p><p>To select GeminiPR, add the following lines to your <code>rules.mk</code>:</p><divclass="language-make vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">make</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STENO_ENABLE = yes</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STENO_PROTOCOL = geminipr</span></span></code></pre></div><p>All packets in the GeminiPR protocol consist of exactly six bytes, used as bit-arrays for different groups of keys. The beginning of a packet is indicated by setting the most significant bit (MSB) to 1 while setting the MSB of the remaining five bytes to 0.</p><p>The format of GeminiPR packets is shown below.</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>1 Fn #1 #2 #3 #4 #5 #6</span></span>
<spanclass="line"><span>0 #7 #8 #9 #A #B #C -Z</span></span></code></pre></div><p>Examples of steno strokes and the associated packet:</p><ul><li><code>EUBG</code> = <code>10000000 00000000 00000000 00001100 00101000 00000000</code></li><li><code>WAZ</code> = <code>10000000 00000010 00100000 00000000 00000000 00000001</code></li><li><code>PHAPBGS</code> = <code>10000000 00000101 00100000 00000000 01101010 00000000</code></li></ul><h3id="switching-protocols-on-the-fly"tabindex="-1">Switching protocols on the fly <aclass="header-anchor"href="#switching-protocols-on-the-fly"aria-label="Permalink to "Switching protocols on the fly {#switching-protocols-on-the-fly}""></a></h3><p>If you wish to switch the serial protocol used to transfer the steno chords without having to recompile your keyboard firmware every time, you can press the <code>QK_STENO_BOLT</code> and <code>QK_STENO_GEMINI</code> keycodes in order to switch protocols on the fly.</p><p>To enable these special keycodes, add the following lines to your <code>rules.mk</code>:</p><divclass="language-make vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">make</span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STENO_ENABLE = yes</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STENO_PROTOCOL = all</span></span></code></pre></div><p>If you want to switch protocols programatically, as part of a custom macro for example, don't use <code>tap_code(QK_STENO_*)</code>, as <code>tap_code</code> only supports <ahref="./../keycodes_basic">basic keycodes</a>. Instead, you should use <code>steno_set_mode(STENO_MODE_*)</code>, whose valid arguments are <code>STENO_MODE_BOLT</code> and <code>STENO_MODE_GEMINI</code>.</p><p>The default protocol is Gemini PR but the last protocol used is stored in non-volatile memory so QMK will remember your choice between reboots of your keyboard — assuming that your keyboard features (emulated) EEPROM.</p><p>Naturally, this option takes the most amount of firmware space as it needs to compile the code for all the available stenography protocols. In most cases, compiling a single stenography protocol is sufficient.</p><p>The default value for <code>STENO_PROTOCOL</code> is <code>all</code>.</p><h2id="configuring-qmk-for-steno"tabindex="-1">Configuring QMK for Steno <aclass="header-anchor"href="#configuring-qmk-for-steno"aria-label="Permalink to "Configuring QMK for Steno {#configuring-qmk-for-steno}""></a></h2><p>After enabling stenography and optionally selecting a protocol, you may also need disable mouse keys, 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.</p><divclass="warning custom-block"><pclass="custom-block-title">WARNING</p><p>If you had <em>explicitly</em> set <code>VIRSTER_ENABLE = no</code>, none of the serial stenography protocols (GeminiPR, TX Bolt) will work properly. You are expected to either set it to <code>yes</code>, remove the line from your <code>rules.mk</code> or send the steno chords yourself in an alternative way using the <ahref="#interfacing-with-the-code">provided interceptable hooks</a>.</p></div><p>In your keymap, create a new layer for Plover, that you can fill in with the <ahref="#keycode-reference">steno keycodes</a>. Remember to create a key to switch to the layer as well as a key for exiting the layer.</p><p>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).</p><p>To test your keymap, you can chord keys on your keyboard and either look at the output of the 'paper tape' (Tools > Paper Tape) or that of the 'layout display' (Tools > Layout Display). If your strokes correctly show up, you are now ready to steno!</p><h2id="learning-stenography"tabindex="-1">Learning Stenography <aclass="header-anchor"href="#learning-stenography"aria-label="Permalink to "Learning Stenography {#learning-stenography}""></a></h2><ul><li><ahref="https://sites.google.com/site/learnplover/"target="_blank"rel="noreferrer">Learn Plover!</a></li><li><ahref="https://joshuagrams.github.io/steno-jig/"target="_blank"rel="noreferrer">Steno Jig</a></li><li>More resources at the Plover <ahref="https://github.com/openstenoproject/plover/wiki/Learning-Stenography"target="_blank"rel="noreferrer">Learning Stenography</a> wiki</li></ul><h2id="interfacing-with-the-code"tabindex="-1">Interfacing with the code <aclass="header-anchor"href="#interfacing-with-the-code"aria-label="Permalink to "Interfacing with the code {#interfacing-with-the-code}""></a></h2><p>The steno code has three interceptable hooks. If you define these functions, they will be called at certain points in processing; if they return true, processi