Re: Detect a sequence of keystrokes in an os independent way

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rajanikanth Jammalamadaka

    #1

    Re: Detect a sequence of keystrokes in an os independent way

    Hi!

    I was able to do this in the following way:

    import os

    fKey= raw_input('')
    if fKey=='ab':
    print(os.listdi r(os.getcwd()))


    Is there a better way to do this?

    Thanks,

    Raj

    On Wed, Aug 20, 2008 at 2:21 PM, Rajanikanth Jammalamadaka
    <rajanikanth@gm ail.comwrote:
    Hi!
    >
    Can somebody tell me if there is an os independent way to detect a
    sequence of key strokes. For example, I want to start some other
    program once the user presses a couple of keys: ex: key a and then key
    b
    >
    Thanks,
    >
    Raj
    >
    --
    "For him who has conquered the mind, the mind is the best of friends;
    but for one who has failed to do so, his very mind will be the
    greatest enemy."
    >
    Rajanikanth
    >


    --
    "For him who has conquered the mind, the mind is the best of friends;
    but for one who has failed to do so, his very mind will be the
    greatest enemy."

    Rajanikanth
Working...