Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Setting a combination result #12

Closed
ckaros opened this issue Oct 3, 2016 · 5 comments
Closed

Setting a combination result #12

ckaros opened this issue Oct 3, 2016 · 5 comments

Comments

@ckaros
Copy link

ckaros commented Oct 3, 2016

Is there a way to set a combination result to be USB code along with a capability function? I want to trigger a layer lock and turn off leds when pressing the key, but I get an error when compiling the following line:

U"MINUS" : U"LCK5" + ledControl(5,0,0)

@haata
Copy link
Member

haata commented Oct 4, 2016

Hmm, that looks valid (minus the missing semicolon at the end).
Would you mind posting your kll file here?

@ckaros
Copy link
Author

ckaros commented Oct 4, 2016

Below is the error text I get as well is the problem KLL file

Scanning dependencies of target kiibohd.elf
â 7%ê Building C object CMakeFiles/kiibohd.elf.dir/main.c.obj
â 11%ê Building C object CMakeFiles/kiibohd.elf.dir/Lib/mk20dx.c.obj
â 15%ê Building C object CMakeFiles/kiibohd.elf.dir/Lib/delay.c.obj
â 19%ê Building C object CMakeFiles/kiibohd.elf.dir/Scan/ISSILed/led_scan.c.obj
â 23%ê Building C object CMakeFiles/kiibohd.elf.dir/Scan/MatrixARM/matrix_scan.c.obj
â 26%ê Building C object CMakeFiles/kiibohd.elf.dir/Scan/STLcd/lcd_scan.c.obj
â 30%ê Building C object CMakeFiles/kiibohd.elf.dir/Scan/UARTConnect/connect_scan.c.obj
â 34%ê Building C object CMakeFiles/kiibohd.elf.dir/Scan/Infinity_Ergodox/scan_loop.c.obj
â 38%ê Building C object CMakeFiles/kiibohd.elf.dir/Macro/PartialMap/macro.c.obj
In file included from /Users/dean/Desktop/kiibo/controller-master/Macro/PartialMap/macro.c:30:0:
/Users/dean/Desktop/kiibo/controller-master/Keyboards/left.gcc/generatedKeymap.h:234:27: error: 'KEY_LCK5' undeclared here (not in a function)
Guide_RM( 59 ) = é 2, 15, KEY_LCK5, 2, 5, 0, 0, 0, 0 è;
î
makeâ2ê: *** âCMakeFiles/kiibohd.elf.dir/Macro/PartialMap/macro.c.objê Error 1
makeâ1ê: *** âCMakeFiles/kiibohd.elf.dir/allê Error 2
make: *** âallê Error 2
Error in make. Exiting...

Name = "MDErgo1";
Layout = "Default";
Base = "Blank";
Version = "0.1";
Author = "ckaros;
KLL = "0.3d";
Date = "2015-09-12";
Generator = "KIICONF 0.2";

U"ESC" : U"6";
U"5" : U"5";
U"4" : U"4";
U"3" : U"3";
U"2" : U"2";
U"1" : U"1";
U"EQUALS" : U"ESCAPE";
U"FUNCTION1" : U"LCK1";
U"T" : U"T";
U"R" : U"R";
U"E" : U"E";
U"W" : U"W";
U"Q" : U"Q";
U"BACKSLASH" : U"TAB";
U"G" : U"G";
U"F" : U"F";
U"D" : U"D";
U"S" : U"S";
U"A" : U"A";
U"TAB" : U"CAPSLOCK";
U"LALT" : U"LALT";
U"LCTRL" : U"LGUI";
U"FUNCTION2" : U"FUN1";
U"B" : U"B";
U"V" : U"V";
U"C" : U"C";
U"X" : U"X"; U"Z" : U"Z";
U"LSHIFT" : U"LSHIFT";
U"HOME" : U"HOME";
U"END" : U"END";
U"DELETE" : U"DELETE";
U"BACKSPACE" : U"SPACE";
U"FUNCTION5" : U"RIGHT";
U"FUNCTION4" : U"BACKSLASH";
U"FUNCTION3" : U"BACKTICK";
U"BACKTICK" : U"LALT";
U"LGUI" : U"LCTRL";
U"FUNCTION6" : U"7";
U"6" : U"8";
U"7" : U"9";
U"8" : U"0";
U"9" : U"MINUS";
U"0" : U"EQUALS";
U"MINUS" : U"LCK5" + ledControl( 5, 0, 0 );
U"LBRACE" : U"LBRACE";
U"Y" : U"Y";
U"U" : U"U";
U"I" : U"I";
U"O" : U"O";
U"P" : U"P";
U"RBRACE" : U"RBRACE";
U"H" : U"H";
U"J" : U"J";
U"K" : U"K";
U"L" : U"L";
U"SEMICOLON" : U"SEMICOLON";
U"QUOTE" : U"QUOTE";
U"RALT" : U"RALT";
U"RCTRL" : U"RCTRL";
U"FUNCTION7" : U"FUN1";
U"N" : U"N";
U"M" : U"M";
U"COMMA" : U"COMMA";
U"PERIOD" : U"PERIOD";
U"SLASH" : U"SLASH";
U"RSHIFT" : U"RSHIFT";
U"PAGEUP" : U"PAGEUP";
U"PAGEDOWN" : U"PAGEDOWN";
U"ENTER" : U"ENTER";
U"SPACE" : U"BACKSPACE";
U"LEFT" : U"LEFT";
U"DOWN" : U"DOWN";
U"UP" : U"UP";
U"RIGHT" : U"RIGHT";
U"RGUI" : U"LCK2";

@haata
Copy link
Member

haata commented Oct 4, 2016

It doesn't like the U"KEY_LCK5" is this something you've defined elsewhere? Because it isn't a standard name.

Do you mean U"LOCK5" instead? layerLock(5) would also work.

@ckaros
Copy link
Author

ckaros commented Oct 4, 2016

I kind of learned that notation from reading output kll files from the configuration. I replaced it with layerLock(5) and it works.

This is kind of weird, because U"LCK5" works fine when I don't have the LED function after it.

It also continued with the error if I input U"Lock5". only works with the explicit layerLock(5) text.

Thanks for the tip.

@haata
Copy link
Member

haata commented Oct 4, 2016

If you want to use the U"Lock5" you have to include stdFuncMap.kll or lcdFuncMap.kll in that layer (it does a symbolic replacement).

https://github.com/kiibohd/kll/blob/master/layouts/lcdFuncMap.kll

@haata haata closed this as completed Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants