Printing - blank keys on first printed page

38 views
Skip to first unread message

Sheik Yerbouty

unread,
Dec 30, 2024, 10:56:06 AM12/30/24
to Ukelele Users
Ukelele version: 3.5.12 (396)
Hardware: Mac Studio, M1 Max
OS: Sequoia 15.2

Issue: 
When I print a keyboard layout to pdf the first page does not show any characters on the keys. Page 2 on the other hand does show characters on the keys. See attachment, 'Ukelele print result.pdf'.

Any ideas what's happening?

Tried ...
... with several layouts, also with those in the resource folder. 
... with print theme and a new custom theme (reversed the colors after issue was noticed)
... deleted '/Users/nat/Library/Saved Application State/org.sil.ukelele.savedState'
... with another user
... downloaded latest version of Ukelele
But alas, no cigar.

Only when I print without 'All States' and without 'All Modifier Combination' I get one keyboard layout, 'State: none', with characters on the keys.
Ukelele print result.pdf

Gé van Gasteren

unread,
Dec 30, 2024, 1:05:51 PM12/30/24
to ukelel...@googlegroups.com
I must confess that, in all these years, I hadn't noticed that one can print a keyboard layout; that's a great feature! ;-)

So I tried it with a "New from current input source" based on the U.S. keyboard layout, and you're right, only a few modifier combinations produce diagrams with printed keys.
See attached, this one printed with both "All states" and "All modifier combinations" checked.

--
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/3dbadefa-a342-4c38-b970-b6d1219ac28fn%40googlegroups.com.
US keyboard layout printed.pdf

Sorin Paliga

unread,
Dec 30, 2024, 1:16:20 PM12/30/24
to ukelel...@googlegroups.com
Yep, the first page (5 states) is empty, the second seems OK (I have not had patience to check whether all OK).
Tested with Romanian MacClub and Cyrillic Linguist, both mine.
Looks like this is an issue for John to solve. 
RO MacClub.pdf
Cyrillic.pdf

Sorin Paliga

unread,
Dec 30, 2024, 4:19:00 PM12/30/24
to ukelel...@googlegroups.com
My test is not relevant, perhaps: I am not at home, and do not have a printer around, so I chose to create a PDF in the print menu. The PDF is not properly created, indeed. Adding the function ‘create PDF’ would be of course welcome. 

<RO MacClub.pdf>
<Cyrillic.pdf>
cked.

On Mon, Dec 30, 2024 at 4:56 PM Sheik Yerbouty <sheik...@gmail.com> wrote:
Ukelele version: 3.5.12 (396)
Hardware: Mac Studio, M1 Max
OS: Sequoia 15.2

Issue: 
When I print a keyboard layout to pdf the first page does not show any characters on the keys. Page 2 on the other hand does show characters on the keys. See attachment, 'Ukelele print result.pdf'.

Any ideas what's happening?

Tried ...
... with several layouts, also with those in the resource folder. 
... with print theme and a new custom theme (reversed the colors after issue was noticed)
... deleted '/Users/nat/Library/Saved Application State/org.sil.ukelele.savedState'
... with another user
... downloaded latest version of Ukelele
But alas, no cigar.

Only when I print without 'All States' and without 'All Modifier Combination' I get one keyboard layout, 'State: none', with characters on the keys.

-- 
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/3dbadefa-a342-4c38-b970-b6d1219ac28fn%40googlegroups.com.

-- 
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.

John Brownie

unread,
Dec 31, 2024, 2:41:10 AM12/31/24
to ukelel...@googlegroups.com
On 30 Dec 2024 at 20:15:41, Sorin Paliga <sorin....@gmail.com> wrote:
Looks like this is an issue for John to solve. 

It does indeed look that way. I’ll investigate the problem and report back.

John

John Brownie

unread,
Jan 2, 2025, 6:33:41 AM1/2/25
to ukelel...@googlegroups.com
Something weird is going on, I think. If I run the version that is released, I get the blank key caps. But if I run it in the debugger, everything works correctly. Obviously more testing is needed!

I also stumbled on a problem with the way that the printing is implemented, in that all possible combinations of modifiers and states are plotted first, which can take a really long time if you have a lot of both. A keyboard layout with 14 modifier combinations and 56 states took way too long to even bring up the print dialog, and took some gigabytes of memory. I’ll have to see if there is a more efficient way to do it.

John

John Brownie

unread,
Jan 2, 2025, 9:46:06 AM1/2/25
to ukelel...@googlegroups.com
It gets weirder… Simply recompiling the current code and running it makes it work! I will continue investigating, but it may simply be a case of reissuing the current version that is the result.

John

Gé van Gasteren

unread,
Jan 2, 2025, 10:42:05 AM1/2/25
to ukelel...@googlegroups.com
That’s good news!

This is a shot in the dark, but when I read your previous message, I thought:
What if those two issues are related: the high memory use and the blank keys?
And, guessing further now, that re-compiling somehow changed the memory assignment and suddenly there is enough RAM to do the job properly?

Anyway. You can let me try the Beta on Sequoia, if you want.

On Thu, Jan 2, 2025 at 3:46 PM 'John Brownie' via Ukelele Users <ukelel...@googlegroups.com> wrote:
It gets weirder… Simply recompiling the current code and running it makes it work! I will continue investigating, but it may simply be a case of reissuing the current version that is the result.

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.

John Brownie

unread,
Jan 3, 2025, 1:38:23 AM1/3/25
to ukelel...@googlegroups.com
On 2 Jan 2025 at 17:41:26, Gé van Gasteren <gevang...@gmail.com> wrote:
That’s good news!

