I want to automate my typing. I can use window managers such as gnome and fvwm.
I can access to ubuntu and obsd.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There are several tools to simulate a key press, for example xdotool. Although the underlying interface uses keycodes,
xdotool does the job of translating keysyms back into keysyms, which is usually very convenient.
If you really need to specify a keycode, I don't know of a command line utility for that, but you can write a small C or python or $favorite_language program¹. Again, you almost always want to specify keysyms, not keycodes.
To do something every minute, either put it in a crontab, or write a shell loop (you probably want the latter, so you can kill it easily):
while sleep 60; do xdotool key A; done
¹ I might be able to dig up some Python if there's demand.