Add support for F keys in hotkey interface.
Make hotkey_listener active only in the hotkeys interface
Do some clean up.