Skip to content
New issue

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

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

Already on GitHub? # to your account

Automatically determine best alignment for combos #8

Open
infused-kim opened this issue Mar 2, 2023 · 1 comment
Open

Automatically determine best alignment for combos #8

infused-kim opened this issue Mar 2, 2023 · 1 comment

Comments

@infused-kim
Copy link

Currently, the alignment for all combos seems to be middle, but for combos that span three keys horizontally or vertically, this ends up covering other keys.

A top or left/right default alignment for those combos would be better.

Here is an image as an example:
Screenshot 2023-03-02 at 14 14 57

@caksoylar
Copy link
Owner

caksoylar commented Mar 2, 2023

This has been something on my mind but I hadn't committed to handling these. Of course it's hard to get it perfect but we can add some heuristics to improve the default parse output. I can think of some rules like:

  • Equal horizontal coordinates for keys, more than one key gap: align: left or align: right depending on whether combo position is left or right of midpoint of layout
  • Equal vertical coordinates for keys, more than one key gap: align: top or align: bottom depending on whether combo position is higher or lower than midpoint of layout

However this is hard to do during parsing since we don't know about the physical layout at this point. This logic might need to be moved to drawing and override mid specification when it is not explicitly specified. We already do something similar for dendron field.

Then there is also the issue of combo boxes overlapping with other elements like the hold specs that sartak brought up here: #3 (comment) Unfortunately that is much harder to fix since it requires rethinking the drawing code so that keys/combos are not all independently drawn.

@caksoylar caksoylar changed the title Change default alignment for combos spanning three keys Automatically determine best alignment for combos Mar 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants