Comment #6 on issue 11480 by james.su: Support GTK keyboard themes (emacs  
keybindings)
http://code.google.com/p/chromium/issues/detail?id=11480

A possible solution would be:
In RenderWidgetHostViewGtk, creates an invisible GtkTextView object and hook
keybinding related signals, such as "move-cursor", "delete-from-cursor",  
etc.
Add a method in RenderWidgetHostView to handle an unhandled key event  
returned from
webkit, eg. bool UnhandledKeyboardEvent(const NativeWebKeyboardEvent&), so  
that it
can have the second chance to handle these events. In this method, if IME  
is enabled
by webkit, which means the cursor is currently inside a text input box, then
gtk_bindings_activate() shall be called against the invisible GtkTextView  
object to
match key bindings defined in desktop theme. If any of the key bindings  
matches,
corresponding signal will be emitted, then we can forward a fake key event  
to webkit
in the signal handler.
In RenderWidgetHost::OnMsgInputEventAck(), calls above new method of view_  
before
calling RenderViewHost::UnhandledKeyboardEvent(), so that key bindings  
defined in
desktop theme can be translated into key events and be handled by webkit.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to