vt: Add virtual console keyboard mode OFF

virtual console: add keyboard mode OFF

Add a new mode for the virtual console keyboard OFF in which all input
other than shift keys is ignored. Prevents vt input buffers from
overflowing when a program opens but doesn't read from a tty, like X11
using evdev for input.

Signed-off-by: Arthur Taylor <art@ified.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Arthur Taylor
2011-02-04 13:55:50 -08:00
committed by Greg Kroah-Hartman
parent 8e6d3fe1af
commit 9fc3de9c83
4 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -50,11 +50,12 @@ struct kbd_struct {
#define VC_CAPSLOCK 2 /* capslock mode */
#define VC_KANALOCK 3 /* kanalock mode */
unsigned char kbdmode:2; /* one 2-bit value */
unsigned char kbdmode:3; /* one 3-bit value */
#define VC_XLATE 0 /* translate keycodes using keymap */
#define VC_MEDIUMRAW 1 /* medium raw (keycode) mode */
#define VC_RAW 2 /* raw (scancode) mode */
#define VC_UNICODE 3 /* Unicode mode */
#define VC_OFF 4 /* disabled mode */
unsigned char modeflags:5;
#define VC_APPLIC 0 /* application key mode */