Multi layer Keyboard

Good day,

Well, I’ve been thinking… With keyboards like the Code keyboards, the Ergodoxes, Ducky, WASD Code… all offer the chance to program layers according to user needs. Some use proprietary software, some use the QMK opensource, to configure the different layers and so on.

Those with proprietary software can only be configured on Windows, some even on Macs. Those that use QMK can be configured using the QMK website. Being the later the only ones that could be configured on Haiku too.

But… and this is what I’ve been thinking about lately… Any keyboard on Haiku can be a multilayered programmable keyboard, with the only limitation of Macros, AFAIK.

Haiku allows users to create custom layouts, change the location of keys, which potentially leads to infinite layered keyboards (if anyone is capable of managing infinite layers anyway :grin:), and change layouts using the Keymap Switcher preference. Ain’t that cool enough? :wink:

This is a nice feature that seems to be not so well known… though for keyboard freaks (me included) it’s a plus, ain’t it? :crazy_face:

Regards,
RR

1 Like

Maybe a stupid idea but, you could try to associate a key to a script with shortcuts app to have macro.

It should be completely doable with the Haiku architecture of the input_server and addons. Though something so fundamental might interfere with other input addons in some way and it would probably need to be the very first one, though I don’t know offhand if you can enforce ordering.

It probably would not be hard to code up a prototype to prove the concept, even something as simple as a “layer” which swaps some keys to just prove the point. You would need to pick a little used key to control the layers, and for extra points you could code a Deskbar replicant which is kept in sync with the current layer using BMessages. Maybe you could even talk back to the addon and choose a layer with a menu as well.

Having said all this makes me want to try hacking up a prototype. Maybe sometime soon :smiley:

1 Like

You have just described KeymapSwitcher which already exists and was already mentionned in the initial post :slight_smile:

Associate a script using hey to a shortcut and you have already something powerful.
If you have a dozen of these handy by just switching keymap it will make some jealous on other systems. :smiley:
If there’s no need to reinvent wheel, you need to be very careful picking characters for the special keymap. Swapping keys around won’t be enough as you wouldn’t want to call a script accidentally. You need to find symbols easy to remember and that you will never use for typing. It seems easy for English speaking people but for others it’s quite common to use three different keymaps; this is reducing choices. Perhaps runes could do it?

Good day,

Actually, I never had thought about scripts or ‘hey’. The only thing I know about ‘hey’ is that is the application scripting language on Haiku and “Hey, Mr. Tambourine man, play a song for me…”, but nothing more, nothing deeper.

Now, yes, I’ve mentioned KeymapSwitcher and thought about this “feature” after preparing the Yawerty keymap and the XBows keyboard Layout. Actually, on Haiku one could buy the 5$ tag “El Cheapo Compatto” keyboard and have a fully programmable keyboard right now, multilayered, modifying keymaps and adding custom keymaps as long as the switch key combination in all keymaps (layers) stays the same, I presume. I wouldn’t think about changing the key combination and their location for this. AFAIK, this “feature” is only available on Haiku. Any keyboard is fully programmable, layerable, with the limitation of macros.

Now, what if macros (keyboard shortcuts) could be assigned on per keymap basis? Well, then it would be the supadupa keyboard feature galore. Biased examples could be:

  • Set a keymap for Krita, to trigger different brushes, change brush width, colors, whatever… (I’m thinking about drawing on the digitizer with the other hand on the keyboard tweaking the strokes, etc)
  • Set a keymap for LMMS, to triger tracks, mutes, fx, change track pan…
  • Set a keymap for MuseScore, to add sharps, flats, note duration, clef, accents… (this example, if MIDI-USB worked might need some rethinking)

You get the point, right?

The possibilities are infinite, as the number of layers. Even one could set a Coledvorak keyboard mix if feeling fearless.

The point being, this programmable multilayer feature of keyboards on Haiku seems to be there, a default feature, not so well known, but very powerful indeed. Maybe waiting to be “rediscovered”? And IMHO, many of other features are not so well known too. :thinking:

Right now I’m carrying out some tests on other stuff, thus the “need” to complete the “switch”, to test more and discover more at a speedier pace. Speedier than now, this does not mean fast.

I could think more about ancient Egypt hieroglyphs :rofl: (duck-duck-arm-bread-ibisHead-cowHeart)

@leavengood, maybe, as the KeymapSwitcher is already there, you could think on how to get the macros/shortcuts be active on a per keymap basis? If that is even possible. Then associating scripts/hey to a key as @Starcrasher pointed out, only on selected keymap would be possible without triggering an unwanted macro when not using the proper keymap where that macro is set?

Seems that the biggest “issue” with Haiku is that outside here, I mean, the community, no one knows about its true potential, which I have the feeling is way bigger than one could expect.

Regards, and thanks!
RR

imagen

And here is the proof of that it can be done. A NumPad keymap, on the right side of the keyboard for TKL keyboards, that can be triggered with the Ctrl+Shift with Keymap Switcher.

The Deskbar Indicator shows “Nu” as the NumPad (user) keymap is selected. Ain’t that cool?

Regards,
RR