I want to use the standard en-US QWERTY layout on the OS side.
Is this possible? If so, I’d love some guidance!
There is a similar thread, which I’ve read through, which mentions the ShapeShifter and TopsyTurvy plugins, but it’s not clear if those plugins are able to do the things I’d like:
Here’s my attempt at using the ShapeShifter plugin:
static const kaleidoscope::ShapeShifter::dictionary_t shape_shift_dictionary[] PROGMEM = {
// Non-shift: `/`, OK. Shift: `|`, wanted `\`.
{Key_Slash, Key_Backslash},
// Non-shift: `?1?1?1?1?1?1?1?1?1?1?1?1?1?1`, wanted `?`. Shift: `!`, OK.
{LSHIFT(Key_Slash), Key_1},
// Non-shift: `.`, OK. Shift: `:`, OK.
{Key_Period, Key_Semicolon},
// Non-shift: `,`, OK. Shift: `:`, wanted `;`.
{Key_Comma, Key_Semicolon},
{Key_NoKey, Key_NoKey},
};
ShapeShifter will keep shift held when inputting the replacement, that’s why you get : (Shift+;) instead of ;. It only replaces the shifted part, and can’t invert shift, hence the first issue (that also triggers a bug I’m yet to solve).
I’m afraid you’ll need a new plugin for this kind of thing. Or a set of macros, that check if Shift is held, and do their thing based on that information. There’s… a few corner cases there, though. For starters, kaleidoscope::hid::wasModifierActive() will be of great help with this…
I’ll try to help more, when time allows, and if needed.
Yeah… hm. Perhaps releaseing shifts, then sending a report, then the backslash would help? And do the release+report combo only on keyToggledOn, not while keyIsPressed? Just a hunch.
(Sorry for the brevity, kinda time-pressed here and can’t elaborate :/)
Those are some of the same mappings I intend to use. I’ve got a plan for a way to do this, but I still need to write the code for the plugin that would do the best job of it, since none of the existing plugins really do the trick. I’ll definitely let you know when I’ve got something better than a kludgy macro to do it.
The really tricky part about what we want to do (arbitrary reassignment of symbols on shifted and unshifted “layers”) is dealing with key overlap. So, if I’m holding down two keys, one of which should produce a symbol that’s shifted (as far as the OS keymap is concerned) and one of which is not, we have to decide what to do. I think one of the two keys should “win”, and the other’s keycode should be suppressed until at least one keyswitch state changes. And that “winner” should not be decided in a way that seems arbitrary to the user. Probably the best way is to decide that either the one that was pressed first wins, or the most recent keypress wins (my inclination is for the latter). Then we’d suppress either every key that wants the “wrong” shift-state, or simply suppress every other keycode.
I haven’t started trying to write any code yet, but I’m interested in the opinions of other people who want this feature before I settle on a design.
Could you give an example of when one might wish to hold down two keys simultaneously? I am not coming up with anything but chording that would be an intentional case of doing that.
Not often, outside of certain types of games (for which it would be better to use a different layer or keymap, anyway), but it also applies to accidental overlap during normal typing.
Change Key_LeftShift and Key_RightShift into ShiftToLayer(SHIFT).
Duplicate the main layer into a new SHIFT layer, adding LSHIFT() around keys where needed.
That might work pretty good. But shift-clicking won’t work. But perhaps I can add an extra, real, shift key somewhere for such occasions. I don’t shift-click much anyway.