I’m programming an IPA layout that fits my needs (I use a lot of non-IPA characters), and am struggling with virtual character keys.
any(BaseCharacters) + [CTRL ','] > context index(Acute, 1)
any(BaseCharacters) + [CTRL K_COMMA] > context index(Acute, 1)
seem to work. Though
any(BaseCharacters) + ‘,’ > context index(Acute, 1)
does. The second option seems to be incorrect for mnemonic keyboards, as well. Do I have to define a virtual character key somewhere? Is my formatting wrong?
My programming skills are pretty rusty. Any help?
Does this help you get started?
group(main) using keys
any(BaseCharacters) + [CTRL K_COMMA] > context(1) U+0301
@kiragecko, yes, the second rule should show a warning if compiled in a mnemonic layout. Can you explain what you are trying to do with the rule and what isn’t working? Is the rule just not firing? Something else?
Note: I tested both
[CTRL ','] and
[CTRL K_COMMA] here just now and they worked without problem.
Sorry for taking so long to get back to you. Virtual keys work fine (I wasn’t writing them in all caps before I posted here). Virtual Character Keys don’t. I’ve been using the former and just ignoring all the warning messages.
I’m using virtual keys to add diacritics or transform characters. I work with a variety of languages at once, so I need to be able to switch between IPA and various transliteration conventions quickly.
- [ CTRL K_BKQUOTE ] > context use(GraveAbove)
any(BaseVowels) > index(Grave, 1)
any(Grave) > index(DblGrave, 1)
Doing the same code with [ CTRL ‘`’] sometimes works. Or maybe only for short periods of time? I’ll come back to the code, and none of it will work until I change it back. Or it just doesn’t work right from the start.
It’s weird enough that I’m thinking it’s probably my computer. I know my shift key has issues, so maybe it sends messed up signals?
Virtual character keys will work only when a mnemonic layout is enabled (
store(&mnemoniclayout) '1'). It’s hard to say what the problem would be otherwise – perhaps you could send the whole keyboard to us to test along with some sequences that don’t work?
Here it is. The thing is a mess though. I’m relearning how to code after a decade away, and only cleaning up the mess when I figure something out.
There’s about 60 virtual keys. All of them stop working if I change the ‘K_’ name. They work again when I change it back. I’ll get my husband to test if the same thing happens on his computer when he gets home tonight.
Edit: Thanks for updating to allow attachments!
IPAWriteAnything.kmn (20.5 KB)
IPAWriteAnything.kmn (20.5 KB)
Does this forum support attachments?
I’ve updated this site to handle Keyman files of
.kmp extensions, so try using the “Upload” button again. Let us know if you still run into issues.
I’m back on deck after some international travel. The Keyman Developer debugger is not currently working with mnemonic layouts. However, I made the change to:
+ [CTRL ','] > context use(HookAbove)
Then I installed the keyboard and it worked fine in Keyman Desktop, e.g. in Notepad, Word and other apps.
Thank you very much!
So I’ll finish the program and then change the virtual keys before compiling. That works!