I'm looking for a simple way to run my own function if player press any key (any mean really any that game can read, for example "Del", "F1-F12", "Tab" and so on... i think only "Fn" key is not readable by default.
First i tried to use this code:
Lua Code:
function Test()
print("Test")
end
WorldFrame:SetScript("OnKeyDown", Test); -- Or UIParent:SetScript("OnKeyUp/Down", Test);
But it freeze all input from my keyboard to game - other words, i can't move my character, every keypress print "Test" in chat, so i can control game only with mouse. Any solutions?
PS. I don't care about what key has been pressed, i just need run function Test() if any key was pressed.