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
55736136
Commit
55736136
authored
Aug 18, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Aug 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Support KEYEVENTF_UNICODE in SendInput.
parent
dad00cce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
18 deletions
+35
-18
spy.c
dlls/user32/spy.c
+1
-1
keyboard.c
dlls/winex11.drv/keyboard.c
+30
-16
winuser.h
include/winuser.h
+4
-1
No files found.
dlls/user32/spy.c
View file @
55736136
...
...
@@ -1370,7 +1370,7 @@ static const char * const VK_KeyNames[SPY_MAX_VKKEYSNUM + 1] =
"VK_ICO_00"
,
/* 0xE4 */
"VK_PROCESSKEY"
,
/* 0xE5 */
NULL
,
/* 0xE6 */
NULL
,
/* 0xE7 */
"VK_PACKET"
,
/* 0xE7 */
NULL
,
/* 0xE8 */
NULL
,
/* 0xE9 */
NULL
,
/* 0xEA */
...
...
dlls/winex11.drv/keyboard.c
View file @
55736136
...
...
@@ -1155,6 +1155,7 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD
UINT
message
;
KBDLLHOOKSTRUCT
hook
;
WORD
flags
,
wVkStripped
,
wVkL
,
wVkR
,
vk_hook
=
wVk
;
LPARAM
lParam
=
0
;
wVk
=
LOBYTE
(
wVk
);
flags
=
LOBYTE
(
wScan
);
...
...
@@ -1216,11 +1217,16 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD
message
=
WM_SYSKEYDOWN
;
TrackSysKey
=
wVkStripped
;
}
if
(
key_state_table
[
wVk
]
&
0x80
)
flags
|=
KF_REPEAT
;
if
(
!
(
event_flags
&
KEYEVENTF_UNICODE
)
&&
key_state_table
[
wVk
]
&
0x80
)
flags
|=
KF_REPEAT
;
}
TRACE_
(
key
)(
" wParam=%04x, lParam=%08lx, InputKeyState=%x
\n
"
,
wVk
,
MAKELPARAM
(
1
,
flags
),
key_state_table
[
wVk
]
);
if
(
event_flags
&
KEYEVENTF_UNICODE
)
{
vk_hook
=
wVk
=
VK_PACKET
;
lParam
=
MAKELPARAM
(
1
/* repeat count */
,
wScan
);
TRACE_
(
key
)(
" message=0x%04x wParam=0x%04x lParam=0x%08lx
\n
"
,
message
,
wVk
,
lParam
);
}
/* Hook gets whatever key was sent. */
hook
.
vkCode
=
vk_hook
;
...
...
@@ -1230,21 +1236,29 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD
hook
.
dwExtraInfo
=
dwExtraInfo
;
if
(
HOOK_CallHooks
(
WH_KEYBOARD_LL
,
HC_ACTION
,
message
,
(
LPARAM
)
&
hook
,
TRUE
))
return
;
if
(
event_flags
&
KEYEVENTF_KEYUP
)
if
(
!
(
event_flags
&
KEYEVENTF_UNICODE
)
)
{
key_state_table
[
wVk
]
&=
~
0x80
;
key_state_table
[
wVkStripped
]
=
key_state_table
[
wVkL
]
|
key_state_table
[
wVkR
];
}
else
{
if
(
!
(
key_state_table
[
wVk
]
&
0x80
))
key_state_table
[
wVk
]
^=
0x01
;
key_state_table
[
wVk
]
|=
0xc0
;
key_state_table
[
wVkStripped
]
=
key_state_table
[
wVkL
]
|
key_state_table
[
wVkR
];
}
if
(
event_flags
&
KEYEVENTF_KEYUP
)
{
key_state_table
[
wVk
]
&=
~
0x80
;
key_state_table
[
wVkStripped
]
=
key_state_table
[
wVkL
]
|
key_state_table
[
wVkR
];
}
else
{
if
(
!
(
key_state_table
[
wVk
]
&
0x80
))
key_state_table
[
wVk
]
^=
0x01
;
key_state_table
[
wVk
]
|=
0xc0
;
key_state_table
[
wVkStripped
]
=
key_state_table
[
wVkL
]
|
key_state_table
[
wVkR
];
}
if
(
key_state_table
[
VK_MENU
]
&
0x80
)
flags
|=
KF_ALTDOWN
;
if
(
key_state_table
[
VK_MENU
]
&
0x80
)
flags
|=
KF_ALTDOWN
;
if
(
wVkStripped
==
VK_SHIFT
)
flags
&=
~
KF_EXTENDED
;
if
(
wVkStripped
==
VK_SHIFT
)
flags
&=
~
KF_EXTENDED
;
lParam
=
MAKELPARAM
(
1
/* repeat count */
,
flags
);
TRACE_
(
key
)(
" message=0x%04x wParam=0x%04x, lParam=0x%08lx, InputKeyState=0x%x
\n
"
,
message
,
wVk
,
lParam
,
key_state_table
[
wVk
]);
}
SERVER_START_REQ
(
send_hardware_message
)
{
...
...
@@ -1252,7 +1266,7 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD
req
->
win
=
0
;
req
->
msg
=
message
;
req
->
wparam
=
wVk
;
req
->
lparam
=
MAKELPARAM
(
1
/* repeat count */
,
flags
)
;
req
->
lparam
=
lParam
;
req
->
x
=
cursor_pos
.
x
;
req
->
y
=
cursor_pos
.
y
;
req
->
time
=
time
;
...
...
include/winuser.h
View file @
55736136
...
...
@@ -2822,6 +2822,8 @@ typedef struct tagCBTACTIVATESTRUCT
/* keybd_event flags */
#define KEYEVENTF_EXTENDEDKEY 0x0001
#define KEYEVENTF_KEYUP 0x0002
#define KEYEVENTF_UNICODE 0x0004
#define KEYEVENTF_SCANCODE 0x0008
/* mouse_event flags */
#define MOUSEEVENTF_MOVE 0x0001
...
...
@@ -3813,7 +3815,8 @@ typedef struct tagCOMPAREITEMSTRUCT
#define VK_PROCESSKEY 0xE5
/* 0xE6 OEM specific */
/* 0xE7-0xE8 Unassigned */
#define VK_PACKET 0xE7
/* 0xE8 Unassigned */
/* 0xE9-0xF5 OEM specific */
#define VK_ATTN 0xF6
...
...
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