]> matita.cs.unibo.it Git - helm.git/commitdiff
more keyboard events tests
authorWilmer Ricciotti <ricciott@cs.unibo.it>
Wed, 13 Jul 2011 14:46:06 +0000 (14:46 +0000)
committerWilmer Ricciotti <ricciott@cs.unibo.it>
Wed, 13 Jul 2011 14:46:06 +0000 (14:46 +0000)
matitaB/matita/matitaweb.js

index 05629a2cb984e081595669b6e7d9ba8a6bf8a064..0cf29e3493241df078acf5bd79e4aaa73f67c2f2 100644 (file)
@@ -114,7 +114,11 @@ function keypress(e)
    pressmesg('keypress',e);
    var s = string_of_key(e.charCode);
    if (s == " ") {
-       return suppressdefault(e,true);
+       i = unlocked.innerHTML.lastIndexOf('\\',getCursorPos());
+               if (i >= 0) {
+         window.alert("found " + unlocked.innerHTML.substring(i,getCursorPos()));
+       }
+       return suppressdefault(e,true);
    } else {
        return suppressdefault(e,false);
    }