Keyboard buffer and mouse click(s) in array

I could use a method that returns the content of the keyboard buffer (e.g. - last key pressed or an array of the last 10 keystrokes for the Shift-Ctrl-T sort of things) and the last mouse event (right, left, single, double). This should be in conjunction with knowledge of the last object (in context - e.g. - form.name in tabpanel.name with field.name) that had focus. I do mean “focus” as compared with say a “getMethodTriggerElementName…” sort of thing.

Here is where this feature is handy for me:

  1. Creating event driven Help Systems. What was the last known focus when F1 was pressed?

  2. Interrupting application.sleep() pauses. Let’s say I post a message for a user and set the sleep to 10 seconds or so. A new user would be glad for the longer pause (he is unsure …). A more accomplished user knows about what’s coming up and in less than 250ms he wants to get on with it. I realize there currently are workarounds to this situation. By the way - a dialog that “hangs around for x seconds while execution continues” is also handy.

  3. Allows for development of even more engaging and creative forms and applications … especially with the ever-opening world of Ajax 8)

The advantage of having an application level test of the hardware input buffers is that one is not tied to events occuring on a given element or set of elements.