1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-13 03:15:47 +01:00

some whitespace formatting

This commit is contained in:
Martin Stubenschrott
2007-08-10 17:52:07 +00:00
parent b845854dc0
commit f9e0238ff0

View File

@@ -120,6 +120,7 @@ function Events() //{{{
[ KeyEvent.DOM_VK_F24, ["F24"] ], [ KeyEvent.DOM_VK_F24, ["F24"] ],
]; ];
// FIXME: how to support <Space> ?
function getKeyCode(str) function getKeyCode(str)
{ {
str = str.toLowerCase(); str = str.toLowerCase();
@@ -247,11 +248,13 @@ function Events() //{{{
} }
else //an invalid key like <A-xxx> was found, stop propagation here (like vim) else //an invalid key like <A-xxx> was found, stop propagation here (like vim)
return; return;
i += matches[0].length + 1;
i += matches[0].length + 1;
} }
} }
var evt = doc.createEvent('KeyEvents'); var evt = doc.createEvent('KeyEvents');
evt.initKeyEvent('keypress', true, true, view, ctrl, alt, shift, meta, keyCode, charCode ); evt.initKeyEvent('keypress', true, true, view, ctrl, alt, shift, meta, keyCode, charCode );
var elem = window.document.commandDispatcher.focusedElement; var elem = window.document.commandDispatcher.focusedElement;
if(!elem) if(!elem)
elem = window; elem = window;
@@ -599,6 +602,7 @@ function Events() //{{{
// a keycode which can be used in mappings // a keycode which can be used in mappings
// e.g. pressing ctrl+n would result in the string "<C-n>" // e.g. pressing ctrl+n would result in the string "<C-n>"
// null if unknown key // null if unknown key
// XXX: _Maybe_ move to another method inside vimperator.events.
KeyboardEvent.prototype.toString = function() //{{{ KeyboardEvent.prototype.toString = function() //{{{
{ {
var key = String.fromCharCode(this.charCode); var key = String.fromCharCode(this.charCode);