How to handle special inputs without layers

In the previous article, I explained how to change the keymap using Vial.

This article explores methods for enhancing typing efficiency without layer switching.

Efficient typing on a keyboard with limited keys requires more than just remapping keys.

Here, we’ll explore the representative customization options.


Handling Modifier Keys

– Macros

– Tap Dance

– Combos


Handling Modifier Keys

Modifier keys are keys like Shift, Ctrl, Alt, and Command.

How can we set it up so that tapping Control inputs Backspace?

Or how can we assign the Control + C shortcut to a single key?

Let’s open the Quantum tab in the Keymap tab.

The function LCtl_T(kc), which is assigned the number 1, inputs Left Control when held down and kc when tapped.

If assigned as follows, holding down this key will input Control and tapping will input Backspace.

To summarize the remaining two points, it would be as follows:

LCtl(kc): Hold Left Control and press kc

e.g. LCtl(KC_C) ⇒ Control + C (copy on Windows)

LSG(kc): Hold Left Shift and GUI (Command) and press kc

e.g. LSG(KC_3) ⇒ Shift + Command + 3 (take a screenshot on Mac)


Macros

Let’s say there is a hypothetical shortcut called M0 (Shift + Control + F12 + 7 + A).

It is impossible to press this shortcut with the keymap we defined last time as shown in below.

Layer 2

Layer 3

Because this keymap has separate layers for alphabets, function keys, numbers, and modifier keys.

Fortunately, it is possible to assign this shortcut to a single key.

In Vial, open the Macros tab and click the “Add Action” button in the bottom right corner.

Once you do that, a line for defining the macro will appear, so you can assign any key to it.

Here, I am defining holding down Shift and Control, tapping F12, 7, and A, and then releasing Shift and Control.

Please be careful not to forget to release (Up) the Shift and Control after pressing (Down) them, or they will remain pressed indefinitely.

Once you have finished assigning keys, click the “Save” button in the bottom right corner and return to the Keymap tab.

Press the keys in the order of 1, 2 or 3, and 4 and assigned M0 to the place where the Enter key was.

Now we can enter Shift + Control + F12 + 7 + A with just one tap of the M0.


Tap Dance

Tap Dance (TD) is a method of assigning multiple keys to a single key without switching layers.

In other words, unlike layers, you can achieve multiple inputs with just one finger and one key.

Let’s actually implement TD.

Open the Tap Dance tab in Vial and assign arbitrary keys to each of the four displayed actions.

Here, I have defined it as follows:

(Single) Tap: Volume Up

– Hold: Volume Down

– Double Tap: Next Track or Fast Forward

– Tap, then Hold: Mute

Let’s go back to the Keymap tab and actually assign this TD to a key.

Press the keys in the order of 1 or 2, and 3 and assigned TD(0) to the place where the Enter key was.

Now, we can change the function of a single key without using layers, such as increasing the volume with a single tap of TD(0) and decreasing the volume with a press down.


Combos

Combos can also change the function of keys without using layers, just like Tap Dance.

Your left ring finger and middle finger are placed on the S and D keys, respectively.

Wouldn’t it be interesting if something happened when you press S and D at the same time?

Exactly, that’s what combos are all about.

Navigate to the Combos tab and define them as follows:

This definition specifies that pressing S and D simultaneously will execute the Control + C function, which is the copy command (For Mac, use LGui(kc) instead of LCtl(kc)).

That’s right. You no longer need to hold down Ctrl and press C to copy.

Defining paste actions as well will make copying and pasting even more efficient.

We’ll define the keyboard shortcut Control + V to be triggered by simultaneously pressing the D and F keys.

With this setup, we can now copy and paste without using our pinky fingers. Much easier.