kalamine icon indicating copy to clipboard operation
kalamine copied to clipboard

Handle and document all geometries from YAML

Open glostis opened this issue 10 months ago • 0 comments

Hi,

Many thanks for this great project!

I had been maintaining my custom XKB symbols by hand until now, I'm grateful that I can now rely on a tool that translates a human-readable format into XKB.

This PR exposes in the CLI help the list of available geometries. The help now looks like this:

$ python -m kalamine.cli new --help
Usage: python -m kalamine.cli new [OPTIONS] OUTPUT_FILE

  Create a new TOML layout description.

Options:
  --geometry [ANSI|ISO|ABNT|JIS|ALT|ERGO]
                                  Specify keyboard geometry (defaults to ISO).
  --altgr / --no-altgr            Set an AltGr layer (defaults to --no-altgr).
  --1dk / --no-1dk                Set a custom dead key (defaults to
                                  --no-1dk).
  --help                          Show this message and exit.

Also, before the PR, if you passed a geometry such as JIS, it was silently ignored and changed to ISO. The input geometry is now checked against the same list of geometries implemented in the YAML, and so all declared geometries are effectively supported.

Finally, the PR includes a minor altgtaltgr fix.

glostis avatar Apr 18 '24 12:04 glostis