Caps lock on iPhone

I’ve set up a keyboard using Keyman Developer 15 on a Windows 11 laptop. The keyboard is designed to be used on mobile phones and I am currently using it on an iPhone 13 running iOS 15.

I set all the keys in the ‘shift’ layer so that they lead to the ‘default’ layer after they are typed.
I added a ‘caps’ layer in which the keys lead instead to the ‘caps’ layer after being used.
Double tapping on the shift key while in ‘default’ correctly leads to the ‘caps’ layer, showing upper-case letters. Typing any of these letters leaves the ‘caps’ layer active, HOWEVER the typed text is all in lower-case. How do I fix this?

Moreover I’d like to set the keyboard to have the ‘shift’ layer active by default when starting to type a new text (and ideally after '. ', '? ', and '! '). I found some guide online about this topic but I fail to understand how that would be applied to a keyboard intended for mobile devices, since those appear to have a different code language than a keyboard intended for desktop users.

Thank you in advance

Here’s the topic on using &CasedKeys &CasedKeys store

And here are a couple of projects you can look at the code to see how it’s been handled. I recently did the old_hungarian one and I had to look at the sil_euro_latin one to figure it out.

1 Like

Thank you for the tips, after some unsuccessful attempt I managed to run both the caps lock and the start of sentence detection. The latter works just fine when I start typing a text and after '. ’ etc, however it fails to switch to the ‘shift’ layer when I type ‘.’ + ‘ENTER’: any idea on how I could fix this?

1 Like

For . followed by new line, you could use the example from sil_euro_latin, which has basically the following code:

  store(whitespace) ' ' U+00A0 U+000D U+000A U+0009 U+2002 U+2003 U+2004 U+2005 U+2006 U+2007 U+2008 U+2009 U+200A U+202F U+205F
  any(sentencePunctuation) any(whitespace) > layer('shift')
  any(sentencePunctuation) any(whitespace) any(whitespace) > layer('shift')

This matches new line, with U+000D and U+000A, or any number of other whitespace characters.

1 Like

Thank you! That worked great. Greetings