Shift and CapsLock

28 views
Skip to first unread message

Raivis Muktāns-Dāvidsons

unread,
Feb 15, 2024, 11:17:15 PMFeb 15
to Ukelele Users

Hi. As i use dead key for my Capital letters, and turned out it works great, I decided to put numbers and symbols under the shift key. 

That's because for Capitals usually need only one capital at time. That's why I got the dead key for them. And if I need more than one, I got CapsLock for that. 

For numbers and symbols usually need several following characters, that's why the shift key is great. 

The only problem for this is that Ukulele (strangely) doesn't let me do that for layout from the current input source.

 But for new empty layout Ukulele let me make two different layouts for CapLock and Shift.


In other words-the CapsLoc automatically copy the layout which I made under the shift only.

 

What's even more strange. For the current input source the CapsLoc copy only half of the shift layout. Example half of the numbers stays as a numbers and other half as a Capitals. 



First layout with CapLock

Screenshot 2024-02-15 at 19.02.43.png





Then with Shift

Screenshot 2024-02-15 at 19.10.30.png





The end up result when again pres CapLock

Screenshot 2024-02-15 at 19.10.53.png

Gé van Gasteren

unread,
Feb 16, 2024, 6:15:47 AMFeb 16
to ukelel...@googlegroups.com
On Fri, Feb 16, 2024 at 5:17 AM Raivis Muktāns-Dāvidsons <rmdr...@gmail.com> wrote:


for new empty layout Ukulele let me make two different layouts for CapLock and Shift.

The only problem for this is that Ukulele (strangely) doesn't let me do that for layout from the current input source.

 

For the current input source the CapsLock copy only half of the shift layout. Example half of the numbers stays as a numbers and other half as a Capitals. 


Hi Raivis,

You have done good research: most keyboard layouts use one and the same table for both the characters produced with Shift and those produced with Caps Lock, together with an exception rule for the digits, so that users can type in ALL CAPS and still type numbers, not symbols.

Therefore, one solution to your problem is to find a keyboard layout you can start from that has separate tables for Shift and Caps Lock, because then that exception rule doesn't get in your way.
Unfortunately, I don’t remember which existing keyboard layouts have this separation – apart from the French keyboard layout, which is not practical for you, because it’s very different from the US keyboard layout.

An alternative is to start with a blank layout, as you have already found out.

The third option is to start from an existing layout, there create a new table for the Caps Lock key and separate it from the Shift key’s table. That is something for more experienced users.

Tom

unread,
Feb 16, 2024, 7:42:30 AMFeb 16
to Ukelele Users
I think the Hebrew layout has separate shift and capslock tables  (capslock produces Latin script).

Gé van Gasteren

unread,
Feb 16, 2024, 8:21:48 AMFeb 16
to ukelel...@googlegroups.com
Hi all,

Here's a custom keyboard layout with separate Shift and Caps Lock tables.

I made it from my most-used layout by taking out lots of special stuff, so not everything will work like the standard U.S. keyboard layout :-)
E.g. there are some combining diacritical marks on Shift-Option  v   n   m   ,
The bundle's language has been changed to English, but I've left the (modified Dutch) icon in, as I didn't know what to replace it with.

Hope that helps!

Separate CL and Shift.bundle.zip

Sorin Paliga

unread,
Feb 16, 2024, 8:22:43 AMFeb 16
to ukelel...@googlegroups.com
I think the key to success is to edit the Modifiers level. As I have never done this, I have no idea whether it may work, but I guess it will.



On 16 Feb 2024, at 14:42, Tom <thge...@gmail.com> wrote:

I think the Hebrew layout has separate shift and capslock tables  (capslock produces Latin script).

Screenshot 2024-02-16 at 15.20.28.png
--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ukelele-users/a3820145-9330-4535-a2d3-0f14980dfb28n%40googlegroups.com.

Message has been deleted

Gé van Gasteren

unread,
Feb 16, 2024, 9:04:47 AMFeb 16
to Ukelele Users
Yes, you're right Sorin, one can duplicate the set for Shift and then assign the duplicate to Caps Lock.
After that, the Caps Lock can be edited separately.

