Keybow : keyboard layout


Hi. Keybow config : Is there a simple way to change the keyboard layout used ? Setting a ‘A’ key in the lua script, I get a ‘Q’ stroke on an Azerty keyboard (the default config is set to QWERTY I guess) - for the number it’s less obvious.
Any hints ?


You would have to change these lines here:

The line SHIFTED_KEYCODES are the keys you would expect to be produced when the shift key is held.

If you figure it out, please share the result! It’s on my TODO list to get some common layouts mapped here and add a function to let users specify which layout they want to use.


Hello, you would have the Italian layout of KEYCODES and SHIFTED_KEYCODES …
I’m going crazy!




I’ve no experience using an Italian keyboard layout, how does it work? Are the images you’ve supplied showing the characters produced using “Shift” and then a different modifier key?


Hello, the first keyboard at the top is UK (don’t mind the red, green, blue characters) and if I’m not mistaken it’s the default one in keybow.lua

local KEYCODES = “abcdefghijklmnopqrstuvwxyz1234567890\n\a\b\t -=\#;’`,./”
local SHIFTED_KEYCODES = “ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()\a\a\a\a\a_+{}|~:”~<>?"

I need the keyboard layout below (ITA) which is the same as the UK except for some characters …

For example the minus symbol “-” (in ITA) becomes single quote “” the problem is only in special characters, the rest works well as in the UK, but I do not understand the "\n\a\b\t " and “\a\a\a\a\a” in KEYCODES and in SHIFTED_KEYCODES.

I need only these:

(KEYCODES) \n\a\b\t -=[]\#;’`,./
(SHIFTED_KEYCODES) !@#$%^&*()\a\a\a\a\a_+{}|~:"~<>?

Would you help me?



The escape sequences- \n etc - map to characters that can’t otherwise be represented in a Lua string.

\n is newline.
\a is basically an unprintable character, to skip ones that don’t have any meaning (a placeholder)
\t is tab
\b is backspace.

In this case the \a\a\a\a is just filling in the gaps where those keys don’t have a shifted state.

I’m hoping to work out a better way to do this, because it’s confusing to read, difficult to maintain, and even more difficult to create new layouts for new languages. Even US/British English differences are a nuisance!