Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ethan Smith
    @ethanhs
    If you have questions, ask them here
    I will be notified
    Jakub Semik
    @gradam
    Hi. I just found out pyhooked and i`m wondering how can i stop hook. I mean when i call listen(). How to stop it?
    Ethan Smith
    @ethanhs
    Hi
    You can call hk.RemHotKey()
    the full docs are here
    @gradam Does that help?
    will wade
    @willwade
    Great module. How do you recommend sending key presses etc from python?
    will wade
    @willwade
    yeah - its ok - but I'm looking for something a bit more cross platform. this tries to do it : https://github.com/SavinaRoja/PyUserInput - but its got some nasty bugs that Ive been racking my head around on the mac for a while (years!) now
    Ethan Smith
    @ethanhs
    Ah. I always use pyautogui.
    Ethan Smith
    @ethanhs
    @willwade , did that help?
    xor
    @xor
    https://sourceforge.net/p/pyhook/wiki/PyHook_Tutorial/#message-pump | The message pump with pyHook isn't required if we are using a GUI toolkit. Is the same true with pyhooked?
    Ethan Smith
    @ethanhs
    @xor these are not the same projects!
    xor
    @xor
    I understand these are not the same projects. I'm asking if pyhooked works the same way as pyHook. Since pyHook can skip the PumpMessages() method call when a GUI toolkit is used, I'm asking if, with pyhooked, I can skip the listen() method call under the same conditions.
    Ethan Smith
    @ethanhs
    No, they have completely different apis.
    Or functions etc
    Ethan Smith
    @ethanhs
    You should always use listen. It is the design of the library
    xor
    @xor
    Thanks for the help.
    Ethan Smith
    @ethanhs
    fyi, if anyone is watching, I will be likely releasing a 1.0 version soon
    It will likely be released either Friday or Saturday
    Loïc Pinsard
    @Muream

    hey there, first of all, Pyhooked works great for me, i've tried pyhk before and I found it slow (maybe it was my script's fault but ), I couldn't press any other key while pressing the hotkey (annoying when I my script was meant to be use when recording footage for videogames haha) anyway, pyhooked works really well!
    i've got 2 questions though :
    -why does pip install pyhooked gives me v0.9 when "pip install git+https://github.com/IronManMark20/hooked.git

    " gives me 0

    0.7
    If i recall correctly I had an error with 0.9 when I tried it and 0.7 works well
    second question : when I press middle mouse button, it prints something in the console, is this meant or is this something you forgot to remove?
    (i'ts by no mean annoying, i'm just wondering)
    Ethan Smith
    @ethanhs
    The 0.9 version is wrongly numbered.
    The git is the latest. With the development branch at 0.8
    Loïc Pinsard
    @Muream
    Oh alright haha
    Ethan Smith
    @ethanhs
    I believe the middle mouse button is not considered in the hooks at the moment. There is a if mouse left, elif....and at the bottom an else statement to print key codes not known.
    So if you post what is printed, I can add it to the 0.8 version.
    Loïc Pinsard
    @Muream
    It prints out something like this : "MouseEvents(event_type='middle down', mouse_x=1053, mouse_y=532)"
    is that what you wanted to know?
    Ethan Smith
    @ethanhs
    Hm. I'll take a look. Probably I forgot to implement it :)
    Loïc Pinsard
    @Muream
    hehe :D
    thewindkee
    @thewindkee
    How to register a hotkey? hk = Hook(),
    hk.Hotkey(["RCtrl","F5"], foo)?
    but the message is : 'Hook' object has no attribute 'Hotkey'
    Ethan Smith
    @ethanhs
    That is the old api. Now you use a handler, which you pass to Hook.
    Look at the example.py I'm the master branch for an example.
    *in the master branch