# Tab key sticking, appears to be a firmware issue – how can I debug?

**URL:** <https://community.keyboard.io/t/tab-key-sticking-appears-to-be-a-firmware-issue-how-can-i-debug/4644>\
**Category:** Programming\
**Created:** [February 23, 2021, 5:26pm UTC](https://community.keyboard.io/t/tab-key-sticking-appears-to-be-a-firmware-issue-how-can-i-debug/4644 "2021-02-23T17:26:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![travis](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/travis/32/3158_2.png) [@travis](https://community.keyboard.io/u/travis)\
**Post date:** [February 23, 2021, 5:26pm UTC](https://community.keyboard.io/t/tab-key-sticking-appears-to-be-a-firmware-issue-how-can-i-debug/4644/1 "2021-02-23T17:26:17Z")

</div>

Recently, my tab key started “sticking” – if I tap it once, my OS continues to receive tab key presses as if it were held down/repeating. As soon as I tap another key, the repeating stops.

I took my board apart, and checking resistance at the key switch, it does not appear as though this is a problem in the key switch itself; as soon as I release the key physically, resistance goes to infinity. However, the key repeat continues.

The particularly odd thing is that this behavior started spontaneously; it was not tied to any changes to my firmware.

Once I realized the physical switch was likely not at fault (though I had already tried the alcohol cleaning method a couple of times), I started poking at my firmware. I ended up updating Kaleidoscope and making the necessary changes to accommodate that update, and at some point the problem disappeared. I assumed somehow updating or re-flashing my firmware enough times fixed it.

However, today it’s back 😢

Are there things I can do to further debug this? I’ve tried restarting my OS, uninstalling [Karabiner-Elements](https://karabiner-elements.pqrs.org/) (because it’s keyboard-related and I was trying anything I could think of), but nothing has had any effect that I can tell.

My [current firmware as of this writing is here](https://github.com/tnorthcutt/Model01-Firmware/blob/07ec6784e7e99b592bc6df918bc879ac15668a28/Model01-Firmware.ino) in case anyone is feeling extra generous and spots anything suspect.

After writing the above, I thought “I should try the default firmware one more time”. So now, after installing that, I can report that with the default firmware, my keyboard is sending whatever key is pressed, _and also the “right option” key_ each time. This is as reported by Karabiner EventViewer, and by matching up the output with what happens on my MBP built-in keyboard when pressing a key with alt/option held down. E.g. if I tap the `A` key on my Model 01 with default firmware installed, I get: `å`, which matches what happens if I hold alt and tap that on my MBP keyboard: `å`.

This seems _really bizarre_ to me. Perhaps this provides more clues as to what’s going on?

Thanks for any help debugging this; it’s driving me rather nuts.

---

<div class="post-metadata">

**Author:** ![travis](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/travis/32/3158_2.png) [@travis](https://community.keyboard.io/u/travis)\
**Post date:** [February 23, 2021, 7:07pm UTC](https://community.keyboard.io/t/tab-key-sticking-appears-to-be-a-firmware-issue-how-can-i-debug/4644/2 "2021-02-23T19:07:57Z")

</div>

Update: I think I _may_ have fixed it, but removing unused mappings that sent tab presses, as seen in this commit: [https://github.com/tnorthcutt/Model01-Firmware/commit/3ba9727ad7e095afcf1cb12d8f49153624fc31c7](https://github.com/tnorthcutt/Model01-Firmware/commit/3ba9727ad7e095afcf1cb12d8f49153624fc31c7)

But, I’m still not sure that’s what fixed it, since I also thought I fixed it a few days ago, only for the problem to spontaneously (this is the baffling part!) reappear.

---

<div class="post-metadata">

**Author:** ![travis](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/travis/32/3158_2.png) [@travis](https://community.keyboard.io/u/travis)\
**Post date:** [February 23, 2021, 8:49pm UTC](https://community.keyboard.io/t/tab-key-sticking-appears-to-be-a-firmware-issue-how-can-i-debug/4644/3 "2021-02-23T20:49:24Z")

</div>

Well, the latest changes now appear to have disabled all of my macros/magic combos 🙃

…is there a way to debug those not working?

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [February 25, 2021, 12:44am UTC](https://community.keyboard.io/t/tab-key-sticking-appears-to-be-a-firmware-issue-how-can-i-debug/4644/4 "2021-02-25T00:44:52Z")

</div>

Two things:

1. Have you used Chrysalis to configure a keymap in EEPROM? That would override the hard-coded one in your Kaleidoscope sketch.

2. The repository for your Kaleidoscope sketch appears to be private (or otherwise inaccessible), so I can’t see your code via the links you posted.
