handleKeyboardEvent() not called for keyupEvent
Hi All, It appears that EditorClient::handleKeyboardEvent() is only called for keydown and keypress events (the exclusion starts in HTMLInputElement::defaultEventHandler). Is there a specific reason why we don't want to call handleKeyboardEvent() for keyup events? Is there some other way to get keyup notification in EditorClient? Thanks, Marshall
On Nov 3, 2011, at 10:24 AM, Marshall Greenblatt wrote:
It appears that EditorClient::handleKeyboardEvent() is only called for keydown and keypress events (the exclusion starts in HTMLInputElement::defaultEventHandler). Is there a specific reason why we don't want to call handleKeyboardEvent() for keyup events? Is there some other way to get keyup notification in EditorClient?
Because key up events have no effect in editing on any platforms that we’re aware of. It sounds like maybe you are doing something other than editing and just using EditorClient because it’s handy, perhaps? Please also note that interfaces like EditorClient are internal to WebKit and just used to communicate between subcomponents of WebKit. -- Darin
On Thu, Nov 3, 2011 at 1:39 PM, Darin Adler <darin@apple.com> wrote:
On Nov 3, 2011, at 10:24 AM, Marshall Greenblatt wrote:
It appears that EditorClient::handleKeyboardEvent() is only called for keydown and keypress events (the exclusion starts in HTMLInputElement::defaultEventHandler). Is there a specific reason why we don't want to call handleKeyboardEvent() for keyup events? Is there some other way to get keyup notification in EditorClient?
Because key up events have no effect in editing on any platforms that we’re aware of. It sounds like maybe you are doing something other than editing and just using EditorClient because it’s handy, perhaps?
EditorClient::handleKeyboardEvent() eventually calls WebViewClient::handleCurrentKeyboardEvent() in the Chromium WebKit API. I have an application that would like to intercept certain key up events and perform application-specific actions if the events have not already been consumed by JavaScript (which seems to be the situation in which EditorClient::handleKeyboardEvent() is called). Is there some way currently to do this?
Please also note that interfaces like EditorClient are internal to WebKit and just used to communicate between subcomponents of WebKit.
-- Darin
Thanks, Marshall
On Nov 3, 2011, at 10:51 AM, Marshall Greenblatt wrote:
EditorClient::handleKeyboardEvent() eventually calls WebViewClient::handleCurrentKeyboardEvent() in the Chromium WebKit API. I have an application that would like to intercept certain key up events and perform application-specific actions if the events have not already been consumed by JavaScript (which seems to be the situation in which EditorClient::handleKeyboardEvent() is called). Is there some way currently to do this?
If Chromium wants to offer a general purpose “handle keyboard event” as part of WebKit API, I recommend setting it up more directly rather than using EditorClient. -- Darin
On Thu, Nov 3, 2011 at 1:54 PM, Darin Adler <darin@apple.com> wrote:
On Nov 3, 2011, at 10:51 AM, Marshall Greenblatt wrote:
EditorClient::handleKeyboardEvent() eventually calls WebViewClient::handleCurrentKeyboardEvent() in the Chromium WebKit API. I have an application that would like to intercept certain key up events and perform application-specific actions if the events have not already been consumed by JavaScript (which seems to be the situation in which EditorClient::handleKeyboardEvent() is called). Is there some way currently to do this?
If Chromium wants to offer a general purpose “handle keyboard event” as part of WebKit API, I recommend setting it up more directly rather than using EditorClient.
Would this involve adding a new callback in WebKit, or is there an existing callback that means "JavaScript did not handle this keyup/char/keydown keyboard event"?
-- Darin
participants (2)
-
Darin Adler
-
Marshall Greenblatt