From 267d1427f3ca9942e054d1cbc8c1f9ef389032a7 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 6 Mar 2003 10:42:17 +0000
Subject: [PATCH] optimized inkey() a little: no reason to convert ctrl-chars
 to uppercase, only one check for ctrl-keys.

---
 src/sbbs3/inkey.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/sbbs3/inkey.cpp b/src/sbbs3/inkey.cpp
index f00168cd3c..05e5738de7 100644
--- a/src/sbbs3/inkey.cpp
+++ b/src/sbbs3/inkey.cpp
@@ -72,16 +72,16 @@ char sbbs_t::inkey(long mode)
 
 	timeout=time(NULL);
 
-	/* Is this control key flagged as passthru? */
-	if(ch<' ' && cfg.ctrlkey_passthru&(1<<ch))
-		return(ch);	/* do not handle here */
+	/* Is this a control key */
+	if(ch<' ') {
+		if(cfg.ctrlkey_passthru&(1<<ch))	/*  flagged as passthru? */
+			return(ch);						/* do not handle here */
+		return(handle_ctrlkey(ch,mode));
+	}
 
 	if(mode&K_UPPER)
 		ch=toupper(ch);
 
-	if(ch<' ')
-		return(handle_ctrlkey(ch,mode));
-
 	return(ch);
 }
 
@@ -318,4 +318,4 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
 			return(0); 
 	}
 	return(ch);
-}
\ No newline at end of file
+}
-- 
GitLab