How to use options.htm?
Where to include to “options.htm”? It is not possible to include this file in kmn.
Also, should we initialize these stores in kmn? in this example “option_order” and “option_zwsp”
c in kmn
@mayura , I was just experimenting with options this evening and have half an answer. In Keyman Developer, the options.htm can be added under the “Files” section of the .kps file for the keyboard.
Once the package (not just keyboard) is compiled and installed, go into “Configuration…” under the Keyman taskbar menu, scroll to find your keyboard, and a blue hypertext for “Keyboard options” will appear at the top of the section for your keyboard. I didn’t see it until I restarted Keyman Destop -it may have been there initially and I hadn’t noticed.
When I select a custom option and click “Ok” I then get a Keyman exception and the dialog to send a report to keyman appears. So I’m looking into this now to see if I have bad HTML.
I did search my local clone of the git repository for an “options.htm” file to review an example of a complete project using options, but couldn’t find one. Are there any examples available?
Thanks for the quick response @dyacob. Yes, you’ve got the details right on how to use options.htm. In terms of the error, I’ll add it to our beta review list for resolution.
At present options.htm is supported only on Windows. We’d like to bring this feature into parity on the other platforms in a future version of Keyman, and improve the way the options are integrated. Currently, they are a little more complex than most keyboard developers would prefer and so they are not widely used.
We do have an example version of EuroLatin that has an options dialog. It’s not yet in the public repo so I’ve put it on my Google Drive at https://drive.google.com/file/d/10bsZI2rBPE8n2AuW1YavF42cRV29K13u/view?usp=sharing
@Marc, thank you for the example project, it answers @mayura’s 2nd question on the need to initialize stores used in the options form -appears to be “yes” as seen on line 22 of european2.kmn.
I encountered the same exception with example project using Keyman Developer 10.0.961.0. I’ll put developing with options on hold, please add a note to this thread when the issue is resolved in a new build.
Thanks @dyacob, can you verify that the same exception occurs with the latest beta version of Desktop and Developer (10.0.961.0 is quite old)? https://keyman.com/beta/ If it does, I’ll create an issue at https://github.com/keymanapp/keyman/issues
Good Morning, I’ve tried with the latest beta (1061) from the website and unfortunately the issue remains. I rebuilt both my own custom options.htm as well as the european2 keyboard.
The new beta does better conformance checking (nice!) and I had to update the european2.kmn (header section) to get it to compile. I’ve placed my modifications in the archive here: