We know that keyboard and mouse are basic hardware interface supported by almost all the Computer Operating System. When the user hits the keyboard key, the device driver for the keyboard deals with it by making use of the interrupts. In this example we will learn how to handle Keyboard Messages using MFC SDI Application. First, We will provide a handler function for the Keyboard. Then, inside the handler, we will check for Shift Key State and Toggle Key State.