diff --git a/exec/load/syncterm_cache.js b/exec/load/syncterm_cache.js
index bdc03ea8d33d5d79589c1c9f795b2e3e5a206bd7..b89d29caf1c4f9db45ab6e411afac7b63993c396 100644
--- a/exec/load/syncterm_cache.js
+++ b/exec/load/syncterm_cache.js
@@ -1,3 +1,5 @@
+require("sbbsdefs.js", "K_NUL");
+
 function SyncTERMCache() {
 	this.supported = this.supports_syncterm_cache();
 };
@@ -14,7 +16,7 @@ SyncTERMCache.prototype.read_apc = function (timeout)
 	if (timeout === undefined)
 		timeout = 1000;
 
-	while((ch = console.inkey(timeout)) !== '') {
+	while((ch = console.inkey(K_NUL, timeout)) !== null) {
 		switch(state) {
 			case 0:
 				if (ch == '\x1b') {