网站首页  词典首页

请输入您要查询的函数:

 

术语 mapvirtualkeyex
释义 MapVirtualKeyEx
语法:
UINT MapVirtualKeyEx( UINT uCode,
UINT uMapType,
HKL dwhkl
);
扫描码功能
该扫描码功能转化为扫描码或字符值,或扫描转换成虚拟键码代码(地图)一个虚拟键码。转换函数的代码使用的输入语言和输入区域设置标识符。
参数
的UCODE
[in]指定虚拟键码或扫描代码的关键。如何解释此值取决于对uMapType参数的值。
uMapType
[in]指定的翻译来执行。这个参数的值取决于的UCODE参数的值。
MAPVK_VK_TO_VSC
的UCODE参数是一个虚拟键码,并成为一个扫描码翻译。如果它是一个虚拟键码,不区分左,右手键,左边的扫描码返回。若没有翻译,则函数返回0。
MAPVK_VSC_TO_VK
的UCODE参数是一个扫描码,并成为一个虚拟键码,不区分左,右手键翻译。若没有翻译,则函数返回0。
Windows Vista和更高版本:对价值高的UCODE字节可以包含0xe0或0xe1指定扩展的扫描码。
MAPVK_VK_TO_CHAR
的UCODE参数是一个虚拟键码,并成为在返回值的低位字unshifted字符值的翻译。死键(变音符号)的说明通过设置返回值的最高位。若没有翻译,则函数返回0。
MAPVK_VSC_TO_VK_EX
Windows NT/2000/XP和更高版本:的UCODE是一个扫描码,并成为一个虚拟键码之间左,右手键区分开来翻译。若没有翻译,则函数返回0。
Windows Vista和更高版本:对价值高的UCODE字节可以包含0xe0或0xe1指定扩展的扫描码。
MAPVK_VK_TO_VSC_EX
Windows Vista和更高版本:的UCODE参数是一个虚拟键码,并成为一个扫描码翻译。如果它是一个虚拟键码,不区分左,右手键,左边的扫描码返回。如果扫描的代码是一个扩展的扫描代码,价值高的UCODE字节可以包含0xe0或0xe1指定扩展的扫描码。若没有翻译,则函数返回0。
dwhkl
[in]输入区域设置标识符使用指定的代码转换。此参数可以是任何输入区域设置标识符先前LoadKeyboardLayout函数返回。
返回值
返回值可以是一个扫描码,一个虚拟键码,或一个字符值,取决于的UCODE和uMapType价值。如果没有翻译,返回值是零。
备注
输入法区域设置标识符是一个比键盘布局更广泛的概念,因为它也可以包括演讲到文本转换器,输入法编辑器(IME),或任何其他形式的投入。
应用程序可以使用扫描码翻译扫描码的虚拟键码常数VK_SHIFT,VK_CONTROL,和VK_MENU,反之亦然。这些翻译不区分的SHIFT键,Ctrl或Alt键左,右实例。
Windows NT/2000/XP的:应用程序可以获取相应的扫描码向左或向右这些关键之一,例如通过调用的UCODE设置为以下虚拟键码常数之一扫描码。
VK_LSHIFT
VK_RSHIFT
VK_LCONTROL
VK_RCONTROL
VK_LMENU
VK_RMENU
这些左,右区分常量可用于应用程序只能通过GetKeyboardState,SetKeyboardState,GetAsyncKeyState,GetKeyState,MapVirtualKey和扫描码功能。对于清单的完整虚拟键码表,请参阅虚拟密钥代码。
在Windows 95/98/Me:MapVirtualKeyExW是支持的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,GetKeyState,LoadKeyboardLayout,SetKeyboardState
==英文原文==MapVirtualKeyEx Function
The MapVirtualKeyEx function translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code. The function translates the codes using the input language and an input locale identifier.
Syntax
UINT MapVirtualKeyEx( UINT uCode,
UINT uMapType,
HKL dwhkl
);
Parameters
uCode
[in] Specifies the virtual-key code or scan code for a key. How this value is interpreted depends on the value of the uMapType parameter.
uMapType
[in] Specifies the translation to perform. The value of this parameter depends on the value of the uCode parameter.
MAPVK_VK_TO_VSC
The uCode parameter is a virtual-key code and is translated into a scan code. If it is a virtual-key code that does not distinguish between left- and right-hand keys, the left-hand scan code is returned. If there is no translation, the function returns 0.
MAPVK_VSC_TO_VK
The uCode parameter is a scan code and is translated into a virtual-key code that does not distinguish between left- and right-hand keys. If there is no translation, the function returns 0.
Windows Vista and later: The high byte of the uCode value can contain either 0xe0 or 0xe1 to specify the extended scan code.
MAPVK_VK_TO_CHAR
The uCode parameter is a virtual-key code and is translated into an unshifted character value in the low order word of the return value. Dead keys (diacritics) are indicated by setting the top bit of the return value. If there is no translation, the function returns 0.
MAPVK_VSC_TO_VK_EX
Windows NT/2000/XP and later: uCode is a scan code and is translated into a virtual-key code that distinguishes between left- and right-hand keys. If there is no translation, the function returns 0.
Windows Vista and later: The high byte of the uCode value can contain either 0xe0 or 0xe1 to specify the extended scan code.
MAPVK_VK_TO_VSC_EX
Windows Vista and later: The uCode parameter is a virtual-key code and is translated into a scan code. If it is a virtual-key code that does not distinguish between left- and right-hand keys, the left-hand scan code is returned. If the scan code is an extended scan code, the high byte of the uCode value can contain either 0xe0 or 0xe1 to specify the extended scan code. If there is no translation, the function returns 0.
dwhkl
[in] Input locale identifier to use for translating the specified code. This parameter can be any input locale identifier previously returned by the LoadKeyboardLayout function.
Return Value
The return value is either a scan code, a virtual-key code, or a character value, depending on the value of uCode and uMapType. If there is no translation, the return value is zero.
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.
An application can use MapVirtualKeyEx to translate scan codes to the virtual-key code constants VK_SHIFT, VK_CONTROL, and VK_MENU, and vice versa. These translations do not distinguish between the left and right instances of the SHIFT, CTRL, or ALT keys.
Windows NT/2000/XP: An application can get the scan code corresponding to the left or right instance of one of these keys by calling MapVirtualKeyEx with uCode set to one of the following virtual-key code constants.
VK_LSHIFT
VK_RSHIFT
VK_LCONTROL
VK_RCONTROL
VK_LMENU
VK_RMENU
These left- and right-distinguishing constants are available to an application only through the GetKeyboardState , SetKeyboardState , GetAsyncKeyState , GetKeyState , MapVirtualKey , and MapVirtualKeyEx functions. For list complete table of virtual key codes, see Virtual Key Codes .
Windows 95/98/Me: MapVirtualKeyExW 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 , GetKeyState , LoadKeyboardLayout , SetKeyboardState
==原始网址==http://msdn.microsoft.com/en-us/library/ms646307(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 9:24:12