3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /* $Id: input.c,v 1.11 2003/08/04 16:56:40 gdalsnes Exp $
21 * PROJECT: ReactOS user32.dll
22 * FILE: lib/user32/windows/input.c
24 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
26 * 09-05-2001 CSH Created
29 /* INCLUDES ******************************************************************/
35 /* FUNCTIONS *****************************************************************/
47 return NtUserDragDetect(hWnd
, pt
.x
, pt
.y
);
55 ActivateKeyboardLayout(HKL hkl
,
67 BlockInput(WINBOOL fBlockIt
)
78 EnableWindow(HWND hWnd
,
90 GetAsyncKeyState(int vKey
)
101 GetKeyboardLayout(DWORD idThread
)
123 GetKeyNameTextA(LONG lParam
,
136 GetKeyNameTextW(LONG lParam
,
149 GetKeyState(int nVirtKey
)
151 return (SHORT
) NtUserGetKeyState((DWORD
) nVirtKey
);
159 GetKeyboardLayoutList(int nBuff
,
171 GetKeyboardLayoutNameA(LPSTR pwszKLID
)
182 GetKeyboardLayoutNameW(LPWSTR pwszKLID
)
193 GetKeyboardState(PBYTE lpKeyState
)
196 return (WINBOOL
) NtUserGetKeyboardState((LPBYTE
) lpKeyState
);
204 GetKeyboardType(int nTypeFlag
)
215 GetLastInputInfo(PLASTINPUTINFO plii
)
226 LoadKeyboardLayoutA(LPCSTR pwszKLID
,
238 LoadKeyboardLayoutW(LPCWSTR pwszKLID
,
250 MapVirtualKeyA(UINT uCode
,
262 MapVirtualKeyExA(UINT uCode
,
275 MapVirtualKeyExW(UINT uCode
,
288 MapVirtualKeyW(UINT uCode
,
300 OemKeyScan(WORD wOemChar
)
313 return NtUserSetFocus(hWnd
);
321 SetKeyboardState(LPBYTE lpKeyState
)
323 return (WINBOOL
) NtUserSetKeyboardState((LPBYTE
)lpKeyState
);
331 ToAscii(UINT uVirtKey
,
333 CONST PBYTE lpKeyState
,
346 ToAsciiEx(UINT uVirtKey
,
348 CONST PBYTE lpKeyState
,
362 ToUnicode(UINT wVirtKey
,
364 CONST PBYTE lpKeyState
,
378 ToUnicodeEx(UINT wVirtKey
,
380 CONST PBYTE lpKeyState
,
395 UnloadKeyboardLayout(HKL hkl
)
417 VkKeyScanExA(CHAR ch
,
429 VkKeyScanExW(WCHAR ch
,