Send keys to currently focused input

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

Send keys to currently focused input

Postby cowmoogun » Wed Jul 28, 2021 12:12 pm

Hey guys, so I have a situation where just setting the value of an input field does not work correctly. So instead, I use a mouse event to click on that field to gain focus and then attempt to use a Keydown, Char, and Keyup events in that order to simulate sending a value through the keyboard, but this does not work, the input field loses focus as soon as I attempt. Anyone else come across this behavior before and know the solution?
cowmoogun
Newbie
 
Posts: 1
Joined: Wed Jul 28, 2021 12:09 pm

Re: Send keys to currently focused input

Postby amaitland » Wed Jul 28, 2021 2:06 pm

Did you give the ChromiumWebBrowser instance focus? How does it behave if you use google.com?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Send keys to currently focused input

Postby amaitland » Wed Jul 28, 2021 2:09 pm

Looks like you have already asked at https://stackoverflow.com/questions/685 ... cial-cases

Please continue the conversation there rather than starting a new thread.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 14 guests