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
3407307a
Commit
3407307a
authored
Sep 18, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Use symbolic names for MapVirtualKey translation types.
parent
aa649542
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
keyboard.c
dlls/winex11.drv/keyboard.c
+16
-15
winuser.h
include/winuser.h
+7
-0
No files found.
dlls/winex11.drv/keyboard.c
View file @
3407307a
...
...
@@ -2094,25 +2094,32 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
FIXME
(
"keyboard layout %p is not supported
\n
"
,
hkl
);
switch
(
wMapType
)
{
case
0
:
{
/* vkey-code to scan-code */
case
MAPVK_VK_TO_VSC
:
/* vkey-code to scan-code */
case
MAPVK_VK_TO_VSC_EX
:
/* FIXME: should differentiate between
left and right keys */
{
/* let's do vkey -> keycode -> scan */
int
keyc
;
for
(
keyc
=
min_keycode
;
keyc
<=
max_keycode
;
keyc
++
)
if
((
keyc2vkey
[
keyc
]
&
0xFF
)
==
wCode
)
returnMVK
(
keyc2scan
[
keyc
]
&
0xFF
);
TRACE
(
"returning no scan-code.
\n
"
);
return
0
;
}
case
1
:
{
/* scan-code to vkey-code */
return
0
;
}
case
MAPVK_VSC_TO_VK
:
/* scan-code to vkey-code */
case
MAPVK_VSC_TO_VK_EX
:
/* FIXME: should differentiate between
left and right keys */
{
/* let's do scan -> keycode -> vkey */
int
keyc
;
for
(
keyc
=
min_keycode
;
keyc
<=
max_keycode
;
keyc
++
)
if
((
keyc2scan
[
keyc
]
&
0xFF
)
==
(
wCode
&
0xFF
))
returnMVK
(
keyc2vkey
[
keyc
]
&
0xFF
);
TRACE
(
"returning no vkey-code.
\n
"
);
return
0
;
}
case
2
:
{
/* vkey-code to unshifted ANSI code */
return
0
;
}
case
MAPVK_VK_TO_CHAR
:
/* vkey-code to unshifted ANSI code */
{
/* we still don't know what "unshifted" means. in windows VK_W (0x57)
* returns 0x57, which is upercase 'W'. So we have to return the uppercase
* key.. Looks like something is wrong with the MS docs?
...
...
@@ -2169,15 +2176,9 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
TRACE
(
"returning no ANSI.
\n
"
);
wine_tsx11_unlock
();
return
0
;
}
case
3
:
/* **NT only** scan-code to vkey-code but distinguish between */
/* left and right */
FIXME
(
" stub for NT
\n
"
);
return
0
;
}
default:
/* reserved */
WARN
(
"Unknown wMapType %d !
\n
"
,
wMapType
);
FIXME
(
"Unknown wMapType %d !
\n
"
,
wMapType
);
return
0
;
}
return
0
;
...
...
include/winuser.h
View file @
3407307a
...
...
@@ -3729,6 +3729,13 @@ typedef struct tagCOMPAREITEMSTRUCT
#define VK_PA1 0xFD
#define VK_OEM_CLEAR 0xFE
/* MapVirtualKey translation types */
#define MAPVK_VK_TO_VSC 0
#define MAPVK_VSC_TO_VK 1
#define MAPVK_VK_TO_CHAR 2
#define MAPVK_VSC_TO_VK_EX 3
#define MAPVK_VK_TO_VSC_EX 4
/* Key status flags for mouse events */
#define MK_LBUTTON 0x0001
#define MK_RBUTTON 0x0002
...
...
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