Once again, I find myself slogging through unfamiliar and (to me) obtuse code, trying to figure out how it all works in order to assess feasibility of some ideas I have, and it’s clear that this is going to take a long time, and probably get me nowhere unless I have hardware, which won’t happen until January.
My main thing is trying to figure out how to de-couple shifted symbols from their rather arbitrarily assigned unshifted counterparts, so I can have (among other things) a set of four keys, each of which has two brackets on it (one shifted, one not). I think I understand the structure of the USB report sent from the keyboard to the host, with one byte of modifier bits, and others for the keycodes of active switches. But there are still questions that I have. First, there are keycodes for the eight modifier keys (
0xE7), but it’s not clear if these actually get included in the report, or if the keyboard simply changes the flags byte, and leaves the modifier keycodes out of the report itself.
This seems like it might matter when constructing a macro to “unshift” a symbol that’s in the shift “layer” on a standard keyboard, but which I want accessible when “shift” is held on a Kaleidoscope layout (and
TopsyTurvy is inadequate here – in general the two symbols might be found on different keys). If the report was altered to clear the shift bit from the flags, but the keycode for one of the shift keys was still included in that report, I don’t know what to expect.
Do the modifier keycodes get included in the report? If so, why bother with the flags byte? If not, why do those keys have keycodes at all? I see that only
alt has two bits in the flags byte (one for left, one for right), but the other three modifiers appear to be indistinguishable there – but the machine I’m typing on can clearly distinguish between the two shift keys…