I assume Lion’s default keyboard layouts have the special characters that appear when you hold down a certain key hardcoded somewhere, and my old custom keyboard layout (based on the default Snow Leopard-layouts) lacks that data.
My question is: how can these “key variations” be defined in a .keylayout file?
The special characters included in the popovers are defined in files like /System/Library/Input Methods/PressAndHold.app/Contents/Resources/Keyboard-en_US.plist, not in .keylayout files. (The popovers are also used with languages that have their own input methods like Vietnamese.)
I don't know how to add a property list like that for a custom layout though. I also tried copying the U.S..keylayout that comes with Ukelele to ~/Libary/Keyboard Layouts/ (without changing the name or id), but the popovers didn't work with it.
By saving a keyboard layout in a bundle, it will become compatible with the “press and hold” mechanism for entering diacritics, introduced in OS X 10.7 (Lion). For this purpose, an “intended language” can be supplied (default is the system language), which will determine which possibilities are offered in the pop-up. However, such bundles may not work with OS X 10.4 (Tiger) and earlier.
The new version of English/Russian Typographical keyboard layout by Ilya Birman (v. 3.0) supports Press and Hold for entering key variations even though it’s a custom keyboard. I’ve managed to replace his layout from the bundle with mine, but these functionality worked only if layout name set in Ukelele was kept the same.
Now I have my own custom layout with my own icon and Press and Hold support, but it’s name is “English — Ilya Birman Typography” and yet I can’t do anything about it. Can anybody think of an workaround for these?