Giter Site home page Giter Site logo

kll's Introduction

kll - keyboard layout language

GitHub Action Status PyPI version Total alerts Language grade: Python

Visit our IRC channel

Visit our Discord Channel

If you're trying to compile keyboard firmware, you want THIS

KLL Compiler

Most current version of the KLL Spec.

Uses funcparserlib

Dependencies

Dependencies can be installed manually, or by using a pipenv.

pipenv install
pipenv run kll/kll --version

or

pip install layouts

Usage

General Usage

kll <kll files>

Kiibohd Controller Usage

kll <misc kll files> --config <config/capability kll files> --base <basemap kll files) --default <default layer kll files> --partial <partial layer 1 kll files> --partial <partial layer 2 kll files>

See kll --help for the most up to date documentation

Unit Tests

Unit tests can be found in the tests directory. They are run by Travis-CI, but can be useful when testing your own changes.

Remember to add new tests when adding new features/changes.

Code Organization

  • kll/common - Main portion of KLL compiler.
  • kll/emitters - Various output formats of the KLL compiler.
  • kll/examples - Example kll files, often used for test cases.
  • kll/extern - External libraries, copied into git repo for convenience.
  • kll/layouts - Layout kll files used for various keyboards and tests.
  • kll/templates - Templates used by emitters when generating output.
  • tests - Unit tests for the KLL compiler.

Patches/Features/Backends

Completely welcome :D

kll's People

Contributors

cryham avatar haata avatar joonasmelin avatar mcm avatar nazar-pc avatar smasher816 avatar terminalman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kll's Issues

LaunchButtonConfigTool, ProgrammableButtonConfig and ConsumerControlConfig do not want to compile

I have 2 lines in kll v0.3d file:

U"F4"  : CONS"EmailReader";
U"F5"  : CONS"ConsumerControlConfig";

The first line compiles and works properly, however, seconds gives me an error during compilation:

-- Compiler Family:
arm
-- Compiler Selected:
gcc
-- Chip Selected:
mk20dx256
-- Chip Family:
mk20dx
-- CPU Selected:
cortex-m4
-- Compiler Source Files:
Lib/mk20dx.c;Lib/delay.c
-- Bootloader Type:
Teensy
-- Detected Scan Module Source Files:
Scan/MatrixARM/matrix_scan.c;Scan/Rapoo_E9070/scan_loop.c
-- Detected Macro Module Source Files:
Macro/PartialMap/macro.c;Macro/PartialMap/result.c;Macro/PartialMap/trigger.c
-- Detected Output Module Source Files:
Output/pjrcUSB/output_com.c;Output/pjrcUSB/arm/usb_desc.c;Output/pjrcUSB/arm/usb_dev.c;Output/pjrcUSB/arm/usb_joystick.c;Output/pjrcUSB/arm/usb_keyboard.c;Output/pjrcUSB/arm/usb_mem.c;Output/pjrcUSB/arm/usb_mouse.c;Output/pjrcUSB/arm/usb_rawio.c;Output/pjrcUSB/arm/usb_serial.c
-- Detected Debug Module Source Files:
Debug/cli/cli.c;Debug/led/led.c;Debug/print/print.c
-- Detected Layout Files:
/sources/Scan/MatrixARM/capabilities.kll
/sources/Macro/PartialMap/capabilities.kll
/sources/Output/pjrcUSB/capabilities.kll
/sources/Scan/Rapoo_E9070/scancode_map.kll
/sources/kll/layouts/stdFuncMap.kll
/sources/kll/layouts/Rapoo_E9070_Fn.kll
-- Configuring done
-- Generating done
-- Build files have been written to: /sources/Keyboards/Rapoo_E9070.gcc
[  4%] Generating KLL Layout
ERROR: 'CONSUMERCONTROLCONFIG' is an invalid USB HID Code Lookup...
Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 348, in _some
    raise NoParseError('got unexpected token', s, t)
