但我沒有成功,ff 方法非全局不考慮,xorg.conf 改了也沒作用,沒看懂 xorg.conf 修改是什麼意思。
後來,我就諗到修改鼠標驅動,滾一下重複上報多次,修改內核代碼 driver/hid/hid-input.c 文件,找到函數 hidinput_hid_event 最後,修改原始:
代码: 全选
……
/* report the usage code as scancode if the key status has changed */
if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
input_event(input, EV_MSC, MSC_SCAN, usage->hid);
input_event(input, usage->type, usage->code, value);
if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY))
input_event(input, usage->type, usage->code, 0);
}
代码: 全选
……
/* report the usage code as scancode if the key status has changed */
if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
input_event(input, EV_MSC, MSC_SCAN, usage->hid);
input_event(input, usage->type, usage->code, value);
/* faster the wheel */
if ((usage->type == EV_REL) && (usage->code == REL_WHEEL)) {
input_event(input, usage->type, usage->code, value);
input_event(input, usage->type, usage->code, value);
}
if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type == EV_KEY))
input_event(input, usage->type, usage->code, 0);
}
也就是說,現在滾一下相當於修改前滾三下!
PS:修改的內核代碼版本爲 3.2.0-rc7, 此文件應該很少更新,版本不是很重要,僅供參考。