Single-byte key addressing (for boards with fewer than 256 keys)

That must be a hell of a language now.

Not true if there are holes in the key matrix, which I believe @algernon said is true of the Shortcut.

Based on my experience dealing with it for the past month or so, I’d say it’s not the STL (which isn’t even available to Arduino, apparently) – it’s the whole language that’s gone off the rails. You cannot imagine how much I hate C++ right now.

1 Like

Can you explain the difference between the hardware on a Planck (and/or Preonic) and the Model01? I’ve looked it up (or tried to) a few times, and all I can remember is that sometimes I look it up and it’s the same, and other times it’s different.

Does holes mean that there are unused entries in the keymap matrix?

Sorry to hear that. Can I do anything to reduce your hatred towards C++? Explanations, links, etc.

Yep:

All those XXX stuff, those are positions that are not wired anywhere.

There are unused positions in the keymap. But when itetrating over the keymap, those holes could probably be ignored. It would in any case not pay off to stop and restart an iteration over the keymap because of five unused elements (shortcut).
In any case this would require no changes in the key addressing implementation.

Wouldn’t it only be a problem if (ROWS * COLUMNS) >= 256 but the number of total keys is still less than 256?

I would write a hardware module for any keyboard that simply assigned a number to each keyswitch in series, so the following test guaratees that it addresses a valid key:

if (key_addr < TOTAL_KEYS) { ... }

I would not want to expose ROWS and COLS to the rest of Kaleidoscope at all. From the top level, I’d still want the user to be able to refer to keys using some sort of coordinate system (with a compile-time translation), but that would probably only be the same as the hardware’s row and column wiring on keyboards like OLKB ones. I personally find the R#C# coordinates on the Model01 difficult to remember; past the sixth column, and I can never get any of them right. I see six rows on each half of the Model01, not four, and not all of them have the same number of keys. And tab is in the second row (I had to look it up) next to T, but it clearly ought to be next to G in the third row…

Alas, the more I learn, the more I despise it. Being unable to do conceptually simple things because of lack of familiarity is mildly frustrating and time-consuming, but the real loathing comes when I learn the solution.

3 Likes

See also