Home Camera Settings 7 cool tricks I love in QMK firmware

7 cool tricks I love in QMK firmware

9
0


If you’ve dipped your toes into the world of custom mechanical keyboards, you’ve likely heard whispers of QMK. For the uninitiated, QMK stands for Quantum Mechanical Keyboard Firmware. It is an open-source code bundle that resides in your programmable keyboard’s microcontroller, acting as an intermediary between the keystrokes you make and the input of your computer registers. However, it is completely open-source and largely community-driven, meaning it’s the ingredient that transforms a simple input device into a highly personalized tool, perfectly tailored to your comfort and preferences.

While off-the-shelf keyboards offer a one-size-fits-all approach with macro recording support at best, QMK allows you to redefine every aspect of how your keyboard functions. From simple key reassignments to complex combinations and multi-layered layouts, QMK puts you in the driver’s seat. QMK documentation is equal parts comprehensive and intimidating if you’re just getting started. I’ve used it on many builds and can confidently recommend these seven cool tricks that are easy to implement, allowing you to wring out the best typing experience from your keyboard.

Related

5 best open-source firmwares for your custom mechanical keyboard

Clean code for personalizable projects

All keyboard microcontrollers cannot be reflashed. Please verify with the manufacturer that your board is QMK-compatible before proceeding with reflashing or modifying the firmware on your board. Flashing the incorrect or incompatible firmware may permanently brick your keyboard. Alternatively, a full list of QMK-compatible keyboards is available here.

7

Caps Word

Caps Lock, but way smarter

Angled view of the keys on the left side of the NuPhy Halo75 V2

We’ve all been there: needing to type a single word in ALL CAPS, like an acronym or a constant in code. The traditional Caps Lock key is a clumsy tool for this — easy to forget, turning subsequent text into unintended shouts. QMK’s Caps Word feature is an elegant solution that temporarily shifts letters to uppercase and even converts hyphens to underscores, which coders might find handy. As the name suggests, it stays on only for one word and is automatically deactivated thereafter.

Since the firmware is the first to recognize your keystrokes, it watches for space or a non-alphanumeric character input as the cue to turn off Caps Word automatically before passing your subsequent inputs in lowercase. It even features a five-second idle timeout by default for when you’re interrupted mid-word. This feature works even if you’ve remapped your physical Caps Lock key in your operating system.

You can trigger Caps Word with a dedicated key bound to the keycode QK_CAPS_WORD_TOGGLE, by pressing both Shift keys simultaneously, or even by double-tapping the Left Shift key. This flexibility means you don’t necessarily need to dedicate a key to it on compact keyboard layouts. It’s a smarter, more context-aware way to handle capitalization for single words, avoiding the pitfalls of the traditional, clunky Caps Lock toggle.

6

Auto Shift

Save the pinky finger a workout

A white HHKB Professional 2 with colorful accent keycaps

Repetitive strain injury (RSI) is a genuine concern for if you type a lot or use uncomfortable mice. A lot of the risk stems from unnatural finger movements, like when you stretch your pinky finger to hit either Shift key. Auto Shift presents a radical alternative. When activated, you just need to tap a key swiftly for the character assigned to the base layer, but hold it just a fraction longer to get the shifted character. So, lowercase “a” becomes “A” if you hold the key down slightly longer. And don’t worry, this doesn’t impact how holding down a key allows you to spam that letter. Moreover, activation is complete once you add the following line to your rules.mk firmware file.

Auto Shift works by monitoring how long you hold down a key. If the duration exceeds a configurable timeout, AUTO_SHIFT_TIMEOUT, around 175ms by default, the firmware sends the shifted keycode. If you release the key before the timeout, or press another key, you get the base layer’s character. It requires tuning the timeout to match your typing speed to avoid accidental Auto Shift activation, but offers a serious ergonomic win.

Compared to a standard keyboard where Shift is a mandatory modifier, Auto Shift fundamentally changed my typing. It isn’t for everyone, because changing the timeout each time requires reflashing your board, and mastering it takes practice. However, for users prioritizing ergonomics on minimalist layouts, Auto Shift offers a fascinating departure from the norm, potentially reducing stressful pinky movements.

