|
From: James S. <jsi...@us...> - 2002-10-29 18:43:34
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv13868
Modified Files:
kbd_kern.h
Log Message:
Synced to console BK tree.
Index: kbd_kern.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/kbd_kern.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- kbd_kern.h 20 Feb 2002 17:49:34 -0000 1.13
+++ kbd_kern.h 29 Oct 2002 18:43:31 -0000 1.14
@@ -1,6 +1,8 @@
#ifndef _KBD_KERN_H
#define _KBD_KERN_H
+#include <linux/tty.h>
+#include <linux/kd.h>
#include <linux/interrupt.h>
#include <linux/keyboard.h>
@@ -11,11 +13,15 @@
extern char *func_table[MAX_NR_FUNC];
extern char func_buf[];
extern char *funcbufptr;
-extern int funcbufsize, funcbufleft;
+extern int funcbufsize, funcbufleft;
-#define KBD_DEFMODE ((1 << VC_REPEAT) | (1 << VC_META))
-#define KBD_DEFLEDS 0
-#define KBD_DEFLOCK 0
+#define KBD_DEFMODE ((1 << VC_REPEAT) | (1 << VC_META))
+/*
+ * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
+ * This seems a good reason to start with NumLock off.
+ */
+#define KBD_DEFLEDS 0
+#define KBD_DEFLOCK 0
/*
* kbd->xxx contains the VC-local things (flag settings etc..)
@@ -33,18 +39,18 @@
they can be associated to arbitrarily chosen keys */
#define VC_SHIFTLOCK KG_SHIFT /* shift lock mode */
#define VC_ALTGRLOCK KG_ALTGR /* altgr lock mode */
-#define VC_CTRLLOCK KG_CTRL /* control lock mode */
-#define VC_ALTLOCK KG_ALT /* alt lock mode */
+#define VC_CTRLLOCK KG_CTRL /* control lock mode */
+#define VC_ALTLOCK KG_ALT /* alt lock mode */
#define VC_SHIFTLLOCK KG_SHIFTL /* shiftl lock mode */
#define VC_SHIFTRLOCK KG_SHIFTR /* shiftr lock mode */
-#define VC_CTRLLLOCK KG_CTRLL /* ctrll lock mode */
-#define VC_CTRLRLOCK KG_CTRLR /* ctrlr lock mode */
- unsigned char slockstate; /* for `sticky' Shift, Ctrl, etc. */
+#define VC_CTRLLLOCK KG_CTRLL /* ctrll lock mode */
+#define VC_CTRLRLOCK KG_CTRLR /* ctrlr lock mode */
+ unsigned char slockstate; /* for `sticky' Shift, Ctrl, etc. */
- unsigned char ledmode:2; /* one 2-bit value */
-#define LED_SHOW_FLAGS 0 /* traditional state */
-#define LED_SHOW_IOCTL 1 /* only change leds upon ioctl */
-#define LED_SHOW_MEM 2 /* `heartbeat': peek into memory */
+ unsigned char ledmode:2; /* one 2-bit value */
+#define LED_SHOW_FLAGS 0 /* traditional state */
+#define LED_SHOW_IOCTL 1 /* only change leds upon ioctl */
+#define LED_SHOW_MEM 2 /* `heartbeat': peek into memory */
unsigned char ledflagstate:3; /* flags, not lights */
unsigned char default_ledflagstate:3;
@@ -71,75 +77,78 @@
extern unsigned char getledstate(void);
extern void setledstate(struct kbd_struct *kbd, unsigned int led);
-extern void (*kbd_ledfunc)(unsigned int led);
+extern void (*kbd_ledfunc) (unsigned int led);
static inline void set_leds(void)
{
tasklet_schedule(&keyboard_tasklet);
}
-static inline int get_kbd_mode(struct kbd_struct *kbd, int flag)
+static inline int get_kbd_mode(struct kbd_struct kbd, int flag)
{
- return ((kbd->modeflags >> flag) & 1);
+ return ((kbd.modeflags >> flag) & 1);
}
-static inline int get_kbd_led(struct kbd_struct *kbd, int flag)
+static inline int get_kbd_led(struct kbd_struct kbd, int flag)
{
- return ((kbd->ledflagstate >> flag) & 1);
+ return ((kbd.ledflagstate >> flag) & 1);
}
-static inline void set_kbd_mode(struct kbd_struct *kbd, int flag)
+static inline void set_kbd_mode(struct kbd_struct kbd, int flag)
{
- kbd->modeflags |= 1 << flag;
+ kbd.modeflags |= 1 << flag;
}
-static inline void set_kbd_led(struct kbd_struct *kbd, int flag)
+static inline void set_kbd_led(struct kbd_struct kbd, int flag)
{
- kbd->ledflagstate |= 1 << flag;
+ kbd.ledflagstate |= 1 << flag;
}
-static inline void clr_kbd_mode(struct kbd_struct *kbd, int flag)
+static inline void clr_kbd_mode(struct kbd_struct kbd, int flag)
{
- kbd->modeflags &= ~(1 << flag);
+ kbd.modeflags &= ~(1 << flag);
}
-static inline void clr_kbd_led(struct kbd_struct *kbd, int flag)
+static inline void clr_kbd_led(struct kbd_struct kbd, int flag)
{
- kbd->ledflagstate &= ~(1 << flag);
+ kbd.ledflagstate &= ~(1 << flag);
}
-static inline void chg_kbd_lock(struct kbd_struct *kbd, int flag)
+static inline void chg_kbd_lock(struct kbd_struct kbd, int flag)
{
- kbd->lockstate ^= 1 << flag;
+ kbd.lockstate ^= 1 << flag;
}
-static inline void chg_kbd_slock(struct kbd_struct *kbd, int flag)
+static inline void chg_kbd_slock(struct kbd_struct kbd, int flag)
{
- kbd->slockstate ^= 1 << flag;
+ kbd.slockstate ^= 1 << flag;
}
-static inline void chg_kbd_mode(struct kbd_struct *kbd, int flag)
+static inline void chg_kbd_mode(struct kbd_struct kbd, int flag)
{
- kbd->modeflags ^= 1 << flag;
+ kbd.modeflags ^= 1 << flag;
}
-static inline void chg_kbd_led(struct kbd_struct *kbd, int flag)
+static inline void chg_kbd_led(struct kbd_struct kbd, int flag)
{
- kbd->ledflagstate ^= 1 << flag;
+ kbd.ledflagstate ^= 1 << flag;
}
#define U(x) ((x) ^ 0xf000)
-/* defkeymap.c */
+/* keyboard.c */
+struct vc_data;
-extern unsigned int keymap_count;
+int getkeycode(struct input_handle *handle, unsigned int scancode);
+int setkeycode(struct input_handle *handle, unsigned int scancode, unsigned int keycode);
+void kd_mksound(struct input_handle *handle, unsigned int hz, unsigned int ticks);
+void kd_nosound(unsigned long private);
+int kbd_rate(struct input_handle *handle, struct kbd_repeat *rep);
+void puts_queue(struct vc_data *vc, char *cp);
+void compute_shiftstate(void);
-/* keyboard.c */
+/* defkeymap.c */
-struct console;
+extern unsigned int keymap_count;
-void compute_shiftstate(void);
-int getkeycode(struct input_handle *handle, unsigned int scancode);
-int setkeycode(struct input_handle *handle, unsigned int scancode, unsigned int
-keycode);
#endif
|