hid.c was available in versions 2.4.9 and earlier, but now it is split into several files
HID keyboard / mouse / joystick events can be tracked / changed at the kernel level Get the kernel source file of your kernel version.
http://lxr.linux.no/linux+v2.6.27.14/drivers/
for the hid (hid.o) linux kernel module, rename the source files as
my-hiddraw.c * my-hid-core.c * my-hid-input.c * my-hid-input-quirk.c
Makefile:
obj-m: = myhid.o
myhid-objs: = my-hiddraw.o my-hid-core.o my-hid-input.o my-hid-input-quirk.o
KDIR: = / lib / modules / $ (shell uname -r) / build
PWD: = $ (shell pwd)
default:
$ (MAKE) -C $ (KDIR) M = $ (PWD) modules
Add a module in the kernel as
$ sudo rmmod usbhid; sudo rmmod hid; sudo insmod myhid.ko; sudo insmod / [MODULE PATH] /usbhid.ko
****************************************.... **************************
Hid-input.c is responsible for sending events for input of the subsystem /hiddev.c
See the Linux documentation hiddev.txt and input.txt for help.
In hid-input.c hidinput _ hid _ event () is responsible for sending events
- void hidinput _ hid _ event (struct hid _ device * hid, struct hid _ field * field, structure hid_usage * use, value __s32)
Use at the end of the function before the input _ event (input, use-> type, use-> code, value);
printk ("\ n hidinput _ hid _ event% i,% i,% i", use-> type, usage-> code, value);
Get / Change these values โโand pass them to the input _ events ()
************************************************** **************************
Hi
mmadni [AT] Gmail [dot] com