remove unused is_typing js util

pull/37/head
MinRK 13 years ago
parent 4d8bbeb356
commit f3a2d5fa27

@ -253,39 +253,13 @@ IPython.utils = (function (IPython) {
DOWN_ARROW: 40,
DOWNARROW: 40,
DOWN : 40,
// all three of these keys may be COMMAND on OS X:
LEFT_SUPER : 91,
RIGHT_SUPER : 92,
COMMAND : 93,
};
var is_typing = function (event) {
// return whether a key event is probably typing (used for setting the dirty flag)
var key = event.which;
if ( key < 46 ) {
if (
( key == keycodes.BACKSPACE ) ||
( key == keycodes.TAB ) ||
( key == keycodes.ENTER )
) {
return true;
} else {
return false;
}
} else {
if (
( key == keycodes.LEFT_SUPER ) ||
( key == keycodes.RIGHT_SUPER ) ||
( key == keycodes.COMMAND )
) {
return false;
} else {
return true;
}
}
};
var points_to_pixels = function (points) {
// A reasonably good way of converting between points and pixels.
var test = $('<div style="display: none; width: 10000pt; padding:0; border:0;"></div>');
@ -312,7 +286,6 @@ IPython.utils = (function (IPython) {
keycodes : keycodes,
fixCarriageReturn : fixCarriageReturn,
autoLinkUrls : autoLinkUrls,
is_typing : is_typing,
points_to_pixels : points_to_pixels,
browser : browser
};

@ -308,9 +308,6 @@ var IPython = (function (IPython) {
} else if (that.control_key_active) {
that.control_key_active = false;
return true;
} else if ( utils.is_typing(event) ) {
that.set_dirty(true);
return true;
}
return true;
});

Loading…
Cancel
Save