u wanna get the last keypress on the server or on the client?? Why?? On the server, I guess it's almost impossible.... on the client u gotta use javascript. However, I think your question has nothin to do with databases, so maybe post it in a different forum