Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

[Keylogger] PyNput will sometimes override "enter"

Basically my issue is that when using PyNput listener, sometimes the enter key will just NOT work anymore.
I've looked at the docs and support tickets and such for the library and I think I'm the only one with this issue. It could be the way I formatted it, because I'm not the best with threading.

Code
    with Listener(on_release=on_release) as keyboardlistener:
with mouse.Listener(on_click=on_click) as mouselistener:
   keyboardlistener.join()
    mouselistener.join()

I believe this is the main issue. I don't really know of a better way to listen for both so I did sort of 2 (?) loops at the same time, and it may be overriding some input.

Here is my full code, minus some FTP details:
Edit: I can't actually post links until 50+ posts. So, here's the whole thing I guess.
Spoiler (Click to View)
I know, my code is unorganized and very unoptimized. I didn't think anyone would see it.

Thanks for any help in advance!
I don't really know that module, but I'd highly recommend pyhook and pythoncom (it'll require it to work). This way you can customize it in whatever way you'd like. I'll also detect Enter, Left Shift, Right Shift, function keys etc... pretty much anything your heart desires
[Image: 5BgQiIm.gif]

(Mar 10, 2017 06:51 PM)TheWarOwl Wrote:  I don't really know that module, but I'd highly recommend pyhook and pythoncom (it'll require it to work). This way you can customize it in whatever way you'd like. I'll also detect Enter, Left Shift, Right Shift, function keys etc... pretty much anything your heart desires

Its worth a look but that's not the issue, It logs enter just fine, but sometimes enter doesnt register on the operating system. I've tested it on a VM so its not a user specific issue. Enter is being pressed and somehow it logs that enter was pressed, yet the in-between of the OS actually performing the action of pressing enter sometimes doesn't happen. And its just that one key, I played a game with it active and common keys like control, shift etc work and log just fine.

Just wondering if there's any other way to do the two nested "with x as y"s.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by slipperypeteMar 13, 2020 08:48 PM 0 82 Mar 13, 2020 08:48 PM
Last Post: slipperypete
[Python] by CyberErrorJan 9, 2019 10:29 AM 4 170 Jan 9, 2019 10:29 AM
Last Post: Ghxst
[Python] by TheWarOwlJul 31, 2017 01:38 PM 2 514 Jul 31, 2017 01:38 PM
Last Post: TheWarOwl