diff --git a/src/sbbs3/inkey.cpp b/src/sbbs3/inkey.cpp
index be524902c2b5def6d8026decb75c1b141be1012d..b97b88de7d1c32fb3676cfbb1816dc96d4c0a985 100644
--- a/src/sbbs3/inkey.cpp
+++ b/src/sbbs3/inkey.cpp
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html		*
  *																			*
  * This program is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU General Public License				*
@@ -41,16 +41,18 @@
 
 #define nosound()	
 
-#define KBINCOM(ch, timeout) \
-{ \
-	if(keybuftop!=keybufbot) { \
-		ch=keybuf[keybufbot++]; \
-		if(keybufbot==KEY_BUFSIZE) \
-			keybufbot=0; \
-	} else \
-		ch=incom(timeout); \
-\
-	return ch; \
+int kbincom(sbbs_t* sbbs, unsigned long timeout)
+{
+	int	ch;
+
+	if(sbbs->keybuftop!=sbbs->keybufbot) { 
+		ch=sbbs->keybuf[sbbs->keybufbot++]; 
+		if(sbbs->keybufbot==KEY_BUFSIZE) 
+			sbbs->keybufbot=0; 
+	} else 
+		ch=sbbs->incom(timeout);
+
+	return ch;
 }
 
 /****************************************************************************/
@@ -61,7 +63,7 @@ char sbbs_t::inkey(long mode, unsigned long timeout)
 {
 	uchar	ch=0;
 
-	KBINCOM(ch, timeout);
+	ch=kbincom(this,timeout); 
 
 	if(ch==0) {
 		// moved here from getkey() on AUG-29-2001
@@ -261,7 +263,7 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
 			hotkey_inside--;
 			return(0); 
 		case ESC:
-			KBINCOM(i,mode&K_GETSTR ? 3000:1000);
+			i=kbincom(this, (mode&K_GETSTR) ? 3000:1000);
 			if(i==NOINP)		// timed-out waiting for '['
 				return(ESC);
 			ch=i;
@@ -277,7 +279,7 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
 				putuserrec(&cfg,useron.number,U_MISC,8,ultoa(useron.misc,str,16)); 
 			}
 			while(i<10 && j<30) {		/* up to 3 seconds */
-				KBINCOM(ch, 100);
+				ch=kbincom(this, 100);
 				if(ch==(NOINP&0xff)) {
 					j++;
 					continue;