If i got you, I've been there once, the way I found to achieve this kind of input of normal calculators is using strings for input converted later to floats or ints. I was dealing with timecode, so there was no floats or dots. You need to add that, but the idea is:
[edit] added a simple dot input handler, it seams to work:)
StringBuilder buff = new StringBuilder("");
void draw(){}
void keyReleased()
{
if(key != CODED){
char c = key;
if ( c >= '0' && c <= '9' || c == '.'){
buff.insert(buff.length(),c);
}
println("buff = " + buff);
}
print("in float... plus 100.25 equals: ");
println(100.25 + float(buff.toString()));
}