add modes for keybindings, fixes #1