summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremy@tifa.local>2007-12-01 16:23:23 -0800
committerJeremy Huddleston <jeremy@yuffie.local>2007-12-01 17:27:36 -0800
commit9ad4560b3cbd42e647d6227746d4d037616d57cf (patch)
tree73a9db1cda57ebce7918b5cdd15539dfb23b6f53
parentf83d758dcc4878849a851c8466f6fa16b2b7cd8e (diff)
Darwin: Alt is Mode_switch Switching to Mode_switch to maintain compatibility with Tiger X11.
(cherry picked from commit 8a76c99c0ebbaf7375f3a9c75c4f7921a79024da)
-rw-r--r--hw/darwin/darwinKeyboard.c9
-rw-r--r--hw/darwin/quartz/Makefile.am1
-rw-r--r--hw/darwin/quartz/quartzKeyboard.c22
3 files changed, 9 insertions, 23 deletions
diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c
index 7f7b7c74a..851a10f11 100644
--- a/hw/darwin/darwinKeyboard.c
+++ b/hw/darwin/darwinKeyboard.c
@@ -518,8 +518,8 @@ Bool DarwinParseNXKeyMapping(
(left ? XK_Control_L : XK_Control_R);
break;
case NX_MODIFIERKEY_ALTERNATE:
- info->keyMap[keyCode * GLYPHS_PER_KEY] =
- (left ? XK_Alt_L : XK_Alt_R);
+ info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Mode_switch;
+ // (left ? XK_Alt_L : XK_Alt_R);
break;
case NX_MODIFIERKEY_COMMAND:
info->keyMap[keyCode * GLYPHS_PER_KEY] =
@@ -709,6 +709,11 @@ DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
break;
case XK_Mode_switch:
+ // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor.
+#ifdef NX_MODIFIERKEY_RALTERNATE
+ info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i;
+#endif
+ info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
info->modMap[MIN_KEYCODE + i] = Mod1Mask;
break;
diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am
index fe6642983..f5199dfa2 100644
--- a/hw/darwin/quartz/Makefile.am
+++ b/hw/darwin/quartz/Makefile.am
@@ -3,7 +3,6 @@ noinst_LIBRARIES = libXQuartz.a
AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
- -DHAS_KL_API \
-I$(srcdir) -I$(srcdir)/.. \
-I$(top_srcdir)/miext/rootless
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index b87249f33..ee485b8c5 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -44,8 +44,6 @@
#include "X11/keysym.h"
#include "keysym2ucs.h"
-#ifdef HAS_KL_API
-
#define HACK_MISSING 1
#define HACK_KEYPAD 1
@@ -68,11 +66,11 @@ const static struct {
{55, XK_Meta_L},
{56, XK_Shift_L},
{57, XK_Caps_Lock},
- {58, XK_Alt_L},
+ {58, XK_Mode_switch},
{59, XK_Control_L},
{60, XK_Shift_R},
- {61, XK_Alt_R},
+ {61, XK_Mode_switch},
{62, XK_Control_R},
{63, XK_Meta_R},
@@ -332,19 +330,3 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
return TRUE;
}
-
-#else /* !HAS_KL_API */
-
-unsigned int
-DarwinModeSystemKeymapSeed (void)
-{
- return 0;
-}
-
-Bool
-DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
-{
- return FALSE;
-}
-
-#endif /* HAS_KL_API */