With a touchy laptop in mind, and also a physical keyboard with some missing buttons (like, delete, caps lock, etc.), is it possible to create custom launchers, or panel indicators that can perform certain keystrokes?
Specifically Copy, Cut, Paste, Delete, and perhaps some others. I know custom launchers can be made and assigned to application But is a keystroke also possible?
GNOME extensions should have such a thing, but alas. So I don't mind making the custom launcher, which seems easier.

  • Tx for the advıce. So far, so good. I dıd read somewhere that xdotools wont functıon ın wayland. But ın the normal sessıon, the launchers do work – Angorano Nov 5 '19 at 14:17

You can simulate a keyboard shortcut using xdotool and thus create an application launcher for the shortcut and pin it to the dock. Install xdotool by running the following command in Terminal

sudo apt install xdotool

and then follow the steps bellow for example for a copy action:

  1. Create a simple .desktop launcher file, say copy-this.desktop, in your ~/.local/share/applications/ directory. You can do that by running the following in Terminal

    touch ~/.local/share/applications/copy-this.desktop
  2. Open the created file using a text-editor, for example by running

    gedit ~/.local/share/applications/copy-this.desktop
  3. Add the following lines to this file and save it

    [Desktop Entry]
    Name=Copy This
    Comment=Copy selection
    Exec=xdotool key ctrl+c
  4. Click "Activities" or "Show Applications" and search for "Copy This". It should appear.

  5. Right click and add to favourites.

Clicking this icon on the dock would simulate pressing Ctrl+C. You can similarly create ones for other shortcuts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.