What happens from the moment we press a key on the keyboard, until it appears in your word document [closed]

This question was in my job interview.. I just to see whether I gave all the details…

Catch “DONE” key press from soft keyboard [closed]

I’m looking for code that can catch key press of DONE button from soft keyboard. When done button is pressed, I need to change button state to enabled and user then can move on to the next activity.

Trigger a keyboard key press event without pressing the key from keyboard

How can I trigger a key press event without pressing the key from Keyboard? I tried with the solution from here, but I got the following exception: The best overloaded method match for ‘System.Windo

What happens when we call $(document).ready()

I have a question about $(document).ready(); function in jquery. What does it do. What is the difference between these codes; 1. $(document).ready(function(){ alert(hello); }); and this 2. $(docume

How we can press any keyboard key programmatically using jquery [duplicate]

Possible Duplicate: How to capture the screen using JavaScript? I want to take a snapshot of the screen on clicking on the save button .. does anyone know how can i press the PrtScn key of keyboard

What was your “aha moment” in understanding delegates? [closed]

Considering the use of delegates in C#, does anyone know if there is a performance advantage or if it is a convenience to the programmer? If we are creating an object that holds a method, it sounds as

Android – Get keyboard key press

I want to catch the press of any key of the softkeyboard. I don’t want a EditView or TextView in my Activity, the event must be handled from a extended View inside my Activity. I just tried this: 1) O

How to call a keyboard key press programmaticly?

Problem: Calling a keyboard key to be pressed, from a piece of C# code but here’s the catch: the key-press should not be limited to the process/application but received by the entire operating system,

What happens when we don’t specify ?

What happens when we don’t specify <meta charset=utf-8> ? in the HEAD of the HTML document?

Start Word and monitor if document closed

we need for our school project a way to start a word instance and track if the document was closed. The COM api from word doens’t have a event for this, are there any other ways to do this? Currently

Hide keyboard on any key press in iphone

I want to hide the keyboard when i press any key other than the return key . For example when the user presses the character ‘n’ on keyboard , keyboard should disappear. Please provide me a suitable a

Answers

Uh, if you have an old old old old binary computer: http://en.wikipedia.org/wiki/Punched_card

Then, in the time you pressed the key, you could probably make a cup of tea!

  1. you hear a click 😉 [but not necessary at this step, maybe at 10th or 20th]
  2. keyboard signals to kb controller
  3. controller issues an interrupt to CPU
  4. OS kernel sees interrupt
  5. OS kernel dispatches interrupt to corresponding driver
  6. driver tells CPU to read a charcode from kb controller
  7. CPU does
  8. driver some way tells the kernel to post an ‘KEY_DOWN’ event into UI subsystem
  9. kernel dispatches event
  10. UI subsystem checks if there active window
  11. it sends a KEY_DOWN UI event to active window

… uh.. tired 🙂 so, after that it will dispatch a key, update window contents, and call the video driver/subsystem to draw that char

  • mechanical switch short-circuits pull up R1 resistor end to the ground
  • a special multiplexor translates it into a message, to reduce the number of wires
  • the message interpreted by a CPU embedded in the keyboard
  • message translated to a USB protocol message, and modulated as a series of electric impulses of alternating voltage between zero and 5 volts
  • USB receiving hub measures samples line voltage periodically
  • host hub controller translates the message to data
  • data enters PC thru USB bus controller, connected to PCIE bus, thru a combination of IRQ notificaitons and a DMA transfer, issued by the bus driver
  • Bus driver interprets the message and forwards it along the driver stack, ultimately to an HID driver
  • HID driver talks to windows, ultimately resulting in a window message sent to a window belonging to msword process
  • WM_KEYDOWN is translated to WM_CHAR by DefWindowProc(). While key is down, multiple WM_CHARs may be created.
  • Word application catches WM_CHAR to add another character to the document model and issue re-rendering of UI
  • UI rendering engine translates unicode codepoint to graphical image by loading respective font
  • graphics engine computes the new image of the whole area to avoid flicker, and puts it pixel-by-pixel to the screen