Keybow Mini Backslash key entry

Hi All,
I’m looking for some assistance with the Keybow Mini programming.

I’m using a US keyboard in the uK and one application I use often has issues with the fact i have to use AltGr + hash to enter a Backslash, so i’m trying to porgram Keybow to enter it.

I’ve tried the following in Mini.lua:

    function handle_minikey_02(pressed)
        keybow.set_key("\", pressed)
        if pressed then
            keybow.set_pixel(2, 0, 0, 255)
        else
            keybow.set_pixel(2, 0, 0, 0)
        end
    end

but it doesn’t recognise the keypress. I’ve tried it without quotes too. Other regular keys work though so I know the Keybow mini is working

I then tried setting up a custom function key in keybow.lua

    'keybow.BACKSLASH = 0X5c`

and then called the variable in mini.lua with:

    function handle_minikey_01(pressed)
            keybow.set_modifier(keybow.BACKSLASH, keybow.KEY_DOWN)
        if pressed then
            keybow.set_pixel(1, 0, 255, 0)
        else
            keybow.set_pixel(1, 0, 0, 0)
        end
    end

But it again didn’t enter anything.

I’m probably missing something easy, but appreciate any help.

Also, sorry for the oddly formatted code snippets, i’m not sure how to embed it and keepo the formatting. -Edit, I worked out how to embed the code snippets properly!

Thanks!

I also have problems with the backslash character on my 12 key Keybow which I use in conjunction with a UK keyboard. The backslash character from my Keybow is being interpreted as a hash character.

I’ve two suggestions for you. First of all, you should try using a double backslash instead of a single backslash in your Mini.lua script.

The second suggestion (and this was my workaround) was to declare the custom function key in keybow.lua as you did. However, the code I used was 0x31.

    keybow.BACKSLASH = 0x31

To my lua script I added the following:

    keybow.set_modifier(keybow.RIGHT_ALT, keybow.KEY_DOWN)
    keybow.set_key(keybow.BACKSLASH, true)
    keybow.set_key(keybow.BACKSLASH, false)
    keybow.set_modifier(keybow.RIGHT_ALT, keybow.KEY_UP)

Essentially this is doing the AltGr method that you manually type, so you may still end up with problems with the application you’re using.

I hope this helps.