emulate a key press

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bart Nessux

    emulate a key press

    This probaly isn't possible with Python, but I thought I'd ask.

    I want to emulate a key press programatically . I want the computer (G5
    running Mac OSX 10.3) to think that the user has pressed the space bar on
    the keyboard. Any module in Python that makes this easy? If not, I'll do
    something in C.
  • Bob Ippolito

    #2
    Re: emulate a key press

    On 2004-02-29 11:51:54 -0500, Bart Nessux <bart_nessux@ho tmail.com> said:
    [color=blue]
    > This probaly isn't possible with Python, but I thought I'd ask.
    >
    > I want to emulate a key press programatically . I want the computer (G5
    > running Mac OSX 10.3) to think that the user has pressed the space bar on
    > the keyboard. Any module in Python that makes this easy? If not, I'll do
    > something in C.[/color]

    I'm pretty sure you'll have to do that in C, I don't believe the API is
    wrapped. An even easier way would be to use Pyrex to create a Python
    extension for what you are trying to do.

    -bob

    Comment

    • Bob Ippolito

      #3
      Re: emulate a key press

      On 2004-02-29 13:02:54 -0500, Bob Ippolito <bob@redivi.com > said:
      [color=blue]
      > On 2004-02-29 11:51:54 -0500, Bart Nessux <bart_nessux@ho tmail.com> said:
      >[color=green]
      >> This probaly isn't possible with Python, but I thought I'd ask.
      >>
      >> I want to emulate a key press programatically . I want the computer (G5
      >> running Mac OSX 10.3) to think that the user has pressed the space bar on
      >> the keyboard. Any module in Python that makes this easy? If not, I'll do
      >> something in C.[/color]
      >
      > I'm pretty sure you'll have to do that in C, I don't believe the API is
      > wrapped. An even easier way would be to use Pyrex to create a Python
      > extension for what you are trying to do.[/color]

      Oh, and a better place to ask this question would probably be the
      pythonmac-sig list.

      -bob

      Comment

      Working...