tl;dr
Just create a shortcut for spectacle -rbc
.
Explanation
Kubuntu uses Spectacle for screenshots. If you run spectacle -h
you can see all the options it supports. We need these options:
-r, --region Capture a rectangular region of the screen
-b, --background Take a screenshot and exit without showing the GUI
-c, --clipboard In background mode, copy screenshot to clipboard
So just create a shortcut for spectacle -rbc
. If you prefer the GUI to popup, then create a shortcut for spectacle -r
. In GUI mode you still have a button that copies the capture to the clipboard and Ctrl+C works too!
Tutorial
- Launch Custom Shortcuts by one of these ways:
- Press Alt+Space and search for "Custom Shortcuts".
- Open the start menu (Super) and search for "Custom Shortcuts".
- Open the start menu (Super) and launch Settings > System Settings then go to Workspace > Shortcuts > Custom Shortcuts.
- Select "Screenshots" (if it doesn't exist create it under Edit > New Group) then Click Edit > New > Global Shortcut > Command/URL.
- Name it and give it a comment like "Take Rectangular Region Screenshot".
- Set the shortcut in the "Trigger" tab to Shift+PrtScr, Ctrl+Shift+PrtScr or whatever you want.
- In the "Action" tab paste the command:
spectacle -rbc
or spectacle -r
for the GUI version.
- Press "Apply" and you are ready to use your shortcut.
You can do the same for "Take Active Window Screenshot" just use the command spectacle -abc
.
Usage
After pressing the shortcut, you can do your rectangular selection by clicking and dragging, then take the screenshot with Enter or by double clicking the selected area. There are other actions you can do at this stage that will be displayed at the bottom of the monitor:
After taking the screenshot with spectacle -rbc
a notification will be shown saying that "a screenshow was saved to your clipboard". With spectacle -r
Spectacle will open and you can use its buttons or Ctrl + C.