At least, that's how I remember it – it's long since I last did this.
I had some crashes, too, damaging the file I was working on beyond repair. 
In general, I was feeling like the sorcerer's apprentice.

That said, from your picture, I'd think your Romanian MacClub keyboard layout already has separate sets (nr 1 and 2) for Shift and Caps Lock!
But I may also be completely off my game here, because when I now create a "New from current input source" based on the U.S. keyboard layout, that layout also has separate sets 1 and 2 – as far as I can see, anyway.

John Brownie

unread,
Feb 16, 2024, 9:51:12 AMFeb 16
to ukelel...@googlegroups.com
I haven’t followed this closely, but is the issue linked keys or sets? In many keyboard layouts, the shift and caps lock use the same set of outputs for the letter keys, and so they can’t be changed independently.

John

Gé van Gasteren

unread,
Feb 16, 2024, 10:32:19 AMFeb 16
to ukelel...@googlegroups.com
On Fri, Feb 16, 2024 at 3:51 PM John Brownie <john_b...@sil.org> wrote:
I haven’t followed this closely, but is the issue linked keys or sets? In many keyboard layouts, the shift and caps lock use the same set of outputs for the letter keys, and so they can’t be changed independently.

Yes, I understand that the OP wants to assign different output for Caps Lock Down, but runs into problems because it's linked to the Shift set.

I uploaded a "starter kit" with unlinked sets.

What I'd like to check with you is whether I interpret this correctly as having separate/unlinked sets:
image.png
Or if there is more to it than this picture shows?

John Brownie

unread,
Feb 16, 2024, 11:03:14 AMFeb 16
to ukelel...@googlegroups.com
No, you can’t tell from the modifiers window whether it’s linked or not. It’s hidden in the details of the XML, but you can find out on a key-by-key basis by making a change on one and seeing if the other gets the same change. Time-consuming, but it works. A shortcut would be to explicitly unlink the caps lock set, which will probably do some needless duplication of XML, but it will do the job, and probably doesn’t make that much of a difference to the final keyboard layout as used by the system.

John

--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.

Gé van Gasteren

unread,
Feb 16, 2024, 11:15:26 AMFeb 16
to ukelel...@googlegroups.com
On Fri, Feb 16, 2024 at 5:03 PM John Brownie <john_b...@sil.org> wrote:
No, you can’t tell from the modifiers window whether it’s linked or not. It’s hidden in the details of the XML, but you can find out on a key-by-key basis by making a change on one and seeing if the other gets the same change. Time-consuming, but it works. A shortcut would be to explicitly unlink the caps lock set, which will probably do some needless duplication of XML, but it will do the job, and probably doesn’t make that much of a difference to the final keyboard layout as used by the system.

All right, I'm learning:

On a copy of the U.S. keyboard layout, I changed Shift + q into ! (exclamation mark)
Then I checked what Caps Lock + q produces: Q
If the keys were linked, I would expect Caps Lock + q to (also) produce !
So where am I going wrong?


John Brownie

unread,
Feb 16, 2024, 11:47:10 AMFeb 16
to ukelel...@googlegroups.com
Q is probably a poor choice, as it’s unlikely to get any diacritics, and so would simply have an entry that says “output=Q” rather than “if state is acute, output=Q´, otherwise, output=Q”. Try it with a vowel, for instance.

John

Gé van Gasteren

unread,
Feb 16, 2024, 1:33:53 PMFeb 16
to ukelel...@googlegroups.com
You’re right, when I changed Shift + e then Caps Lock + e changed automatically.

Then I undid that and unlinked the modifier set:
image.png
I know the command says "Unlink Key…" but after doing that step, the Undo menu showed the option "Undo unlink modifiers" so I guess it was indeed the entire set that was unlinked?

Anyway, when I then tried the first step again and changed the output of Shift + e, the Caps Lock + e output remained the same. 
Yay!

However, for the life of me, I can’t see the logic here.
Why isn’t this the same for Q and E ?

