About windows keyboard




















To help the user identify the active window, the system places it at the top of the Z order and highlights its title bar if it has one and border.

A thread can activate a top-level window by using the SetActiveWindow function. It can determine whether a top-level window it created is active by using the GetActiveWindow function. The low-order word of the wParam parameter is zero if the window is being deactivated and nonzero if it is being activated.

To block keyboard and mouse input events from reaching applications, use BlockInput. Note, the BlockInput function will not interfere with the asynchronous keyboard input-state table. This means that calling the SendInput function while input is blocked will change the asynchronous keyboard input-state table. The system makes a distinction between system keystrokes and nonsystem keystrokes. If your window procedure must process a system keystroke message, make sure that after processing the message the procedure passes it to the DefWindowProc function.

Otherwise, all system operations involving the ALT key will be disabled whenever the window has the keyboard focus. System keystroke messages are primarily for use by the system rather than by an application. The system uses them to provide its built-in keyboard interface to menus and to allow the user to control which window is active. System keystroke messages are generated when the user types a key in combination with the ALT key, or when the user types and no window has the keyboard focus for example, when the active application is minimized.

In this case, the messages are posted to the message queue attached to the active window. Nonsystem keystroke messages are for use by application windows; the DefWindowProc function does nothing with them. A window procedure can discard any nonsystem keystroke messages that it does not need.

The wParam parameter of a keystroke message contains the virtual-key code of the key that was pressed or released. A window procedure processes or ignores a keystroke message, depending on the value of the virtual-key code. A typical window procedure processes only a small subset of the keystroke messages that it receives and ignores the rest.

A typical window procedure does not process keystroke messages from character keys. Instead, it uses the TranslateMessage function to convert the message into character messages. For more information about TranslateMessage and character messages, see Character Messages.

The lParam parameter of a keystroke message contains additional information about the keystroke that generated the message. This information includes the repeat count, the scan code, the extended-key flag, the context code, the previous key-state flag, and the transition-state flag. The following illustration shows the locations of these flags and values in the lParam parameter. You can check the repeat count to determine whether a keystroke message represents more than one keystroke.

This often occurs when the user holds down a key long enough to start the keyboard's automatic repeat feature. Instead of filling the system message queue with the resulting key-down messages, the system combines the messages into a single key down message and increments the repeat count.

The scan code is the value that the keyboard hardware generates when the user presses a key. It is a device-dependent value that identifies the key pressed, as opposed to the character represented by the key. An application typically ignores scan codes. Instead, it uses the device-independent virtual-key codes to interpret keystroke messages.

The extended-key flag indicates whether the keystroke message originated from one of the additional keys on the enhanced keyboard. The extended-key flag is set if the key is an extended key. The context code indicates whether the ALT key was down when the keystroke message was generated. The code is 1 if the ALT key was down and 0 if it was up. The previous key-state flag indicates whether the key that generated the keystroke message was previously up or down. If it has, I encourage you to link to it and share it with your friends, so more people can benefit from it.

If you read this far, tweet to the author to show them you care. Tweet a thanks. Learn to code for free. Get started. Forum Donate. Using your keyboard properly can help avoid soreness or injury to your wrists, hands, and arms, particularly if you use your computer for long periods. Here are a few tips to help improve keyboard use:. Center your keyboard in front of you. If your keyboard has a numeric keypad, you can use the spacebar as the centering point.

Type with your hands and wrists floating above the keyboard, so that you can use your whole arm to reach for distant keys instead of stretching your fingers. Avoid resting your palms or wrists on any type of surface while typing. If your keyboard has a palm rest, use it only during breaks from typing. Windows 8. Using the numeric keypad, type the first number in the calculation. Type the next number in the calculation. Press Enter to complete the calculation. Need more help?

Join the discussion. Was this information helpful? Yes No. Thank you! Any more feedback? The more you tell us the more we can help. Can you help us improve? Resolved my issue. Clear instructions. Easy to follow. No jargon. Pictures helped. Didn't match my screen. Incorrect instructions. Too technical. Some keyboards utilize a standard design, like the Saitek keyboard pictured above, and others are split down the middle, utilizing an ergonomic design.

Some keyboards are rigid and always the same shape, while others are flexible and can fold in half or roll up. A computer keyboard has many more functions than typing. Below is a list of additional tasks you can perform using a keyboard.

The following section contains information on Apple keyboards and how they differ from their PC equivalents. The following image shows the standard layout for an Apple keyboard with a numeric keypad. The keyboards used with Apple desktop computers have a nearly identical layout to those used with Windows computers. However, they have a few different keys on both sides of the keyboard's characters section near the bottom: Command and Option.

A laptop keyboard is arranged differently than a desktop keyboard to accommodate the laptop's narrower footprint. Most laptop keyboards are made smaller by placing the keys closer and by including an Fn key. The Fn key is used to give other keys more than once function. For example, pressing the Fn key and the up or down arrow on the keyboard may increase or decrease screen brightness shown below.

Also, many laptop keyboards generally omit the numeric keypad to save space. Today's smartphones and tablets do not come with a physical keyboard, although one may be purchased as an optional peripheral add-on.



0コメント

  • 1000 / 1000