Fix keyboard shortcuts

When the function doesn't return false the keypress is passed to the browser
which shouldn't happen.
Merge pull request #248 from Makkes/fix-keybindings

Fix keyboard shortcuts