Sorin Paliga

unread,
Feb 16, 2024, 1:45:38 PMFeb 16
to ukelel...@googlegroups.com


On 16 Feb 2024, at 20:33, Gé van Gasteren <gevang...@gmail.com> wrote:

Why isn’t this the same for Q and E ?

Some keys do not behave the same way because they are also used for shortcuts, e.g. option-E = dead acute, option-U = Umlaut etc. This is my explanation. i noticed this some time ago when trying to have the best way to success.

John Brownie

unread,
Feb 16, 2024, 2:09:40 PMFeb 16
to ukelel...@googlegroups.com
This is where it gets technical.

In the XML file, there are two ways output can be specified for a key. The first is an output statement, which says that the key outputs the same character, no matter what dead key state you are in. The second is an action statement, which is referred to by name, and has a string of options, depending on the dead key state. The linking happens when the same action is referred to by two or more different key/modifier combinations. In that case, changing one key's output changes the action statement, thus affecting the other linked key or keys.

Unlinking keys makes a copy of the action statement, so that the keys no longer refer to the same action name. That makes them independent of each other, so changing one key no longer affects the other.

It took me a while to work this out in my own mind, and to come up with a way to handle the problem, so don't be worried if this is too complicated to be easily understood!

John 

--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.

Gé van Gasteren

unread,
Feb 16, 2024, 2:48:14 PMFeb 16
to ukelel...@googlegroups.com
@John:
Thanks for the explanation, which now lies on my brain, very partially digested ;-)

The main achievement for me now is that (it seems) I can take any macOS keyboard layout and separate Shift from Caps Lock – that can be really useful!

@Raivis:
1. I can confirm that the keyboard layout I uploaded earlier has the requested feature, and 
2. You can send me the keyboard layout you’re working on and I’ll return it with the Shift and Caps Lock outputs unlinked.

One general point I want to mention:
Since a few years, macOS lets you use Caps Lock to switch between two keyboard layouts, if one of them is a Latin script and the other non-Latin.
This can be a handy feature, but it tends to clash with the Caps Lock switch we have discussed in this thread: between sets within the active keyboard layout.
So when designing a custom keyboard layout, we have to consider if, maybe, the prospective users are already using Caps Lock to switch layouts, and if utilizing that switch in the new custom layout wouldn’t cause too much confusion.

Raivis Muktāns-Dāvidsons

unread,
Feb 16, 2024, 5:46:42 PMFeb 16
to ukelel...@googlegroups.com
First, thank you for responding so quickly.
Can you please do the unlink for the
 British - PC layout from the mac os menu and send it to me?
Because on all of the cases I will experiment with my layout- the British-PC layout file always be my starting point. 
Thanks. 




Gé van Gasteren

unread,
Feb 17, 2024, 1:53:17 AMFeb 17
to ukelel...@googlegroups.com
On Fri, Feb 16, 2024 at 11:46 PM Raivis Muktāns-Dāvidsons <rmdr...@gmail.com> wrote:
First, thank you for responding so quickly.
Can you please do the unlink for the
 British - PC layout from the mac os menu and send it to me?
Because on all of the cases I will experiment with my layout- the British-PC layout file always be my starting point. 
Thanks. 

@Raivis: All right, here is a modified copy of British – PC.

@Tom or John: I noticed that there are lots of diacritical marks in this keyboard layout, but in my view, they are useless, because they are spacing marks, not combining ones.
Do you know a scenario where spacing marks serve a purpose?
image.png
The cedilla (on Shift Option Z) is a fascinating case in this regard, because when I type it in TextEdit, it (U+00b8) gets combined with the letter just before, as if it’s substituted on the fly by its combining version (U+0327) !
But this doesn’t happen with any of the other diacritics in the keyboard layout.
Is this an existing or known mechanism? 
And if so, are there apps that behave this way with more/all marks included in this keyboard layout?
I really can’t understand why it would work (in TextEdit) with this spacing cedilla – especially seeing that it doesn’t with the other marks.
British PC basis for Raivis.bundle.zip

