Browse Source

Quit with Q

main
fdai7184 2 years ago
parent
commit
df56145d29
  1. 6
      src/input.c

6
src/input.c

@ -36,7 +36,8 @@ void getInput(){
void testArrowInput(){ void testArrowInput(){
if(kbhit()){ if(kbhit()){
if(getch() == '\033'){
char key1 = getch();
if(key1 == '\033'){
getch(); getch();
char key = getch(); char key = getch();
if(key=='A'){ if(key=='A'){
@ -52,6 +53,9 @@ void testArrowInput(){
printf("left"); printf("left");
} }
} }
else if(key1=='q'){
printf("Quit");
}
} }
} }

Loading…
Cancel
Save