Skip to content

Commit aac27ab

Browse files
Merge pull request #1509 from DJm00n/patch-5
Update ns-winuser-keybdinput.md
2 parents 0415553 + e2322db commit aac27ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sdk-api-src/content/winuser/ns-winuser-keybdinput.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ helpviewer_keywords: ["*LPKEYBDINPUT","*PKEYBDINPUT","KEYBDINPUT","KEYBDINPUT st
66
old-location: inputdev\keybdinput.htm
77
tech.root: inputdev
88
ms.assetid: VS|winui|~\winui\windowsuserinterface\userinput\keyboardinput\keyboardinputreference\keyboardinputstructures\keybdinput.htm
9-
ms.date: 12/05/2018
9+
ms.date: 05/02/2023
1010
ms.keywords: '*LPKEYBDINPUT, *PKEYBDINPUT, KEYBDINPUT, KEYBDINPUT structure [Keyboard and Mouse Input], KEYEVENTF_EXTENDEDKEY, KEYEVENTF_KEYUP, KEYEVENTF_SCANCODE, KEYEVENTF_UNICODE, PKEYBDINPUT, PKEYBDINPUT structure pointer [Keyboard and Mouse Input], _win32_KEYBDINPUT_str, _win32_keybdinput_str_cpp, inputdev.keybdinput, winui._win32_keybdinput_str, winuser/KEYBDINPUT, winuser/PKEYBDINPUT'
1111
req.header: winuser.h
1212
req.include-header: Windows.h
@@ -88,7 +88,7 @@ Specifies various aspects of a keystroke. This member can be certain combination
8888
</dl>
8989
</td>
9090
<td width="60%">
91-
If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
91+
If specified, the <b>wScan</b> scan code consists of a sequence of two bytes, where the first byte has a value of 0xE0. See <a href="/windows/win32/inputdev/about-keyboard-input#extended-key-flag">Extended-Key Flag</a> for more info.
9292

9393
</td>
9494
</tr>
@@ -144,7 +144,7 @@ An additional value associated with the keystroke. Use the <a href="/windows/des
144144
<b> INPUT_KEYBOARD</b> supports nonkeyboard-input methods—such as handwriting recognition or voice recognition—as if it were text input by using the <b>KEYEVENTF_UNICODE</b> flag. If <b>KEYEVENTF_UNICODE</b> is specified, <a href="/windows/desktop/api/winuser/nf-winuser-sendinput">SendInput</a> sends a <a href="/windows/desktop/inputdev/wm-keydown">WM_KEYDOWN</a> or <a href="/windows/desktop/inputdev/wm-keyup">WM_KEYUP</a> message to the foreground thread's message queue with <i>wParam</i> equal to <b>VK_PACKET</b>. Once <a href="/windows/desktop/api/winuser/nf-winuser-getmessage">GetMessage</a> or <a href="/windows/desktop/api/winuser/nf-winuser-peekmessagea">PeekMessage</a> obtains this message, passing the message to
145145
<a href="/windows/desktop/api/winuser/nf-winuser-translatemessage">TranslateMessage</a> posts a <a href="/windows/desktop/inputdev/wm-char">WM_CHAR</a> message with the Unicode character originally specified by <b>wScan</b>. This Unicode character will automatically be converted to the appropriate ANSI value if it is posted to an ANSI window.
146146

147-
Set the <b>KEYEVENTF_SCANCODE</b> flag to define keyboard input in terms of the scan code. This is useful to simulate a physical keystroke regardless of which keyboard is currently being used. The virtual key value of a key may alter depending on the current keyboard layout or what other keys were pressed, but the scan code will always be the same.
147+
Set the <b>KEYEVENTF_SCANCODE</b> flag to define keyboard input in terms of the scan code. This is useful for simulating a physical keystroke regardless of which keyboard is currently being used. You can also pass the <b>KEYEVENTF_EXTENDEDKEYE</b> flag if the scan code is an extended key. The virtual key value of a key can change depending on the current keyboard layout or what other keys were pressed, but the scan code will always be the same.
148148

149149
## -see-also
150150

0 commit comments

Comments
 (0)