use by click on keyboard !! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

use by click on keyboard !!

in console application ( c++ , c#, java , python )... how i get keyboard do some functions in my program.. such as when i click on E button my program print "hello world!" or other ..

3rd Mar 2017, 9:50 AM
Mohammed Qabbari
Mohammed Qabbari - avatar
2 Answers
+ 8
Maybe switching switch acording to the user input
3rd Mar 2017, 12:03 PM
C.E.
C.E. - avatar
+ 5
c++ #include <iostream.h> void main() { char a; cin>>a; if(a=='e') { cout<<"Hello World"; }
3rd Mar 2017, 2:12 PM
Ronit Kumar
Ronit Kumar - avatar