Keylayout not appearing in System Prefs

51 views
Skip to first unread message

michael...@gmail.com

unread,
Feb 9, 2021, 8:31:20 AM2/9/21
to Ukelele Users
I have a key layout written in 2014 which has worked fine on each iteration of the macOS since then. I'm currently running Catalina. (Everything is new and up to date.) I went in and made a few edits to they keylayout (adding two dead keys, adding a capital, just changing four or five mappings). Now the keylayout does not appear in System Prefs > Language and Region > Keyboard Prefs > Input Sources (and I looked under Other too). I've logged out and restarted. It just doesn't show there. 

What is alarming me also is that I tried making edits to the .keylayout in a virtual machine running macOS 10.8 using the version of Ukelele that runs on that system and I get the same non-result. 

John Brownie

unread,
Feb 9, 2021, 8:44:40 AM2/9/21
to ukelel...@googlegroups.com
The best thing is to send me a copy of the keyboard layout that doesn't
work, and I can have a look and see what is going wrong. There's
obviously a bug, since this shouldn't happen.

michael...@gmail.com wrote on 9/2/21 15:31:
--
John Brownie
Mussau-Emira language, New Ireland Province, Papua New Guinea
Kouvola, Finland

michael...@gmail.com

unread,
Feb 9, 2021, 8:50:17 AM2/9/21
to Ukelele Users
All right, but I don't have your e-mail address.

Michael Everson

unread,
Feb 9, 2021, 9:22:17 AM2/9/21
to ukelel...@googlegroups.com
John Browne.

I found your address from withing my e-mail though it is obscured looking at this forum in the browser. Files sent with thanks.

Michael

John Brownie

unread,
Feb 10, 2021, 4:28:11 AM2/10/21
to ukelel...@googlegroups.com
The problem seems to be in the keyboard compiler. Ukelele is generating
valid XML, but the keyboard compiler cannot parse it, complaining about
an illegal character, though I haven't been able to determine what that
is (the line number and character offset point to different places in
the file).

The solution is to save the keyboard layout using the numerical
representation of code points outside the ASCII range. I would tell you
to do so by changing a preference, but it appears that I have a bug in
the current version of Ukelele which prevents that from working. I will
hopefully be able to get out a new version soon that fixes it.

In the meantime, with Ukelele not running, run the following command in
a Terminal window:

defaults write org.sil.ukelele CodeNonAscii 1

Now open Ukelele, make a change and then change it back, forcing Ukelele
to save the file, which should then be saved in a format that the
keyboard compiler will accept, and you should be able to use your
keyboard layouts again.

John

GĂ© van Gasteren

unread,
Feb 10, 2021, 5:27:32 AM2/10/21
to Ukelele Users
The solution is to save the keyboard layout using the numerical
representation of code points outside the ASCII range. I would tell you
to do so by changing a preference, but it appears that I have a bug in
the current version of Ukelele which prevents that from working. I will
hopefully be able to get out a new version soon that fixes it. 

1. John, does this mean we have to enter characters in decimal or hex form for the time being?
Or alternatively run that Terminal command?
I have my Preferences set like this:

2. I wanted to answer Michael that he could have used the option "Reply to the author", but when I want to use it, it’s greyed out.
I’m logged in to the group with my Google account. What should I change/try/check to get this working again?

GĂ© van Gasteren

unread,
Feb 10, 2021, 5:31:53 AM2/10/21
to Ukelele Users
Somehow the dragged image didn’t show up in my previous message, so here it is as an attachment.
Screen Shot 2021-02-10 at 11.20.05.png

John Brownie

unread,
Feb 10, 2021, 6:43:28 AM2/10/21
to ukelel...@googlegroups.com, GĂ© van Gasteren
GĂ© van Gasteren wrote on 10/2/21 12:27:

The solution is to save the keyboard layout using the numerical
representation of code points outside the ASCII range. I would tell you
to do so by changing a preference, but it appears that I have a bug in
the current version of Ukelele which prevents that from working. I will
hopefully be able to get out a new version soon that fixes it. 

1. John, does this mean we have to enter characters in decimal or hex form for the time being?
Or alternatively run that Terminal command?
I have my Preferences set like this:
The problem is that the preferences is writing the wrong preference key. This only affects the generated XML. You can mix explicit characters and XML code points as you want when working in Ukelele, and they will be converted either way when reading or writing the XML file.

2. I wanted to answer Michael that he could have used the option "Reply to the author", but when I want to use it, it’s greyed out.
I’m logged in to the group with my Google account. What should I change/try/check to get this working again?
I just made a couple of changes to the group settings, which might fix things.

GĂ© van Gasteren

unread,
Feb 10, 2021, 8:06:57 AM2/10/21
to Ukelele Users
On Wednesday, 10 February 2021 at 12:43:28 UTC+1 John Brownie wrote:
The problem is that the preferences is writing the wrong preference key. This only affects the generated XML. You can mix explicit characters and XML code points as you want when working in Ukelele, and they will be converted either way when reading or writing the XML file.

Sorry John, that went straight over my head :)
I mean, I understood that it doesn’t matter how we edit the keyboard layout in Ukelele.
But did this error arise because it was an old keyboard layout, or should we be doing something special before working on new ones in the current Ukelele version 3.5.0?

Thanks for fixing that thing with the Google group’s private message!

John Brownie

unread,
Feb 10, 2021, 9:47:28 AM2/10/21
to ukelel...@googlegroups.com


GĂ© van Gasteren wrote on 10/2/21 15:06:
No, you shouldn't have to do this unless the keyboard layout fails to appear in System Preferences. There's some sort of bug in the keyboard compiler that parses the XML into the form that the system uses, but I don't know how to trigger it, just that sometimes it happens that way.

GĂ© van Gasteren

unread,
Feb 10, 2021, 10:15:05 AM2/10/21
to Ukelele Users
On Wednesday, 10 February 2021 at 15:47:28 UTC+1 John Brownie wrote:
No, you shouldn't have to do this unless the keyboard layout fails to appear in System Preferences. There's some sort of bug in the keyboard compiler that parses the XML into the form that the system uses, but I don't know how to trigger it, just that sometimes it happens that way.

All right, so all should be well normally, just that this is one more thing to add to the troubleshooting checklist.
Good that you’re monitoring the group…!
Reply all
Reply to author
Forward
0 new messages