I usually use java.awt.Robot when I want to simulate keyboard and mouse entries and it work very well.
Recently I heard of another language, Lua, and I try it. I wrote some little programs that work well, but now I'm tying to simulate a keyboard like in java but I can't make it work.
The most frustrating part is that I find example that use a PressAndReleaseKey('someKey') function in Lua with google, and these codes seems to require no library, however I can't make this function work (they also seems to be always related to logitech so maybe it's only usable within logitech drivers?). So I'm not sure it is what I'm searching for.
So, in short, my question is: How can I simulate a keyboard entry with a Lua program?
For example, if I type in my terminal
lua test.lua
with this file been like that:
while(true) do
thefunctionIsearch('a')
end
then the program is supposed to type the letter 'a' infinitely.
I am on Linux (Ubuntu) if it something.