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
0d565d01
Commit
0d565d01
authored
Jun 09, 2017
by
Josh DuBois
Committed by
Alexandre Julliard
Jun 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Implement MapVirtualKeyEx.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86534e0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
keyboard.c
dlls/wineandroid.drv/keyboard.c
+64
-0
wineandroid.drv.spec
dlls/wineandroid.drv/wineandroid.drv.spec
+1
-0
No files found.
dlls/wineandroid.drv/keyboard.c
View file @
0d565d01
...
...
@@ -36,6 +36,7 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
keyboard
);
WINE_DECLARE_DEBUG_CHANNEL
(
key
);
static
const
UINT
keycode_to_vkey
[]
=
{
...
...
@@ -821,3 +822,66 @@ INT CDECL ANDROID_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
TRACE
(
"lparam 0x%08x -> %s
\n
"
,
lparam
,
debugstr_w
(
buffer
));
return
len
;
}
/***********************************************************************
* ANDROID_MapVirtualKeyEx
*/
UINT
CDECL
ANDROID_MapVirtualKeyEx
(
UINT
code
,
UINT
maptype
,
HKL
hkl
)
{
UINT
ret
=
0
;
const
char
*
s
;
TRACE_
(
key
)(
"code=0x%x, maptype=%d, hkl %p
\n
"
,
code
,
maptype
,
hkl
);
switch
(
maptype
)
{
case
MAPVK_VK_TO_VSC_EX
:
case
MAPVK_VK_TO_VSC
:
/* vkey to scancode */
switch
(
code
)
{
case
VK_SHIFT
:
code
=
VK_LSHIFT
;
break
;
case
VK_CONTROL
:
code
=
VK_LCONTROL
;
break
;
case
VK_MENU
:
code
=
VK_LMENU
;
break
;
}
if
(
code
<
sizeof
(
vkey_to_scancode
)
/
sizeof
(
vkey_to_scancode
[
0
]))
ret
=
vkey_to_scancode
[
code
];
break
;
case
MAPVK_VSC_TO_VK
:
case
MAPVK_VSC_TO_VK_EX
:
/* scancode to vkey */
ret
=
scancode_to_vkey
(
code
);
if
(
maptype
==
MAPVK_VSC_TO_VK
)
switch
(
ret
)
{
case
VK_LSHIFT
:
case
VK_RSHIFT
:
ret
=
VK_SHIFT
;
break
;
case
VK_LCONTROL
:
case
VK_RCONTROL
:
ret
=
VK_CONTROL
;
break
;
case
VK_LMENU
:
case
VK_RMENU
:
ret
=
VK_MENU
;
break
;
}
break
;
case
MAPVK_VK_TO_CHAR
:
s
=
vkey_to_name
(
code
);
if
(
s
&&
(
strlen
(
s
)
==
1
))
ret
=
s
[
0
];
else
ret
=
0
;
break
;
default:
FIXME
(
"Unknown maptype %d
\n
"
,
maptype
);
break
;
}
TRACE_
(
key
)(
"returning 0x%04x
\n
"
,
ret
);
return
ret
;
}
dlls/wineandroid.drv/wineandroid.drv.spec
View file @
0d565d01
...
...
@@ -5,6 +5,7 @@
# USER driver
@ cdecl GetKeyNameText(long ptr long) ANDROID_GetKeyNameText
@ cdecl MapVirtualKeyEx(long long long) ANDROID_MapVirtualKeyEx
@ cdecl ToUnicodeEx(long long ptr ptr long long long) ANDROID_ToUnicodeEx
@ cdecl EnumDisplayMonitors(long ptr ptr long) ANDROID_EnumDisplayMonitors
@ cdecl GetMonitorInfo(long ptr) ANDROID_GetMonitorInfo
...
...
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