Open ermshiperete opened 4 years ago
The way I'd like to solve this is to use the mnemonic layout recompiler (mcompile) to build positional versions of a mnemonic keyboard. mcompile takes a mnemonic layout and combines it with a Windows base layout to produce a positional layout that should work unmodified on other platforms. We then ensure that the other platforms always treat the base layout as US (with a couple of minor tweaks around modifiers and additional keys not on a US keyboard) so that positional layouts always work consistently.
Note that the Windows core itself is positional now, because mcompile does the hard work.
Right now, mcompile has a dependency on Windows for parsing the base layout, but I think we can build a table of base layouts into mcompile, and once we have that then mcompile itself should be very cross-platform.
The same approach applies for mac (won't open an issue on this just now)
So mcompile
gets executed when the keyboard gets installed? And as base layout the default (or first) keyboard/language is used. What happens when the user sets a different default?
On Windows, yes, mcompile
runs when the keyboard is installed. The base layout by default is the first Latin-script Windows keyboard on the system (the user's default keyboard is first keyboard). The user can change the base layout in Keyman Configuration, which then triggers a re-run of mcompile. Keyman on Windows stores each mrecompiled keyboard along with the original in the keyboard folder:
Note that the -d
alternative treats 'deadkeys as plain keys'. Keyman uses this keyboard internally if that option is selected in Configuration.
Hmm, implementing an option to select the base keyboard in km-config might be a quicker way to support mnemonic keyboards on Linux.
No, not really. Without a way of knowing if it's a positional or a mnemonic keyboard this would break positional keyboards. Or does it? Need to test...
Hmm, implementing an option to select the base keyboard in km-config might be a quicker way to support mnemonic keyboards on Linux.
Mnemonic keyboards will not work correctly without mcompile. The algorithm for mnemonic layouts is not straightforward to implement, because it's based on matching character output rather than key codes, and there are a bunch of nuances around modifier keys and dead keys. I don't think we want to pursue an implementation that doesn't make use of mcompile.
No, not really. Without a way of knowing if it's a positional or a mnemonic keyboard this would break positional keyboards. Or does it? Need to test...
A .kmx file has a &mnemoniclayout
flag.
There are some ibus-keyman integration tests that should be enabled (in linux/ibus-keyman/tests/testfixture.cpp
) once mnemonic keyboards are supported on Linux:
026 - system stores.kmn
027 - system stores 2.kmn
bumped to 18.0/Future since comparing/testing resulting files and deadkeys need to be done.
closed this issue since it is solved in PR #11334
closed this issue since it is solved in PR #11334
Unfortunately, the tool is finished but the integration is not yet. So we should keep this issue open until the integration is done!
Currently Linux doesn't properly support mnemonic keyboards - a US-English keyboard base layout is always assumed. see #8972, #8973, #8974, #8975, #8977, #8978, #8979