网站首页  词典首页

请输入您要查询的函数:

 

术语 vkkeyscanex
释义 VkKeyScanEx
语法:
SHORT VkKeyScanEx( TCHAR ch,
HKL dwhkl
);
VkKeyScanEx功能
VkKeyScanEx函数的一个字符转换为相应的虚拟键码和转移的状态。转换函数使用的字符输入语言和身体的键盘布局输入法区域设置标识符确定。
参数
通道
[in]指定的字符翻译成一个虚拟键码。
dwhkl
[in]输入区域设置标识符用于转换的字符。此参数可以是任何输入区域设置标识符先前LoadKeyboardLayout函数返回。
返回值
如果函数成功,低返回值的命令字节包含虚拟键码和高字节包含转移状态,它可以是下列标志位的组合。
如果该函数没有发现键转换为字符代码通过的,无论是低阶和高阶字节包含-1。
BitMeaning
1Either Shift键被按下。
2Either CTRL键被按下。
4Either Alt键被按下。
8The Hankaku键被按下
16Reserved(定义键盘布局驱动程序)。
32Reserved(定义键盘布局驱动程序)。
备注
输入法区域设置标识符是一个比键盘布局更广泛的概念,因为它也可以包括演讲到文本转换器,输入法编辑器(IME),或任何其他形式的投入。
键盘布局,使用(例如shift键右侧Alt键,法国的键盘布局),这种转变是由国家6所代表的价值,因为右侧Alt键在内部转换成按Ctrl + Alt。
为数字键盘翻译(VK_NUMPAD0通过VK_DIVIDE)被忽略。这个功能主要是为了转化为按键从主键盘部分的字符。例如,字符“7”被翻译成VK_7,而不是VK_NUMPAD7。
VkKeyScanEx所使用的应用程序通过使用的WM_KEYUP和WM_KEYDOWN消息字符。
在Windows 95/98/Me:VkKeyScanExW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 4.0
UnicodeImplemented为ANSI和Unicode版本。
参见
键盘输入,GetAsyncKeyState,GetKeyboardState,GetKeyNameText,GetKeyState,LoadKeyboardLayout,SetKeyboardState,ToAsciiEx
==英文原文==VkKeyScanEx Function
The VkKeyScanEx function translates a character to the corresponding virtual-key code and shift state. The function translates the character using the input language and physical keyboard layout identified by the input locale identifier.
Syntax
SHORT VkKeyScanEx( TCHAR ch,
HKL dwhkl
);
Parameters
ch
[in] Specifies the character to be translated into a virtual-key code.
dwhkl
[in] Input locale identifier used to translate the character. This parameter can be any input locale identifier previously returned by the LoadKeyboardLayout function.
Return Value
If the function succeeds, the low-order byte of the return value contains the virtual-key code and the high-order byte contains the shift state, which can be a combination of the following flag bits.
If the function finds no key that translates to the passed character code, both the low-order and high-order bytes contain –1.
BitMeaning
1Either SHIFT key is pressed.
2Either CTRL key is pressed.
4Either ALT key is pressed.
8The Hankaku key is pressed
16Reserved (defined by the keyboard layout driver).
32Reserved (defined by the keyboard layout driver).
Remarks
The input locale identifier is a broader concept than a keyboard layout, since it can also encompass a speech-to-text converter, an Input Method Editor (IME), or any other form of input.
For keyboard layouts that use the right-hand ALT key as a shift key (for example, the French keyboard layout), the shift state is represented by the value 6, because the right-hand ALT key is converted internally into CTRL+ALT.
Translations for the numeric keypad (VK_NUMPAD0 through VK_DIVIDE) are ignored. This function is intended to translate characters into keystrokes from the main keyboard section only. For example, the character "7" is translated into VK_7, not VK_NUMPAD7.
VkKeyScanEx is used by applications that send characters by using the WM_KEYUP and WM_KEYDOWN messages.
Windows 95/98/Me: VkKeyScanExW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 4.0
UnicodeImplemented as ANSI and Unicode versions.
See Also
Keyboard Input , GetAsyncKeyState , GetKeyboardState , GetKeyNameText , GetKeyState , LoadKeyboardLayout , SetKeyboardState , ToAsciiEx
==原始网址==http://msdn.microsoft.com/en-us/library/ms646332(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:26:33