Re: Getting my own " ctrl + f "

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: rishi agrawal <postrishi@...>
Cc: Kernel Newbies <kernelnewbies@...>, maecomp <maecomp@...>, <technical.mae.alumni@...>
Date: Thursday, August 14, 2008 - 4:11 am

To answer your question, I looked at the source code for implementing
the PAUSE_BREAK function when using KDB - and here is the patch:

   5152 --- linux.orig/drivers/char/keyboard.c
   5153 +++ linux/drivers/char/keyboard.c
   5154 @@ -43,6 +43,9 @@
   5155  #include <linux/reboot.h>
   5156  #include <linux/notifier.h>
   5157  #include <linux/jiffies.h>
   5158 +#ifdef CONFIG_KDB
   5159 +#include <linux/kdb.h>
   5160 +#endif /* CONFIG_KDB */
   5161
   5162  extern void ctrl_alt_del(void);
   5163
   5164 @@ -1178,6 +1181,13 @@ static void kbd_keycode(unsigned int key
   5165                         if (keycode < BTN_MISC && printk_ratelimit())
   5166                                 printk(KERN_WARNING
"keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
   5167
   5168 +#ifdef CONFIG_KDB
   5169 +       if (down && !rep && keycode == KEY_PAUSE && kdb_on == 1) {
   5170 +               kdb(KDB_REASON_KEYBOARD, 0, get_irq_regs());
   5171 +               return;
   5172 +       }
   5173 +#endif /* CONFIG_KDB */
   5174 +
   5175  #ifdef CONFIG_MAGIC_SYSRQ             /* Handle the SysRq Hack */
   5176         if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1
&& sysrq_alt))) {
   5177                 if (!sysrq_down) {

And so reading the file, u can get a rough picture of how scancode
from keyboard is detected.

From above the keys KEY_PAUSE and KEY_LEFTALT are detected, for others
u can then find out in include/linux/input.h.



On Mon, Aug 11, 2008 at 10:43 PM, rishi agrawal <postrishi@gmail.com> wrote:



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Getting my own " ctrl + f ", rishi agrawal, (Mon Aug 11, 10:43 am)
Re: Getting my own " ctrl + f ", Peter Teoh, (Thu Aug 14, 4:11 am)