mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Implemented GetKeyState, GetKeyboardState & SetKeyboardState.
svn path=/trunk/; revision=5179
This commit is contained in:
parent
06f059499a
commit
3c46b3026a
5 changed files with 58 additions and 40 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2003-07-20 James Tabor <jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net>
|
||||||
|
|
||||||
|
* include/win32k/ntuser.h Implemented GetKeyState, GetKeyboardState &
|
||||||
|
SetKeyboardState.
|
||||||
|
* subsys/win32k/ntuser/stubs.c
|
||||||
|
* subsys/win32k/ntuser/keyboard.c
|
||||||
|
* lib/user32/windows/input.c
|
||||||
|
|
||||||
2003-07-20 James Tabor <jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net>
|
2003-07-20 James Tabor <jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net>
|
||||||
|
|
||||||
* lib/gdi32/misc/stubs.c Implemented Unpluged DC code.
|
* lib/gdi32/misc/stubs.c Implemented Unpluged DC code.
|
||||||
|
|
|
@ -698,7 +698,7 @@ NtUserGetKeyboardLayoutName(
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserGetKeyboardState(
|
NtUserGetKeyboardState(
|
||||||
DWORD Unknown0);
|
LPBYTE Unknown0);
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
|
@ -1309,7 +1309,7 @@ NtUserSetInternalWindowPos(
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserSetKeyboardState(
|
NtUserSetKeyboardState(
|
||||||
DWORD Unknown0);
|
LPBYTE Unknown0);
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: input.c,v 1.8 2003/07/10 21:04:32 chorns Exp $
|
/* $Id: input.c,v 1.9 2003/07/20 05:32:19 jimtabor Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/input.c
|
* FILE: lib/user32/windows/input.c
|
||||||
|
@ -144,8 +144,7 @@ GetKeyNameTextW(LONG lParam,
|
||||||
SHORT STDCALL
|
SHORT STDCALL
|
||||||
GetKeyState(int nVirtKey)
|
GetKeyState(int nVirtKey)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (SHORT) NtUserGetKeyState((DWORD) nVirtKey);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,8 +188,8 @@ GetKeyboardLayoutNameW(LPWSTR pwszKLID)
|
||||||
WINBOOL STDCALL
|
WINBOOL STDCALL
|
||||||
GetKeyboardState(PBYTE lpKeyState)
|
GetKeyboardState(PBYTE lpKeyState)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
|
||||||
return FALSE;
|
return (WINBOOL) NtUserGetKeyboardState((LPBYTE) lpKeyState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -317,8 +316,7 @@ SetFocus(HWND hWnd)
|
||||||
WINBOOL STDCALL
|
WINBOOL STDCALL
|
||||||
SetKeyboardState(LPBYTE lpKeyState)
|
SetKeyboardState(LPBYTE lpKeyState)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (WINBOOL) NtUserSetKeyboardState((LPBYTE)lpKeyState);
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: keyboard.c,v 1.4 2003/07/05 16:04:01 chorns Exp $
|
/* $Id: keyboard.c,v 1.5 2003/07/20 05:32:19 jimtabor Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <win32k/win32k.h>
|
#include <win32k/win32k.h>
|
||||||
|
#include <internal/safe.h>
|
||||||
#include <include/guicheck.h>
|
#include <include/guicheck.h>
|
||||||
#include <include/msgqueue.h>
|
#include <include/msgqueue.h>
|
||||||
#include <include/window.h>
|
#include <include/window.h>
|
||||||
|
@ -246,4 +247,44 @@ NtUserSetFocus(HWND hWnd)
|
||||||
return W32kSetFocusWindow(hWnd);
|
return W32kSetFocusWindow(hWnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
STDCALL
|
||||||
|
NtUserGetKeyState(
|
||||||
|
DWORD key)
|
||||||
|
{
|
||||||
|
DWORD ret;
|
||||||
|
|
||||||
|
if (key >= 'a' && key <= 'z') key += 'A' - 'a';
|
||||||
|
ret = ((DWORD)(QueueKeyStateTable[key] & 0x80) << 8 ) |
|
||||||
|
(QueueKeyStateTable[key] & 0x80) |
|
||||||
|
(QueueKeyStateTable[key] & 0x01);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
STDCALL
|
||||||
|
NtUserGetKeyboardState(
|
||||||
|
LPBYTE lpKeyState)
|
||||||
|
{
|
||||||
|
if (lpKeyState) {
|
||||||
|
if(!NT_SUCCESS(MmCopyToCaller(lpKeyState, QueueKeyStateTable, 256)))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
STDCALL
|
||||||
|
NtUserSetKeyboardState(
|
||||||
|
LPBYTE lpKeyState)
|
||||||
|
{
|
||||||
|
if (lpKeyState) {
|
||||||
|
if(! NT_SUCCESS(MmCopyFromCaller(QueueKeyStateTable, lpKeyState, 256)))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: stubs.c,v 1.15 2003/07/19 04:10:30 royce Exp $
|
/* $Id: stubs.c,v 1.16 2003/07/20 05:32:19 jimtabor Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -779,16 +779,6 @@ NtUserGetKeyboardLayoutName(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
NtUserGetKeyboardState(
|
|
||||||
DWORD Unknown0)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserGetKeyNameText(
|
NtUserGetKeyNameText(
|
||||||
|
@ -801,16 +791,6 @@ NtUserGetKeyNameText(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
NtUserGetKeyState(
|
|
||||||
DWORD Unknown0)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserGetListBoxInfo(
|
NtUserGetListBoxInfo(
|
||||||
|
@ -1276,15 +1256,6 @@ NtUserSetImeHotKey(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
NtUserSetKeyboardState(
|
|
||||||
DWORD Unknown0)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
Loading…
Reference in a new issue