You should write your own python script. Please take a look at a simple monkeyrunner program from Android doc and an example from this tutorial. When you write the sript don't use these types of events:
device.press('KEYCODE_POWER', 'DOWN_AND_UP')
device.press('KEYCODE_POWER', 'DOWN')
device.press('KEYCODE_POWER', 'UP')
which are reponsible for screen lock (more key codes). In order to run your own script use:
mokeyrunner srcipt_name.py
Another solution could be avoiding s (pseudo-random number generator) flag in adb shell monkey command. Then use interesting flags except for --pct-syskeys (These are keys that are generally reserved for use by the system, such as Home, Back, Start Call, End Call, or Volume controls.) More flags you find in http://developer.android.com/tools/help/monkey.html