It’s worth noting that Auto Shift doesn’t work with key combinations by default, like holding down Ctrl+A for long, won’t magically make it Ctrl+Shift+A. However, you can force-enable this behavior by adding the following line to your config.h file.

#define AUTO_SHIFT_MODIFIERS

5

Sequencer

Make beats on your board

An image showing a macro pad sitting next to an Elgato Stream Deck Neo.

This feature leans more towards the experimental and fun side of QMK. The Sequencer feature essentially turns your keyboard into a programmable MIDI device, primarily envisioned for creating drum machine-like patterns. Imagine tapping keys to program a beat or a melodic sequence directly from your keyboard.

The Sequencer allows you to define a series of steps (16 by default) across as many as eight independent tracks. You can activate or deactivate specific steps within each track using dedicated keycodes SQ_S(n), which toggles step n. You control the playback tempo with SQ_TMPU and SQ_TMPD, and the resolution, which determines the timing granularity of the steps, like quarter notes, eighth notes, etc.

While a standard keyboard’s function is strictly limited to sending key presses to the computer, the Sequencer transforms the keyboard into a basic musical input device. It’s a niche feature, unlikely to replace dedicated music hardware or software, but it is a fine demonstration of QMK’s versatility. It highlights how firmware can imbue a keyboard with capabilities far beyond simple typing, offering users a creative outlet. Even if you aren’t serious about music production, enabling this gives your keyboard a fun feature you can play around with.

4

Tap Dance

Like Morse code, but better

Ever wish a single key could do more? Tap Dance makes it happen. Once it is enabled in QMK, you can tap a key once for one action, tap the same key twice quickly for another action, and tap it thrice for something else entirely — the possibilities are numerous. It’s particularly useful in macropods or single-button peripherals like standalone rotary encoders where you only have one clickable button in the knob itself.

Think about the semicolon key — tap once for semicolon, tap twice for colon. QMK’s Tap Dance allows you to program this type of behavior, creating a slight overlap with Auto Shift, as mentioned earlier. You can define actions based on the number of taps within a specific time window using the TAPPING_TERM definition. Actions can range from sending different keycodes via ACTION_TAP_DANCE_DOUBLE, changing or toggling layers using ACTION_TAP_DANCE_LAYER_TOGGLE, or even running custom functions defined in your keymap.

Standard keyboards lack this context-sensitive capability, and a key only does one thing and its shifted function, offering two layers at most. Tap Dance exponentially enhances the density of functions per key, especially on smaller keyboards. A single key could act as Escape on tap, Caps Lock on double-tap, and trigger a layer change on triple-tap. It requires some fiddling around after you have a deeper understanding of how your keymap could improve, but it unlocks powerful and personalized behavior.

Related

9 Cool uses for the knob on your keyboard or macropad

Twirl away for productivity gains

3

Mod Tap

Custom tap and hold actions

A white-themed keyboard placed on its box

Space is often at a premium on custom keyboards since larger boards use more premium materials, leaving a bigger hole in your pocket than compact layouts. Mod Tap is a clever feature that helps save a buck and stick with compact keyboards. It allows a single key to serve two distinct purposes: hold the key down, and it acts as a modifier, like Shift, Ctrl, or Alt, and tap the key quickly to send a standard keycode, such as Space, Enter, or Escape.

On my smaller boards, I routinely set up Mod Tap on the spacebar so that tapping it sends space input, but holding it down momentarily activates a layer where I can use IJKL or WASD as arrow keys. This is particularly useful for modifiers typically pressed by thumbs, pinkies, or less agile fingers, especially by your non-dominant hand. Instead of dedicating separate keys to, say, Control and Escape, a single Mod Tap key can handle both duties, freeing up space for other functions. The behavior hinges on the TAPPING_TERM setting mentioned earlier — the maximum time that distinguishes a tap from a long-press.

