Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
f6a6712a
Commit
f6a6712a
authored
Oct 26, 2009
by
Ken Thomases
Committed by
Alexandre Julliard
Oct 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Assign OEM virtual key codes in a separate loop.
parent
8c090941
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
27 deletions
+41
-27
keyboard.c
dlls/winex11.drv/keyboard.c
+41
-27
No files found.
dlls/winex11.drv/keyboard.c
View file @
f6a6712a
...
...
@@ -1737,7 +1737,6 @@ void X11DRV_InitKeyboard( Display *display )
e2
.
display
=
display
;
e2
.
state
=
0
;
OEMvkey
=
VK_OEM_8
;
/* next is available. */
memset
(
keyc2vkey
,
0
,
sizeof
(
keyc2vkey
));
for
(
keyc
=
min_keycode
;
keyc
<=
max_keycode
;
keyc
++
)
{
...
...
@@ -1854,39 +1853,54 @@ void X11DRV_InitKeyboard( Display *display )
}
}
if
(
!
vkey
)
if
(
vkey
)
{
TRACE
(
"keycode %04x => vkey %04x
\n
"
,
e2
.
keycode
,
vkey
);
keyc2vkey
[
e2
.
keycode
]
=
vkey
;
}
}
/* for */
/* Others keys: let's assign OEM virtual key codes in the allowed range,
* that is ([0xba,0xc0], [0xdb,0xe4], 0xe6 (given up) et [0xe9,0xf5]) */
OEMvkey
=
VK_OEM_8
;
/* next is available. */
for
(
keyc
=
min_keycode
;
keyc
<=
max_keycode
;
keyc
++
)
{
if
(
keyc2vkey
[
keyc
]
&
0xff
)
continue
;
e2
.
keycode
=
(
KeyCode
)
keyc
;
keysym
=
XLookupKeysym
(
&
e2
,
0
);
if
(
!
keysym
)
continue
;
do
{
/* Others keys: let's assign OEM virtual key codes in the allowed range,
* that is ([0xba,0xc0], [0xdb,0xe4], 0xe6 (given up) et [0xe9,0xf5]) */
do
switch
(
++
OEMvkey
)
{
switch
(
++
OEMvkey
)
{
case
0xc1
:
OEMvkey
=
0xdb
;
break
;
case
0xe5
:
OEMvkey
=
0xe9
;
break
;
case
0xf6
:
OEMvkey
=
0xf5
;
WARN
(
"No more OEM vkey available!
\n
"
);
}
}
while
(
OEMvkey
<
0xf5
&&
vkey_used
[
OEMvkey
]);
case
0xc1
:
OEMvkey
=
0xdb
;
break
;
case
0xe5
:
OEMvkey
=
0xe9
;
break
;
case
0xf6
:
OEMvkey
=
0xf5
;
WARN
(
"No more OEM vkey available!
\n
"
);
}
}
while
(
OEMvkey
<
0xf5
&&
vkey_used
[
OEMvkey
]);
vkey
=
VKEY_IF_NOT_USED
(
OEMvkey
);
vkey
=
VKEY_IF_NOT_USED
(
OEMvkey
);
if
(
TRACE_ON
(
keyboard
))
if
(
TRACE_ON
(
keyboard
))
{
TRACE
(
"OEM specific virtual key %X assigned to keycode %X:
\n
"
,
OEMvkey
,
e2
.
keycode
);
TRACE
(
"("
);
for
(
i
=
0
;
i
<
keysyms_per_keycode
;
i
+=
1
)
{
TRACE
(
"OEM specific virtual key %X assigned to keycode %X:
\n
"
,
OEMvkey
,
e2
.
keycode
);
TRACE
(
"("
);
for
(
i
=
0
;
i
<
keysyms_per_keycode
;
i
+=
1
)
{
const
char
*
ksname
;
const
char
*
ksname
;
keysym
=
XLookupKeysym
(
&
e2
,
i
);
ksname
=
XKeysymToString
(
keysym
);
if
(
!
ksname
)
ksname
=
"NoSymbol"
;
TRACE
(
"%lX (%s) "
,
keysym
,
ksname
);
}
TRACE
(
")
\n
"
);
keysym
=
XLookupKeysym
(
&
e2
,
i
);
ksname
=
XKeysymToString
(
keysym
);
if
(
!
ksname
)
ksname
=
"NoSymbol"
;
TRACE
(
"%lX (%s) "
,
keysym
,
ksname
);
}
TRACE
(
")
\n
"
);
}
if
(
vkey
)
...
...
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