Changed order of keyboard lookups.

  First lookup current-mode, then the global.  This makes more
 logical sense.
  Removed get_global/set_global.

  `get_global` was unused, and `set_global` was only used once.