Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
9784701f
Commit
9784701f
authored
26 years ago
by
Brian Gerst
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
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
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/x11drv/keyboard.c
+24
-2
24 additions, 2 deletions
windows/x11drv/keyboard.c
with
24 additions
and
2 deletions
windows/x11drv/keyboard.c
+
24
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment