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. 
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
(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