From 98a02c0402c29eceb2c07b45ab2383983f13cc95 Mon Sep 17 00:00:00 2001 From: Wilmer Ricciotti Date: Wed, 13 Jul 2011 14:46:06 +0000 Subject: [PATCH] more keyboard events tests --- matitaB/matita/matitaweb.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matitaB/matita/matitaweb.js b/matitaB/matita/matitaweb.js index 05629a2cb..0cf29e349 100644 --- a/matitaB/matita/matitaweb.js +++ b/matitaB/matita/matitaweb.js @@ -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); } -- 2.39.2