diff --git a/src/syncterm/term.c b/src/syncterm/term.c
index 96f355baab519167739bfbc0fb6a45b9a5ac7575..00fbcaa56407dacbf4c550d375ef73c581b9b257 100644
--- a/src/syncterm/term.c
+++ b/src/syncterm/term.c
@@ -1054,7 +1054,7 @@ static void transfer_complete(BOOL success)
 	lprintf(LOG_NOTICE,"Hit any key or wait %u seconds to continue...", timeout);
 	while(timeout > 0) {
 		if (kbhit()) {
-			if(getch()==0 && getch()<<8 == CIO_KEY_QUIT)
+			if(getch()==(CIO_KEY_QUIT & 0xff) && (getch()<<8) == (CIO_KEY_QUIT & 0xff00))
 				check_exit(FALSE);
 			break;
 		}