commit bb4ecab77d7eb189ce872671371b4f3b7ee59853
parent 4818da85b0fb01ff3e3b9e060fbc059d8630d9c1
Author: CNLohr <charles@cnlohr.com>
Date: Tue, 5 Dec 2017 17:43:00 -0500
Merge pull request #28 from drbachler/feature/quit-key
Added quit key
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/cnping.c b/cnping.c
@@ -97,7 +97,16 @@ void * PingSend( void * r )
-void HandleKey( int keycode, int bDown ){}
+void HandleKey( int keycode, int bDown )
+{
+ switch( keycode )
+ {
+ case 'q':
+ exit(0);
+ break;
+
+ }
+}
void HandleButton( int x, int y, int button, int bDown ){}
void HandleMotion( int x, int y, int mask ){}
void HandleDestroy() { exit(0); }