diff --git a/dev/js/src/hint.js b/dev/js/src/hint.js
index e07785b..f2f3149 100644
--- a/dev/js/src/hint.js
+++ b/dev/js/src/hint.js
@@ -30,11 +30,6 @@
   /**
    * Return keycode based on event
    */
-  function _codeFromEvent (e) {
-    if ((e.charCode) && (e.keyCode==0))
-      return e.charCode
-    return e.keyCode;
-  };
 
   // Initialize hint array
 
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 3f6d3a5..9aa410d 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -94,6 +94,7 @@
       '#search > ol > li:not(.active)'
     );
     var i = 0;
+
     for (i = 0; i < inactiveLi.length; i++) {
       inactiveLi[i].addEventListener('click', function (e) {
 	if (this._match !== undefined)
@@ -103,6 +104,20 @@
 	};
 	e.halt();
       });
+      inactiveLi[i].addEventListener('keydown', function (e) {
+	var code = _codeFromEvent(e);
+	
+	switch (code) {
+	case 32:
+	  if (this._match !== undefined)
+	    this._match.toggle();
+	  else {
+	    matchClass.create(this).open();
+	  };
+	  e.halt();
+	  break;
+	};
+      });
     };
 
     var result = document.getElementById('resultinfo');
@@ -292,4 +307,3 @@
   };
   return vc;
 };
-
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index f6fbd41..88c87fb 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -190,6 +190,14 @@
       return true;
     },
 
+    // Todo: Test toggle
+    toggle : function () {
+      if (this._element.classList.contains('active'))
+	this.close();
+      else
+	this.open();
+    },
+
 
     /**
      * Close info view
diff --git a/dev/js/src/util.js b/dev/js/src/util.js
index f17ec2a..00a2bd5 100644
--- a/dev/js/src/util.js
+++ b/dev/js/src/util.js
@@ -35,6 +35,14 @@
     node.removeChild(node.firstChild);
 };
 
+// Utility to get either the charCode
+// or the keyCode of an event
+function _codeFromEvent (e) {
+  if ((e.charCode) && (e.keyCode==0))
+    return e.charCode
+  return e.keyCode;
+};
+
 
 define(function () {
   // Todo: That's double now!
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 0685242..0bc7284 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -55,7 +55,7 @@
   "use strict";
 
   // ???
-  KorAP._validStringMatchRE = new RegExp("^(?:eq|ne|contains|excludes)$");
+  KorAP._validStringMatchRE = new RegExp("^(?:eq|ne|contains(?:not)?|excludes)$");
   KorAP._validDateMatchRE   = new RegExp("^[lg]?eq$");
   KorAP._validDateRE        = new RegExp("^(?:\\d{4})(?:-\\d\\d(?:-\\d\\d)?)?$");
   KorAP._overrideStyles     = false;
@@ -112,7 +112,7 @@
 	    ['eq', null],
 	    ['ne', null],
 	    ['contains', null],
-	    ['excludes', null]
+	    ['containsnot', null]
 	  ]),
 	  'date' : menuClass.create([
 	    ['eq', null],
@@ -123,7 +123,7 @@
 	    ['eq', null],
 	    ['ne', null],
 	    ['contains', null],
-	    ['excludes', null]
+	    ['containsnot', null]
 	  ])
 	};
       };
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 66dfc6e..07943f0 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -557,6 +557,9 @@
       case "excludes":
 	string += '!~';
 	break;
+      case "containsnot":
+	string += '!~';
+	break;
       case "geq":
 	string += 'since';
 	break;
