diff --git a/Emulator.js b/Emulator.js
index c49d007..c733711 100644
--- a/Emulator.js
+++ b/Emulator.js
@@ -84,7 +84,7 @@ Emulator.handleKeyPress = function(e) {
 }
 Emulator.handleKeyDown = function(e) {
 	var keycode = Emulator.getKeyCode(e);
-	if (keycode == 8 || keycode == 46) {
+	if (KeyCodes.isSpecialKey(keycode)) {
 		Emulator.handleKeyPress(e);
 		return false;
 	}
@@ -177,7 +177,7 @@ Emulator.ANSISequences.output = function(text) {
 				Emulator.Output.cursorOff();
 				Emulator.Output.moveCursor(0, - parseInt(specialText), false);
 				Emulator.Output.cursorOn();
-				normalText = "";				
+				normalText = "";
 				specialText = "";
 				specialText2 = "";
 				state = 0;
diff --git a/KeyCodes.js b/KeyCodes.js
index 51f71be..1746c8f 100644
--- a/KeyCodes.js
+++ b/KeyCodes.js
@@ -3,6 +3,17 @@ var KeyCodes = function() {
 KeyCodes.normalKey = function(code) {
 	return String.fromCharCode(code);
 }
+KeyCodes.isSpecialKey = function(code) {
+	return 	(code == 8)  || 
+		(code == 10) || 
+		(code == 13) ||
+		(code == 27) ||
+		(code == 37) ||
+		(code == 38) ||
+		(code == 39) ||
+		(code == 40) ||
+		(code == 46);
+}
 KeyCodes.isBackspace = function(code) {
 	return (code == 8);
 }