I want to automate my typing. I can use window managers such as gnome and fvwm.
I can access to ubuntu and obsd.
There are several tools to simulate a key press, for example xdotool. Although the underlying interface uses keycodes,
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):
¹ I might be able to dig up some Python if there's demand.