How to get an input without pressing enter and it can have multiple characters?

For example, if i type “hello” is it possible to get the word without pressing enter and that it can be more than 1 character long?

How would the program know when you’re done typing?

2 Likes

Maybe OP wants to use it a in a situation where when a correct string is detected, the program continues, for example.

Unfortunately, I can’t find a solution to OP’s request though.

2 Likes

I want to make a wpm test, so it will check if the word is correctly written.

Aside from the fact that one of the methods is lightly broken (getchars), my key capturing package seems like a good fit here

3 Likes

I tried fkeycapture, it works fine if i don’t delete a character. If i miss, when i press delete, it counts as a change, so it returns the word without the last letter

1 Like

Ah yeah. That might be a bit of an issue. I’ll make a fix for that. (It’ll be a new method, since it’s non-default behavior)

EDIT: How are you having the program return it to you btw? Char by char, or all at once?

3 Likes

It returns it all at once

1 Like

Alright. If you update the package to version 1.2.5 now, and pass allowDelete=True to the get call, it should allow you to delete chats now.

2 Likes

It works now, thanks! Also, I was wondering, is it possible to see the word while i type it like the built in input() function?

I made a thing for that in one of my other packages, I’ll integrate a variation of it into fkeycapture after I make sure it works properly.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.