funcparserlib.parser.NoParseError: got unexpected token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../../kll/kll.py", line 721, in processKLLFile
    tree = parse( tokenSequence )
  File "../../kll/kll.py", line 707, in parse
    return kll_file.parse( tokenSequence )
  File "/sources/kll/funcparserlib/parser.py", line 146, in parse
    (tree, _) = self.run(tokens, State())
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 318, in _many
    (v, s) = p.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 183, in _add
    (v2, s3) = other.run(tokens, s2)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 182, in _add
    (v1, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 204, in _or
    return self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 206, in _or
    return other.run(tokens, State(s.pos, e.state.max))
  File "/sources/kll/funcparserlib/parser.py", line 224, in _shift
    (v, s2) = self.run(tokens, s)
  File "/sources/kll/funcparserlib/parser.py", line 225, in _shift
    return f(v), s2
  File "../../kll/kll.py", line 248, in make_consCode
    return make_hidCode( 'ConsCode', token )
  File "../../kll/kll.py", line 215, in make_hidCode
    hidCode = kll_hid_lookup_dictionary[ type ][ token[1:-1].upper() ][1]
KeyError: 'CONSUMERCONTROLCONFIG'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../../kll/kll.py", line 797, in <module>
    processKLLFile( filename )
  File "../../kll/kll.py", line 724, in processKLLFile
    if err.token.value != '<=':
AttributeError: 'KeyError' object has no attribute 'token'
CMakeFiles/kiibohd.elf.dir/build.make:66: recipe for target 'generatedKeymap.h' failed
make[2]: *** [generatedKeymap.h] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/kiibohd.elf.dir/all' failed
make[1]: *** [CMakeFiles/kiibohd.elf.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Error in make. Exiting...

State scheduling

Hi,
I don't know if this is really an issue, but I can't manage to get state scheduling to work. I would love to have dual function keys, like on my Ergodox EZ, where left shift is shift when hold, but when tapped, it's "(". However, I just can't get this to work.
I can reassign left shift like to the following:
U"LSHIFT" : U"LSHIFT"(H), U"9", U"LSHIFT"(R);
Which enters a "(" when pressed, but shift doesn't work anymore.
U"LSHIFT"(UP) : U"LSHIFT"(H), U"9", U"LSHIFT"(R);
or
U"LSHIFT"(UR) : U"LSHIFT"(H), U"9", U"LSHIFT"(R);
Doesn't work, now shift stays shift, also when tapped.
Is this feature just not yet implemented? Or am I using it incorrectly?
Any help with this issue is much appreciated!

Defining triggers with keys that are *not* pressed

Is this possible? There doesn't seem to be anything in the documentation indicating that it is.

I'm trying to implement a key that is ), but > when shift is held (similar to how ] and } behave. I tried something like:

U"FUNCTION7" : ')';
U"RShift" + U"FUNCTION7" : '>';

That almost works. The problem is that the shifted form matches both, so it outputs )> rather than just >.

Is there any way to accomplish this currently? I've got this working via ControllerMate, but I'd love to make it native to my board.

Clarify the difference between rectangle and point addressing

As an example, I was using the following to experiment with setting a block of pixels, but it didn't seem to do anything:

A[exp] <= start, loops:1, pfunc:interp;
A[exp, 1] <= P[c:0%,r:0%](255, 0, 255), P[c:20%,r:20%](255, 0, 255);

CC @haata (Since it doesn't look like I can directly assign issues)

Cannot use Consumer Control "Mute", "ScanPreviousTrack", and "ScanNextTrack"

U"D"         : CONS"SCANPREVIOUSTRACK";
U"F"         : CONS0x0CD;
U"G"         : CONS"ScanNextTrack";
  • OS:

Mac OS X El Capitan 10.11.6, KLL compilation in Arch Linux Docker container from kiibohd/firmware project

  • Version:
    KLL v0.5c

  • Reproduction Steps:

  1. Add one of the aforementioned Consumer Control Codes (CONS) to your KLL file.

  2. Attempt to compile for the Ergodox Infinity.

  3. Compilation fails for SOME named CONS, but not for others.

    Confirmed working:

    • Mute
    • VolumeDown
    • VolumeUp
    • Hex/Decimal coded CONS (eg CONS0x0CD for PausePlay)

    Confirmed Not Working:

    • ScanPreviousTrack
    • ScanNextTrack
    • PausePlay

Additionally, attempting to use CON instead of CONS (as indicated by this document) results in complete failures.

  • Resulting Issue:
    Attempting to use some consumer control codes results in failure of compilation. Hexadecimal/Decimal variants of said consumer control codes compile and work fine

Some Keybindings do not work ( possibly Layer dependent )

The problem appears with the commit: 05af940

Some keybinds appear to be ignored by the kll script.

U"DOWN" : U"PAGEDOWN" works, whereas
U"UP" : U"PAGEUP" doesn't work.

This problem existed in an earlier commit as well iirc. The problem is solved by checking out the previous commit: bac49ca

edit:
The problem is not commit related. I noticed this because while trying to reproduce a non working and a working generatedKeymap.kll, the board didn't work with the bac49ca compile.

I then tried to compile+flash with the latest release a few times, and the 3rd attempt resulted in a success. Make out of this what you want

http://dpaste.com//1ZX37Q6
Working: http://dpaste.com//3X5N7V2
Not working: http://dpaste.com//1ZX37Q

Trigger combinations on K-Type not functioning

Simple snippet using 0.1.0 configurator:

U["Esc"] + U["A"] : U["Ctrl"] + U["A"];

Not working for me, nor are other trigger combinations working. Result combinations are working for me.

dual role keys?

Apologies if this is covered somewhere, I can't find an example of it in any of the example klls or the spec document.

How can one create a dual role key with kll?

I would like to make backspace and space behave like shift when held, and ctrl and alt to send escape and enter respectively when tapped. I currently accomplish this on an Atreus with the "Modifier with Tap key" tmk feature, e.g. ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)

edit: I'm using an ergodox infinity, thanks for your help!

State Scheduling Triggers

KLL 0.5 Identifies several un-implemented State Scheduling mechanisms

  • Press
  • Unique Press
  • Unique Release
  • Release
  • Hold
  • Off

Keyboard will not output # ~ signs

Current setup is

S0x21 : '#';
S0x22 : '~';
S0x23 : U"Hash"

On the lower layer
Output is

S0x21 = £ 
S0x22 = ¬

U"Hash" Gives this error in the debug serial connection
WARNING - USB Code not within 4-49 (0x4-0x31), 51-155 (0x33-0x9B), 157-164 (0x9D-0xA4), 176-221 (0xB0-0xDD) or 224-231 (0xE0-0xE7) NKRO Mode: 0x32
System language is set to English UK if that affects anything.

Anyone got any ideas?

Negative brightness values do not seem to work

A[decrease_red] <= pfunc:interp, loops:1;
A[decrease_red, 1] <= P[c:-100%](+0,+0,-:16), P[c:200%](+0,+0,-:16);
A[decrease_red] <= ;
A[decrease_red, 1] <= P[r:1](+0,+0,-:16);

I have witnessed different behaviors. Sometimes simply nothing happens, sometimes the whole animation system freezes permanently. (the basic keyboard functionality seems to be unaffected by this)

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

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.

KLL 0.4 or 0.5?

Is there a timeline on 0.4? I'm anxious especially to do some of the timing stuff - I'd like to program certain keys only to trigger on their own (Enter most specifically), and I hear good things about tap keys...

Capital letters without holding down shift

I have a keybind set to underscore on a key in layer 0. Ideally when holding this key down it does not capitalize other letters, which it currently does.

Is this possible in some way?

I understand this might be complicated to make work with key repeat, but I would be satisfied if there was some way to bind a key to "shift down, -, shift up", unless shift is being held, in which case it just becomes "-".

The reason for this request is because occasionally when typing an under_score in the middle of a word I might not be quick enough with releasing the key, resulting in under_Score, despite me never pressing shift.

The extra ISO key

Swedish ISO Layouy

I cant find away to send the key between left shift and z which is a major problem if you use a Swedish layout and want to program.

KLL compiler generates an incorrect frame if list-of-pixels notation is used more than once

  • Firmware/Compiling Origin:
    KLL compiler

  • KLL Snippet:

This KLL works:

A[tatejima, 1] <= P[21,22,30,31](255);

generatedPixelmap.c:

const uint8_t tatejima_frame1[] = {
	PixelAddressType_Index, /*21*/21,0,0,0, PixelChange_Set, 255,
	PixelAddressType_Index, /*22*/22,0,0,0, PixelChange_Set, 255,
	PixelAddressType_Index, /*30*/30,0,0,0, PixelChange_Set, 255,
	PixelAddressType_Index, /*31*/31,0,0,0, PixelChange_Set, 255,
	PixelAddressType_End
};

But this KLL doesn't work:

A[tatejima, 1] <= P[21,22,30,31](255),P[7,14,20,29,38](0);

generatedPixelmap.c:

const uint8_t tatejima_frame1[] = {
	PixelAddressType_Index, /*21*/21,0,0,0, PixelChange_Set, 255,
	PixelAddressType_Index, /*7*/7,0,0,0, PixelChange_Set, 0,
	PixelAddressType_End
};
  • OS:
    Ubuntu 18.04.1 LTS bionic

  • Version:
    kll repo: commit 89bdc90

  • Reproduction Steps:
    I used ergodox.bash to compile.

  • Resulting Issue:
    It seems KLL compiler takes only the first pixel of each list.

Off-by-one error in generated kll.json for Col/Row

The generated Col/Row data seems to be shifted for both the PixelIds and ScanCodes nodes.

Output for K-Type scancode_map.p3.kll (not the non-existent 120)

        "1": {
            "Col": 36,
            "Row": 7,
            "ScanCode": 1,
            "x": 0.0,
            "y": 0.0,
            "z": 0.0
        },
        "2": {
            "Col": 1,
            "Row": 1,
            "ScanCode": 2,
            "x": 38.1,
            "y": 0.0,
            "z": 0.0
        },
[...]
        "119": {
            "Col": 0,
            "Row": 2,
            "x": -10.41,
            "y": 0.0,
            "z": 0.0
        },
        "120": {
            "Col": 0,
            "Row": 1
        }

Multiple outputs with mising semicolon

  • Firmware/Compiling Origin:
    controller v0.5.3

  • KLL Snippet:

# Bottom Row
'v' : 'd'
'b' : 'v'
'n' : 'm';
'm' : 'h';
  • OS:
    Linux (likely all)

  • Version:
    kll v0.5.7.3

  • Reproduction Steps:
    Compile layout with the previous snipped. Adding semicolons fixes the issue.

  • Resulting Issue:
    When pressing v both db will be typed

  • Additional Info:
    differences in generated kll.json

4565c4565
<                 "kll": "S0x04c : U0x007, U0x000;",
---
>                 "kll": "S0x04c : U0x007, U0x000, U0x005, U0x000;",
4579a4580,4593
>                     ],
>                     [
>                         {
>                             "schedule": [],
>                             "type": "USBCode",
>                             "uid": 5
>                         }
>                     ],
>                     [
>                         {
>                             "schedule": [],
>                             "type": "USBCode",
>                             "uid": 0
>                         }
4593c4607
<                 "kll": "S0x04d : U0x019, U0x000;",
---
>                 "kll": "S0x04d : U0x005;",
4599,4606c4613
<                             "uid": 25
<                         }
<                     ],
<                     [
<                         {
<                             "schedule": [],
<                             "type": "USBCode",
<                             "uid": 0
---
>                             "uid": 5
4621c4628
<                 "kll": "S0x04e : U0x010, U0x000;",
---
>                 "kll": "S0x04e : U0x011;",
4627,4634c4634
<                             "uid": 16
<                         }
<                     ],
<                     [
<                         {
<                             "schedule": [],
<                             "type": "USBCode",
<                             "uid": 0
---
>                             "uid": 17

Setting a combination result

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)

kll compiler doesn't warn when missing a semicolon

last commit when getting this issue: 6ea6b7e (kll), e94a6562 (controller)

When using the default kira keymaps (release.1.kll), replacing the 2 layer combinations at the top by:

### Custom key mappings
 
U"ESC" : U"CAPSLOCK"
U"CAPSLOCK" : U"ESC"
 
 
### Layer Combinations ###
 
U"RCtrl" + U"F1" : Layer[1];
U"RCtrl" + U"F2" : Layer[2];
U"RCtrl" + U"F3" : Layer[3];
U"RCtrl" + U"F4" : Layer[4];

(note the missing semicolons before the layer combinations comment)

The above kll will compile file, the compiler will not output any warning, but ESC and CAPSLOCK will not be interchanged, and layer switching (RCTRL+F1) will not work.

Cannot configure the "FN" key

  • Firmware/Compiling Origin:
    Configurator app produces the error when compiling KLL from configurator-JSON.

  • KLL Snippet:

  "matrix": [
    {
      "code": "0x01",
      "x": 0,
      "y": 0,
      "w": 4,
      "h": 4,
      "layers": {
        "0": {
          "key": "FN",
          "label": "FN"
        },
        "1": {
          "key": "#:flashMode()",
          "label": "FLASH"
        },
        "2": {
          "key": "#:animation_control(4)",
          "label": "V:RESET"
        }
      },
      "triggers": null
    },
  • OS:
    OSX Mojave

  • Version:
    Configurator 1.0.0

  • Reproduction Steps:

  1. set a key to the FN symbol, in a JSON file
  2. import to configurator
    1.build a KLL file
  • Resulting Issue:
    An error is thrown
[1/50] Generating KLL Layout
FAILED: generatedKeymap.h kll_defs.h usb_hid.h generatedPixelmap.c kll.json 
cd /controller && cmake -E env GITHUB_APIKEY=376423eb012a4587857428bf0bf10ac37415cb99 python3 -m kll --kiibohd-debug --config /controller/Scan/Devices/ISSILed/capabilities.kll /controller/Scan/Devices/MatrixARMPeriodic/capabilities.kll /controller/Scan/Devices/Storage/capabilities.kll /controller/Macro/PartialMap/capabilities.kll /controller/Macro/PixelMap/capabilities.kll /controller/Output/HID-IO/capabilities.kll /controller/Output/USB/capabilities.kll /controller/Debug/latency/capabilities.kll /controller/Debug/led/capabilities.kll /controller/Lib/arm_cortex.kll /controller/Lib/sam.kll --base /controller/Scan/Kira/scancode_map.kll --default /root/.local/share/virtualenvs/Keyboards-41-guJFC/lib/python3.6/site-packages/kll/layouts/stdFuncMap.kll /tmp/tmp.gHvENFpD4L/Kira-Standard-0.kll --partial /root/.local/share/virtualenvs/Keyboards-41-guJFC/lib/python3.6/site-packages/kll/layouts/stdFuncMap.kll /tmp/tmp.gHvENFpD4L/Kira-Standard-1.kll --partial /root/.local/share/virtualenvs/Keyboards-41-guJFC/lib/python3.6/site-packages/kll/layouts/stdFuncMap.kll /tmp/tmp.gHvENFpD4L/Kira-Standard-2.kll --emitter kiibohd --def-output /tmp/tmp.gHvENFpD4L/kll_defs.h --map-output /tmp/tmp.gHvENFpD4L/generatedKeymap.h --hid-output /tmp/tmp.gHvENFpD4L/usb_hid.h --pixel-output /tmp/tmp.gHvENFpD4L/generatedPixelmap.c --json-output /tmp/tmp.gHvENFpD4L/kll.json
ERROR: 'FN' (Layout(name=default)) is an invalid USB HID Code Lookup...
  File "/root/.local/share/virtualenvs/Keyboards-41-guJFC/lib/python3.6/site-packages/kll/common/parse.py", line 115, in hidCode
    hid_code = int(lookup[match_name], 0)
Invalid dictionary lookup, check syntax.
ERROR: OperationSpecificsStage:parse -> /tmp/kll/tmptmp.gHvENFpD4L@['Kira-Standard-0']_processed.kll:13
ERROR: Invalid stage status 'Incomplete' for 'OperationSpecificsStage'.
ninja: build stopped: subcommand failed.
Error in build. Exiting...

Context

On Mac / OSX keyboards, the lower-left key is "Function", and is ASCII code 63. I am unsure if it should be added to a file like this or if the place to put it is wherever this file has gone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.