a javascript script to make it support hotkey