[RFC PATCH v3 07/13] vt: Add keyboard hook to disable bootsplash
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt--- drivers/tty/vt/keyboard.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..a248429194bb 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,28 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Trap keys when bootsplash is shown */ + if (bootsplash_would_render_now()) { + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (keycode >= KEY_F1 && keycode <= KEY_F12) { + bootsplash_disable(); + + /* +* No return here since we want to actually +* perform the VT switch. +*/ + } else { + if (keycode == KEY_ESC) + bootsplash_disable(); + + /* +* Just drop any other keys. +* Their effect would be hidden by the splash. +*/ + return; + } + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 -- 2.12.3
[RFC PATCH v3 07/13] vt: Add keyboard hook to disable bootsplash
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt --- drivers/tty/vt/keyboard.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..a248429194bb 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,28 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Trap keys when bootsplash is shown */ + if (bootsplash_would_render_now()) { + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (keycode >= KEY_F1 && keycode <= KEY_F12) { + bootsplash_disable(); + + /* +* No return here since we want to actually +* perform the VT switch. +*/ + } else { + if (keycode == KEY_ESC) + bootsplash_disable(); + + /* +* Just drop any other keys. +* Their effect would be hidden by the splash. +*/ + return; + } + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 -- 2.12.3
[RFC PATCH v2 07/13] vt: Add keyboard hook to disable bootsplash
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt--- drivers/tty/vt/keyboard.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..a248429194bb 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,28 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Trap keys when bootsplash is shown */ + if (bootsplash_would_render_now()) { + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (keycode >= KEY_F1 && keycode <= KEY_F12) { + bootsplash_disable(); + + /* +* No return here since we want to actually +* perform the VT switch. +*/ + } else { + if (keycode == KEY_ESC) + bootsplash_disable(); + + /* +* Just drop any other keys. +* Their effect would be hidden by the splash. +*/ + return; + } + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 -- 2.12.3
[RFC PATCH v2 07/13] vt: Add keyboard hook to disable bootsplash
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt --- drivers/tty/vt/keyboard.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..a248429194bb 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,28 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Trap keys when bootsplash is shown */ + if (bootsplash_would_render_now()) { + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (keycode >= KEY_F1 && keycode <= KEY_F12) { + bootsplash_disable(); + + /* +* No return here since we want to actually +* perform the VT switch. +*/ + } else { + if (keycode == KEY_ESC) + bootsplash_disable(); + + /* +* Just drop any other keys. +* Their effect would be hidden by the splash. +*/ + return; + } + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 -- 2.12.3
[RFC 07/14] bootsplash: Add VT keyboard hook
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max StaudtReviewed-by: Oliver Neukum --- drivers/tty/vt/keyboard.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..177b35182b7c 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,15 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (((keycode >= KEY_F1 && keycode <= KEY_F12) || keycode == KEY_ESC) + && bootsplash_is_enabled()) { + bootsplash_disable(); + + if (keycode == KEY_ESC) + return; + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 -- 2.12.3
[RFC 07/14] bootsplash: Add VT keyboard hook
Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt Reviewed-by: Oliver Neukum --- drivers/tty/vt/keyboard.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..177b35182b7c 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,15 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (((keycode >= KEY_F1 && keycode <= KEY_F12) || keycode == KEY_ESC) + && bootsplash_is_enabled()) { + bootsplash_disable(); + + if (keycode == KEY_ESC) + return; + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 -- 2.12.3
Re: keyboard hook?
> Input API looks nice. For now, I'll write a patch against pc_keyb.c to add a > hook for my qoder stuff, and a loadable module for the meat of the > driver. Okay. > Then I'll port up to the input API. Just send me the code and I will place it into CVS. >I have a Sparc here; does it have drivers you wish to have ported? Alot of work has to be done their :-/ If you are up to it I would be happy to work with you. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Thanks, I'm loking through your driver now. Does the input api already/currently support ps2 keyboards? -M On Sat, Jun 02, 2001 at 08:40:04PM -0700, James Simmons wrote: > > Hi! > >Your best bet for a kernel driver is to use the linux input api like > the usb keyboard do. The drivers are pretty simple to write and since all > the keyboard drivers will be port over to this api it will save a lot of > work done the road. If you need help let me know. I will be glad to help. > It sounds alot alike the p2 to serial driver just placed in our CVS. You > can access our CVS by doing > > cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole login > > cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole >co ruby > > The driver is in ruby/linux/drivers/input as ps2serkbd.c. > > > I'm beginning the process of writing a driver for the "Qoder" > > keyboard-fob barcode scanner made by InterMec. It communicates with the > > host computer using the PS/2 port by way of a "dock" that sits in > > between the keyboard and the computer. > > > One of them is "turn > > numlock light on," which I can do with an ioctl from userspace (as root, > > anyway), but also caps lock, num lock and carriage-return scancodes. > > EV_LED > > > The CueCat driver written by Pierre Coupard also modifies the keyboard > > driver. It would be nice if it was possible to load modules that hook > > into keyboard processing without requiring a kernel patch. And perhaps > > there is, but I haven't run across it yet. > > input api :-) > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
> Thanks, I'm loking through your driver now. Does the input api > already/currently support ps2 keyboards? With the current tree no. The work around is to make input api keyboards behave as PS/2 keyboards. In 2.5.X ps2 keyboards will be input api based. As you can see we already have PS/2 input api driver (i8042.c and atkbd.c). I have been using it for several months now. It is just a matter of making sure it works on other platforms besides intel. P.S I also need to port other keyboard drivers on other platforms over to the input api and test these drivers. If anyone would like to help out contact me. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Input API looks nice. For now, I'll write a patch against pc_keyb.c to add a hook for my qoder stuff, and a loadable module for the meat of the driver. Then I'll port up to the input API. The Qoder is strictly ps/2 keyboard, as far as its interface goes, so I cannot use the input API for now. I have a Sparc here; does it have drivers you wish to have ported? On Sun, Jun 03, 2001 at 09:02:18PM -0700, James Simmons wrote: > > > Thanks, I'm loking through your driver now. Does the input api > > already/currently support ps2 keyboards? > > With the current tree no. The work around is to make input api keyboards > behave as PS/2 keyboards. In 2.5.X ps2 keyboards will be input api based. > As you can see we already have PS/2 input api driver (i8042.c and atkbd.c). > I have been using it for several months now. It is just a matter of making > sure it works on other platforms besides intel. > > P.S >I also need to port other keyboard drivers on other platforms over to > the input api and test these drivers. If anyone would like to help out > contact me. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Input API looks nice. For now, I'll write a patch against pc_keyb.c to add a hook for my qoder stuff, and a loadable module for the meat of the driver. Then I'll port up to the input API. The Qoder is strictly ps/2 keyboard, as far as its interface goes, so I cannot use the input API for now. I have a Sparc here; does it have drivers you wish to have ported? On Sun, Jun 03, 2001 at 09:02:18PM -0700, James Simmons wrote: Thanks, I'm loking through your driver now. Does the input api already/currently support ps2 keyboards? With the current tree no. The work around is to make input api keyboards behave as PS/2 keyboards. In 2.5.X ps2 keyboards will be input api based. As you can see we already have PS/2 input api driver (i8042.c and atkbd.c). I have been using it for several months now. It is just a matter of making sure it works on other platforms besides intel. P.S I also need to port other keyboard drivers on other platforms over to the input api and test these drivers. If anyone would like to help out contact me. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Thanks, I'm loking through your driver now. Does the input api already/currently support ps2 keyboards? With the current tree no. The work around is to make input api keyboards behave as PS/2 keyboards. In 2.5.X ps2 keyboards will be input api based. As you can see we already have PS/2 input api driver (i8042.c and atkbd.c). I have been using it for several months now. It is just a matter of making sure it works on other platforms besides intel. P.S I also need to port other keyboard drivers on other platforms over to the input api and test these drivers. If anyone would like to help out contact me. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Thanks, I'm loking through your driver now. Does the input api already/currently support ps2 keyboards? -M On Sat, Jun 02, 2001 at 08:40:04PM -0700, James Simmons wrote: Hi! Your best bet for a kernel driver is to use the linux input api like the usb keyboard do. The drivers are pretty simple to write and since all the keyboard drivers will be port over to this api it will save a lot of work done the road. If you need help let me know. I will be glad to help. It sounds alot alike the p2 to serial driver just placed in our CVS. You can access our CVS by doing cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole login cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole co ruby The driver is in ruby/linux/drivers/input as ps2serkbd.c. I'm beginning the process of writing a driver for the Qoder keyboard-fob barcode scanner made by InterMec. It communicates with the host computer using the PS/2 port by way of a dock that sits in between the keyboard and the computer. One of them is turn numlock light on, which I can do with an ioctl from userspace (as root, anyway), but also caps lock, num lock and carriage-return scancodes. EV_LED The CueCat driver written by Pierre Coupard also modifies the keyboard driver. It would be nice if it was possible to load modules that hook into keyboard processing without requiring a kernel patch. And perhaps there is, but I haven't run across it yet. input api :-) - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Input API looks nice. For now, I'll write a patch against pc_keyb.c to add a hook for my qoder stuff, and a loadable module for the meat of the driver. Okay. Then I'll port up to the input API. Just send me the code and I will place it into CVS. I have a Sparc here; does it have drivers you wish to have ported? Alot of work has to be done their :-/ If you are up to it I would be happy to work with you. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Hi! Your best bet for a kernel driver is to use the linux input api like the usb keyboard do. The drivers are pretty simple to write and since all the keyboard drivers will be port over to this api it will save a lot of work done the road. If you need help let me know. I will be glad to help. It sounds alot alike the p2 to serial driver just placed in our CVS. You can access our CVS by doing cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole login cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole co ruby The driver is in ruby/linux/drivers/input as ps2serkbd.c. > I'm beginning the process of writing a driver for the "Qoder" > keyboard-fob barcode scanner made by InterMec. It communicates with the > host computer using the PS/2 port by way of a "dock" that sits in > between the keyboard and the computer. > One of them is "turn > numlock light on," which I can do with an ioctl from userspace (as root, > anyway), but also caps lock, num lock and carriage-return scancodes. EV_LED > The CueCat driver written by Pierre Coupard also modifies the keyboard > driver. It would be nice if it was possible to load modules that hook > into keyboard processing without requiring a kernel patch. And perhaps > there is, but I haven't run across it yet. input api :-) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
keyboard hook?
I'm beginning the process of writing a driver for the "Qoder" keyboard-fob barcode scanner made by InterMec. It communicates with the host computer using the PS/2 port by way of a "dock" that sits in between the keyboard and the computer. The dock does handshaking with the host computer, which means that it listens for specific signals sent from the host. One of them is "turn numlock light on," which I can do with an ioctl from userspace (as root, anyway), but also caps lock, num lock and carriage-return scancodes. I will have to modify the keyboard driver to capture and process data from the barcode scanner cleanly, and without requiring root access for the client programs. The CueCat driver written by Pierre Coupard also modifies the keyboard driver. It would be nice if it was possible to load modules that hook into keyboard processing without requiring a kernel patch. And perhaps there is, but I haven't run across it yet. I just need to scan the keystroke stream for an attention signal (shift,shift,shift,alt,ctrl) and then respond ("turn on numlock light") to initiate the data transfer; then, of course, capture and format that data and make it available via /proc, or something. Does anyone have any suggestions before I go ugly-up the keyboard driver? Thanks, -- Michael Rothwell [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
keyboard hook?
I'm beginning the process of writing a driver for the Qoder keyboard-fob barcode scanner made by InterMec. It communicates with the host computer using the PS/2 port by way of a dock that sits in between the keyboard and the computer. The dock does handshaking with the host computer, which means that it listens for specific signals sent from the host. One of them is turn numlock light on, which I can do with an ioctl from userspace (as root, anyway), but also caps lock, num lock and carriage-return scancodes. I will have to modify the keyboard driver to capture and process data from the barcode scanner cleanly, and without requiring root access for the client programs. The CueCat driver written by Pierre Coupard also modifies the keyboard driver. It would be nice if it was possible to load modules that hook into keyboard processing without requiring a kernel patch. And perhaps there is, but I haven't run across it yet. I just need to scan the keystroke stream for an attention signal (shift,shift,shift,alt,ctrl) and then respond (turn on numlock light) to initiate the data transfer; then, of course, capture and format that data and make it available via /proc, or something. Does anyone have any suggestions before I go ugly-up the keyboard driver? Thanks, -- Michael Rothwell [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: keyboard hook?
Hi! Your best bet for a kernel driver is to use the linux input api like the usb keyboard do. The drivers are pretty simple to write and since all the keyboard drivers will be port over to this api it will save a lot of work done the road. If you need help let me know. I will be glad to help. It sounds alot alike the p2 to serial driver just placed in our CVS. You can access our CVS by doing cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole login cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/linuxconsole co ruby The driver is in ruby/linux/drivers/input as ps2serkbd.c. I'm beginning the process of writing a driver for the Qoder keyboard-fob barcode scanner made by InterMec. It communicates with the host computer using the PS/2 port by way of a dock that sits in between the keyboard and the computer. One of them is turn numlock light on, which I can do with an ioctl from userspace (as root, anyway), but also caps lock, num lock and carriage-return scancodes. EV_LED The CueCat driver written by Pierre Coupard also modifies the keyboard driver. It would be nice if it was possible to load modules that hook into keyboard processing without requiring a kernel patch. And perhaps there is, but I haven't run across it yet. input api :-) - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/