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
9784701f
Commit
9784701f
authored
Dec 07, 1998
by
Brian Gerst
Committed by
Alexandre Julliard
Dec 07, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The scancode Windows send for extended keys is the scancode of the
unextended equivalent of the key, plus the extended flag.
parent
7952ebf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
keyboard.c
windows/x11drv/keyboard.c
+24
-2
No files found.
windows/x11drv/keyboard.c
View file @
9784701f
...
...
@@ -293,8 +293,30 @@ void KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
NumState
=
FALSE
;
CapsState
=
FALSE
;
bScan
=
event
->
keycode
-
min_keycode
;
/* Windows starts from 0, X from
min_keycode (8 usually) */
switch
(
keysym
)
{
/* Windows expects extended keys to generate the unexetended scan
code and then set the extended flag */
case
XK_Control_R
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_Control_L
);
break
;
case
XK_Alt_R
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_Alt_L
);
break
;
case
XK_Insert
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Insert
);
break
;
case
XK_Delete
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Delete
);
break
;
case
XK_Home
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Home
);
break
;
case
XK_End
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_End
);
break
;
case
XK_Prior
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Prior
);
break
;
case
XK_Next
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Next
);
break
;
case
XK_Left
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Left
);
break
;
case
XK_Up
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Up
);
break
;
case
XK_Right
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Right
);
break
;
case
XK_Down
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_KP_Down
);
break
;
case
XK_KP_Divide
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_slash
);
break
;
case
XK_KP_Enter
:
bScan
=
TSXKeysymToKeycode
(
display
,
XK_Return
);
break
;
default:
bScan
=
event
->
keycode
;
break
;
}
bScan
-=
min_keycode
;
/* Windows starts from 0, X from min_keycode (8 usually) */
TRACE
(
key
,
"bScan = 0x%02x.
\n
"
,
bScan
);
dwFlags
=
0
;
if
(
event
->
type
==
KeyRelease
)
dwFlags
|=
KEYEVENTF_KEYUP
;
if
(
vkey
&
0x100
)
dwFlags
|=
KEYEVENTF_EXTENDEDKEY
;
...
...
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