First part of code to allow configurable hotkeys.