Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid lafayette.keylayout built with Kalamine (duplicate XML elements) (macOS) #121

Open
iovantsaous opened this issue Mar 29, 2024 · 0 comments

Comments

@iovantsaous
Copy link

iovantsaous commented Mar 29, 2024

I run Debian 12 at home. I first installed pipx, then Kalamine 0.36.

I downloaded Qwerty Lafayette v0.9 https://qwerty-lafayette.org/layouts/lafayette.toml

I built lafayette.toml with Kalamine and began to use with Debian : it worked fine.

Then, I tried to install the dist/lafayette.keylayout file at the office, on a very old macOS (Mojave 10.14).

I know how to install a *.keylayout file in ~/Library/Keyboard\ Layouts, as I've done it a couple of times before, but this time it didn't worked – the layout didn't showed up in Preferences > Keyboard > Input Sources (or Préférences > Clavier > Méthodes de saisie as the locale is French).

Looking at the lafayette.keylayout file (attached to this issue as lafayette.keylayout.txt ), I found two duplicate blocks of XML elements :

The first one at lines 1252-1259, the second one at lines 1268-1275 :

$ nl -b a lafayette.keylayout  | sed -n '1252,1259p;1268,1275p' 
  1252	    <action id="ab08_;">
  1253	      <when state="none"       output=";" />
  1254	      <when state="1dk"        output="•" />
  1255	    </action>
  1256	    <action id="ab08_;">
  1257	      <when state="none"       output=";" />
  1258	      <when state="1dk"        output="•" />
  1259	    </action>
  1268	    <action id="ab10_?">
  1269	      <when state="none"       output="?" />
  1270	      <when state="1dk"        output="¿" />
  1271	    </action>
  1272	    <action id="ab10_?">
  1273	      <when state="none"       output="?" />
  1274	      <when state="1dk"        output="¿" />
  1275	    </action>

I deleted the duplicate blocks. The layout then appeared in Input Sources and I was able to use it (as a proof : I’ve written some paragraphs of this message with Lafayette).

I don't know whether the issue comes from Qwerty Lafayette or from Kalamine (I tried to look at the Kalamine code, but I have no programming skills). But for testing purpose I built two other layouts :

I could install Ergol, but not lafayette101.keylayout. There was another duplicate block :

 752     <action id="ae01_!">
 753       <when state="none"       output="!" />
 754       <when state="1dk"        output="¡" />
 755     </action>

So I deleted the duplicata XML element and the layout showed up in Input sources.

For information, the prebuilt layout for Lafayette v0.8, downloaded from https://qwerty-lafayette.org/releases/lafayette_macos_v0.8.keylayout, works fine on macOS 10.14.

@iovantsaous iovantsaous changed the title invalid lafayette.keylayout built with Kalamine (duplicate XML elements) invalid lafayette.keylayout built with Kalamine (duplicate XML elements) (macOS) Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant