<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi,<br>
    <br>
    I would like to add 2 new key binding in clipman menu, in order to
    swap Secure Item as Clear Text, and also to delete any them directly
    from menu hitting del key.<br>
    <br>
    <img
src="https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/raw/secure_item_dbus/image.png"
      alt="image.png" class="js-lazy-loaded qa-js-lazy-loaded"><br>
    <br>
    I lack gtk knowledge, what I found is that:<br>
    <br>
    the app seems to do a g_application_register<br>
    <br>
    <a moz-do-not-send="true"
      href="https://docs.gtk.org/gio/method.Application.register.html">https://docs.gtk.org/gio/method.Application.register.html</a><br>
    <br>
    but, I think the sole purpose of this is to avoid duplicate running
    clipman.<br>
    <br>
    I also found, that I should add a keyboard mask somewhere
    GDK_KEY_PRESS_MASK<br>
    <br>
    <a moz-do-not-send="true"
href="https://stackoverflow.com/questions/44098084/how-do-i-handle-keyboard-events-in-gtk3">https://stackoverflow.com/questions/44098084/how-do-i-handle-keyboard-events-in-gtk3</a><br>
    <br>
    may be their in panel_plugin_register() ?<br>
    <br>
    <a moz-do-not-send="true"
href="https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/blob/secure_item_dbus/panel-plugin/main-panel-plugin.c#L71">https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/blob/secure_item_dbus/panel-plugin/main-panel-plugin.c#L71</a><br>
    <br>
    Then I may be able to add a callback<br>
    <br>
    <pre class="lang-c s-code-block"><code class="hljs language-c">g_signal_connect (G_OBJECT (window), <span class="hljs-string">"key_press_event"</span>,
        G_CALLBACK (my_keypress_function), <span class="hljs-literal">NULL</span>);

</code></pre>
    to my own keyboard handler, and then dispatch on which keystroke I
    receive, right?<br>
    What about "activate" callback on enter key, should I call them
    after I introduce a keyboard handler?<br>
    <br>
    If you have code example, I would love to discover how it works. 😁<br>
    <br>
    Regards,<br>
    Sylvain. <br>
    <code class="hljs language-c"></code>
    <pre class="moz-signature" cols="72">-- 
Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France</pre>
  </body>
</html>