///How to Mapping Shift + Esc to '~'?
How to Mapping Shift + Esc to '~'? 2016-07-01T16:56:50+00:00

Hello Kira Forums Support KLL How to Mapping Shift + Esc to '~'?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Y. Mahlich
    Post count: 1

    Hi all,

    I was wondering if there is a possibility to teach my Whitefox the behavior to interpret Shift + Esc as ‘~’. Essentially I would like to reproduce the behavior of the Leopold FC660M for the Escape key. I am running macOS 10.11 and this will come into player later (I guess).

    What I have done so far successfully:
    Compiling the firmware using the kiibohd controller and writing my “own” KLL configuration, more specifically mapping ‘Esc’ to ‘`’ on the function layer (amongst other fn-layer things and remapping the modifier row). Hence Fn + Shift + Esc results into ‘~’ now. However this is still not the fully desired functionality.

    What didn’t work for me:
    As soon as I am trying to map Shift + Esc (using combinations i.e. “U”LShift + U”Esc” : U”LShift” + U”Backtick”;) to ‘~’, things get weird.
    In some instances (specific editors i.e. Sublime) I receive the desired outcome, in most cases this doesn’t work however. The behavior that I think I observe is the following: The escape key keypress will be interpreted and executed before the “macro/remapping” that the firmware should perform actually takes place. So if a tool can interpret Shift + Esc as an application or system wide macro it does before “typing ’tilde'”. One example: In iTerm running zsh with oh-my-zsh standard config showing all available folders for quick selection. Or in Chrome while in the adressbar, Chrome selects the full adressbar, and then overwrites it with one ’tilde’. macOS introduced at some point the functionality of Shift + Esc to show “auto completion” in some textbased applications – something that I can observe that will also be executed and then right after the ’tilde’ is “printed”.

    I am wondering if this whole thing is something that is mostly due to the fact that I am driving the Whitefox on macOS, or if this has to do something with the micro-controller in the keyboard and how it interprets the commands.

    Is there actually any way to “properly” teach my Whitefox what to do?

    Thank you all for any input, and sorry for the forwards backwards english (not a native speaker).


    Steve Beaulac
    Post count: 1

    Using the example in md1Action.kll, I added the extra LShift to send the Shift key for when we press on anything else but Esc.

    U[“LShift”, “RShift”] : blockHold( 0x29 ) + U”LShift”;
    U”Esc” : blockKey( 0x29 );

    # Now that Esc is blocked, it’s possible to use this macro
    U[“LShift”, “RShift”] + U”Esc” : ‘~’;

    Post count: 2

    I realise that this is an old thread but I’m trying to implement yhid for my whitefox layout. I took the files generated from the configurator and added the lines that you suggested to shiftesc.kll. However I’m having trouble compiling them

    In whitefox.bash I have the following:

    ## KLL Configuration ##
    # Generally shouldn't be changed, this will affect every layer
    # This is the default layer of the keyboard
    # NOTE: To combine kll files into a single layout, separate them by spaces
    # e.g.  DefaultMap="mylayout mylayoutmod"
    DefaultMap="WhiteFox-AriaBlank-0 shiftesc"
    # This is where you set the additional layers
    # NOTE: Indexing starts at 1
    # NOTE: Each new layer is another array entry
    # e.g.  PartialMaps[1]="layer1 layer1mod"
    #       PartialMaps[2]="layer2"
    #       PartialMaps[3]="layer3"

    First I build the firmware using the original whitefox.bash, then added the template kll files to the whitefox.gcc directory, and updated whitefox.bash as above. However upon compiling them I’m left with an error:

    ERROR: Parsing error in 'shiftesc.kll' - should have reached <EOF>: 9,3-9,11: VariableContents '“LShift”,'
    CMakeFiles/kiibohd.elf.dir/build.make:68: 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...

    Any suggestions are greatly appreciated

    Edit 1:

    I’d like to outline the build process further:
    Clone git repo: https://github.com/kiibohd/controller

  • cd to controller/Keyboards
  • ./whitefox.bash
  • Use configurator to generate kll files and add them to Whitefox.gcc directory
  • Add files to whitefox.bash as above
  • Run whitefox.bash
  • Edit 2:
    It looks like even removing shiftesc from the DefaultMap line in whitefox.bash results in a compilation error, this time it’s different so I’m definitely missing something:

    [ 16%] Building C object CMakeFiles/kiibohd.elf.dir/Macro/PartialMap/macro.c.o
    In file included from /home/name/controller/Macro/PartialMap/macro.c:30:0:
    /home/name/controller/Keyboards/WhiteFox.gcc/generatedKeymap.h:163:27: error: 'KEY_FUN1' undeclared here (not in a function)
     Guide_RM( 47 ) = { 1, 13, KEY_FUN1, 0 };
    CMakeFiles/kiibohd.elf.dir/build.make:219: recipe for target 'CMakeFiles/kiibohd.elf.dir/Macro/PartialMap/macro.c.o' failed
    make[2]: *** [CMakeFiles/kiibohd.elf.dir/Macro/PartialMap/macro.c.o] 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...
    • This reply was modified 1 year, 5 months ago by  CoffeeBot.
Post count: 2

I switched to the TMK firmware to resolve this, you can see my git here: https://github.com/TWDickson/Whitefox-Aria/tree/33e5995ecbbb06af78ec25172ae795f97f6cc798

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘KLL’ is closed to new topics and replies.