Answers for "what is the name of the enter button in keyboard module python"

0

how to get input from user in python with out press enter

import keyboard
while not keyboard.ispressed("s"):
	print("none")
if keyboard.ispressed("s"):
	print("bottun pressed!")
Posted by: Guest on November-17-2021
0

Input without pressing enter python

import tty, sys, termios

filedescriptors = termios.tcgetattr(sys.stdin)
tty.setcbreak(sys.stdin)
x = 0
while 1:
  x=sys.stdin.read(1)[0]
  print("You pressed", x)
  if x == "r":
    print("If condition is met")
termios.tcsetattr(sys.stdin, termios.TCSADRAIN,filedescriptors)
Posted by: Guest on March-01-2021

Code answers related to "what is the name of the enter button in keyboard module python"

Python Answers by Framework

Browse Popular Code Answers by Language