OK.
Maybe I'm missing something but why do you need to go via a string? Won't:
Code:
$("input").live("keyup", function (e) {
if (e.keyCode >= 48 && e.keyCode <= 57) {
console.log(parseInt($(this).val()));
};
});
do what you need? So if the user types 123 into the input the code will produce 1, 12, 123 as the keys are pressed - is that what you want?
From a brief test in FF7 (only) I got better results with keyup compared to keypress, incidentally.