Keyboard Firmware Links
Links related to keyboard firmware.
QMK  folded
QMK Basics – Thomas Baart and info
- QMK Basics: Tap and hold actions: Tap into your modifiers – Thomas Baart
- Help me start a collection of QMK Macro and features for sharing : olkb
- What clever keystroke shortcuts have you set up with QMK? : olkb
- Porting QMK To A Cheap Mechanical Keyboard | Hackaday
- Automatic conversion of OLED images : ErgoMechKeyboards
Configuration  folded
Layer toggle types  folded
- Momentary (MO):
- This is like a Shift key. Hold down a momentary toggle, and you're taken to another layer. Let go, and you drop back to layer 0.
- As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer.
- When you apply this to a key, that same key must be set as KC_TRNS on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent).
- You can only switch to layers above your current layer. If you're on layer 0 and you use MO(1), that will switch to layer 1 just fine. But if you include MO(3) on layer 5, that won't do anything for you – because layer 3 is lower than layer 5 on the stack.
- Toggle (TG):
- This is similar to a Caps Lock. Tap once, and you're moved to that layer. You'll stay on that layer until you tap the layer toggle key again. Depending on the type, you'll momentarily/permanently have access to the key bindings of that specific layer.
- One-shot (OSL):
- Tap this key, and you're moved to the layer. Tap a single key on the layer, and you will then be sent back to layer 0. Like Shift, but without having to hold down two keys at once.
- This type of layer switch allows you to either tap it and get the next layer for one key press or hold it and continue to get that next layer until you release it. It's wonderful for the types of keys we'll be looking at on Layer 1.
- OSM(mod) - this is a "one shot" modifier. - sticky shift
- So let's say you have your left Shift key defined as OSM(MOD_LSFT). Tap it, let go, and Shift is "on" – but only for the next character you'll type. So to write "The", you don't need to hold down Shift – you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :)
- Tap-Toggle (TT):
- A combination of Momentary and Toggle. Hold this key, and the layer is active only as long as you hold it. Tap it briefly, and you're moved to the destination layer until you tap it again.
- Direct switch (TO):
- All other layer switches go up (allow you to switch from layer 0 to layer 1, for example). TO is the only one which also allows you to switch down (from layer 3 to layer 2, for example).
- Meh / Hyper keys
- System-level shortcuts to switch to apps
Retro tapping  folded
MT(Mod, X)will send X if the key is held longer than tapping term. Retro Tap thus gives another way to trigger the tapping function of mod-taps. With this option, you can get away with a very short tapping term.- Tapping term is short, so it is easier to do Hold
- What if we set tapping term to zero? (so any keypress is "Hold")
- When used in combination with other keys, mod will always be Hold
- What if we set tapping term to infinity? (so any keypress is "Tap")
- We can get "nested hold, rolling tap" behavior with
- MT = Nested=Hold, Rolling=Tap -> PERMISSIVE_HOLD + IGNORE_MOD_TAP_INTERRUPT
- LT = Nested=Hold, Rolling=Tap -> PERMISSIVE_HOLD
- This is also a behavior that looks natural to me, so it might be possible to go without tapping term
- When should keys be processed in this case? Should we wait until all are released?
- What if we are on a layer or holding Shift?
Tap-Hold Configuration  folded
TAPPING_TERM 200Tapping Term - determines what is a tap and what is a holdTAPPING_TERM_PER_KEY+ get_tapping_term() function to define term per key
#define PERMISSIVE_HOLDPermissive Hold - do not take tapping term into account for mod taps (hold mod, press and release another key will always work, even if done faster than tapping term)- Makes tap and hold keys (like Mod Tap) work better for fast typists, or for high
TAPPING_TERMsettings - Note: always enabled for
TAPPING_TERM>= 500 - For Instance:
SFT_T(KC_A) DownKC_X DownKC_X UpSFT_T(KC_A) Up- Normally, if you do all this within the
TAPPING_TERM, by default 200ms, this will be registered as ax by the firmware and host system. - With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would be registered as X (SHIFT+x).
- Permissive Hold, and two keymaps by agbell · Pull Request #1359 · qmk/qmk_firmware
- Note: it looks like permissive hold only works for MT (mod tap), but not for LT
- Maybe not, this is mentioned in PR comments, but it may have changed since then
- PERMISSIVE_HOLD_PER_KEY + get_permissive_hold() to define permissive hold per key
- Makes tap and hold keys (like Mod Tap) work better for fast typists, or for high
#define IGNORE_MOD_TAP_INTERRUPTIgnore Mod Tap Interrupt - allow to release modifier before the other key (rolling through mod and key), need to hold both down during the tapping term (or is this the opposite, where enabling ignore mod tap interrupt makes rolling input produce regular keys and enables mod ONLY AFTER waiting for the tapping term)- Setting Ignore Mod Tap Interrupt requires holding both keys for the
TAPPING_TERMto trigger the hold function (the mod) For Instance:
SFT_T(KC_A) DownKC_X DownSFT_T(KC_A) UpKC_X Up
Normally, this would send X (SHIFT+x). With Ignore Mod Tap Interrupt enabled, holding both keys are required for the
TAPPING_TERMto register the hold action.- Bad example, as "normally" here does not say if that is done before or after the tapping term
- A quick tap will output ax in this case, while a hold on both will still output X (SHIFT+x).
- Note: This only concerns modifiers and not layer switching keys.
- Not sure why, logically layers should work exactly the same as regular modifiers
IGNORE_MOD_TAP_INTERRUPT_PER_KEY+ get_ignore_mod_tap_interrupt to set per key
- Setting Ignore Mod Tap Interrupt requires holding both keys for the
Ignore Mod Tap Interrupt + Permissive Hold Modifier added when rolling (modifier released first) instead of waiting for other key release (like in permissive hold) or when both keys are held for tapping term
- If you have Permissive Hold enabled, as well, this will modify how both work.
- The regular key has the modifier added if the first key is released first or if both keys are held longer than the
TAPPING_TERM.
Not sure, but probably this means that:
- SFT_T(KC_A) Down - KC_X Down - SFT_T(KC_A) Up - KC_X Up
- will always produce Shift-x?
- Isn't it more logical to always have SFT Down - X down - X Up - Shift Up to trigger Shift-x?
- Again, the description is confusing: "The regular key has the modifier added if the first key is released first" - what is the 'first' key here, is this always a mod key?
#define TAPPING_FORCE_HOLDTapping Force Hold - disable key repeat on tap followed by tap+hold (act as hold instead of key repeat)- Usually, this is a way to activate the repeat function on mod taps
But it does not work well, for example, when I have backspace on a layer that is activated with space
- When I type "xyz" and want to delete it, I do
- x - y - z - left space - hold left space - right space (as backspace)
- so here I have the "left space - hold left space" which would trigger space repeat normally, while I do not want this
- TAPPING_FORCE_HOLD_PER_KEY + get_tapping_force_hold for per key setting
- Retro Tapping - releasing the Mod key without pressing another will send the original keycode even if it is outside the tapping term (regular behavior:
#define RETRO_TAPPING: no output)- For instance, holding for tapping term and releasing LT(2, KC_SPACE) will output space (by default - nothing)
- RETRO_TAPPING_PER_KEY + get_retro_tapping for per key setting
- okke's Cheatsheet on MT and LT
- QMK Tap-Hold Configuration
- https://docs.google.com/spreadsheets/d/1IaaOMbl6zLBb5Jswyr90Lp9hGx3xIyugVSfD_oBk4po/edit#gid=0
- [Feature Request] Permissive Hold and Ignore Mod Tap Interrupt for LT · Issue #8971 · qmk/qmk_firmware
- Questions
- permissive hold is always enabled when tapping term > 500 - how is the tapping term used then? tapping term determines what is a tap and what is a hold, but now hold ignores the tapping term
- is retro tapping useful for anything else? the obvious case is a habit to often keep keys pressed for too long like when thinking about something
- am I understanding ignore mod tap interrupt right?
- permissive hold: nested key press ("mod down - key down - key up - mod up") = always mod+key (hold action)
- ignore mod tap interrupt: rolling key press ("mod down - key down - mod up - key up") holding keys longer than tapping term = mod+key
- ignore mod tap interrupt + permissive hold: rolling key press ("mod down - key down - mod up - key up") = always mod+key
- maybe: both nested and rolling key press are counted as mod (so this is just a "stronger" option than permissive hold)
- there is also a discussion here [Feature Request] Permissive Hold and Ignore Mod Tap Interrupt for LT · Issue #8971 · qmk/qmk_firmware
- especially, this comment - https://github.com/qmk/qmk_firmware/issues/8971#issuecomment-623435438
- and a follow up PR
- Add HOLD_ON_OTHER_KEY_PRESS option for dual-role keys by sigprof · Pull Request #9404 · qmk/qmk_firmware
- Looking at the change itself - code change is very small, it is more a terminology question and the how-it-works explanation (also, current documentation may not be correct as he says that default MT behavior is not to wait for tapping term and to use mod both for nested key press and rolling key press)
- In general: it looks like these two settings are overcomplicated, and could be a multi-choice option instead of the combination of settings
- Default: wait for tapping term (shorter - regular key, longer - mod)
- Other key is pressed / released while mod is held (regardless of time) - apply mod
- Other key is pressed while mod is held (can be released after, regardless of time) - apply mod
- if QMK has unit tests, it would be great to emulate and check how it works via test (set some settings, run key sequences, check the result) - to be sure how it works
- but sigprof just tested manually, using 499 tapping term
- AND they are adding alternative options for LT mods (current options are for MT, but affect LT too)
[home key mods + fast typing] 111WPM  folded
home key mods + fast typing: 111WPM on a Dactyl Manuform with homerow mods and Colemak-DHM : ErgoMechKeyboards
- I've enabled pretty much every tap hold configuration setting and tweaked the tapping term on a per key basis based on frequency of the modifier and the tendency of some of my fingers to rest longer on the key. This is, for example, why I added 200ms to the tapping term of the HOME_I key as my ring finger tended to rest oddly long on the key when typing n-grams such as "ion".
- Recently, in an effort to lower the tapping term for my shift modtaps even more, I've been toying with canceling the effect of shift on the adjacent keys. So if I hit "N" with right shift on, I probably intended to write "en" instead. So in those cases, instead of sending "N", the firmware sends "en". As a consequence, capital "N" can only be typed with the opposite shift.
Related:
- Tap-Hold Configuration - QMK
- there is an option to set tapping term per key
- settings for home mods in miryoku layout
Retro Shift - allows using AutoShift with dual-mod keys (hold longer and let go - shifted symbol, use with another key - mod)
Retro Shift (Auto Shift for Tap Hold via Retro Tapping) : ErgoMechKeyboards
Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts by IsaacElenbaas · Pull Request #11059 · qmk/qmk_firmware
- Not merged yet, PR by miryoku author
The Leader key: A new kind of modifier
Macro shortcuts: Send a whole string when pressing just one key
source code  folded
- (tmk core + keyboards) tmk/tmk_keyboard: Keyboard firmwares for Atmel AVR and Cortex-M
- tmk/tmk_core: TMK keyboard library
- (first commit) add initial files from teensy's usb_keyboard_debug. · tmk/tmk_core@ac3134f
- lufa - The Lightweight USB Framework for AVRs
- initial attempt for LUFA. · tmk/tmk_core@dd93d29
- Add LUFA mouse feature and fix mouse report. · tmk/tmk_core@a9a3610
- Add consumer/system control feature to LUFA. · tmk/tmk_core@3d81d52
- Add protocol/lufa. LUFA supported now. · tmk/tmk_core@cc68ade
- Merge branch 'lufa' · tmk/tmk_core@fca518f
- Commits · tmk/tmk_core
- Add NKRO support for LUFA · tmk/tmk_core@daa4a42
- Search · lufa
- (first ps2 commit) Add PS/2 mouse support to connect TrackPoint Unit. · tmk/tmk_core@2a562a4
- (first usb hid commit) Add USB HID(host) protocol.(not finished) · tmk/tmk_core@895cd4d
- chibios
- mmalecki/qmk_rc: Remote control for your QMK-powered keyboard
- https://github.com/mmalecki/qmk_rc
- On the keyboard side: include the c/h files, hook it to the `raw_hid_receive`
- On the computer side: run cmd tool to send commands to the keyboard - enable or disable RGB, write something to OLED screen, toggle layer, etc
- Interesting as an interaction example between the host and keyboard
- qmk/qmk_web_stack
- QMK - python code
- I thought it was for tool scripts, but it looks like actually part of the keyboard code can be in python
- qmk_firmware/users/dennytom/chording_engine at master · qmk/qmk_firmware
- This chording engine has some python logic
- see also Search · def
- LED heatmap lighting : ergodox
- webusb / connect mitosis to ORYX
- Probably the simple way would be to flash zsa's QMK and add my keymap to it
- Add support for WebUSB by drashna · Pull Request #7778 · qmk/qmk_firmware
- Keyboards/zsa updates by drashna · Pull Request #9214 · qmk/qmk_firmware
- qmk_firmware/moonlander.h at c87b2efef8c7ff02c997c64c6bf112af4f30622e · qmk/qmk_firmware
- Joystick support
ZMK (bluetooth firmware)  folded
- zephyrproject-rtos/zephyr Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
- ZMK · joric/nrfmicro Wiki
- Troubleshooting | ZMK Firmware
- Add autoshift for slash · serebrov/zmk-config@f1bd3d9
- zmk/keys.h at main · zmkfirmware/zmk
- autoshift via Hold-Tap works Hold-Tap Behavior | ZMK Firmware
- Flashing: double "tap" the reset button.
Connect halves: Tap reset once on each half (blue diode starts flashing on the nice!nano)
Tap once more to exit the pair mode.
- Basic Setup | ZMK Firmware 3rd Party Toolchains — Zephyr Project Documentation
- auto-shift can be done as hold-tap where the hold version is the upper-case version of the same key
- &ht A LS(A)
- (it is not possible to combine it with mod though - but this is not possible in QMK either)
- Hello from ZMK Firmware | ZMK Firmware
KMK (python-based firmware)  folded
- KMKfw/kmk_firmware: Clackety Keyboards Powered by Python
- 40% Keyboards: KMK-Explorer
- 40% Keyboards: PiPi Gherkin
- 40% Keyboards: PCA10059 running KMK firmware
- kmk_firmware/kmk at main · KMKfw/kmk_firmware
- makerdiary/python-keyboard: A hand-wired USB & Bluetooth keyboard powered by Python and more
Keyboard firmware  folded
Lists of Keyboard Firmware
- awesome-mechanical-keyboard/firmware.md at master · Keycapsss/awesome-mechanical-keyboard
- Firmware
- BlueMicro_BLE - A Bluetooth Firmware for the NRF52832.
- Bluetosis - Bluetooth firmware for the Mitosis keyboard.
- EasyAVR - is a keyboard firmware and keymapper GUI for custom keyboards based on USB AVRs.
- Kaleidoscope - Flexible firmware for Arduino-powered keyboards.
- Keyplus - An easy to use keyboard firmware with support for wireless and wired split keyboards.
- KMK - is a feature-rich and beginner-friendly firmware for computer keyboards written and configured in CircuitPython.
- Mechy - Arduino compatible, plugin based.
- MK32 - Simple BLE keyboard for ESP32
- nrf52-keyboard - A ble keyboard firmware using nrf52810/52832
- Python-Keyboard - A highly extensible firmware written in Python, based on CircuitPython, with RGB, USB and Bluetooth.
- QMK - A keyboard firmware based on the tmk_keyboard firmware for Atmel AVR and ARM controllers.
- TMK - Keyboard firmwares for Atmel AVR and Cortex-M.
- ZMK - MIT-licensed firmware built on top of the Zephyr RTOS that is "wireless first".
- kbd-prettier - Automatically format your keyboard layout
- Keyboard Firmware Builder - Online QMK Firmware Builder (2+ years behind QMK firmware master)
- Q2K - A python based utility for parsing QMK Firmware keymaps to various outputs
- QMK Configurator - An open source configurator for QMK Firmware
- qmk_emote_macro_generator - Easily generate QMK macro/leader sequences for arbitrary unicode sequences.
- TMK Firmware Builder - Online TMK Firmware Builder
- help-14/mechanical-keyboard: DIY mechanical keyboard and where to find them
- EasyAVR - EasyAVR is a keyboard firmware and keymapper GUI for custom keyboards based on USB AVRs. It is powerful but also really easy to use.
- The VIA - QMK based firmware for the view app.
- Anne Key - Firmware for Anne Pro Keyboard written in Rust.
- Lotlab/nrf52-keyboard - TMK based keyboard firmware for nRF52 series, now support both nRF52810 and nRF52832.
- Lotlab/nrf51822-keyboard - This is a firmware based on nrf51822 Bluetooth keyboard, which uses nRF SDK 10.0 as the underlying hardware driver, and uses TMK keyboard library as the upper part of the keyboard function.
- Polymer firmware - Polymer keyboard firmware.
- Pipit keyboard - Firmware and config tools for chording keyboards.
- python-keyboard - A highly extensible firmware written in Python, based on CircuitPython, with RGB, USB and Bluetooth. similar to TMK/QMK.
- Firmware - Keebfol.io (firmware list)
- firmware - MechanicalKeyboards (firmware list)
Rust Firmware
- How to make your C codebase rusty: rewriting keyboard firmware keymap in Rust · houqp
- Univa/rumcake: A rust-based mechanical keyboard firmware https://github.com/Univa/rumcake
- KeySeeBee, TeXitoi/keyberon: A rust crate to create a pure rust keyboard firmware.
- Keyberon - A pure rust keyboard firmware.
- Key To Key - Rust libary for building keyboard firmwares.
- rusty-c - QMK in rust.
Real-Time OS Basics: Picking The Right RTOS When You Need One | Hackaday
Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? | Digi-Key Electronics - YouTube
pop-os/keyboard-configurator: Keyboard configuration UI
grota/tmk_keyboard: keyboard controller firmware for Atmel AVR USB family
Kaleidoscope — Kaleidoscope documentation
keyboardio/Kaleidoscope: Firmware for the Keyboardio Model 01 and other keyboards with AVR or ARM MCUs.
keyboardio/Chrysalis: Graphical configurator for Kaleidoscope-powered keyboards
VIA : https://caniusevia.com/
- Is VIA dead? · Issue #491 · the-via/keyboards
- GitHub - ci-bus/Miguelio-VIA-Keyboards: VIA Software Open Source to keyboards with QMK
- looks like this is a dynamic configurator (no flashing needed)
- it is closed-source (some code is open, but not the configurator nor firmware, so it is not possible to build VIA firmware on your own)
- QMK is amazing and the VIA tool is just something else. : olkb
- drashna (about non-opensource Via)
- They did have the source for a while.
- But no license attached to it. But then some Chinese company cloned it, and they changed the repo to private.
- drashna (how it works)
- It's a few things, actually.The real magic is the "dynamic keymaps" which store the keymap in eeprom, rather than program memory. This allows for it to be changed and retained without flashing the board.
- The second part is Raw HID, which allows for bidirectional communication (to read and write data to the board). This is what allows you to get and change said keymap.
- And there is the via feature, which leverages both of the above, and creates a communication protocol that allows for all of this to work, and interface with other features in QMK (rgb stuff).
- ..
- I'd also love to see VIA use the QMK API (what the configurator uses for the backend) to grab all the board info. That would mean that once the board is added to QMK, it would be immediately recognized by VIA. No doubling up PRs.
- However, I suspect that it would take some changes to the API. but … that would be something to be discussed between the via devs and the devs for the QMK configurator.
- drashna (about non-opensource Via)
- microdox is not listed on the site, but it looks like there is support already
- qmk_firmware/rules.mk at 0.22.0 · qmk/qmk_firmware
- although the PR to via repository is open
- Add VIA support for boardsource/microdox by wafflekeebs · Pull Request #406 · the-via/keyboards
- so may need to build via manually to make it work, not sure though if the configurator itself is opensource, I only see the binary releases repository
- Is the source in the reader repo?
- there is a PR for mitosis
- also for Ergodox EZ
- vial-kb/vial-gui: Vial is an open-source cross-platform (Windows, Linux and Mac) GUI and a QMK fork for configuring your keyboard in real time, similar to VIA.
safijari/keyboard_firmware_gen
- looks like basic firmware is actually pretty simple (based on arduino keyboard.h)
- My dumb little firmware generator is functionally complete now : ErgoMechKeyboards
- Question about how serial or i2c comms are handled : ErgoMechKeyboards