# What are \`INJECTED\` keys for?

**URL:** <https://community.keyboard.io/t/what-are-injected-keys-for/799>\
**Category:** Kaleidoscope Internals\
**Tags:** question\
**Created:** [November 26, 2017, 6:03pm UTC](https://community.keyboard.io/t/what-are-injected-keys-for/799 "2017-11-26T18:03:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 26, 2017, 6:21pm UTC](https://community.keyboard.io/t/what-are-injected-keys-for/799/2 "2017-11-26T18:21:31Z")

</div>

`INJECTED` is to allow plugins to ignore key events, so they won’t end up in an endless loop (like `SpaceCadet` trying to turn a shift into a paren over and over and over again). It is not redundant with `UNKNOWN_KEYSWITCH_LOCATION`, because plenty of `INJECTED` keys retain the coordinates of the originating key (like `SpaceCadet`). Whenever the cost of storing the original location is cheap (or zero) we tried to preserve the coordinates. We only use `UNKNOWN_KEYSWITCH_LOCATION` when the original position is not available, usually because it would be too complex, or too big to store. For example, for one-shot keys, we’d have to store the position of _all_ active oneshots, and that’d be costy. With `SpaceCadet`, we do everything in a single event handler, which gets the coordinates as arguments anyway, so the cost is zero.

---

_[View the full topic](https://community.keyboard.io/t/what-are-injected-keys-for/799)._
