Windows vk_f1




















Call the IsKeyLocked method of the Control class. The following table shows the key code values represented by two enumerated values, representing both the general original equipment manufacturer OEM keys and the more specific U. For the. NET Framework 2. The older version has been retained for backward compatibility, but it may be deleted in future versions of the. NET Framework. Skip to main content. This browser is no longer supported.

Download Microsoft Edge More info. Contents Exit focus mode. Keys Enum Reference Is this page helpful? Please rate your experience Yes No. Your content, curated Your favorite photos.

Refocus your workflow Review of apps available for multi-tasking. Connect with one touch Learn how to connect with Microsoft Teams. Connect with. The latest in PC gaming performance Play the latest games with graphics that rival reality. How to get Windows 11 PCs preloaded with Windows 11 are coming soon! Get Windows news and updates Subscribe to our newsletter to get the latest Windows news, feature updates, how-to tips, deals, and more.

Features and app availability may vary by region. Microsoft subscription sold separately. Some layouts only available based on display resolution and scale settings. Service fees may apply. Chatting via SMS is available in limited countries and will be made available to other geos on a rolling basis. Please refer to this page for more details. Internet access required; ISP fees may apply. May require additional hardware and subscriptions. Recurring memberships are automatically charged at the then-current regular price subject to change; plus applicable taxes unless cancelled account.

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.

It is 1 if the key was previously down and 0 if the key was previously up. You can use this flag to identify keystroke messages generated by the keyboard's automatic repeat feature. The transition-state flag indicates whether pressing a key or releasing a key generated the keystroke message.

Keystroke messages provide a lot of information about keystrokes, but they do not provide character codes for character keystrokes. To retrieve character codes, an application must include the TranslateMessage function in its thread message loop.

It then generates a character message that includes the character code and places the message at the top of the message queue. The next iteration of the message loop removes the character message from the queue and dispatches the message to the appropriate window procedure. The wParam parameter of all character messages contains the character code of the character key that was pressed. The value of the character code depends on the window class of the window receiving the message.

If the Unicode version of the RegisterClass function was used to register the window class, the system provides Unicode characters to all windows of that class. For more information, see Unicode and Character Sets. The contents of the lParam parameter of a character message are identical to the contents of the lParam parameter of the key-down message that was translated to produce the character message. For information, see Keystroke Message Flags. Some non-English keyboards contain character keys that are not expected to produce characters by themselves.

Instead, they are used to add a diacritic to the character produced by the subsequent keystroke. These keys are called dead keys. The circumflex key on a German keyboard is an example of a dead key. To enter the character consisting of an "o" with a circumflex, a German user would type the circumflex key followed by the "o" key. The window with the keyboard focus would receive the following sequence of messages:. The wParam parameter of the first contains the character code of the diacritic; the wParam parameter of the second contains the character code of the subsequent character key.

While processing a keyboard message, an application may need to determine the status of another key besides the one that generated the current message. The application can use the GetKeyState function to determine the status of a virtual key at the time the current message was generated; it can use the GetAsyncKeyState function to retrieve the current status of a virtual key. The keyboard layout maintains a list of names. The name of a key that produces a single character is the same as the character produced by the key.

An application can retrieve the name of any key from the device driver by calling the GetKeyNameText function. The system includes several special purpose functions that translate scan codes, character codes, and virtual-key codes provided by various keystroke messages.

In addition, Microsoft Rich Edit 3. This means that when Microsoft Rich Edit 3. Applications use hot keys to obtain high-priority keyboard input from the user. The wParam parameter of the message contains the identifier of the hot key. The application can define multiple hot keys for a thread, but each hot key in the thread must have a unique identifier. Before the application terminates, it should use the UnregisterHotKey function to destroy the hot key.

Applications can use a hot key control to make it easy for the user to choose a hot key.



0コメント

  • 1000 / 1000