diff --git a/src/sbbs3/inkey.cpp b/src/sbbs3/inkey.cpp
index 226cd1a56b864681995bef4c380f0f8ef58d6101..dd32bbab73a9459f699261f686e2c00073326807 100644
--- a/src/sbbs3/inkey.cpp
+++ b/src/sbbs3/inkey.cpp
@@ -97,7 +97,8 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
 			bputs("\b \b");
 		return(0); 
 	}
-	if(ch==CTRL_Z && action!=NODE_PCHT) {	 /* Ctrl-Z toggle raw input mode */
+	if(ch==CTRL_Z && !(mode&K_MSG)
+		&& action!=NODE_PCHT) {	 /* Ctrl-Z toggle raw input mode */
 		if(hotkey_inside>1)	/* only allow so much recursion */
 			return(0);
 		hotkey_inside++;