Using Custom Shortcuts of DE as Diodon hotkey

A hotkey feature to open the clipboard history has been available in Diodon since its very first release and is a major part of its usability. Unfortunately this hotkey has not always worked as expected, causing issues on certain desktop environments or stopped working altogether caused by regressions of updated libraries. Furthermore, customization of the hotkey did not always work such as using Symbols. Sometimes even the order how the keys were pressed mattered. All in all this feature has not been very stable. The main underlying problem for this is that there is no standard across desktop environments to register global hotkeys.

Looking at all those issues it is kind of obvious that handling of a hotkey should not be the responsibility of Diodon but be handled by the desktop environment itself. Therefore the decision has been made to drop the internal Diodon hotkey feature altogether as per version 1.4.0. Instead a custom shortcut needs to be registered through the settings offered by whatever desktop environment you use.

For GNOME/Unity this can be done by opening Keyboard app through the Dash/Activities overview. There you go to Shortcuts -> Custom Shortcuts and add a new one with the name “Diodon” and command “/usr/bin/diodon”. Afterwards assign your preferred hotkey and you are done.
Custom-Shortcut-Diodon

Unfortunately for Diodon at this point it is not possible to register this Custom Shortcut during package installation. So as of version 1.4.0 registration of a hotkey needs to be done manually. Additionally the special keybinding to browse through the history will not work anymore as Diodon doesn’t know anymore what keybinding was used. (Of course you can still use the up and down or k and j keys to cycle through the history.)
We believe though the additional stability in the hotkey feature makes up for this one-time manual step.

If you have any questions or concerns about this change leave a comment – feedback is always appreciated. And if you actually know a way how an application could register a custom shortcut during installation best have a look at this question.

20 thoughts on “Using Custom Shortcuts of DE as Diodon hotkey

  1. Beautiful!
    Although it’d be nice to have this OS binding loadable along with Diodon, it’d also be nice for the OS to give me a massage.
    Still, maybe note this need in the Diodon documentation? The panel has great mover-over guides, why not add this to that?
    Cheers!

  2. Super-V (Win-V) keyboard shortcut (as used for Windows smart clipboard) doesn’t show diodon (nothing happens – at least in Mint 20.1).

    The script below makes it work:

    #!/bin/bash
    sleep 0.1
    /usr/bin/diodon

    Hope this helps.

          1. As this is a race condition between X events (Xorg) and GTK events the hotkey actually works with Wayland without any problems (at least on my machine).

      1. What I did is I made a text file named ‘diodon-shortcut’ in my home `/home/fenglengshun/.local/bin`, write Adam’s three line commands in the file, made it executable by right-click > properties > permission, then put in `/home/fenglengshun/.local/bin/diodon-shortcut` as the shortcut’s command.

        I have tested this in Ubuntu Budgie 21.10, and it works. I’ve also tried “sleep 0.1 && /usr/bin/diodon” and “~/.local/bin/diodon-shortcut” but neither works, it has to specifically be `/home/fenglengshun/.local/bin/diodon-shortcut`as the command.

  3. In Ubuntu:
    Settings>Keyboard>Keyboard Shortcuts>View and Customize Shortcuts>Custom Shortcuts>”+”

    My setting “Set Custom Shortcut”

    Name: 🐡️ Diodon Clipboard History
    Command: /usr/bin/diodon
    Shortcut: Ctrl+Alt+V

    1. terimakasih banyak… ini berhasil di linuxmint 21.1 codename: vera. ubuntu codename: jammy

      Translated:
      thanks a lot… it worked on linux mint 21.1 codename: vera. ubuntu codename: jammy

  4. It doesn’t seem possible to hide diodon menu anymore. After menu is opened the only option to exit it is to pick some item.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.