# Any way to detect if both Fn keys are being held at the same time?

**URL:** <https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007>\
**Category:** Programming\
**Created:** [September 9, 2018, 9:43am UTC](https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007 "2018-09-09T09:43:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonictk](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@sonictk](https://community.keyboard.io/u/sonictk)\
**Post date:** [September 9, 2018, 9:43am UTC](https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007/1 "2018-09-09T09:43:25Z")

</div>

I’d like to have a new layer of keys be activated, but only when both the Fn keys are held down at the same time. Is this possible to do? I was taking a quick look at the documentation and available scancodes but this wasn’t immediately obvious.

---

<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 9, 2018, 11:58am UTC](https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007/2 "2018-09-09T11:58:59Z")

</div>

Have both `Fn` keys be a `ShiftToLayer(FN)`, and on the `FN` layer, map the same positions to another layer (lets call it `THIRD`), by replacing the transparent keys in the Fn position with `ShiftToLayer(THIRD)`.

If you press the left `Fn` key, it will switch to the `FN` layer, if you then press the right one, it will switch further to `THIRD`. The other way around works the same. The only time it does not work is when you press both keys in the same cycle (might work in that case too, but… that’s a bit of a stretch).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![sonictk](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@sonictk](https://community.keyboard.io/u/sonictk)\
**Post date:** [September 9, 2018, 8:24pm UTC](https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007/3 "2018-09-09T20:24:45Z")

</div>

As usual, I overthink what should be a simple solution. Exactly what I needed, thank you.

---

<div class="post-metadata">

**Author:** ![shane0](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/shane0/32/2317_2.png) [@shane0](https://community.keyboard.io/u/shane0)\
**Post date:** [November 23, 2018, 10:20pm UTC](https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007/4 "2018-11-23T22:20:08Z")

</div>

k I tried this, not sure if it’s my code or a bug yet but it partially works

my left fn is a numpad layer, the right is a function layer

my numpad layer right fn shifts to mouselayer, this works

my fn layer left fn is mapped to a macro layer, this doesn’t work

I’m also using space cadet

---

<div class="post-metadata">

**Author:** ![rumpel](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/rumpel/32/626_2.png) [@rumpel](https://community.keyboard.io/u/rumpel)\
**Post date:** [November 24, 2018, 11:19pm UTC](https://community.keyboard.io/t/any-way-to-detect-if-both-fn-keys-are-being-held-at-the-same-time/2007/5 "2018-11-24T23:19:43Z")

</div>

Try using the MagicCombo plugin for this. I found it is the best solution.
