patch-2.2.18 linux/include/asm-m68k/keyboard.h
Next file: linux/include/asm-m68k/linux_logo.h
Previous file: linux/include/asm-m68k/irq.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Fri Oct 13 23:32:07 2000
- Orig file:
v2.2.17/include/asm-m68k/keyboard.h
- Orig date:
Fri Apr 21 12:46:49 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/asm-m68k/keyboard.h linux/include/asm-m68k/keyboard.h
@@ -19,6 +19,10 @@
#ifdef CONFIG_Q40
#include <asm/q40_keyboard.h>
#endif
+#ifdef CONFIG_MAC
+extern int mackbd_translate(unsigned char, unsigned char *, char);
+extern int mackbd_unexpected_up(unsigned char);
+#endif
static __inline__ int kbd_setkeycode(unsigned int scancode,
unsigned int keycode)
@@ -39,6 +43,15 @@
return scancode > 127 ? -EINVAL : scancode;
}
+static __inline__ int kbd_pretranslate(unsigned char scancode, char raw_mode)
+{
+#ifdef CONFIG_Q40
+ if (MACH_IS_Q40)
+ return q40kbd_pretranslate(scancode,raw_mode);
+#endif
+ return 1;
+}
+
static __inline__ int kbd_translate(unsigned char scancode,
unsigned char *keycode, char raw_mode)
{
@@ -46,6 +59,10 @@
if (MACH_IS_Q40)
return q40kbd_translate(scancode,keycode,raw_mode);
#endif
+#ifdef CONFIG_MAC
+ if (MACH_IS_MAC)
+ return mackbd_translate(scancode, keycode, raw_mode);
+#endif
*keycode = scancode;
return 1;
}
@@ -55,6 +72,10 @@
#ifdef CONFIG_Q40
if (MACH_IS_Q40)
return q40kbd_unexpected_up(keycode);
+#endif
+#ifdef CONFIG_MAC
+ if (MACH_IS_MAC)
+ return mackbd_unexpected_up(keycode);
#endif
return 0200;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)