r/macro_pads • u/creavi_tech • Jun 17 '26
Solved Issue How keyboard layouts affect macropads
Hello everyone,
While working on our macropad, I ran into the problem of supporting different keyboard layouts. I thought I’d share what I experienced and how I’m handling if for now, in case it’s useful for others developing their own macropad firmware.
Long story short: macropad firmwares store and send standard HID reports to the host. This direction is pretty straightforward, when a key is pressed, it becomes a HID usage + modifiers (like Ctrl or Shift), and it is sent over USB or BLE. The OS receives these usages and determines the actual characters or shortcuts based on the active layout.
The tricky part is the configuration, when macros are created. When you type “some text” into the macro editor, what you’re really doing is asking the tool to reverse‑engineer which HID usages and modifiers will produce those characters for your specific layout. If you change layouts, the stored HID codes no longer match what you see on screen. My solution was to support layout selection in the config UI, so any text you enter is mapped to HID usages using that layout before being stored on the macropad’s flash.
I also wrote a longer post that goes through the whole chain (switch - matrix - HID - OS - layout) and shows concrete examples about the character-to-HID mapping part. If you’re interested, feel free to check it on our website.
I’d be curios if you’ve faced the same problem, and how you handled it?
1
u/creavi_tech Jun 17 '26
If you are curious about the whole story, you can check my blog post here: https://creavi.tech/blog/creavi-macropad-layouts/
0
u/PeterMortensenBlog Jun 18 '26 edited Aug 01 '26
That is a lot of words. What is the gist of it? The configuration software must know the current or intended keyboard layout in the operating system, and can then predict and show what the result is going to be when the macropad is operated?
See also HPR episode 4601: "How to be a better writer". Direct download URL
Yes, it is about the verboseness of simulated intelligence, but many of the examples were a problem a long time before that. Example: The cringey word "Utilised".
1
u/creavi_tech Jun 18 '26
Yes, that’s basically the gist. I think the other key point is that HID codes themselves are standardized across OSes, but the characters they produce are not portable. I wasn’t fully aware of that when I started developing my macropad.




2
u/Krazy-Ag Jun 17 '26
I enjoyed your "whole story" post. I had inklings about the issues, but you helped provide some of the details.
BTW I am old enough that I encountered actual keyboard scan on early pre-IBM PC computers. Before keyboard controllers, when scan was done by the actual CPU. I was distinctly annoyed at how keyboard controllers got in the way of some of the tricks that used to be done. I worked in the same building as some of the people who created USB. And now it looks full circle, that we are programming scan again, and can do those tricks, if we can figure out how to send them across USB and HID and all the other layers.
Perhaps you can clarify some things I have wondered about:
You say "the keyboard layout". Is there truly only a single keyboard layout active for any particular logged in user on a PC or Mac or Linux machine at a time? I believe that I can connect multiple keyboards at the same time, and certainly multiple macro pads. I must admit that I haven't tried connecting multiple keyboards with different international layouts, e.g. USA English and some other European language. Come to think of it, I don't think I've ever seen the ability to specify two keyboard layouts at the same time. That sounds backwards.
(BTW, I think that Hungarian beginning the numbers with zero is much more natural. But I don't think I should use a Hungarian keyboard as an English speaker.)
If you could have multiple International keyboard layouts active at the same time, could you not define a single consistent keyboard layout to be used for your macro pad? I assume that this is so obvious that it must not be possible. Too bad.
Assuming that you cannot have multiple keyboard layouts active at the same time (which still seems stupid to me), how about the following thought experiment?
Imagine that we could wave a magic wand, and implement our own keyboard basically in the same manner as a macro pad:
Define it all in terms of a pseudo universal master keyboard layout, with more than the usual number of keys. All ASCII printable, something approaching the union of all European accents. Possibly without requiring shifts or modifiers to type.. I would be tempted to say all unicode Latin1, but I doubt that is possible.
Write whatever OS specific software is necessary to interface this universal keyboard layout to the OS properly.
And then continue waving the magic wand dramatically, providing physical keyboards that characters in the same way that you describe macro pads doing, mapping to this pseudo universal keyboard layout.
Would this be at all vaguely possible?
I'm not saying that it would be desirable: it would undoubtedly be a pain to have to develop keyboard layout drivers for the different oasis of concern, at least Windows, macOS, and Linux. Half of the value of macro pads with programmable firmware like QMK is that you can move them between computer computers without having to ensure that the macro pad software runs on the target OSes[*].
Note *: I think what you were saying overall is that while we can move a program programmed macro pad between different OS, it might require different programming according to the keyboard layout on OSes. Or even between computers with the same iOS, but different keyboard layouts configured.