Closed robinmoussu closed 5 months ago
Iām afraid kalamine does not handle spaces outside of the spacebar, as mentioned in the User Guide.
I really donāt know how this should be supported. Using non-visible characters such as no-break spaces in the ASCII art description would be weird and very error-prone. Maybe an explicit definition with an escape char could make sense, e.g. \s
for space, \t
for tabā¦ but IDK what one-char identifier could be used for nbsp and nnbsp.
Closing as a duplicate of #31.
Hmm, on second thoughtā¦ re-opening, but only for the double-identifier bug that occurs whenever a character is included more than once on the base layer.
(FTR, as your title was focusing on space characters, I kinda missed the point. Renaming.)
The is not a dup of #31, but thatās my fault I did a typo in the explanation, and discovered that the bug was more important than I initially thought after creating the title.
It does affect all symbols that are present at least two times in layer alpha, shift and altgr, not just space-related characters. I did not checked all layers combination, but Iām confident that they all causes issues. The only ālayerā that doesnāt causes issue is having dupplicate symbols in the 1typo layer.
I edited the original message to fix the typo. I did remap the [S] key to A
. So that both [A] and [S] are mapped to the A
key
Off-topic: And btw for (narrow) non-breaking space I did use the utf8 symbols in the source toml. It it parsed correctly, but indeed you need a visual clue in your text editor otherwise itās confusing.
@fabi1cazenave fabi1cazenave changed the title Fix support for mapping a symbol multiple times in alpha, shift and altgr layer [keylayout] conflicting IDs when a character is included twice in the same layer
Itās not only in the same layer, but any duplicates between any of alpha, shift, altgr and altgr+shift (1typo is not affected)
Well, for Lafayette and Ergo-L, all programming symbols are included twiceāÆ: once in the alpha layer, once in the AltGr layer. But thereās no conflict AFAIK.
So I think the current description is correct. It might be incomplete but I need to investigate a bit on this before I can refine it. Incomplete is better than incorrect, imho.
I realize that to have issue, you need to have:
Currently itās not possible to have 1typo symbol in altgr, so it is immune to this bug but it would if we add support to it.
I did a test where I modified the key at the right of [P] to have 1
in shift, and a symbol in 1typo. As you can see, two block with the same id are generated.
ergol-dupplicate.toml.txt ergol-dupplicate.keylayout.txt ergol-dupplicate.keylayout.expected.txt
Currently itās not possible to have 1typo symbol in altgr, so it is immune to this bug but it would if we add support to it.
Are you saying this bug is invalidāÆ?
Iām afraid I donāt understand your bug report. But if it involves an unsupported feature, well, thereās nothing to report.
Are you saying this bug is invalidāÆ?
It cannot be exibited with altgr because 1dk+altgr is not valid currently
If you have the same symbol in one key that also have an 1dk for the same layer, and in another key that also have an associated 1dk layer, you get two "action" section with the same id.
What I did: map "shift + [P]" to 1
, and map "1dk + shif + [P]" to any symbol (note: 1
is also available in 1
, and that key as also a mapping on 1dk + alpha
What I got: two "action" section with the same id (the one for the alpha / 1dk+alpha of [1] and the one for shift / 1dk+shift of [P])
What I expected: two "action" section with different id.
We have had exactly this case with Erglace 0.1 or 0.2 layoutsāÆ: the Qwerty "-" key, outside of the 3x10 block, had a perfect copy in the layout in the 3x10. Please note that only one of both keys had a 1dk layer defined. It was enough to have the bug, because it was on the same layer. So we had a double "-" action generated. https://github.com/Lysquid/Erglace/blob/2711ac803b6894869db5f65f09ea7f9b8e703bfc/layouts/erglace.toml
Precisely, we had:
action
, even if only one needed it and the other should have been a simple output
,Number 1 is an old bug, confirmed in Kalamine 0.25. Number 2 was introduced between Kalamine 0.25 and 0.29.
Iām working on it. I hope to have some time today, otherwise I will probably complete it next week.
Stealing, as we really need to move on. Looks rather straight-forward, the hard part being to test without having a Mac. :-)
Ping me when you are done, I should have time to test it
I took ergol.toml, modified the name8 to "double-identifier", replaced the "-" on the alpha layer by an unbreakable space and "," by a narrow unbreakable space, and "S" by "A" (so that we have two
A
key, what are you going to do š)In dist/double-identifier.toml, I get 2 sections with id "x00a0" (unbreakable space), 2 sections with id "202f" (narrow unbreakable space), and two section with id "a" which is incorrect.
I would suggest to use the layer + keycode as action id, like "alpha-0" for "a" in layer alpha, "shift-0" for "S", "altgr-18" for the symbol in altgr in the first key on the number row, "shift-space"ā¦
double-identifier.toml.txt double-identifier.keylayout.txt