kiibohd / kll

KLL Compiler
GNU General Public License v3.0
115 stars 67 forks source link

Layer control USB Codes (eg U"Lock1") cause compilation error if not assigned to U"Latch/Lock/FunctionX" trigger #18

Closed ganthern closed 7 years ago

ganthern commented 7 years ago

Greetings,

I'm having an issue that's preventing me from changing and recompiling my layout for my Ergodox Infinity from the drop earlier this year. The kll compiler is refusing to translate my layer control key assignments even though I'm adding the lcdFuncMap to every map that uses them.

I think I tracked down when this happens. When re-cloning the controller repository and using the unchanged ergodox.bash to compile the firmware (cygwin gcc build), everything goes smoothly. But when I change

# Top-Middle Row - Left
U"Function1" : U"Lock1";

to

# Top-Middle Row - Left
U"T" : U"Lock1";

or

U"D" : U"Latch1";

or

U"A" : U"Function1";

in mdergo1Overlay.kll I get

ERROR: 'HID(USBCode)"KEY_LCK1"' Invalid USB HID code, missing FuncMap layout (e.g. stdFuncMap, lcdFuncMap)

or equivalent from the kll compiler and therefore fail to proceed with the firmware compilation.

The issue disappears when I assign the Layer Lock/Latch/Function to a key that has already been assigned any layer control USB Code in the scancode_map. Changing the soft assignments (::) in lcdFuncMap to normal assignments (:) doesn't make a difference.

I'm not 100% sure this isn't intended behaviour, but it seems to have emerged between february and now and it's made it difficult to create layouts without changing the scancode map.

d-mart commented 7 years ago

I'm having this issue too and no longer able to (re-)compile my existing layout. Thanks for distilling it.

edit: looks like is known breakage currently, e.g.: https://github.com/kiibohd/controller/issues/204

haata commented 7 years ago

This should be fixed now. Lots of code, and a bunch more unit tests though :D