How to return from Shift automatically? and how to Caps lock by double tapping?

Dear colleagues,

We are now testing the new duun touch-screen keyboard in a small group. One person asked whether it is possible to mimic caps lock by double tapping but otherwise to have the Shift-layer opened just once like with other keyboards he is used to?

  1. So tap Shift opens the shift layer,
  2. tap M produces M and goes back to the default layer
  3. tap shift 2x opens the shift layer and stays there
  4. tap shift once more again returns to the default layer

Can this be achieved?

I set the next-layer of my alphabetic characters to go back to the main layer, and made sure that numeric and math characters stayed on the same layer. This produces some of the desired effect of disabling the Shift after typing, but not the caps-lock.

Touch Keyman does not (AFAIK) currently have a built-in way of emulating Caps Lock yet, but as you suggest, a determined developer could create a CAPS layer without next-layer options.


  • Tap Shift once, and we go to the SHIFT Layer.


  • If you type a letter, it goes back to the normal layer after output (next-layer).
  • If you tap shift again, if goes to a custom CAPS layer (next-layer always undefined for letters).


  • Typing any letter would give the capital, and stay on this layer.
  • Tapping shift from this CAPS layer would take you back to the normal layer.

One caveat is that on some keyboards (like AZERTY), SHIFT and CAPS may be different for non-alphabetic characters.

This could be done, but @Marc may suggest that we wait for Caps to be truly added as a feature.

One thing that doesn’t work well with this solution is timing. If you are in the shift layer, and want to move to the base layer, you always have to cycle through the caps layer. For a proper solution, we’d want the double-tap of the shift to be two taps within a short timeframe to avoid this.

Yes. These kinds of things belong in the engine. Yes, I know we are under-resourced and so it all takes much longer than everyone would like.

This is documented as an issue here.

Please see our specification for Caps Lock support on touch layouts at

Hi! How can I achieve this? I try with:

  • [SHIFT K_SHIFT] > set(&layer = “caps”) :thinking: but it’s wrong

You can set the ‘next layer’ on the shift key in the touch layout editor.

1 Like

You can set the layer from the “code” as in this example, and I believe it affects touch and web keyboards:

+ 'b' > 'β' layer('shift')

As Marc said, you can also set the layer from the touch keyboard configuration as in this example, and I believe it will only affect the touch layout:

"key": [
                "id": "K_SYMBOLS",
                "text": "*Symbol*",
                "sp": "1",
                "nextlayer": "symbol"

I’ve used both in different contexts. Most of the time, either (never both) should work, but I’ve had the best luck with option 2.

1 Like

I see this conversation is currently active.

You might be interested to know we have a range of pull requests which implement solid caps lock layer and start-of-sentence support pending for 15.0:

Documentation is on its way too:

1 Like