# Can OneShot be used with SpaceCadet on the same keys?

**URL:** <https://community.keyboard.io/t/can-oneshot-be-used-with-spacecadet-on-the-same-keys/3176>\
**Category:** Plugins\
**Created:** [September 16, 2019, 2:29am UTC](https://community.keyboard.io/t/can-oneshot-be-used-with-spacecadet-on-the-same-keys/3176 "2019-09-16T02:29:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benze](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/benze/32/2798_2.png) [@benze](https://community.keyboard.io/u/benze)\
**Post date:** [September 16, 2019, 2:29am UTC](https://community.keyboard.io/t/can-oneshot-be-used-with-spacecadet-on-the-same-keys/3176/1 "2019-09-16T02:29:10Z")

</div>

I’d like to use both OneShot and SpaceCadet on the same keys on the thumb-arcs. But I get the impression that these two plugins are not compatible. Ex: Using OneShot on a Left-Shift and SpaceCadet to use the Left-Shift for a Left-Parenthesis.

So instead, what I’m looking to see if there is a way to change the mappings dynamically, For example, use a Fn key combination to enable SpaceCadet, and when SC is active, it overrides (or disables) the OneShot plugin on the specific modifiers.

Is something like this feasible?

Thanks,

Eric

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [September 16, 2019, 7:14am UTC](https://community.keyboard.io/t/can-oneshot-be-used-with-spacecadet-on-the-same-keys/3176/2 "2019-09-16T07:14:15Z")

</div>

The closest thing I can think of is to use a layer: `Fn` would simply switch to a layer where the shifts are not one-shot, so SpaceCadet would work on them.

---

<div class="post-metadata">

**Author:** ![benze](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/benze/32/2798_2.png) [@benze](https://community.keyboard.io/u/benze)\
**Post date:** [September 17, 2019, 1:23am UTC](https://community.keyboard.io/t/can-oneshot-be-used-with-spacecadet-on-the-same-keys/3176/3 "2019-09-17T01:23:03Z")

</div>

Thanks for the suggestion. I’ve read through the firmware docs a handful of times, and read through the forums, but still a little unclear as to LOCK\_LAYER() and UNLOCK\_LAYER(). Is it safe to say that LOCK\_LAYER() is essentially “enable functionality for layer x”, whereas UNLOCK\_LAYER() is “ignore layer x”? That would be the only way I could see this working.

For example, layers would be:  
FUNCTION  
NUMLOCK  
SPACE\_CADET  
QWERTY

Where QWERTY contains the OneShot definitions, and the SPACE\_CADET layer contains the original/non-OneShot key definitions.

The Keyboard would boot with UNLOCK\_LAYER(SPACE\_CADET), and upon triggering the SC key, it would both LOCK\_LAYER(SPACE\_CADET) and enable the SC plugin.

I’d also like to flash one of the LEDs based on the status of SpaceCadet. I’ve seen plugins that change an entire layer’s LEDs, but is there a way I can flash/turn on a LED for a specific key based on the status? For instance, if I map this SpaceCadet layer to Butteryfly-2, I’d like it to flash the `2-key` GREEN if it is enabling SC, and RED if it is turning it off. Or something similar.

Thanks,

Eric
