send Keycode SHIFT+ARROW
Moderator: Martin
send Keycode SHIFT+ARROW
Is it possible to select some texts like in windows by pressing shift+arrow keys?
I have tried control ui. But its only moving directional pad instead of selecting text.
sendKey("DPAD_LEFT", "SHIFT_ON")
I have tried control ui. But its only moving directional pad instead of selecting text.
sendKey("DPAD_LEFT", "SHIFT_ON")
Re: send Keycode SHIFT+ARROW
I also face the same problem, can't use Shift + DPad, or any other combination, example Ctrl+C, Ctrl+V. But using bluetooth keyboard, it is working fine.
Try
The cursor only move to the left, not selecting the char. Log from KeyEvent
Try
also doesn't work, cursor only move left.
Try
it sends a capital A, so the shift on actually works. Only not recognized when using with dpad.
Try
Code: Select all
sendKey("DPAD_LEFT","SHIFT_ON")
Code: Select all
^ KeyUp: action=1 code=21 repeat=0 meta=1 scancode=0 mFlags=1024 label='' chars='null' number=''
Code: Select all
sendKey("DPAD_LEFT","SHIFT_MASK")
Code: Select all
^ KeyUp: action=1 code=21 repeat=0 meta=193 scancode=0 mFlags=1024 label='' chars='null' number=''
Code: Select all
sendKey("A","SHIFT_ON")
Code: Select all
^ KeyDown: action=0 code=29 repeat=0 meta=1 scancode=0 mFlags=1024 label='A' chars='null' number=''
^ KeyUp: action=1 code=29 repeat=0 meta=1 scancode=0 mFlags=1024 label='A' chars='null' number=''
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: send Keycode SHIFT+ARROW
CTRL+C, V, A, X working fine here.
Only problem with SHIFT.
Only problem with SHIFT.
Re: send Keycode SHIFT+ARROW
Oh. Just tested it, Ctrl version works fine. Seems can be useful in certain occassion. I think we also need the multiple meta key version. Something like CTRL+ALT+DEL, essentially 2 or more meta key at once
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: send Keycode SHIFT+ARROW
I thought to continue my flow without shift option but now
Ctrl + Z works,
Ctrl + Y doesn't
Ctrl + Z works,
Ctrl + Y doesn't
Re: send Keycode SHIFT+ARROW
In which app, we can use Ctrl + Y ? In keyevent the Y is shown up, but I don't know if it is followed by the CTRL hold down.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: send Keycode SHIFT+ARROW
On Android CTRL+SHIFT+Z is for redo operation. It is working with hacker's keyboard. So we need more than one metakey. Martin?
Re: send Keycode SHIFT+ARROW
Can't test that one using current sendKey(). Yes, we need additional meta key. Along with additional meta key "MENU" (keycode 82). I just found out that some chrome shortcut require "MENU" key, not "CTRL". It is lucky that the close tab can be done using "CTRL" + "W".
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: send Keycode SHIFT+ARROW
Hi,
sendKey already allows to use multiple meta keys like this:
sendKey("A", "CTRL_ON", "SHIFT_ON");
The documentation does not mention this capability and the dialog only provides single meta key selection. I'll try to improve both.
I'm not sure why DPAD with SHIFT does not work. I will have to make a few experiments to see if there's a way to make this work. You could use function setSelection to achieve something similar in a less comfortable way.
Regards,
Martin
sendKey already allows to use multiple meta keys like this:
sendKey("A", "CTRL_ON", "SHIFT_ON");
The documentation does not mention this capability and the dialog only provides single meta key selection. I'll try to improve both.
I'm not sure why DPAD with SHIFT does not work. I will have to make a few experiments to see if there's a way to make this work. You could use function setSelection to achieve something similar in a less comfortable way.
Regards,
Martin
Re: send Keycode SHIFT+ARROW
That worked.
I don't know how to get start or end number for setSelection.
I don't know how to get start or end number for setSelection.