hotkey: Use $.each instead of 'in'

This is simpler and more consistent with the rest of our code.

(imported from commit 5188b8047952fe4e6556a26f10ab93123d67e03f)
This commit is contained in:
Keegan McAllister 2012-10-31 17:31:04 -04:00
parent 4cd5cdbcd6
commit 3b66748967
1 changed files with 3 additions and 4 deletions

View File

@ -6,10 +6,9 @@ var pressed_keys = {};
function num_pressed_keys() {
var size = 0, key;
for (key in pressed_keys) {
if (pressed_keys.hasOwnProperty(key))
size++;
}
$.each(pressed_keys, function () {
size++;
});
return size;
}