24 views
Skip to first unread message

Gé van Gasteren

unread,
Apr 18, 2025, 11:54:57 AMApr 18
to ukelel...@googlegroups.com
At last, I got around to try and create a new Keyboard Type.
Result: Thanks to John's recent efforts, I can now have Ukelele display my keyboard as it is, yay!

I mean, I didn't care about subtle differences; the main thing was to swap the  ` and § keys. 
This was necessary because my hardware keyboard is a peculiar case: it has an extra key next to the Z but it still works like an ANSI keyboard. In practice, this means that the § key is visible only when I choose ISO for the display, albeit in the wrong place, namely next to the 1 key. And the  ` symbol is shown in the right place only when I choose ANSI.
While I was at it, I also swapped the Option and Control keys to match my macOS System Settings.

Comments:

• After some initial confusion, I can now confirm that the first two values given for each key are the coordinates of the upper left corner, not of the lower left corner as mentioned in the manual. Maybe related is the unmentioned fact that the vertical coordinate increases downward.

• When I first open a keyboard layout (from a file or through New From Current Input Source), the display is always wrong: the Enter key is displayed one row too high. (See the attached image.)
It's not a big thing though, because it can easily be fixed by switching to another percentage; after that, the display remains correct, also when I switch back to the original percentage. 
This behaviour is independent of the initial percentage setting, and it may have been inherited from the Extended ADB (ISO) keyboard type I took as my starting point.

For my version, I had changed both text strings (for the list and the comments in the Keyboard Type dialog), which are shown accordingly. But in the display window, yet another text showed up, this one still old – claiming the keyboard type to be Extended ADB. Maybe that third text string is linked to the Keyboard Type’s number and stored somewhere in the app? 
Because now, after I've changed the number of the Keyboard Type (at the beginning of the XML file) to 1008, nothing at all is shown in the display window. (See image.)
Also, the Settings/Preferences dialog now shows empty texts in the drop-down menus for “Keyboard type” and “Keyboard coding”, although I'm not sure that's related.

Displaying no keyboard type and wrong Enter key position.jpg

John Brownie

unread,
Apr 21, 2025, 4:23:06 AMApr 21
to ukelel...@googlegroups.com
On 18 Apr 2025 at 18:54:17, Gé van Gasteren <gevang...@gmail.com> wrote:
At last, I got around to try and create a new Keyboard Type.

Great that you gave a try!

Result: Thanks to John's recent efforts, I can now have Ukelele display my keyboard as it is, yay!

I mean, I didn't care about subtle differences; the main thing was to swap the  ` and § keys. 
This was necessary because my hardware keyboard is a peculiar case: it has an extra key next to the Z but it still works like an ANSI keyboard. In practice, this means that the § key is visible only when I choose ISO for the display, albeit in the wrong place, namely next to the 1 key. And the  ` symbol is shown in the right place only when I choose ANSI.
While I was at it, I also swapped the Option and Control keys to match my macOS System Settings.

Comments:

• After some initial confusion, I can now confirm that the first two values given for each key are the coordinates of the upper left corner, not of the lower left corner as mentioned in the manual. Maybe related is the unmentioned fact that the vertical coordinate increases downward.

I need to check that out. There is a confusing conflict of systems, with the original Mac counting from top left, and the original OS X from bottom left, so that sometimes coordinate systems are ‘flipped’, so it may well be that this is the case and I’d forgotten that it is flipped.

• When I first open a keyboard layout (from a file or through New From Current Input Source), the display is always wrong: the Enter key is displayed one row too high. (See the attached image.)
It's not a big thing though, because it can easily be fixed by switching to another percentage; after that, the display remains correct, also when I switch back to the original percentage. 
This behaviour is independent of the initial percentage setting, and it may have been inherited from the Extended ADB (ISO) keyboard type I took as my starting point.

This is strange, and I’ll have to look at it. Can you send me the file?

For my version, I had changed both text strings (for the list and the comments in the Keyboard Type dialog), which are shown accordingly. But in the display window, yet another text showed up, this one still old – claiming the keyboard type to be Extended ADB. Maybe that third text string is linked to the Keyboard Type’s number and stored somewhere in the app? 
Because now, after I've changed the number of the Keyboard Type (at the beginning of the XML file) to 1008, nothing at all is shown in the display window. (See image.)
Also, the Settings/Preferences dialog now shows empty texts in the drop-down menus for “Keyboard type” and “Keyboard coding”, although I'm not sure that's related.

I guess that this wasn’t something I tested very extensively, so I’ll have to work on that.

So, I’m glad that it works at one level, but would love to fix the bugs that appeared with the new features!

John

Gé van Gasteren

unread,
Apr 21, 2025, 5:21:11 AMApr 21
to ukelel...@googlegroups.com
Not to spoil your holiday, but here is my custom keyboard type.
It’s the version with the changed keyboard type number, the one that doesn’t get any text displayed in the Ukelele main window – as shown in my previous post.

To give you a headstart, I went through all the built-in keyboard types and checked which of them initially show a shifted Enter key; see the lists below.

Greetings!

ANSI keyboard types with the Enter key moved up a row on initial view:
Original Mac
Standard ADB (The Enter key moves down a row instead of up, and the layout shown is clearly ISO, not ANSI!)
Extended ADB
Powerbook Subnotebook

ISO keyboard types:
Standard ADB (ISO coding) is all right except that it looks like an ANSI layout – see above :-)
Extended ADB
Powerbook ADB
Powerbook embedded keypad (only half a row up)
Original USB Cosmo (a quarter row up, I think)
Powerbook/iBook, 2nd Cmd key (half a row up)
Powerbook USB internal (half a row)
Aluminium wireless (half a row)
Aluminium Apple (half a row)

JIS keyboard types:
In Adjustable, the Enter key is moved up two rows initially.
Original USB Cosmo (a quarter row up, I think)
1999 Japanese Powerbook (half a row)
Powerbook USB internal (half a row)
Aluminium wireless (half a row)
Aluminium Apple (half a row)

Greetings!
KeyboardType Packard Bell 9201 v1 (1008).plist

John Brownie

unread,
Apr 25, 2025, 9:31:46 AMApr 25
to ukelel...@googlegroups.com
Thanks for the information. It was helpful, and precipitated another rethink of how this all works.

Previously, the keyboard was laid out upside down and then flipped, as that was the way that the original KCAP resources were put together, and my translation into XML didn’t change that. But that is just confusing and doesn’t make it easy for people creating their own keyboard types. So I switched it around and converted the XML file to avoid all that. So now all the keyboard types look correct at a first glance. The names turn up in the info panel in the keyboard editor window, too. (I also updated the Packard Bell 9201 file, so that should work, too. You would want to remove the old one first when the new one is ready to install.)

It’s Friday afternoon, so I won’t try to rush it out now, but will do some more testing and get a new version out soon.

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.
To view this discussion visit https://groups.google.com/d/msgid/ukelele-users/CAOH1hL9LaWmpW7qQpu_xVohLm4onW%2B07ub3ZcsMDo6h489F4og%40mail.gmail.com.

Gé van Gasteren

unread,
Apr 25, 2025, 10:42:38 AMApr 25
to ukelel...@googlegroups.com
Aha!
So I guess that Enter keys’ funny behaviour was caused by something in the flipping routine (flipped around the wrong axes, maybe) which worked differently for two-part keys than with simple keys.

Don’t fuss with Ukelele over the weekend, I’d say – have a nice one!

Reply all
Reply to author
Forward
0 new messages