# Key has no member setKeyCode

**URL:** <https://community.keyboard.io/t/key-has-no-member-setkeycode/3412>\
**Category:** Uncategorized\
**Created:** [December 13, 2019, 4:38pm UTC](https://community.keyboard.io/t/key-has-no-member-setkeycode/3412 "2019-12-13T16:38:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gio](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/gio/32/2003_2.png) [@gio](https://community.keyboard.io/u/gio)\
**Post date:** [December 13, 2019, 4:38pm UTC](https://community.keyboard.io/t/key-has-no-member-setkeycode/3412/1 "2019-12-13T16:38:56Z")

</div>

Hi,

I’m trying to compile the stock firmware. As far as I’m aware, I’m using the latest revision. When doing `make flash` I get this error:

```auto
/Model01-Firmware.ino:308:13: error: 'Key {aka union kaleidoscope::Key}' has no member named 'setKeyCode'
     lastKey.setKeyCode(Key_A.getKeyCode() + (uint8_t)(millis() % 36));
             ^ ~~~~~~~~~
/Model01-Firmware/Model01-Firmware.ino:308:30: error: 'Key {aka union kaleidoscope::Key}' has no member named 'getKeyCode'
     lastKey.setKeyCode(Key_A.getKeyCode() + (uint8_t)(millis() % 36));

```

My google-fu didn’t help me. The `Model01-Firmware.ino` comes from Github.

---

<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:** [December 13, 2019, 5:54pm UTC](https://community.keyboard.io/t/key-has-no-member-setkeycode/3412/2 "2019-12-13T17:54:08Z")

</div>

> [@gio](#):
>
> My google-fu didn’t help me. The `Model01-Firmware.ino` comes from Github.

The firmware is made up from two main parts, the `Model01-Firmware` repo, which we call the sketch, and `Kaleidoscope`, the firmware library the sketch builds upon. The vast majority of development happens in `Kaleidoscope`. In this case, your `Model01-Firmware` has been updated to a version that requires a newer `Kaleidoscope` too.

If you installed Kaleidoscope via the Arduino IDE, then there’s three ways to fix the issue:

1. Roll back `Model01-Firmware` to a version that does not require the new Kaleidoscope yet. You can do this with `git checkout -b key-union 4299824b114a001fd74ae790669ff0d39563d62d`. If you later want to update to the latest again, then `git checkout master && git pull` will do the trick.
2. Remove the bundle you installed via the Arduino IDE, and install directly with git. See the [README](https://github.com/keyboardio/Kaleidoscope#get-into-the-right-directory) in the Kaleidoscope repo for steps how to do that.
3. Wait until @jesse releases a new version of the bundle, and update it via the Arduino IDE.

Hope this helps!
