Kopy Pasta z XDA 😛 dla ciekawskich sauce - http://forum.xda-developers.com/showthread.php?t=703539
Uwaga dla tych co w szkole mieli Malbolge - Używać TYLKO Z MCR r3.1 (Pays też *powinien* działać ale usuwa UV+OC)
I've managed to do some dirty hack to wake phone using trackpad.
It's kernel update so i believe it will only work with MCR r3.1 (which I am using)
Thank's to kingchris for his lockscreen apk mod this now should work:
Tested ONLY on MCR r3.1.
Do not flash on ANY Froyo roms
http://ponury.net/desire/tp-wake.zip - trackpad wakes, nothing unlocks
http://ponury.net/desire/tp-wake_unlock.zip - trackpad wakes, trackpad unlocks
http://ponury.net/desire/tp_power-wake_unlock.zip - trackpad + power wakes, trackpad unlocks
http://ponury.net/desire/tp-doubletap_wake_unlock.zip - trackpad wakes AND unlocks when pushed fast twice (slow push does nothing)
Here's that diff: (just a single line added :-) )
Always send DPAD_CENTER event!
http://ponury.net/desire/oj_send_dpad_center_ev.patch - download
--- a/drivers/input/misc/gpio_matrix.c 2010-05-12 08:24:13.000000000 +0200
+++ b/drivers/input/misc/gpio_matrix.c 2010-06-17 08:05:08.223812817 +0200
@@ -162,6 +162,7 @@
need_send_spec_key = !pressed;
printk(KERN_DEBUG "%s: send key, pressed: %d\n",
__func__, need_send_spec_key);
+ input_report_key(kp->input_devs->dev[dev], keycode, pressed);
}
}
#endif
Send DPAD_CENTER event when pushed twice (fast) when screen is OFF:
http://ponury.net/desire/oj_send_dpad_center_when_doubleclicked_ev.patch - download
http://ponury.net/desire/oj_send_dpad_center_when_doubleclicked_ev_mod.patch - download + mod to automatically unlock (this one is used in doubleclick mod)
--- a/drivers/input/misc/gpio_matrix.c 2010-05-12 08:24:13.000000000 +0200
+++ b/drivers/input/misc/gpio_matrix.c 2010-06-17 12:53:47.893816146 +0200
@@ -29,6 +29,8 @@
#include <linux/curcial_oj.h>
#endif
+extern struct wake_lock main_wake_lock;
+
struct gpio_kp {
struct gpio_event_input_devs *input_devs;
struct gpio_event_matrix_info *keypad_info;
@@ -118,6 +120,8 @@
unsigned short keyentry = mi->keymap[key_index];
unsigned short keycode = keyentry & MATRIX_KEY_MASK;
unsigned short dev = keyentry >> MATRIX_CODE_BITS;
+ static unsigned long last_jiffies = 0;
+ static bool sent = 0;
#ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL
static unsigned need_send_spec_key = 1;
#endif
@@ -162,6 +166,18 @@
need_send_spec_key = !pressed;
printk(KERN_DEBUG "%s: send key, pressed: %d\n",
__func__, need_send_spec_key);
+ if (!wake_lock_active(&main_wake_lock) &&
+ pressed && jiffies - last_jiffies < 75) {
+ input_report_key(kp->input_devs->dev[dev], keycode, pressed);
+ last_jiffies = 0;
+ sent = 1;
+ }
+ else if (!wake_lock_active(&main_wake_lock) && pressed)
+ last_jiffies = jiffies;
+ else if (wake_lock_active(&main_wake_lock) && sent) {
+ input_report_key(kp->input_devs->dev[dev], keycode, pressed);
+ sent = last_jiffies = 0;
+ }
}
}
#endif