Commit deb455ec authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserGetKeyboardState implementation from user32.

parent d99f61dd
......@@ -594,29 +594,6 @@ BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
/**********************************************************************
* GetKeyboardState (USER32.@)
*/
BOOL WINAPI DECLSPEC_HOTPATCH GetKeyboardState( LPBYTE state )
{
BOOL ret;
UINT i;
TRACE("(%p)\n", state);
memset( state, 0, 256 );
SERVER_START_REQ( get_key_state )
{
req->key = -1;
wine_server_set_reply( req, state, 256 );
ret = !wine_server_call_err( req );
for (i = 0; i < 256; i++) state[i] &= 0x81;
}
SERVER_END_REQ;
return ret;
}
/**********************************************************************
* SetKeyboardState (USER32.@)
*/
BOOL WINAPI SetKeyboardState( LPBYTE state )
......
......@@ -3888,7 +3888,7 @@ BOOL WINAPI TranslateMessage( const MSG *msg )
return ImmTranslateMessage(msg->hwnd, msg->message, msg->wParam, msg->lParam);
}
GetKeyboardState( state );
NtUserGetKeyboardState( state );
len = ToUnicode(msg->wParam, HIWORD(msg->lParam), state, wp, ARRAY_SIZE(wp), 0);
if (len == -1)
{
......
......@@ -321,7 +321,7 @@
@ stdcall GetKeyboardLayoutList(long ptr)
@ stdcall GetKeyboardLayoutNameA(ptr)
@ stdcall GetKeyboardLayoutNameW(ptr)
@ stdcall GetKeyboardState(ptr)
@ stdcall -import GetKeyboardState(ptr) NtUserGetKeyboardState
@ stdcall GetKeyboardType(long)
@ stdcall GetLastActivePopup(long)
@ stdcall GetLastInputInfo(ptr)
......
......@@ -71,3 +71,25 @@ SHORT WINAPI NtUserGetKeyState( INT vkey )
TRACE("key (0x%x) -> %x\n", vkey, retval);
return retval;
}
/**********************************************************************
* NtUserGetKeyboardState (win32u.@)
*/
BOOL WINAPI NtUserGetKeyboardState( BYTE *state )
{
BOOL ret;
UINT i;
TRACE("(%p)\n", state);
memset( state, 0, 256 );
SERVER_START_REQ( get_key_state )
{
req->key = -1;
wine_server_set_reply( req, state, 256 );
ret = !wine_server_call_err( req );
for (i = 0; i < 256; i++) state[i] &= 0x81;
}
SERVER_END_REQ;
return ret;
}
......@@ -112,6 +112,7 @@ static void * const syscalls[] =
NtUserGetClipboardSequenceNumber,
NtUserGetClipboardViewer,
NtUserGetKeyState,
NtUserGetKeyboardState,
NtUserGetLayeredWindowAttributes,
NtUserGetObjectInformation,
NtUserGetProcessWindowStation,
......
......@@ -949,7 +949,7 @@
@ stub NtUserGetKeyboardLayout
@ stub NtUserGetKeyboardLayoutList
@ stub NtUserGetKeyboardLayoutName
@ stub NtUserGetKeyboardState
@ stdcall -syscall NtUserGetKeyboardState(ptr)
@ stdcall -syscall NtUserGetLayeredWindowAttributes(long ptr ptr ptr)
@ stub NtUserGetListBoxInfo
@ stub NtUserGetMenuBarInfo
......
......@@ -99,6 +99,7 @@
SYSCALL_ENTRY( NtUserGetClipboardSequenceNumber ) \
SYSCALL_ENTRY( NtUserGetClipboardViewer ) \
SYSCALL_ENTRY( NtUserGetKeyState ) \
SYSCALL_ENTRY( NtUserGetKeyboardState ) \
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
......
......@@ -244,3 +244,10 @@ NTSTATUS WINAPI wow64_NtUserGetKeyState( UINT *args )
return NtUserGetKeyState( vkey );
}
NTSTATUS WINAPI wow64_NtUserGetKeyboardState( UINT *args )
{
BYTE *state = get_ptr( &args );
return NtUserGetKeyboardState( state );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment