Moving a lot of the hotkey lib from C to Lua!