B
B
bychok3002017-03-10 18:46:25
linux
bychok300, 2017-03-10 18:46:25

How to capture a keystroke on a keyboard?

How to fix the fact of pressing? I don't need to know what key it is, I just need it to be output to the console that a key was pressed, any one
in pseudocode looks something like this:

def captureEvent():
    While True:
        if keyBoardButton wasUsed:
            print('KeyBoard was used now')

can this be done using PyQt?
The second day I'm looking for information, I can't find anything suitable

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Axian Ltd., 2017-03-10
@bychok300

This is called the key pressed event. Examples can be googled, such as stackoverflow.com/questions/12152060/how-does-the-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question