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

(Noseglasses) #81

That must be a hell of a language now.

(Michael Richters) #82

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.

(Michael Richters) #83

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.

Hardware differences between the Model01 and OLKB boards
(Noseglasses) #84

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

(Noseglasses) #85

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

(Gergely Nagy) #86


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

(Noseglasses) #87

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?

(Michael Richters) #89

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…

(Michael Richters) #90

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.

(Noseglasses) #91

See also