Change keyboard shortcut context

closes #4247
- added scope to every shortcut, the scope of shortcut is default to
  'default'
- add shortcut `enter` to modal which confirm the modal
- shortcut `enter` and `esc` now have scope 'modal'
- when lunch a modal, scope is switching to 'modal', and set back to
  'default' when close
- shortcut `enter` now confirm the dialog without conflicting with route
  shortcuts
We try to keep all our variable declarations together as much as possible, but I see that you have to do this up here.
Can you move the declarations for action and options out of the key function below and up to where you're declaring scope?