Just to assure that I am doing things right:
Have the ‘Kaleidoscope-Bundle-Keyboardio’ here:
‘/home/jo/Arduino/hardware/keyboardio/’.
As a submodule ‘Kaleidoscope’ resides here:
‘/home/jo/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope’.
In the submodule do a ‘git fetch origin pull/905/head:oneshot_redesign’ and ‘git checkout oneshot_redesign’.
Put my layout there:
‘/home/jo/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/examples/Devices/Keyboardio/Atreus/Atreus.ino’.
Do a ‘make; make flash’ in
‘/home/jo/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/examples/Devices/Keyboardio/Atreus/’.
After flashing keyboard behaviour is a bit strange:
I)
Although the ‘Key_MetaSticky’ is not defined anywhere in the keymaps, when tapping on a key with ‘OSL(L2)’ and afterwards on a second key with ‘M(MACRO_MINUS_DOLLAR)’ as it’s L2 value, the second key permanently changes to it’s L2 value. This is not the case if the second key’s L2 value is e. g. ‘LSHIFT(Key_Period)’.
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
//bool shifted = Keyboard.isModifierActive(Key_LeftShift.keyCode) ||
bool shifted = Keyboard.isModifierActive(Key_LeftShift.getKeyCode()) ||
::OneShot.isModifierActive(Key_LeftShift);
switch (macroIndex) {
case MACRO_MINUS_DOLLAR:
if (shifted) {
return MACRODOWN(D(LeftShift), T(4), U(LeftShift));
}
else {
return MACRODOWN(T(Slash));
}
break;
case MACRO_APOSTROPHE_AT:
if (shifted) {
return MACRODOWN(U(LeftShift), D(RightAlt), T(Q), U(RightAlt));
}
else {
return MACRODOWN(D(RightAlt), T(Backslash), U(RightAlt));
}
break;
}
return MACRO_NONE;
}
II)
We are on layer L0. When tapping on (or holding) a key with ‘OSL(L1)’ and afterwards tapping on a second key with ‘M(MACRO_APOSTROPHE_AT)’ as it’s L0 value and ‘Key_Tab’ as it’s L1 value, the keyboard outputs the second key’s L0 value – as if OSL was without any effect?
III)
Trying to get a Qukey’s alternative value ‘OSL(L1)’ sticky by holding the Qukey for approx. 1s, releasing it and tapping it again immediately afterwards, always yields the L0 value of the Qukey and afterwards the L0 value of any subsequently pressed key – ‘OSL(L1)’ has neither become active for one shot, nor has layer L1 become sticky. It makes no difference if Qukey’s layer L1 value is transparent or not.
OneShot timeout is set:
OneShot.setTimeout(3000);
IV)
A Key with ‘Key_Cycle’ on layer L0 with
void cycleAction(Key previous_key, uint8_t cycle_count) {
bool is_shifted = previous_key.getFlags() & SHIFT_HELD;
if (previous_key.getKeyCode() == Key_A.getKeyCode())
cycleThrough (Key_A, Key_Quote, LSHIFT(Key_Quote));
if (previous_key.getKeyCode() == Key_O.getKeyCode())
cycleThrough (Key_O, Key_Semicolon, LSHIFT(Key_Semicolon));
if (previous_key.getKeyCode() == Key_U.getKeyCode())
cycleThrough (Key_U, Key_LeftBracket, LSHIFT(Key_LeftBracket));
if (previous_key.getKeyCode() == Key_S.getKeyCode())
cycleThrough (Key_S, Key_Minus);
}
seems to prevent to access it’s values on other layers (e. g. L1, L2, L3) with ‘OSL(Ln)’.
V)
‘Key_OneShot_Stickify’ tapped after one or a combination of modifier and layer shift keys (Qukeys as well!) makes them sticky – great! Thank you.
The Stickiness can be canceled by Escape-OneShot (except for the metasticky keys, cf. I)).