h2. Aloha HotKeys

endprologue.

Add and remove HotKey handler for keyboard events supporting almost any key combination.

The syntax is as follows:
<javascript>
    $(document).bind('keydown', 'ctrl+a', fn);
</javascript>


Example configuration for inserting a Link with the HotKey `Ctrl-u` (default: `Ctrl-l`)
<javascript>
Aloha.settings = {
	plugins: {
		link: {
			hotKey: { insertLink: 'ctrl+u' }
		}
	}
}
</javascript>

## Types
Supported types are `'keydown'`, `'keyup'` and `'keypress'`

### Addendum
Firefox is the most liberal one in the manner of letting you capture all short-cuts even those that are built-in in the browser such as `Ctrl-t` for new tab, or `Ctrl-a` for selecting all text. You can always bubble them up to the browser by returning `true` in your handler.

Others, (IE) either let you handle built-in short-cuts, but will add their functionality after your code has executed. Or (Opera/Safari) will *not* pass those events to the DOM at all.

*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.*

Code from "jquery.hotkeys":https://github.com/jeresig/jquery.hotkeys

WARNING: The HotKey feature is still being developed. Not all shortcuts are available at the moment.


|_. Document action |_. Shortcut |
| Select all | Ctrl+A |
| Copy | Ctrl+C |
| Paste | Ctrl+V |
| Cut | Ctrl+X |
| Undo* | Ctrl+Z |
| Redo* | Ctrl+Y |
| Increase paragraph indentation* | Tab |
| Decrease paragraph indentation* | Shift+Tab |


|_. Text formatting |_. Shortcut |
| Bold | Ctrl+B |
| Italicize | Ctrl+I |
| Underline | Ctrl+U |
| Superscript | Ctrl+. |
| Subscript | Ctrl+, |
| Clear formatting | Ctrl+\ |


|_. Paragraph formatting |_. Shortcut |
| Normal paragraph style | Ctrl+Alt+0 |
| Header style 1 | Ctrl+Alt+1 |
| Header style 2 | Ctrl+Alt+2 |
| Header style 3 | Ctrl+Alt+3 |
| Header style 4 | Ctrl+Alt+4 |
| Header style 5 | Ctrl+Alt+5 |
| Header style 6 | Ctrl+Alt+6 |
| Preformatted | Ctrl+Alt+P |
| Left alignment* | Ctrl+Shift+L |
| Center alignment* | Ctrl+Shift+E |
| Right alignment* | Ctrl+Shift+R |
| Full justify* | Ctrl+Shift+J |
| Numbered list* | Ctrl+Shift+7 |
| Bulleted list* | Ctrl+Shift+8 |


|_. Actions |_. Shortcut |
| Insert link | Ctrl+K |


|_. Navigation |_. Shortcut |
| Move to next heading* | Ctrl + Alt + N then Ctrl + Alt + H |
| Move to previous heading* | Ctrl + Alt + P then Ctrl + Alt + H |


|_. Plugins |_. Shortcut |
| WAI Lang: Insert Annotation | Ctrl+Shift+l |


*) not implemented yet
Reference: https://docs.google.com/support/bin/answer.py?answer=179738
