Replies: 1 comment
-
I think you should try using modifiers in the dispatch_key_event method. From the docs: modifiers (Optional[int]) – (Optional) Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). So, to use shift+enter you can try something like: await page.send(uc.cdp.input_.dispatch_key_event(
type_="rawKeyDown",
modifiers=8, # here 8 = shift
key="Enter",
code="Enter",
windows_virtual_key_code=13,
))
await page.send(uc.cdp.input_.dispatch_key_event(
type_="keyUp",
modifiers=8,
key="Enter",
code="Enter",
windows_virtual_key_code=13,
)) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I literally have no ideas, I've tried js scripts and embedded CDP objects (dispatch_key_event). Does anyone have any ideas? I need to use the shift+enter keyboard shortcut for the textarea
this is my code now, and it doesn't work as it should, it just enters 'enter', not 'shift+enter'
Thanks for any help
Beta Was this translation helpful? Give feedback.
All reactions