Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python pynput letter key pressed

from pynput import keyboard

def on_press(key):
    if key.char == 'a': # here you can choose the letter you want to get detected
        print("You pressed A")

with keyboard.Listener(on_press=on_press) as listener:
    listener.join()
Comment

PREVIOUS NEXT
Code Example
Python :: deleting duplicates in list python 
Python :: print() in python 
Python :: click button in selenium python 
Python :: how to change icon in pygame 
Python :: python opens windows store 
Python :: natsort python pip install 
Python :: pd combine date time 
Python :: check numpy arrays equal 
Python :: django validator min max value 
Python :: How to get all links from a google search using python 
Python :: selenium python 
Python :: how to get current date in python 
Python :: add role discord .py 
Python :: python change a key in a dictionary 
Python :: mode of a column in df 
Python :: print type(x) in python 
Python :: how to import iris dataset 
Python :: how to address a column in a 2d array python 
Python :: creat and active python environment 
Python :: python csv reader skip header 
Python :: difference between sort and sorted 
Python :: python join paths 
Python :: remove a char in a string python 
Python :: pandas get column names with nan 
Python :: pynput left click command 
Python :: make calculator in python 
Python :: how to detect an even number in python 
Python :: legend of colorbar python 
Python :: pandas iterate over a series 
Python :: combine dataframes 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =