aboutsummaryrefslogtreecommitdiff
path: root/x11-servers/xorg-server/files/patch-xf86Events.c
blob: 2d88773233b8f71a603df350065aaf4d43d8613d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- hw/xfree86/common/xf86Events.c.orig	Sun Sep 26 04:17:42 2004
+++ hw/xfree86/common/xf86Events.c	Sun Sep 26 04:17:25 2004
@@ -448,7 +448,7 @@
 #if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
   static Bool first_time = TRUE;
 #endif
-#if defined(__sparc__) && defined(__linux__)
+#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__))
   static int  kbdSun = -1;
 #endif
   /* Disable any keyboard processing while in suspend */
@@ -464,7 +464,7 @@
   }
 #endif
 
-#if defined (__sparc__) && defined(__linux__)
+#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__))
   if (kbdSun == -1) {
     if ((xf86Info.xkbmodel && !strcmp(xf86Info.xkbmodel, "sun"))
 	|| (xf86Info.xkbrules && !strcmp(xf86Info.xkbrules, "sun")))
@@ -474,7 +474,7 @@
   }
   if (kbdSun)
     goto special;
-#endif /* __sparc__ && __linux__ */
+#endif /* __sparc__ && (__linux__ || __FreeBSD__) */
 
 #ifdef __linux__
   if (xf86Info.kbdCustomKeycodes) {
@@ -525,6 +525,7 @@
     } else
 #endif /* i386 && SVR4 */
     {
+      if (!xf86IsPc98()) {
       switch (scanCode) {
       case 0x59:        scanCode = KEY_0x59; break;
       case 0x5a:        scanCode = KEY_0x5A; break;
@@ -555,6 +556,7 @@
       case 0x75:        scanCode = KEY_0x75; break;
       case 0x76:        scanCode = KEY_0x76; break;
       }
+      }  /*  end if (!xf86IsPc98())  */
     }
   }
 
@@ -636,10 +638,12 @@
    * they need to get the same key code as the base key on the same
    * physical keyboard key.
    */
+  if (!xf86IsPc98()) {
   if (scanCode == KEY_SysReqest)
     scanCode = KEY_Print;
   else if (scanCode == KEY_Break)
     scanCode = KEY_Pause;
+  }
 #endif
   
   /*
@@ -676,7 +680,7 @@
     }
   }
 #endif
-#if defined (__sparc__) && defined(__linux__)
+#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__))
 special:
   if (kbdSun) {
     switch (scanCode) {
@@ -710,7 +714,7 @@
      */
     scanCode--;
   }
-#endif /* defined (__sparc__) && defined(__linux__) */
+#endif /* __sparc__ && (__linux__ || __FreeBSD__) */
 
 #ifdef XKB
   if ((xf86Info.ddxSpecialKeys == SKWhenNeeded &&