[webkit-gtk] Custom paste handler for editable WebView

Robert Schroll rschroll at gmail.com
Sat Jul 19 14:46:55 PDT 2014

Hi all,

Without any input from me, an editable WebView will paste text into 
itself when I press Ctrl-V.  I don't know if this is handled entirely 
within the WebView, or if the Gtk.Window contains a Ctrl-V accelerator 
that sends a paste signal to the WebView.  Regardless, I'd like to 
provide a custom handler for this paste event, rather than relying on 
the default one.  Is this possible?

It is for other Gtk widgets, I know.  For example, if I add this 
handler to a Gtk.Entry:
	entry.connect('paste-clipboard', lambda *args:
the paste doesn't happen.  (I could query the clipboard and insert some 
text into the Entry myself, of course.)  But when I do that to a 
WebView, it has no effect.  The documentation suggests that there is a 
paste-clipboard signal for the WebView, and I can trigger it manually.  
How can I intercept it?


More information about the webkit-gtk mailing list