Global hotkey for .net, plus some helper functions