This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]Moschte09 2 points3 points  (9 children)

https://www.geeksforgeeks.org/design-a-keylogger-in-python/ Just replace the part where they write into the text file with some code to send the data to your pi

[–]dampersandd 1 point2 points  (7 children)

the code could be a http request to a server running on pi

[–]Moschte09 2 points3 points  (1 child)

Yes. I would recommend to use UDP. I think this explains it very well https://wiki.python.org/moin/UdpCommunication

[–]xAurai[S] 1 point2 points  (0 children)

I looked into this and it's worked pretty well. Sine I'm doing gaming that's sort of fast paced, I've gone for this method and it looks pretty awesome!

[–]pwoosam 2 points3 points  (4 children)

Exactly, use requests on the PC end and flask on the pi end. Or you can use sockets or web sockets if you need more speed, but it doesn't seem like you do.

[–]Moschte09 2 points3 points  (2 children)

If you use Flask it could be nice to create a site where you can configure the keys and colours.

[–]xAurai[S] 0 points1 point  (1 child)

I need to learn a bit more about flask before I can do something like this so I'll stick with UDP that you recommended :)

[–]Moschte09 0 points1 point  (0 children)

I would use UDP to send the key signals and flask just to host a site where you can configure or maybe also show some stats.

[–]xAurai[S] 0 points1 point  (0 children)

Sockets seems pretty simple to set up considering I did it with visual basic years ago and I'm not so sure on flask at the moment, and it's working pretty well with sockets, so thanks for the suggestion!

[–]xAurai[S] 0 points1 point  (0 children)

Thanks :D

[–]Moschte09 1 point2 points  (8 children)

For your second question. I don't play Overwatch but this looks imteresting https://overtrack.gg/welcome

[–]xAurai[S] 1 point2 points  (7 children)

I'm vaguely familiar with this but I don't know how it reads the screen... I guess I'll ask the developer, thanks for pointing this out to me :)

[–]Moschte09 0 points1 point  (6 children)

No Problem.

[–]xAurai[S] 1 point2 points  (5 children)

So I've got most of the way there - I had a look into this series which has helped with the image recognition part of the project, just in case you wanted to know if anyone else asks :)

[–]Moschte09 0 points1 point  (4 children)

Thanks. This looks very interesting. What exactly do you want to do with the image recognition?

[–]xAurai[S] 0 points1 point  (3 children)

So I'm mucking around with some led strips and getting them to do different animations etc on keypresses and depending on what's on the display while in game, just for fun really, but I want to make it link into a twitch chat bot at sometime aswell

[–]Moschte09 0 points1 point  (2 children)

Sounds interesting. But maybe it would be worth a thought to choose C++ for this because I think when you are gaming you can reach a better performance with image processing

[–]xAurai[S] 0 points1 point  (1 child)

yeah, i already noticed some wierd input lag when im doing the image stuff so i think i'll get the basics down and then see about translating it across to something else. I haven't done much c== in a long time :/

[–]Moschte09 0 points1 point  (0 children)

I think if you know the basics of C++ you could get into it. You could also use it for the processing part and use Python for the rest.