Allow intercepting keyboard events

This will be needed by ImageJ2's LegacyUI to install commands with
accelerators, e.g. the script editor.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge pull request #21 from imagej/intercept-key-presses

Allow intercepting keyboard events