Raivis Muktāns-Dāvidsons

unread,
Feb 19, 2024, 8:06:27 AMFeb 19
to ukelel...@googlegroups.com
Thank you for the modified layout copy. Everything works great. Now I can use the full potential of the shift layout. Thanks. 

--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.

Gé van Gasteren

unread,
Feb 19, 2024, 8:32:02 AMFeb 19
to ukelel...@googlegroups.com
On Mon, Feb 19, 2024 at 2:06 PM Raivis Muktāns-Dāvidsons <rmdr...@gmail.com> wrote:
Thank you for the modified layout copy. Everything works great. Now I can use the full potential of the shift layout. Thanks.
 
Thank you for the feedback!
I thought the layout should work as requested, but one never knows…

Did you understand what I wrote about the diacritical marks in there vs. the combining diacritical marks I would expect?
If interested, I can send you a copy of the keyboard layout where I’ve replaced them.

Raivis Muktāns-Dāvidsons

unread,
Feb 19, 2024, 8:46:17 AMFeb 19
to ukelel...@googlegroups.com
 😅 no. I do not understand a thing about those marks. 

--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.

Gé van Gasteren

unread,
Feb 19, 2024, 10:09:21 AMFeb 19
to ukelel...@googlegroups.com
On Mon, Feb 19, 2024 at 2:46 PM Raivis Muktāns-Dāvidsons <rmdr...@gmail.com> wrote:
 😅 no. I do not understand a thing about those marks.

I like honest people! :-)
Basically, there are now three ways to produce accented characters:

1. The good old way with dead keys.
E.g., typing [Option e], then [e] produces [é]

2. The "smartphone way" of holding a letter down until a row of accented variations pops up, then choosing one of them:
image.png

3. Typing first the base letter, then a "combining diacritical mark" – or CDM for short:
[e] then [ ́] produces é
Note that the [ ́] here is a different Unicode code point than the [´] produced by [Option e], then [space].

Method nr. 3 was designed more recently, with its goals being: ease of entry and better-quality typography with proper software support.
For me, its biggest advantage is that stacking accents becomes not just possible, but very easy:
[e] [ ̄ ] [  ̣] [ ̌ ] -> [ẹ̄̌]
The software figures out, from information inside the font file, where to place the accents:
[E] [ ̄ ] [  ̣] [ ̌ ] -> [Ẹ̄̌]
I believe apps try to substitute the sequence of characters by a so-called pre-composed character – if it exists in Unicode or in the font – or else try to render it as best they can.
However, I don’t know the ins and outs of this. E.g. for the above [ẹ̄̌] I’m pretty sure that it’s not a Unicode character and not a glyph inside the font, but still it is selected as if it’s one character – how is that possible, I wonder?

As of today, most apps support this feature for many fonts, but there are exceptions, and it doesn’t always produce good-looking results.

Raivis Muktāns-Dāvidsons

unread,
Feb 19, 2024, 2:24:45 PMFeb 19
to ukelel...@googlegroups.com
Now I got you. But actually i no need all of those characters.
But i explain why i need exactly British-PC base. 
I do work only with text and numbers and for me no need hundreds of characters as programmers need. 
I managed to put my language (including letters like ā ē ī č etc) under 28keys on the keyboard - the three touch typing lines. I even not use the two keys top on pinkies-where is the Q and P on qwerty - just because I need however my hand to reach those two keys. 
I made one dead key right on the home row-right under one finger - which allows me use second layer on speed off blinking.
When I use shift for capitalisation,(which needs to hold for capital letters) my speed drops to 40vpm. But when I use dead key for capitals, my sped is 80-100 vpm.(on chill out mode) So it’s more than huge advantage over shift.

So the shift stays without a job and it’s still occupies the keyboard.
So with help of karabine I moved both the shifts on home row - right next to the pinkies, which allowed me to very comfortably use one more layer. And for numbers really needed a key like shift-which need to hold to input long numbers like calendar dates and etc. 

