how to trigger a keyevent manually

hi…

I’ve one question to ask u all…

how to generate or manually trigger a keypress event from an event handler or function?..

For ex, if i call keypress(char) then a particular (char) keyevent must be occurred…

advanced thanks… hopefully expecting ur reply…

plz reply it to my mail id : murali.au@gmail.com

Hi,

hi...

I've one question to ask u all...

how to generate or manually trigger a keypress event from an event handler or function?...

For ex, if i call keypress(char) then a particular (char) keyevent must be occurred..

advanced thanks... hopefully expecting ur reply..

plz reply it to my mail id : murali.au@gmail.com <mailto:murali.au@gmail.com>

You may be able to use wx.CommandEvent...although I'm not certain that a key event is a command event...hmmm, in looking at it further, I think that was a red herring. Try reading through this thread and see if it gives you any ideas:

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

hi…

I’ve one question to ask u all…

how to generate or send a keypress event from our application?..

For ex, if i call keypress(char) then a particular (char) keyevent must be occurred…

i came to know about
wx.post event
wx.command event
emulate key press

but i’m end up with no useful examples…
plz anybody explain this with examples if it is possible in wxpython…

advanced thanks… hopefully expecting ur reply…

plz reply it to my mail id : murali.au@gmail.com

Murali kumar wrote:

hi...

I've one question to ask u all...

how to generate or send a keypress event from our application?...

For ex, if i call keypress(char) then a particular (char) keyevent must be occurred..

i came to know about
wx.post event
wx.command event
emulate key press

but i'm end up with no useful examples..
plz anybody explain this with examples if it is possible in wxpython..

advanced thanks... hopefully expecting ur reply..

plz reply it to my mail id : murali.au@gmail.com <mailto:murali.au@gmail.com>

Did you read that thread? It didn't sound like there was a cross-platform way to do this, but Kevin et al were looking for a way to do it. Anyway, on Windows, there's the SendKeys module, which may or may not be what you are looking for.

http://www.rutherfurd.net/python/sendkeys/

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org