mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:16:17 +00:00
- Fix a bug with incorrect handling of the keyboard layout pointer (which is HKL in fact in our current implementation).
- Change the prototype to better match actual parameters usage. See issue #2787 for more details. svn path=/trunk/; revision=30046
This commit is contained in:
parent
8609c9c790
commit
4a05c1e591
4 changed files with 10 additions and 8 deletions
|
@ -2356,8 +2356,8 @@ NtUserValidateTimerCallback(
|
||||||
DWORD
|
DWORD
|
||||||
NTAPI
|
NTAPI
|
||||||
NtUserVkKeyScanEx(
|
NtUserVkKeyScanEx(
|
||||||
DWORD Unknown0,
|
WCHAR wChar,
|
||||||
DWORD Unknown1,
|
ULONG_PTR KeyboardLayout,
|
||||||
DWORD Unknown2);
|
DWORD Unknown2);
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
|
|
@ -32,6 +32,7 @@ BOOL FASTCALL IntMouseInput(MOUSEINPUT *mi);
|
||||||
BOOL FASTCALL IntKeyboardInput(KEYBDINPUT *ki);
|
BOOL FASTCALL IntKeyboardInput(KEYBDINPUT *ki);
|
||||||
|
|
||||||
BOOL UserInitDefaultKeyboardLayout();
|
BOOL UserInitDefaultKeyboardLayout();
|
||||||
|
PKBL UserHklToKbl(HKL hKl);
|
||||||
|
|
||||||
#define ThreadHasInputAccess(W32Thread) \
|
#define ThreadHasInputAccess(W32Thread) \
|
||||||
(TRUE)
|
(TRUE)
|
||||||
|
|
|
@ -308,7 +308,7 @@ PKBL W32kGetDefaultKeyLayout(VOID)
|
||||||
return pKbl;
|
return pKbl;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PKBL UserHklToKbl(HKL hKl)
|
PKBL UserHklToKbl(HKL hKl)
|
||||||
{
|
{
|
||||||
PKBL pKbl = KBLList;
|
PKBL pKbl = KBLList;
|
||||||
do
|
do
|
||||||
|
|
|
@ -1007,12 +1007,11 @@ UserGetKeyboardType(
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserVkKeyScanEx(
|
NtUserVkKeyScanEx(
|
||||||
DWORD wChar,
|
WCHAR wChar,
|
||||||
DWORD KeyboardLayout,
|
ULONG_PTR KeyboardLayout,
|
||||||
DWORD Unknown2)
|
DWORD Unknown2)
|
||||||
{
|
{
|
||||||
/* FAXME: currently, this routine doesnt seem to need any locking */
|
/* FIXME: currently, this routine doesnt seem to need any locking */
|
||||||
|
|
||||||
PKBDTABLES KeyLayout;
|
PKBDTABLES KeyLayout;
|
||||||
PVK_TO_WCHAR_TABLE vtwTbl;
|
PVK_TO_WCHAR_TABLE vtwTbl;
|
||||||
PVK_TO_WCHARS10 vkPtr;
|
PVK_TO_WCHARS10 vkPtr;
|
||||||
|
@ -1020,9 +1019,11 @@ NtUserVkKeyScanEx(
|
||||||
int nMod;
|
int nMod;
|
||||||
DWORD CapsMod = 0, CapsState = 0;
|
DWORD CapsMod = 0, CapsState = 0;
|
||||||
|
|
||||||
|
DPRINT("NtUserVkKeyScanEx() wChar %d, KbdLayout 0x%p\n", wChar, KeyboardLayout);
|
||||||
|
|
||||||
if(!KeyboardLayout)
|
if(!KeyboardLayout)
|
||||||
return -1;
|
return -1;
|
||||||
KeyLayout = (PKBDTABLES) KeyboardLayout;
|
KeyLayout = UserHklToKbl((HKL)KeyboardLayout)->KBTables;
|
||||||
|
|
||||||
for (nMod = 0; KeyLayout->pVkToWcharTable[nMod].nModifications; nMod++)
|
for (nMod = 0; KeyLayout->pVkToWcharTable[nMod].nModifications; nMod++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue