TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A hand-wired USB and Bluetooth keyboard powered by Python

81 pointsby kfihihcabout 5 years ago

8 comments

BiteCode_devabout 5 years ago
A lot of people are asking:<p>- why python?<p>- isn&#x27;t is slow?<p>Remember that Python is a language spec, there are several implementations.<p>This project uses a particular implementation called CircuitPython ( <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;CircuitPython" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;CircuitPython</a>), a derivative project from MicroPython ( <a href="https:&#x2F;&#x2F;fr.wikipedia.org&#x2F;wiki&#x2F;MicroPython" rel="nofollow">https:&#x2F;&#x2F;fr.wikipedia.org&#x2F;wiki&#x2F;MicroPython</a>), by the people at AdaFruit.<p>This implementation runs with a very different VM that can fit within 256k of code space and 16k of RAM.<p>So, while obviously you cannot expect anywhere near C level of perfs, this is way lighter than CPython.<p>The advantage is that you get the ease of Python to program your board, including the clean terce language, the memory management and the rich data structures. You can even have a live shell on some embeded hardwares! The whole dev process is so simple: code, copy your module, run.<p>Of course, some features of CPython are not available.
评论 #23242331 未加载
davefpabout 5 years ago
Great job! I&#x27;ve not seen python-based keyboard firmware before, I&#x27;m impressed that it&#x27;s fast enough to run something like a keyboard.<p>Without detracting from the code in the post, I recommend that anyone wanting to make and program their own keyboard should take a look at QMK, a widely supported keyboard firmware project that is FOSS: <a href="https:&#x2F;&#x2F;qmk.fm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;qmk.fm&#x2F;</a>
hellweaver666about 5 years ago
If you want to make a little macro-keyboard equivalent at a fraction of the cost, I wrote a little guide (with example code) here: <a href="https:&#x2F;&#x2F;makeandymake.github.io&#x2F;2020&#x2F;05&#x2F;02&#x2F;seeeduino-xiao-circuitpython-usb-hid-macro-keypad.html" rel="nofollow">https:&#x2F;&#x2F;makeandymake.github.io&#x2F;2020&#x2F;05&#x2F;02&#x2F;seeeduino-xiao-cir...</a>
评论 #23236312 未加载
mchan889about 5 years ago
This looks cool, however can someone with some electronics know-how explain to me why the connections on most, if not all the keys are crossed? They don&#x27;t look like insulated wires, though I could be wrong.
评论 #23224500 未加载
评论 #23234726 未加载
评论 #23223869 未加载
Abishek_Muthianabout 5 years ago
This is nice, we need more such open-source, affordable keyboard designs and components; Especially for accessibility keyboards[1] as their costs are exorbitant.<p>[1]<a href="https:&#x2F;&#x2F;needgap.com&#x2F;problems&#x2F;96-one-hand-keyboard-keyboard-accessibility" rel="nofollow">https:&#x2F;&#x2F;needgap.com&#x2F;problems&#x2F;96-one-hand-keyboard-keyboard-a...</a>
stonecharioteerabout 5 years ago
Haha that&#x27;s amazing. What&#x27;s the latency on this though? I always assumed firmware written in python would be slow for a use case like a keyboard.
评论 #23230521 未加载
thecureforzitsabout 5 years ago
Nice, if I made it I would replace the capslock with control and &quot;~&quot; with escape. Make the <i>least used</i> keys require combinations, not the often used ones.
评论 #23234702 未加载
评论 #23234619 未加载
jonny383about 5 years ago
Honestly, why Python? Writing a much faster equivalent in C really isn&#x27;t any more complicated...
评论 #23234259 未加载