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
d6b063e3
Commit
d6b063e3
authored
Mar 29, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle control characters in VkKeyScanEx similar to what Windows
does.
parent
607bb11a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
keyboard.c
dlls/x11drv/keyboard.c
+12
-1
No files found.
dlls/x11drv/keyboard.c
View file @
d6b063e3
...
@@ -1866,6 +1866,9 @@ SHORT X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
...
@@ -1866,6 +1866,9 @@ SHORT X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
CHAR
cChar
;
CHAR
cChar
;
SHORT
ret
;
SHORT
ret
;
/* FIXME: what happens if wChar is not a Latin1 character and CP_UNIXCP
* is UTF-8 (multibyte encoding)?
*/
if
(
!
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
&
wChar
,
1
,
&
cChar
,
1
,
NULL
,
NULL
))
if
(
!
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
&
wChar
,
1
,
&
cChar
,
1
,
NULL
,
NULL
))
{
{
WARN
(
"no translation from unicode to CP_UNIXCP for 0x%02x
\n
"
,
wChar
);
WARN
(
"no translation from unicode to CP_UNIXCP for 0x%02x
\n
"
,
wChar
);
...
@@ -1881,7 +1884,15 @@ SHORT X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
...
@@ -1881,7 +1884,15 @@ SHORT X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
wine_tsx11_lock
();
wine_tsx11_lock
();
keycode
=
XKeysymToKeycode
(
display
,
keysym
);
/* keysym -> keycode */
keycode
=
XKeysymToKeycode
(
display
,
keysym
);
/* keysym -> keycode */
if
(
!
keycode
)
if
(
!
keycode
)
{
/* It didn't work ... let's try with deadchar code. */
{
if
(
keysym
>=
0xFF00
)
/* Windows returns 0x0240 + cChar in this case */
{
ret
=
0x0240
+
cChar
;
/* 0x0200 indicates a control character */
TRACE
(
" ... returning ctrl char %#.2x
\n
"
,
ret
);
wine_tsx11_unlock
();
return
ret
;
}
/* It didn't work ... let's try with deadchar code. */
TRACE
(
"retrying with | 0xFE00
\n
"
);
TRACE
(
"retrying with | 0xFE00
\n
"
);
keycode
=
XKeysymToKeycode
(
display
,
keysym
|
0xFE00
);
keycode
=
XKeysymToKeycode
(
display
,
keysym
|
0xFE00
);
}
}
...
...
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