# Selectable

## Using States

Selectable can store selections that can be retrieved at any time.

You can set the instance to save the current state when the current selection is changed by using the `saveState` option.

You can use `ctrl + z` to undo a selection and `ctrl + y` to restore / redo an undone selection.

The `state()` method can be used to manually save, load, undo, redo and clear states.

The instance will also fire it's own custom events corresponding to the state event. See `state.save`, `state.undo` and `state.redo`.

#### Heads Up!

If you have defined a container with the `appendTo` option, you must have the mouse pointer over the container for the keyboard controls to work. This prevents overriding the default keyboard controls for the webpage.