0

How do i use inputs from the keyboard?

(My code is in python 3.4 the program, and not in sololearn) I want to be able press a key on the keyboard, for example the up_arrow and add a value to a variable. Something like this: if up_arrow: a+=1 print (a) Does anyone know of a method or a package that can accomplish this?

12th Dec 2017, 11:27 AM
Sveinung Myhre
Sveinung Myhre - avatar
1 Resposta
+ 2
for javascript u can do this: if(key == 'a' || key == 'A'){ //code } u can also search for the internet for keycode values
14th Dec 2017, 7:36 PM
Meta Byte
Meta Byte - avatar