1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 17:57:58 +01:00

events.feedkeys("J") now sends a shifted event, thanks to muttator, so we find bugs in our liberator lib :)

This commit is contained in:
Martin Stubenschrott
2008-03-04 22:44:00 +00:00
parent b75dff68d3
commit 97e009ecff

View File

@@ -768,6 +768,11 @@ vimperator.Events = function () //{{{
i += matches[0].length + 1; i += matches[0].length + 1;
} }
} }
else // a simple key
{
// FIXME: does not work for non A-Z keys like Ö,Ä,...
shift = (keys[i] >= "A" && keys[i] <= "Z");
}
var elem = window.document.commandDispatcher.focusedElement; var elem = window.document.commandDispatcher.focusedElement;
if (!elem) if (!elem)
@@ -779,7 +784,12 @@ vimperator.Events = function () //{{{
if (elem.dispatchEvent(evt)) // return true in onEvent to stop feeding keys if (elem.dispatchEvent(evt)) // return true in onEvent to stop feeding keys
{ {
vimperator.beep(); vimperator.beep();
return return;
}
else
{
evt.preventDefault();
evt.stopPropagation();
} }
} }
}, },