Newbie basics: MacOS input source?

Having recently gone back to development work early in 2018, and getting some ulnar nerve symptoms as a result, I’m experimenting with a few “proper” keyboards - ditched the Apple board, using a Matias Ergo Pro at the moment, whilst I await the arrival of both an Ergodox EZ Shine and a Keyboardio Model 01.

I’m a UK MacOS (Mojave) user.

As I understand it, keyboards send scan codes to the operating system. If you want your input to match what’s printed on the keys (of a non-programmable keyboard, for the sake of argument), you have to choose the keyboard layout (called “input source”, rather illogically, on MacOS) that matches what’s printed on your keyboard. For a standard British Mac keyboard, it’s “British”, my Matias Ergo Pro needs “British - PC”. If I don’t choose British-PC, I get @ above the 2 (which is printed ").

Now, on the Ergodox, the only keys that are actually printed are the letter keys and a few symbols, but the Keyboardio seems to have all keys printed (including # above the 3, sadly), which I assume maps to the default firmware layout, but presumably therefore expects a “US” input source.

My assumption about programmable keyboards is that you still have to use the “correct” layout (input source) on the OS, at least to the extent that you want the symbols to come out as printed on the key caps, and that if you want to change the layout (which I would only do where it doesn’t contradict what’s printed on the key caps themselves, because I’m anally retentive), you use the firmware of the keyboard.

If this is the case, what’s the “correct” layout (input source on Mac) for the Keyboardio? US or “US - international”?

Or, is it more complicated? Can I actually programme a keyboard so that shift-3 = anything I want? Or is that purely in the domain of the input source on the OS?

I’ve Googled a fair bit and have failed to educate myself properly about how this stuff works; whether a non-programmable keyboard and a programmable one send the same codes for the same things or whether there’s a fundamental difference in the way each works.

Using the Ergodox as an example (since it has a browser-based configurator): when I choose # in the drop-down list to assign to a key in a layer, is the code that the keyboard sends identical to the one that I get if I hold shift and hit 3 (if my input source is US), or is it a different code that explicitly means # and will always be interpreted by the OS as a #, regardless of the input source? Or, I have a British layout selected in the OS, and I choose the # in the configurator drop-down to assign to a key in a layer, will that keypress come out as a £?

From my own research, the conclusion I’ve drawn is that, even on a programmable keyboard, if you hold shift and press 3, the result will be determined by the OS input source, since the keyboard is actually sending a scancode that corresponds to “shift-3”, not to #, or £, or whatever. But if you explicitly map a key in a different layer to #, the code that’s sent is different and corresponds explicitly to a #, regardless of the input source.

I’d be very grateful for any clarification from those who understand this stuff better than me!

1 Like

Yes and no. You can programm the keyboard so that shift+3 sends anything you want. But the way you do that is that you ask the firmware to send a different key combination when it sees shift+3 (like, it would send shift+4 instead, for example). It’s a hack, but a possible hack nevertheless.

It will send Shift+3. There’s sadly no way to send a keycode to the host that will always be a certain symbol, regardless of what OS-side layout you use.

Your conclusion is correct.

2 Likes

Thank you! So, would you agree that, with a programmable keyboard like these two, what you really want to do is to set the input source to US and then use the firmware to customise if you want symbols to be where they normally are on your local board? On the ErgoDox (which has only the very basic stuff printed), it might be tempting to simply set the input source to British, which would mean shift-modified keystrokes would be immediately familiar (at least, above the numbers). But if I were to do that, the graphical configurator layout would be wrong if it uses any symbols that have a different position on a US keyboard from a UK one. So a # on layer 2 would come out as £. And this would also apply to the drop-downs which offer symbols that can be selected for mapping?

If that’s the case, I think it would be helpful (for non-US customers, at least) to add this to the very basic “getting started” instructions to avoid a lot of confusion when we first plug the thing in.

Final question: the Mac has a built-in feature - the on-screen “keyboard viewer”, which shows you, as you type, what keys are being pressed, and, when you hold a modifier key, where the symbols are. I had a play with Ukulele, but I can’t work out what determines the physical layout of the keyboard (the arrangement of keys) - on my MacBook I notice it corresponds to the laptop (i.e. no separate number pad), whereas on my iMac it correctly represents the external Mac keyboard layout.

It strikes me that this tool could be invaluable whilst learning a new board like the Keyboardio/Ergodox, but it would only really be viable if the picture of the board actually reflected the physical arrangement of the keys. Any idea if this is actually possible? I looked at the XML file that represents the input source and there’s nothing to describe the physical layout so it must be determined elsewhere. In Ukulele you can choose from a number of “keyboard types” but it’s found under the “view” menu, implying that it doesn’t carry through into the resulting input source that you can then install on the Mac.

P.S. I see that BOTH boards have shipped this morning…

1 Like