Creating a Unicode replacement functionality similar to the Unicode Hex Input keyboard layout

18 views
Skip to first unread message

Suhas K

unread,
Apr 16, 2025, 4:44:57 AMApr 16
to Ukelele Users
I was wondering if it is possible to manually create the Unicode replacement functionality that is present in the Unicode Hex Input layout. I created a keyboard by "Capture current input source" for UHI and then saw that each of those are dead keys ranging from 4253 to 4368. I mainly used Dvorak layout (I'm comfortable with touch-typing), so I decided to try to copy this in a different layout. I then created a keyboard by the capture method for Dvorak and then on Capslock + Alt, I mapped the 0-9 and abcdef keys to the corresponding dead key states that I could see in UHI.
The issue is that this creates no replacement when I type 00b2 in Capslock + Alt mode (this should give an output of superscript 2). What is going wrong and how can I fix this?

P.S., is there a quick way to map dead keys like "Quick Enter Mode"?

Here is the layouts attached (UHI + Dvorak is the one which works fine, Dvorak + UHI and Dvorak + QWERTY (Unicode) both do not work)

Suhas K

unread,
Apr 16, 2025, 4:48:06 AMApr 16
to Ukelele Users
I was unable to attach the document in the above message, it's in this one.
Dvorak 2.bundle.zip

John Brownie

unread,
Apr 16, 2025, 7:24:59 AMApr 16
to ukelel...@googlegroups.com
As I’ve said in other threads, Ukelele doesn’t offer a way to deal with this kind of keyboard layout. The biggest problem is that the XML required for it includes a representation of the NULL character, U+0000, and that is the only character that is illegal to include in an XML file. XML parsers simply ignore the coded character, so without writing a custom parser, it’s just not possible to keep the functionality. So you are left with hand-modifying the XML output to get the NULL character in the right place.

John
Reply all
Reply to author
Forward
0 new messages