Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e5e261f1
Commit
e5e261f1
authored
Jan 23, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Make MapVirtualKeyEx(MAPVK_VK_TO_CHAR) behave more like in Windows.
parent
e929e3b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
input.c
dlls/user32/input.c
+12
-1
keyboard.c
dlls/winex11.drv/keyboard.c
+12
-12
No files found.
dlls/user32/input.c
View file @
e5e261f1
...
...
@@ -622,7 +622,18 @@ UINT WINAPI MapVirtualKeyW(UINT code, UINT maptype)
*/
UINT
WINAPI
MapVirtualKeyExA
(
UINT
code
,
UINT
maptype
,
HKL
hkl
)
{
return
MapVirtualKeyExW
(
code
,
maptype
,
hkl
);
UINT
ret
;
ret
=
MapVirtualKeyExW
(
code
,
maptype
,
hkl
);
if
(
maptype
==
MAPVK_VK_TO_CHAR
)
{
BYTE
ch
=
0
;
WCHAR
wch
=
ret
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
(
LPSTR
)
&
ch
,
1
,
NULL
,
NULL
);
ret
=
ch
;
}
return
ret
;
}
/******************************************************************************
...
...
dlls/winex11.drv/keyboard.c
View file @
e5e261f1
...
...
@@ -2121,17 +2121,15 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
/* let's do vkey -> keycode -> (XLookupString) ansi char */
XKeyEvent
e
;
KeySym
keysym
;
int
keyc
;
char
s
[
2
];
e
.
display
=
display
;
int
keyc
,
len
;
char
s
[
10
];
e
.
state
=
LockMask
;
/* LockMask should behave exactly like caps lock - upercase
* the letter keys and that's about it. */
e
.
display
=
display
;
e
.
state
=
0
;
e
.
keycode
=
0
;
wine_tsx11_lock
();
e
.
keycode
=
0
;
/* We exit on the first keycode found, to speed up the thing. */
for
(
keyc
=
min_keycode
;
(
keyc
<=
max_keycode
)
&&
(
!
e
.
keycode
)
;
keyc
++
)
{
/* Find a keycode that could have generated this virtual key */
...
...
@@ -2159,14 +2157,16 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
}
TRACE
(
"Found keycode %d (0x%2X)
\n
"
,
e
.
keycode
,
e
.
keycode
);
if
(
XLookupString
(
&
e
,
s
,
2
,
&
keysym
,
NULL
))
len
=
XLookupString
(
&
e
,
s
,
sizeof
(
s
),
&
keysym
,
NULL
);
wine_tsx11_unlock
();
if
(
len
)
{
wine_tsx11_unlock
();
returnMVK
(
*
s
);
WCHAR
wch
;
if
(
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
s
,
len
,
&
wch
,
1
))
returnMVK
(
toupperW
(
wch
));
}
TRACE
(
"returning no ANSI.
\n
"
);
wine_tsx11_unlock
();
return
0
;
}
default:
/* reserved */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment