1
/* $Xorg: GetActKey.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */
5
/***********************************************************
6
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
7
Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA.
11
Permission to use, copy, modify, and distribute this software and its
12
documentation for any purpose and without fee is hereby granted,
13
provided that the above copyright notice appear in all copies and that
14
both that copyright notice and this permission notice appear in
15
supporting documentation, and that the names of Digital or Sun not be
16
used in advertising or publicity pertaining to distribution of the
17
software without specific, written prior permission.
19
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
20
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
21
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
22
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
27
SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
28
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
29
NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI-
30
ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
31
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
32
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
33
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
34
THE USE OR PERFORMANCE OF THIS SOFTWARE.
36
******************************************************************/
40
Copyright 1987, 1988, 1998 The Open Group
42
Permission to use, copy, modify, distribute, and sell this software and its
43
documentation for any purpose is hereby granted without fee, provided that
44
the above copyright notice appear in all copies and that both that
45
copyright notice and this permission notice appear in supporting
48
The above copyright notice and this permission notice shall be included in
49
all copies or substantial portions of the Software.
51
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
54
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
55
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
58
Except as contained in this notice, the name of The Open Group shall not be
59
used in advertising or otherwise to promote the sale, use or other dealings
60
in this Software without prior written authorization from The Open Group.
64
#include "IntrinsicI.h"
66
KeySym XtGetActionKeysym(event, modifiers_return)
68
Modifiers *modifiers_return;
70
TMKeyContext tm_context;
72
KeySym keysym, retval;
75
tm_context= _XtGetPerDisplay(event->xany.display)->tm_context;
76
if (event->xany.type != KeyPress && event->xany.type != KeyRelease) {
80
if (tm_context != NULL
81
&& event == tm_context->event
82
&& event->xany.serial == tm_context->serial ) {
84
if (modifiers_return != NULL)
85
*modifiers_return = tm_context->modifiers;
86
retval = tm_context->keysym;
91
XtTranslateKeycode( event->xany.display, (KeyCode)event->xkey.keycode,
92
event->xkey.state, &modifiers, &keysym );
94
if (modifiers_return != NULL)
95
*modifiers_return = event->xkey.state & modifiers;