Lines Matching refs:keysym

52 #include <X11/keysym.h>     /* standard X keysyms */
76 * Two osf keys are not defined in standard keysym.h,
112 * according to both Java keycode and X keysym. There are a number of
113 * keycodes that map to more than one corresponding keysym, and we need
339 /* X11 keysym names for input method related keys don't always
350 * same keysym as ALT_GRAPH in spite of its different behavior.
505 DTRACE_PRINTLN1("keysymToAWTKeyCode: no key mapping found: keysym = 0x%x", x11Key);
532 * For keys that don't map to unicode characters, the keysym
533 * is irrelevant at this point. We set the keysym to zero
538 * For keys that do map to unicode characters, we change the keysym
542 handleVendorKeySyms(XEvent *event, KeySym *keysym)
544 KeySym originalKeysym = *keysym;
546 switch (*keysym) {
595 *keysym = 0;
601 *keysym = XK_BackSpace;
604 *keysym = XK_Escape;
607 *keysym = XK_Cancel;
610 *keysym = XK_Delete;
616 if (originalKeysym != *keysym) {
617 DTRACE_PRINTLN3("%s originalKeysym=0x%x, keysym=0x%x",
618 "In handleVendorKeySyms:", originalKeysym, *keysym);
623 * The purpose of this function is to adjust the keysym and XEvent
629 adjustKeySym(XEvent *event, KeySym *keysym)
631 KeySym originalKeysym = *keysym;
638 *keysym &= 0x0000FFFF;
640 switch (*keysym) {
642 *keysym = XK_Tab;
645 *keysym = '.';
648 *keysym = '+';
652 *keysym = '-';
656 *keysym = '/';
660 *keysym = '*';
663 *keysym = '=';
666 *keysym = '0';
669 *keysym = '1';
672 *keysym = '2';
675 *keysym = '3';
678 *keysym = '4';
681 *keysym = '5';
684 *keysym = '6';
687 *keysym = '7';
690 *keysym = '8';
693 *keysym = '9';
696 *keysym = XK_Left;
697 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
700 *keysym = XK_Up;
701 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
704 *keysym = XK_Right;
705 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
708 *keysym = XK_Down;
709 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
712 *keysym = XK_Home;
713 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
716 *keysym = XK_End;
717 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
720 *keysym = XK_Page_Up;
721 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
724 *keysym = XK_Page_Down;
725 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
728 *keysym = XK_Begin;
729 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
732 *keysym = XK_Insert;
733 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
736 *keysym = XK_Delete;
737 event->xkey.keycode = XKeysymToKeycode(awt_display, *keysym);
740 *keysym = XK_Linefeed;
747 if (originalKeysym != *keysym) {
748 DTRACE_PRINTLN2("In adjustKeySym: originalKeysym=0x%x, keysym=0x%x",
749 originalKeysym, *keysym);
806 * Xlib manual, ch 12.7 says, as a first rule for choice of keysym:
813 * So, is it a keypad keysym?
831 handleKeyEventWithNumLockMask_New(XEvent *event, KeySym *keysym)
833 KeySym originalKeysym = *keysym;
839 *keysym = XKeycodeToKeysym(event->xkey.display,
842 *keysym = XKeycodeToKeysym(event->xkey.display,
849 *keysym = XKeycodeToKeysym(event->xkey.display,
852 *keysym = XKeycodeToKeysym(event->xkey.display,
866 handleKeyEventWithNumLockMask(XEvent *event, KeySym *keysym)
868 KeySym originalKeysym = *keysym;
876 * the keysym list beyond the first two (unmodified, Shift or
887 *keysym = XKeycodeToKeysym(event->xkey.display,
889 if (originalKeysym != *keysym) {
890 DTRACE_PRINTLN3("%s originalKeysym=0x%x, keysym=0x%x",
892 originalKeysym, *keysym);
897 switch (*keysym) {
899 *keysym = XK_KP_1;
902 *keysym = XK_KP_2;
905 *keysym = XK_KP_3;
908 *keysym = XK_KP_4;
911 *keysym = XK_KP_5;
914 *keysym = XK_KP_6;
917 *keysym = XK_KP_7;
920 *keysym = XK_KP_8;
923 *keysym = XK_KP_9;
926 *keysym = XK_KP_0;
929 *keysym = XK_KP_Decimal;
932 *keysym = XK_KP_Equal; /* Type 4 kbd */
935 *keysym = XK_KP_Divide;
938 *keysym = XK_KP_Multiply;
941 * Need the following keysym changes for Linux key releases.
947 *keysym = XK_KP_4;
950 *keysym = XK_KP_8;
953 *keysym = XK_KP_6;
956 *keysym = XK_KP_2;
959 *keysym = XK_KP_7;
962 *keysym = XK_KP_1;
965 *keysym = XK_KP_9;
968 *keysym = XK_KP_3;
971 *keysym = XK_KP_5;
977 if (originalKeysym != *keysym) {
978 DTRACE_PRINTLN3("%s originalKeysym=0x%x, keysym=0x%x",
979 "In handleKeyEventWithNumLockMask:", originalKeysym, *keysym);
988 * keysym is not the same as the unicode value. For values that
989 * we don't handle explicitly, we just cast the keysym to a jchar.
990 * Most of the real mapping work that gets the correct keysym is handled
997 * instead of the keysym as the keychar when posting. Then we don't
1004 keySymToUnicodeCharacter(KeySym keysym) {
1005 jchar unicodeValue = (jchar) keysym;
1007 switch (keysym) {
1017 unicodeValue = (jchar) (keysym & 0x007F);
1029 if (unicodeValue != (jchar)keysym) {
1030 DTRACE_PRINTLN3("%s originalKeysym=0x%x, keysym=0x%x",
1031 "In keysymToUnicode:", keysym, unicodeValue);
1049 Java_sun_awt_X11_XWindow_getAWTKeyCodeForKeySym(JNIEnv *env, jclass clazz, jint keysym) {
1053 keysymToAWTKeyCode(keysym, &keycode, &mapsToUnicodeChar, &keyLocation);
1066 KeySym keysym = NoSymbol;
1079 boo = awt_x11inputmethod_lookupString((XKeyPressedEvent*)jlong_to_ptr(event), &keysym);
1080 testbuf[0] = keysym;