Yes. There is top row for numbers and marks like !?()- etc. But it’s not in touch typing zone. And the shift now let me move those characters in touch typing zone and I no need anymore take my eyes off the screen. 

Before you did that shift-caplock separated, I just give up the cpaplock capitals. So thanks again to you. 

Now everything i use is under just 28keys In touch typing zone - and I’m not even hovering my hands over the keyboard - just moving fingers. 

The exact reason I need British-PC base is 
1. I have psychical British-pc layout keyboard 
2. As I changed only 28 keys - everything else I see on my keyboard still there when in rare cases I need something.

I hope you understand my English. 

--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.

Gé van Gasteren

unread,
Feb 19, 2024, 2:38:36 PMFeb 19
to ukelel...@googlegroups.com
Thanks, Raivis, very interesting!

I’m curious to know on which key you put the dead key for capital letters?
Or maybe you can simply upload your layout when finished, so I can try it out in practice :-)

Raivis Muktāns-Dāvidsons

unread,
Feb 21, 2024, 4:53:56 AMFeb 21
to ukelel...@googlegroups.com
Hi. Sorry for the late response. But this week I’m not on my pc desk.
I can send the layout late next week. 
Actually all together I have two dead keys.
The main is where on the qwerty homerow right pinky- ; : key
And another one - U key. 

By the way, what’s your keyboard language?

You received this message because you are subscribed to a topic in the Google Groups "Ukelele Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ukelele-users/UasDKHBwoOQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ukelele-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ukelele-users/CAOH1hL_%3DWiaa5iPtbX7fSVjOb_9Sz5rb-guEysnZDc9S-E%2B31g%40mail.gmail.com.

Gé van Gasteren

unread,
Feb 21, 2024, 7:27:51 AMFeb 21
to ukelel...@googlegroups.com
On Wed, Feb 21, 2024 at 10:53 AM Raivis Muktāns-Dāvidsons <rmdr...@gmail.com> wrote:
Hi. Sorry for the late response. But this week I’m not on my pc desk.
I can send the layout late next week. 
Actually all together I have two dead keys.
The main is where on the qwerty homerow right pinky- ; : key
And another one - U key. 

By the way, what’s your keyboard language?

I’ll wait :-)
It’ll be interesting to see how you put in all the extras for Latvian (I’m guessing from your name) while also adding that Shift key alternative.

I use a modified version of the Dutch keyboard. 
Dutch (hardware) keyboards look exactly like U.S. ones, except that they are ISO, meaning (among other things) that the left Shift key is smaller and further to reach.
So I can sympathize with your looking for a Shift-key alternative!

Sorin Paliga

unread,
Feb 21, 2024, 7:50:30 AMFeb 21
to ukelel...@googlegroups.com


On 21 Feb 2024, at 14:27, Gé van Gasteren <gevang...@gmail.com> wrote:

Dutch (hardware) keyboards look exactly like U.S. ones, except that they are ISO

The same for Romanian: US keyboard, with or without the extra key. Apple keyboards are always sold with the extra key, PC keyboards mainly without any concern. During the typewriter era, there was no real standard for Romanian. There were QWERTZ (most), QWERTY (less) and even AZERTY (rarely) keyboards, a total chaos. But there were guys who adapted anything to every taste and needs. 
My first (portable) writer was manufactured in Czechoslovakia, Consul, had a small suitcase and may be labelled the precursor of a notebook.

Gé van Gasteren

unread,
Feb 21, 2024, 11:28:55 AMFeb 21
to ukelel...@googlegroups.com
On Wed, Feb 21, 2024 at 1:50 PM Sorin Paliga <sorin....@gmail.com> wrote:
My first (portable) writer was manufactured in Czechoslovakia, Consul, had a small suitcase and may be labelled the precursor of a notebook.

Like this (with what looks like a French layout):
image.png

Sorin Paliga

unread,
Feb 21, 2024, 12:39:57 PMFeb 21
to ukelel...@googlegroups.com
Yes, more or less. This looks like a little bit older than mine. 

<image.png>


--
You received this message because you are subscribed to the Google Groups "Ukelele Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukelele-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages