Currently the onPress hotkey action for gui elements are called repeatedly when holding a hotkey (except for special keys on linux due to #4915). However in most cases only the first press is relevant and we can save perfomance with only executing on the first such message. massbarter and batchtrain are examples of such. Some other hotkey (like tab scrolling and idle unit) still need the repeated events and get so.
Also generalize the GlobalHotkeys from rP22851 to allow different events.