Keyboard Sensor Element

KSNS is an element that detects key presses and allows users to create complex electronics that depend on key inputs. It'll facilitate game saves and all sorts of creations. 

## How KSNS works

KSNS has two 'modes': simple and advanced. 

In simple mode (tmp = 0), KSNS sparks a wire according to a cardinal direction, only responding to arrow keys. If you, for example, press the down arrow key, then KSNS sparks any type of wire leading downward from the particle (see image). Simple mode also works with more than one arrow key held down simultaneously. 

![Directional wires](http://puu.sh/75WZp.png)

In advanced mode (tmp = 1), KSNS will check if its `tmp` value, which you can set manually to the key code you want to catch, equals its `life` value (the life value is set via key events to the currently effective key code, providing a nice way to debug the element), and if it does, sparks a regular wire particle around it.

![Advanced mode](http://i.imgur.com/QIuRNOy.png)

---

An example Windows 32-bit build is accessible [here][w32]. 

[w32]: https://dl.dropboxusercontent.com/u/22100200/bin/tpt/various/keyboard-sensor-element.exe