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
0debf422
Commit
0debf422
authored
Apr 13, 2000
by
Stephane Lussier
Committed by
Alexandre Julliard
Apr 13, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed AltGr key handling.
parent
8903137c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
x11drv_main.c
dlls/x11drv/x11drv_main.c
+0
-2
keyboard.c
windows/x11drv/keyboard.c
+17
-1
No files found.
dlls/x11drv/x11drv_main.c
View file @
0debf422
...
...
@@ -156,8 +156,6 @@ static void process_attach(void)
CLIPBOARD_Driver
=
&
X11DRV_CLIPBOARD_Driver
;
WND_Driver
=
&
X11DRV_WND_Driver
;
putenv
(
"XKB_DISABLE="
);
/* Disable XKB extension if present. */
/* Open display */
if
(
!
(
display
=
TSXOpenDisplay
(
Options
.
display
)))
...
...
windows/x11drv/keyboard.c
View file @
0debf422
...
...
@@ -450,7 +450,7 @@ static WORD EVENT_event_to_vkey( XKeyEvent *e)
return
keyc2vkey
[
e
->
keycode
];
}
static
BOOL
NumState
=
FALSE
,
CapsState
=
FALSE
;
static
BOOL
NumState
=
FALSE
,
CapsState
=
FALSE
,
AltGrState
=
FALSE
;
/**********************************************************************
* KEYBOARD_GenerateMsg
...
...
@@ -583,6 +583,16 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
ascii_chars
=
TSXLookupString
(
event
,
Str
,
1
,
&
keysym
,
&
cs
);
TRACE_
(
key
)(
"EVENT_key : state = %X
\n
"
,
event
->
state
);
/* If the state mask for AltGr hasn't been set yet, it's probably
because the X server/client are using XKB extension. With XKB extension
AltGr is mapped to a Group index. The group index is set in bits 13-14
of event->state field.
Ref: X Keyboard Extension: Library specification (section 14.1.1 and 17.1.1) */
if
(
AltGrState
&&
(
AltGrMask
==
0
))
AltGrMask
=
event
->
state
&
0x6000
;
if
(
keysym
==
XK_Mode_switch
)
{
TRACE_
(
key
)(
"Alt Gr key event received
\n
"
);
...
...
@@ -593,6 +603,12 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
force_extended
=
TRUE
;
X11DRV_KEYBOARD_HandleEvent
(
pWnd
,
event
);
force_extended
=
FALSE
;
/* Here we save the pressed/released state of the AltGr key, to be able to
identify the group index associated with AltGr on the next key pressed *
see comment above. */
AltGrState
=
(
event
->
type
==
KeyPress
)
?
TRUE
:
FALSE
;
return
;
}
...
...
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