This is a shot in the dark, but when I read your previous message, I thought:
What if those two issues are related: the high memory use and the blank keys?
And, guessing further now, that re-compiling somehow changed the memory assignment and suddenly there is enough RAM to do the job properly?

No, it doesn’t appear to be related to the memory problem. I get it with a small number of modifiers and states, too, and the massive one has all the keys shown anyway (though it took roughly 90 minutes to show the print dialog, and peaked at nearly 10 GB of memory!).

Anyway. You can let me try the Beta on Sequoia, if you want.

I have moved to Sequoia (15.1.1) myself, so it should be working OK. I’ll be working on a new approach to printing today, and hopefully that will be more usable.

John

Sorin Paliga

unread,
Jan 3, 2025, 9:09:35 AM1/3/25
to ukelel...@googlegroups.com
John,

You’ve got hard work during the first days of January! 
I am sure you will do it. Indeed, printing or exporting a PDF with all the chars at all levels would be a great thing.
All the best

--
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.

John Brownie

unread,
Jan 7, 2025, 8:55:22 AM1/7/25
to ukelel...@googlegroups.com
After a day and a half of scratching my head and trying to get positioning on the page to work, I think that I have a solution that makes printing work moderately well. It’s much faster, and seems to do the job correctly, though the output of some keys is clipped (especially the F keys, but that’s no big deal). I noticed while doing it that it will only use the default print theme, so I can make that customisable if there’s a desire for that.

Anyway, a couple more days of testing things, and I should put out a new version.

John

Gé van Gasteren

unread,
Jan 7, 2025, 9:14:44 AM1/7/25
to ukelel...@googlegroups.com
Thanks for the progress report – scratching the head always seems to do the trick ;-)

I’d suggest leaving the function keys blank, or even leave them out completely – if that isn’t upsetting your planning too much…
The rationele being that they aren’t modifiable in Ukelele, and vary from application to application anyway.

A cosmetic suggestion would be to replace the text "none" by just an EM dash (in the State field), so it doesn’t draw as much attention.

--
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.

Sheik Yerbouty

unread,
Jan 7, 2025, 11:24:36 AM1/7/25
to Ukelele Users
Oh nice, my new year wish is comming true :)

> I noticed while doing it that it will only use the default print theme, so I can make that customisable if there’s a desire for that.
If you mean, selecting another theme for printing, don't think it's necessary. One can change the print theme if they want other colors.

printscreen of PDF
Screenshot 2025-01-07 at 16.54.36.png


FYI, the window where you can edit the theme acts a bit strange. But for me, customizing the print theme is not necessary, happy the way it is.

Printscreen of theme editor window after clicking on 'Pressed' 'Dead Key'.
Screenshot 2025-01-07 at 16.38.34.png

John Brownie

unread,
Jan 8, 2025, 8:07:48 AM1/8/25
to ukelel...@googlegroups.com
At least this one turned out to be a simple change (one line of code).

I’m close to wrapping up a new version with these fixes, so if anybody has noticed other problems that haven’t been mentioned, now would be a good time to do so. 😀

John

On 7 Jan 2025 at 18:24:36, Sheik Yerbouty <sheik...@gmail.com> wrote:
Oh nice, my new year wish is comming true :)


Gé van Gasteren

unread,
Jan 8, 2025, 8:50:16 AM1/8/25
to ukelel...@googlegroups.com
Great!

This isn’t directly related, but I had some trouble changing the displayed font.
Doesn’t Ukelele save the selected font upon quitting?
Also, when I revert the Settings to default, does that font get reset?

I haven’t been playing with it long enough to make clear statements, sorry about that.

--
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.

John Brownie

unread,
Jan 8, 2025, 10:28:39 AM1/8/25
to ukelel...@googlegroups.com
The font isn’t saved when it gets changed in the Font panel, which only affects the current window. There’s only so much that can be stored per keyboard layout, dictated by what Apple allows in the XML file. I haven’t tried it or investigated too much, but it may be possible to store my own metadata there, without it causing problems for the keyboard layout system. Something to think about, for sure!

John

Sheik Yerbouty

unread,
Jan 8, 2025, 10:35:47 AM1/8/25
to Ukelele Users
@ Gé
Where do you change your font? Because for me it stays even after restarting Ukelele. Do you still have the issue if you change it in your settings/preferences?

Through the icon in the window, fonts are change immediately.
Through the settings, only applied after restarting Ukelele or when creating a new layout. After restarting Ukelele, applied to all layouts.

Screenshot 2025-01-08 at 16.11.04.png

Gé van Gasteren

unread,
Jan 8, 2025, 1:35:23 PM1/8/25
to ukelel...@googlegroups.com
On Wed, Jan 8, 2025 at 4:28 PM 'John Brownie' via Ukelele Users <ukelel...@googlegroups.com> wrote:
The font isn’t saved when it gets changed in the Font panel, which only affects the current window.
Thanks, that confirms my findings. And now that I know it, there is good logic to it – one can experiment which font is best for a printout, without having to deal with permanence.

There’s only so much that can be stored per keyboard layout, dictated by what Apple allows in the XML file. I haven’t tried it or investigated too much, but it may be possible to store my own metadata there, without it causing problems for the keyboard layout system. Something to think about, for sure!

I hadn’t thought of that even! 
I kind of assumed the font selected here would be stored with the Preferences/Settings, but then Sheik Yerbouty already reminded me that that applies to the font selected in the Settings – and only to that.

Gé van Gasteren

unread,
Jan 8, 2025, 1:36:08 PM1/8/25
to ukelel...@googlegroups.com
Yes, you’re completely right! Thanks for the clear explanation.

Reply all
Reply to author
Forward
0 new messages