Set the mode after running a command in the command.

This make the commands more flexible, because we don't need to set the mode
after a command is called from somewhere else than the input box.
Fixed none working keybindings with a 1.

If a keybind contained a 1 this was only checked if it where uppercase, and
the shift mask was added to the keybinding. Indeed the 1 is uppercase and
lowercase together, so we ignore such cases where the char is available in
both cases.