From 85e57964a10c2280b801585d66f47ad44bc7de66 Mon Sep 17 00:00:00 2001 From: richelbilderbeek Date: Thu, 25 Jul 2013 12:01:46 +0200 Subject: [PATCH 1/2] Let program give feedback when an unknown key is pressed --- libcvautomation/libcvautomation-xtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcvautomation/libcvautomation-xtest.c b/libcvautomation/libcvautomation-xtest.c index f64bd86..acea724 100644 --- a/libcvautomation/libcvautomation-xtest.c +++ b/libcvautomation/libcvautomation-xtest.c @@ -505,7 +505,10 @@ void xte_clickKey ( Display *displayLocation, char *key ) ks = XStringToKeysym( key ); if ( ks == NoSymbol ) - return; + { + fprintf( stderr, "Key '%s' is an unknown key\n", key ); + return; + } kc = XKeysymToKeycode( displayLocation, ks ); From 2aaf750e31d76c92c52b95768c5f681eee73b071 Mon Sep 17 00:00:00 2001 From: richelbilderbeek Date: Thu, 25 Jul 2013 12:47:28 +0200 Subject: [PATCH 2/2] Fixed coding standard --- libcvautomation/libcvautomation-xtest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcvautomation/libcvautomation-xtest.c b/libcvautomation/libcvautomation-xtest.c index acea724..e2fd03e 100644 --- a/libcvautomation/libcvautomation-xtest.c +++ b/libcvautomation/libcvautomation-xtest.c @@ -504,8 +504,7 @@ void xte_clickKey ( Display *displayLocation, char *key ) KeySym ks; ks = XStringToKeysym( key ); - if ( ks == NoSymbol ) - { + if ( ks == NoSymbol ) { fprintf( stderr, "Key '%s' is an unknown key\n", key ); return; }