Since you're giving jQuery a callback, you're surrendering to it's wits. However, you could introduce some more latency for excessive notifications by installing some sort of lazy event queue that you process every tenth of a second.
queue = new Array();
setTimeInterval( 100, function() { queue.process(); } );
queue.process = function( ) {
key = queue[0];
process( key );
// consume equivalent keypresses by shifting array
var originallength = queue.length;
// find shift size
var firstdiff = 1;
for(; firstdiff < queue.length && queue[ firstdiff ] == key;
firstdiff=firstdiff+1 )
{}
var newlength = originallength - firstdiff;
// shift everything and delete trailing tail
var i = firstdiff;
for( var j = 0; j != newlength; j=j+1 ) { queue[ j ] = queue[ j+firstdiff ]; }
for( var k = newlength; k != originallength; k=k+1 ) { queue[k]=null; }
}
$(document).keyup( function(e) { queue[ queue.length ] = e; } );
Or prevent appending to the queue alltogether using a minimal time diff between keypress events, as in this answer.