<div>Hello people,</div><div><br></div><div><br></div><div>I working on a small proof of concept keylogger that works on kernel mode. It's parte of my studies of kernel development. </div><div>I'm using the struct "keyboard_notifier_param" to get the keys pressed on the keyboard(s) attached to the system.</div>
<div><br></div><div>At the end, I print the value, like this:</div><div><br></div><div>printk(KERN_DEBUG "KEY== %i", param->value);</div><div><br></div><div><br></div><div>According to the definition of the struct "keyboard_notifier_param" at <a href="http://lxr.free-electrons.com/source/include/linux/keyboard.h#L37">http://lxr.free-electrons.com/source/include/linux/keyboard.h#L37</a>, the field value is a "keycode, unicode value or keysym".</div>
<div><br></div><div>For example, when I press the key a, I get the value 30, but I would like tranlate it to the ASCII. I managed to create a translation table by myself, but I think there is another way more stylish to do this, or not? I googled a lot but could not find a consistent answer.</div>
<div><br></div><div>Any help is appreciated,</div><div><br></div><div>Gabriel.</div><div><div><br></div>-- <br>Gabriel Duarte<br>Linux User #471185<br>France / Grenoble - Rhône Alpes<br><a href="http://genericdev.wordpress.com/" target="_blank">http://genericdev.wordpress.com/</a><br>
<br>
</div>