Share your repls and programming experiences

← Back to all posts
I made a new program that puts your key presses in the log.
eekboi (62)

My Repl takes the letters you type and puts it into the log, instead of having to use old, rackety, overall poorly coded websites that spam your email after you sign up, all you need to do is sign up to repl.it and youll be set. Any Questions, Comments, Concerns? tell me in the comments!

Commentshotnewtop
PeterChaplin_Sm (5)

All of this is un-necessary and super inefficient when you could just use these four lines:

from getkey import *
while True :
  key = getkey( )
  print(key, "KEY PRESSED")

Advantages to this:

  • less work
  • more efficient
  • shows capitalization, symbols and numbers
eekboi (62)

@PeterChaplin_Sm Look at other comments, I know youre trying to help and all, but i simply like the look of long code. And if i happen to need it in a longer bit of code i will use it.

sugarfi (159)

@eekboi If you want to have long code, you should use a dictionary instead of lots of if statements. It is more Pythonic.

MrEconomical (1464)

@eekboi why do you like longer code? it's slower and often harder to debug, and doesn't make you look smart or anything

eekboi (62)

@sugarfi Will do. (For other creations.)

eekboi (62)

@MrEconomical Its more of an aesthetic kind of thing for less complex things. Im not trying to be smart, im not gonna fool anyone xD.

PeterChaplin_Sm (5)

@eekboi That's a very odd reason, the issue is this is just very long handed and doesn't cover all the keypresses on a keyboard because you're using a series of if statements. There's no point making stuff harder for yourself.

jhash (14)

For anyone asking, this code can be used for keylogging and making games.

LazyboyOrigin (0)

@jhash Yea exactly what i was thinking.

EthanCulp (14)

I mean, what? Are you joking about this or are you being serious about it? Why did you say that stuff about repl.it? are you trying to promote or something? I am sorry but I am really confused.

Zavexeon (936)

@EthanCulp I don't think they were talking about repl.it.

eekboi (62)

@ethanculp im not trying to promote or slander anything. im just stating the fact that some websites made to help you can make your online life a living hell, intentional or not. No im not talking about repl.it.

EthanCulp (14)

Welp, oh well, sorry bout that then @eekboi

maazzubair99 (112)

you could just print(key)

eekboi (62)

@maazzubair99 is that with the getkey i used with this script or vanilla python? is there a way i could do it on repl.it? I couldnt get it to work.

sugarfi (159)

@eekboi that should work with your getkey script., replace the if statements with print(key, 'KEY PRESSED'). That just prints the key and 'KEY PRESSED', giving the same output you have now, but allowing the user to type non-letter characters, like 0 or ?.

eekboi (62)

@sugarfi Thanks for clarifying. I most likely wont use it on this script bc i like complicated things lol. Ill make sure to keep that as a note.

ChezCoder (130)

@eekboi um you can make the code much shorter:

print("made by @eekboi and was co-made by @kai_justice. give credit if using. Thanks!")
from getkey import *

while True :
    key = getkey( )
    print(key)
eekboi (62)

@ChezCoder funny enough someone already mentioned this. I wont use this in this program bc i like things being complicated. also i like the look of long code.

JustinPhillip (18)

@eekboi Making things complicated is a cardinal sin of programming. Make things simple enough so that somebody else can improve on it later on.

3465728974563 (46)

@eekboi It's not very complicated if it's just mostly the same thing. And it shouldn't be a long line of code if there is an easy fix that makes it a lot more efficient and with a lo less lines of code used. Plus it's just looking at a long line of ctrl c + ctrl v, except just changing the value

eekboi (62)

@3465728974563 I get what everyone is saying, i just like the look, also at the time of posting this i didnt know most of these features.

IreoluwaRaufu (183)

@JustinPhillip, @eekboi didn't make more complicated, he made it more complex. In programming, that's totally acceptable, besides, it's his/her preference. :)

eekboi (62)

@IreoluwaRaufu Its a matter of style for not very complicated programs, This person gets it!

IreoluwaRaufu (183)

@eekboi
"Simple is better than complex.
Complex is better than complicated."

-The Zen of Python

maazzubair99 (112)

@eekboi yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Nettakrim (272)

yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

eekboi (62)

@Nettakrim Y KEY PRESSED E KEY PRESSED E KEY PRESSED E KEY PRESSED
im already tired lmao

JordanDixon1 (249)

This is very interesting, I didn't know getkey was a module in python. You just opened so many doors for me...

eekboi (62)

@dan82 Thanks! Any suggestions?

eekboi (62)

@epicman702 Yeah, i got that bug too, i only could replicate it once. I never could find how to fix it

Bookie0 (145)

Cool code! Like it’s satisfying to spam click and see row after row telling me what I clicked!

eekboi (62)

@Bookie0 Thanks for the support! Do you have any suggestions?

Bookie0 (145)

Hello, @eekboi
I have a small suggestion: maybe you could add color to the text, like if I press A, it A KEY PRESSED in red for example.
Then if I press B, it says B KEY PRESSED in yellow for example.

Myself I don’t know how to do that, so I can’t really give you any tips, but feel free to incorporate it into your code!

Anyway good job!

Have a nice day!

MarcusWeinberger (165)

I'm sorry, but what is the purpose of this? What did you mean by "instead of having to use old, rackety, overall poorly coded websites that spam your email after you sign up, all you need to do is sign up to repl.it and youll be set."

eekboi (62)

@MarcusWeinberger Im just stating that some websites unintentionally spam your email. With my code here it reads back what keys you press on a trusted website.

3465728974563 (46)

@MarcusWeinberger I'm confused as well, how does this help in any way? I mean like it sounds like he's trying to promote repl.it and get people to sign up, but I'm pretty sure that anyone who sees this post is already signed up.

MarcusWeinberger (165)

@eekboi what does a python script that logs which keys you press (poorly), have to do with websites spamming your email address?

eekboi (62)

@MarcusWeinberger im not trying to promote or slander anything. im just stating the fact that some websites made to help you can make your online life a living hell, intentional or not.

eekboi (62)

@3465728974563 No, Im not trying to promote repl.it No, im not trying to slander or spread shade to any community. It's just a statement that i have made stating my experiences with certain programs, website, etc... Good site Or bad site unless it doesnt hurt me or anyone else i wont slander it.

MarcusWeinberger (165)

@eekboi yeah I know I don't care what you're saying about whatever, I'm just wondering, what is the purpose of your program???

eekboi (62)

@MarcusWeinberger to read back to you the keys you press

MarcusWeinberger (165)

@eekboi okay, and what does your program have to do with old, rackety, poorly coded (funny, since your program is poorly coded) websites that spam your email? why did you mention all that in the title? what does that have to do with your program?

eekboi (62)

@MarcusWeinberger Honestly this is a rabbithole im too annoyed to keep going down. Best of luck

JustinPhillip (18)

sounds like keylogger but ok

eekboi (62)

@JustinPhillip If you look thru the code it doesnt dump all the finding of the code into a database for anyone to use.

AHulot (22)

This is some interesting basic code... Any ideas of what to use it for?

eekboi (62)

@AHulot I've came upnwith some ideas, most useful is a macro that presses a key set by the code. No idea how to implement it so repl detects whats happening.

theangryepicbanana (1315)

Didn't you already post this?

eekboi (62)

@theangryepicbanana my wifi dropped as I posted that so it mightve went through and i didnt know.

Giothecoder (122)

There are a lot more chars than that, would you mind if I made a quick suggestion?
Edit: nvm

eekboi (62)

@Giothecoder lol, thanks for atleast trying.