Closed robinmoussu closed 8 months ago
I’m not sure whether I should pick this issue or not. Maybe you’re already working on it @robinmoussu ?
As per the task list, I suggest to move out of this issue all items that are not specific to macOS :
1dk
+AltGr
is not supported {and likely difficult to implement on Linux)special keys like arrows, page up/down, Enter, Tab, are not supported either (see #31)
If you think these would be valuable features, please open specific issues (one for each).
FTR, your YAML altgr
layer specification is incorrect.
You wrote this:
altgr: |
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
┆ ┃ 1 │ 2 │ 3 │ 4 │ 5 ┃ 6 │ 7 │ 8 │ 9 │ 0 ┃ ┆ ┆
┆ ┃ 1 │ 2 │ 3 │ 4 │ 5 ┃ 6 │ 7 │ 8 │ 9 │ 0 ┃ ┆ ┆
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ pgup│ret │ up │ del │ pgd ┃ │ 7 │ 8 │ 9 │ ┃ ┆ ┆
· ┃ @ │ [ « │ ] » │ $ € │ % ‰ ┃ ^ │ & │ " │ ' │ ` ┃ ┆ ┆
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ org │ left│down │right│ end ┃ │ 4 │ 5 │ 6 │ ┃ ┆ ┆
· ┃ { │ ( │ ) │ } │ _ ┃ | │ + ± │ - − │ * × │ ! ¬ ┃ ┆ ┆
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
┆ ┃ │ tab │ │enter│ ┃ │ 1 │ 2 │ 3 │ ┃ ·
┆ ┃ ~ „ │ < “ │ > ” │ = ≠ │ # ° ┃ \ │ / ÷ │ ; │ : │ ? ┃ ·
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
But kalamine expects symbols to be defined in the lower-right corner, like this:
altgr: |
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
┆ ┃ │ │ │ │ ┃ │ │ │ │ ┃ ┆ ┆
┆ ┃ │ │ │ │ ┃ │ │ │ │ ┃ ┆ ┆
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ │ │ │ │ ┃ │ 7 │ 8 │ 9 │ ┃ ┆ ┆
· ┃ @ │ [ │ ] │ $ │ % ┃ ^ │ & │ " │ ' │ ` ┃ ┆ ┆
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ │ │ │ │ ┃ │ 4 │ 5 │ 6 │ ┃ ┆ ┆
· ┃ { │ ( │ ) │ } │ _ ┃ | │ + │ - │ * │ ! ┃ ┆ ┆
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
┆ ┃ │ │ │ │ ┃ │ 1 │ 2 │ 3 │ ┃ ·
┆ ┃ ~ │ < │ > │ = │ # ┃ \ │ / │ ; │ : │ ? ┃ ·
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
The Lafayette and Ergo-L projects should be good templates for such YAML/TOML descriptors, where both the 1dk
and altgr
layers are wanted. And as they’re only using what Kalamine supports, they would be much better test files to improve the macOS support.
Please consider generating one of these two layouts and fixing the resulting *.keylayout
file to help me fix these macOS-specific issues.
In fact, before considering that a bug is macOS-specific, it would be very helpful to start testing your YAML/TOML layout descrptor with kalamine --watch
. In your case:
kalamine --watch bmp.yaml
I can see using kalamine --watch
that no altgr
layer has been defined, which explains why there’s no ASCII art for it in the *.keylayout
file. Which means it is not a macOS issue.
[EDIT] And using a proper altgr
description, e.g. taking the one from the Ergo-L project, works fine and does produce a valid ASCII art in the *.keylayout
file. [/EDIT]
However, Shift+.
and Shift+,
do produce :
and ;
, in the *.keylayout
file though it works as expected in kalamine --watch
, so we do have a macOS-specific issue here.
So… after a few tests, I think the only macOS-specific issue we have here is related to the Shift
layer, which is sometimes incorrect. In your example :
.
should make a .
, not a :
1dk
Shift+[Q] should make an À
, not an æ
I think all other items are either related to unsupported features or to mistakes in your YAML file. Do you agree ?
I’ve just realized that these wrong behaviors for the Shift layer are related to the dead keys in the 1dk
layer. In other words, without dead keys in the 1dk
layer (which is not supported at the moment but happens to work on Linux), everything works fine.
Help wanted, as I still don’t have any Mac. Seeing some improvement supporting dead keys in the 1dk
layer would be nice to have, as we’re considering it for a very specific use case in Lafayette42 and Ergo-L.
I see new issues related to #55 keep being created, so closing all of them as duplicates now.
I’m listing here all the issue that i found so far when trying to generate the bmp disposition which seems to be a good stress test !
I’m using kalamine 0.18, from the latest master.
(note: github doesn’t like .yaml and .keylayout files, so I added the suffix .txt, like in the early 00’ :yeah:)
bmp.keylayout.actual.txt bmp.keylayout.expected.txt bmp.yaml.txt
By order of apparition of the issue in the file:
(note: I’ve noticed that my expected file, while totally functional as-it (it’s the one I’m using currently) as a few defect, like using "http" instead of "https" in the reference link, or a few unneeded things related to the modifier map index, so kalamine is not expected to generate a bit perfect copy of bmp.keylayout.expected)
.
(dot) is mapped both in alpha and shift+alpha layer, then kalamine replace its shift+alpha version by:
(colon)x0020
instead ofspace
(it’s technically not an issue, they are equivalent but it’s surprising)æ
instead ofÂ
on [q] for example)