Standard keyboards rigidly assign one function per key, plus its shifted state. Mod Tap introduces dynamic, context-sensitive behavior based on how you interact with the key. It’s a cornerstone of many efficient small keyboard layouts, allowing extensive functionality without physically increasing the key count on the board. You can even combine it with other features like Auto Shift or Caps Word activated on the long-press of something like the Shift key.

2

One Shot Keys

Sticky keys, but for mods and layers

Top view of a gold and white mechanical keyboard on a green surface

Modifier keys like Shift and Ctrl usually only work while you’re holding them down. This necessitates complicated finger gymnastics for some key combinations like Win+Shift+S to take a screenshot. It helps to have the same modifier keys on either side of the alphabet cluster, but one side is always under your non-dominant hand, slowing down an uncomfortable experience. If you want a modifier to stay active for just the next keypress, One Shot Keys has your back. Defined by keycodes OSM for mods and OSL for layers, this is the Sticky Keys accessibility option on steroids, and it’s OS-agnostic too, since QMK is keyboard-level firmware.

Press a One Shot Shift key, release it, and then press “a” to get uppercase “A”. The Shift modifier is then deactivated for all subsequent keypresses. This is fantastic for quick, infrequent modifier use without needing to hold the modifier key down, reducing finger exertion. I love to stack mods as well — using the same example as before, I can tap Win and release, then tap Shift and release, and lastly press S to trigger the combo for Win+Shift+S without holding all three keys down together. The same concept applies to One Shot Layers, which activate a specific layer for only the next key press — perfect for accessing a symbol or function on a layer without needing to hold or toggle the layer key.

This differs significantly from standard keyboard modifiers that are hold-only, or layer lockers like Caps Lock and Num Lock that must be toggled. One Shot keys offer a temporary, sticky state that automatically clears after use. They can be configured to time out if no key is pressed soon after activation, preventing them from staying active indefinitely by mistake. For me, this is another ergonomic and efficiency win, especially useful for complex shortcuts or temporary layer access.

1

Layer Lock

Best of both worlds

Flatlay of the Wooting 80HE keyboard against a dark teal background
 

Besides offering One Shot Layer keys, QMK doesn’t force you to choose between a momentary layer activator you need to hold down, and a layer toggle key like Caps Lock. Layers are fundamental to QMK, and it also has an option to stay on one for more than a couple of keystrokes. Holding the layer key can become uncomfortable here, and Caps Word only works with letters, so we got Layer Lock to solve this.

Imagine holding your MO(NAV) key to access your navigation layer. While still holding it, if you press your designated QK_LAYER_LOCK key, you can release the MO(NAV) key, and the NAV layer will remain active. If you have a key or two to spare on your layout, this feature ensures you aren’t choosing between momentary activators and toggle keys. Press QK_LAYER_LOCK again or activate another layer-switching key like TO(other_layer)to unlock and return to your base layer.

Standard keyboards don’t have user-defined layers implemented this way. Layer Lock provides a toggle-like persistence for layers typically accessed momentarily. It works with layers activated via MO, LT (Layer Tap), OSL (One Shot Layer), TT (Layer Tap Toggle), and LM (Layer Mod) keys, about which you can find more info in the QMK documentation. You can even configure an idle timeout to automatically unlock the layer after a period of inactivity. It makes extended work on secondary layers far more comfortable.

QMK is more than just typing tricks for power users

Exploring QMK features, such as the ones we mentioned, elevates a keyboard from a mere input device to a deeply personalized and efficient tool. These tricks allow users to overcome the limitations of standard keyboard layouts, tailor functionality to specific tasks, improve ergonomics, and even add a touch of creative fun. However, this is just the tip of the iceberg of what QMK has to offer. Whether streamlining code entry, reducing finger strain, or simply making interactions more fluid, the power and flexibility it offers remain unparalleled, and obviously are a far cry from the basic non-programmable keyboard.

Related

5 mechanical keyboard features I can survive without

I love a feature-packed mechanical keyboard, but not all features are worth it



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here