You'll find that the input plugins are using Direct Input and won't respond to keystate messages sent to the graphic window in that way. I'll put together an application that will send keystrokes using a low-level API function called by the keyboard device driver and see if that works.
EDIT: Doesn't seem to work with ePSXe. On a side note, closing the ePSXe graphic window leaves ePSXe.exe dangling, that's why it doesn't save the memcards.
EDIT: Doesn't seem to work with ePSXe. On a side note, closing the ePSXe graphic window leaves ePSXe.exe dangling, that's why it doesn't save the memcards.