Kebow - changing layout files dynamically

I should really do my homework before asking questions !

I finished assembling my Keybow (my Christmas present to me) two hours ago and it worked first time with
no problems which is unusual for me - thanks for no soldering !!

Quickly browsed the ‘Using macros …’ tutorial.

Two quick thoughts
a. Are there any ways of changing the current layout file dynamically, i.e. without removing and editing the micro-SD ?.
b. Will it be possible to write to the micro-SD card from the attached computer (in my case Xubuntu 18.04) ?

Thanks for an intriguing little device - looking forward to finding uses for it !

My experience with having tried to make a microSD writeable from the host PC, while also simultaneously being readable from the Pi, is that it’s- unfortunately- a fools errand. I don’t doubt there’s a way to do it, but the custom code needed to do so is presently beyond me- and I’ve experimented in pretty significant depth with the PiratePython distro and code reloader which actually works, but isn’t terribly reliable.

Changing the layout dynamically may be possible, however, with a “load new layout” command or perhaps some kind of “hold key on boot” setup. It’s something we’ve at least discussed!

@gadgetoid I have a feeling that is possible. Hold a key combo, and run a function that loads in a new layout file. I’ll investigate today…

I wonder if a script could be added that performs safe shutdown of the pi?

The whole idea is that you don’t have to safely shut down the Pi Zero, since the SD card isn’t used at all after the initial boot (everything runs in RAM), so there’s basically no way anything can get corrupted.

Thanks for response .

I can see that writing to the SD card might have problems .
(https://elinux.org/images/1/14/Opasiak--tame_the_usb_gadgets_talkative_beast.pdf) but I’m pleased that changing files dynamically might be possible.

I see that KeyBow could be useful if you could load individual layout files for didfferent applications – python, GIMP, games etc. . It isn’t feasible to remove and re-program the microSD card for this, but it could work if one could load a collection of layout files and then choose which one to use .

(I’ve already found that repeatedly removing, editing and replacing the MicroSD card is fiddly and I feel that it may damage the contacts on the Pi if you are not careful. The process also seems to be bit hit and miss (KeyBow Lights up but no inputs) )

If two extra functions were provided it could solve most of the problems:
a. Replace current layout file with new_layout_file and reload.
b. Add ‘long press’ option (maybe on the key_01 ‘long period?’) which could automatically load a alternative Keys file (which could be edited by the user).

The long press is used to reboot my favourite MP3 player – Sansa Clip Zip.

Thanks again

Heres my first attempt at making a dynamically changing layout. Its been a long time since I’ve coded so not beutiful, plus never used lau before.

Advance Keybow Layout

Multibow features multiple keyboard layouts, switchable at runtime using a key combination. Also features LED brightness control.

There’s also WIP going on to support timer-controlled functionality in keymaps, but not yet on stable master.

I’m also looking into this. I imagined multiple keymaps for different uses and keeping one key (top left or?) that would cycle through keymaps. The LED colors could give you a cue as to which map you were using.

Multibow looks looked promising, but is archived and no longer developed. (@thediveo your work is appreciated! @gadgetoid congrats on your baby!) But the archived readme.md looks like it probably has the basic functions, right? I’ll give it a shot at some point, but can anyone verify it’s working well enough, minus longpress, etc.?

Anyone use flyingferret’s Advance Keybow Layout?

Thanks!

For anyone reading this thread and hunting for similar things…

I found this post about the keybow:

and some code for what they’re calling “multi-tab” support - which is using the top 4 buttons as “tabs” to change the 2nd and 3rd rows of keys.

Was anyone able to get this working. The only instructions for installing it that I saw was just from this line in the post:

Installation is simply a matter of importing main from the pimoroni keybow entry point script.

I guess I just don’t understand what that means. I’ve tried placing the keybow-pager files on the Keybow SD card with no success, even though it looks like that should work.

My Keybow is in constant use - as a Linux window controller - keys move windows to various positions on my two monitors avoiding xfce panels and ‘conky’ display. It’s just a way of simplifying bespoke keyboard shortcuts.

Move Windows
keybow

11 08 05 02
10 07 04 01
09 06 03 00

Swap screen       Super >		07
 Left   Screen (Full)    Super K		04
 Right Screen (Full)    Super L		01
Left Screen - Top		     Super Y		11
Left Screen - Bottom	Super H		10
Left - left half            Super U		09
Left - right half          Super I			06
Right - left half          Super O		03
Right - right half        Super P		00
Align - left-screen      Super ;			08
Align - right-screen    Super '			05
Minimise        Super J		02

It would have been nice to make it more flexible but it obviously wasn’t that simple.
At least it’s used unlike many other purchases !