Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a trouble with studying linux kernel
I want to change the kernel that it prints 'x pressed' for each key pressing, where x is the scan code of the key
I tried to add printk(" pressed\n") in
'static irqreturn_t atkbd_interrupt()' function at drivers/input/keyboard/atkbd.c
but when I press key, it printed
pressed
a pressed
pressed
b pressed
...
I don't know why it prints twice

and want to change scan code when type 'u', the monitor display 'i'
but I couldn't find the location where scan code defined.

Need your help
Posted
Comments
Richard MacCutchan 7-Oct-13 11:19am    
You should go and read the technical documentation for PC keyboards, in particular the section on interrupts. Pressing a key does not just send a single interrupt and scan code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900