<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2021-07-13T21:05:45Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Hybrid Keyboard Descriptor supports Boot & NKRO</title>
<issued>2021-07-13T21:05:45Z</issued>
<modified>2021-07-13T21:05:45Z</modified>
<id>https://gamma.unpythonic.net/01626210345</id>
<link rel="alternate" type="text/html" href="https://gamma.unpythonic.net/01626210345"/>
<content type="text/html" mode="escaped">
&lt;b&gt;Updated 2021-09-25&lt;/b&gt;: For compatibility with CircuitPython 7.0.0.

&lt;p&gt;
&lt;a href=&quot;https://blog.adafruit.com/2021/05/16/n-key-rollover-nkro-with-usb-keyboards/&quot;&gt;It has been suggested&lt;/a&gt; that it's possible to have both N-key rollover (NKRO)
and be compatible with computer early boot screens (BIOS/UEFI/etc) by ensuring
that the first 8 bytes of the report are compatible with the standard keyboard
protocol.

&lt;p&gt;On the &lt;a href=&quot;https://gamma.unpythonic.net/01625944378&quot;&gt;heels of my earlier experience&lt;/a&gt; with how easy
CircuitPython 7 made it to try a custom descriptor for NKRO, I tried
implementing this too.  And it works!  On a sample of one Dell notebook
computer, the hybrid descriptor can navigate in the boot menu but also enjoys
full NKRO once Linux has booted.

&lt;p&gt;You have to configure the descriptor in &lt;tt &gt;boot.py&lt;/tt&gt;
and then use the HybridKeyboard class in your code.  It is compatible
with the adafruit_hid.keyboard.Keyboard class, except that if you ask it
to press more than 6 keys in a row, it doesn't throw an exception!

&lt;p&gt;The original NKRO descriptor is also in this &lt;tt &gt;boot.py&lt;/tt&gt;, in case you want to
try both and compare how they work for you; &lt;tt &gt;code.py&lt;/tt&gt; is intended to
auto-select the correct interface class.  Remember that you need to fully restart the Feather when modifying &lt;tt &gt;boot.py&lt;/tt&gt;!

&lt;p&gt;The first file below is &lt;tt &gt;boot.py&lt;/tt&gt; and the second is &lt;tt &gt;code.py&lt;/tt&gt;, and the code is designed for an Adafruit Feather RP2040 with custom 4x5 keypad, &lt;a href=&quot;https://learn.adafruit.com/desk-calculator-with-circuitpython&quot;&gt;detailed in a Learning System guide&lt;/a&gt;.

&lt;p&gt;&lt;script src=&quot;https://gist.github.com/jepler/3f507711de499fa4f3cb756680bea927.js&quot;&gt;&lt;/script&gt;


&lt;p&gt;&lt;br&gt;</content>
</entry>
</feed>
