diff options
author | Vojtech Bocek <vbocek@gmail.com> | 2014-03-13 17:36:52 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit> | 2014-04-16 17:51:17 +0200 |
commit | 0b7fe504dc93246957aee38c0d93ea1fa1580fab (patch) | |
tree | 77a4471931591355c383074c480b91d8b71840e5 /minuitwrp | |
parent | Add additional search path for brightness (diff) | |
download | android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.tar android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.tar.gz android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.tar.bz2 android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.tar.lz android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.tar.xz android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.tar.zst android_bootable_recovery-0b7fe504dc93246957aee38c0d93ea1fa1580fab.zip |
Diffstat (limited to 'minuitwrp')
-rw-r--r-- | minuitwrp/events.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/minuitwrp/events.c b/minuitwrp/events.c index 93c41f2d5..eb1490719 100644 --- a/minuitwrp/events.c +++ b/minuitwrp/events.c @@ -384,6 +384,7 @@ static int vk_modify(struct ev *e, struct input_event *ev) { static int downX = -1, downY = -1; static int discard = 0; + static int last_virt_key = 0; static int lastWasSynReport = 0; static int touchReleaseOnNextSynReport = 0; static int use_tracking_id_negative_as_touch_release = 0; // On some devices, type: 3 code: 39 value: -1, aka EV_ABS ABS_MT_TRACKING_ID -1 indicates a true touch release @@ -593,7 +594,11 @@ static int vk_modify(struct ev *e, struct input_event *ev) if (discard) { discard = 0; - return 1; + + // Send the keyUp event + ev->type = EV_KEY; + ev->code = last_virt_key; + ev->value = 0; } return 0; } @@ -651,6 +656,8 @@ static int vk_modify(struct ev *e, struct input_event *ev) ev->code = e->vks[i].scancode; ev->value = 1; + last_virt_key = e->vks[i].scancode; + vibrate(VIBRATOR_TIME_MS); // Mark that all further movement until lift is discard, |