This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to add a global shortcut for clipper

Tags: None
(comma "," separated)
wolf.
Registered Member
Posts
3
Karma
0
OS
I want to add a global shortcut that puts an entry (a timestamp) into clipboard. The dcop command to insert the timestamp into the clipboard contents is not the problem, but making it a global shortcut, like ctrl+alt+c, is. Perhaps using a global shortcut is not the right way to go, which, I guess, is part of the question. However, here is what I'm doing to add the shortcut:
* In the panel, right click on klipper and choose "Configure Klipper"
* In the "Configure KDE Panel" that pops up I choose the "Global Shortcuts" tab
* I observe that there is no "Add" feature
* I search a bit on the net, and this forum, but no one is asking this question, which means either that
(a) it's typicall so easy no one needs to ask the question, or
(b) everyone (except me) knows this is not the right way to do what I'm after

So, dispite my question, all I really want to do is hit ctrl+alt+c to activate the command, dcop klipper klipper setClipboardContents `date +"%Y-%m-%d-%H:%M:%S-%Z"`, so I can paste a timestamp into certain apps I use that don't have an 'insert timestamp feature.

kde version: 3.5.4
o/s : Centos 5

Thanks
Wolf
User avatar
google01103
Manager
Posts
6668
Karma
25
to create a custom shortcut systemsettings -> shortcuts and gestures -> custom shortcuts -> right click (middle column) -> new -> global shortcut -> command/url


OpenSuse Leap 42.1 x64, Plasma 5.x

wolf.
Registered Member
Posts
3
Karma
0
OS
Thank you for helping, but I'm still stuck.

Details:
My kde (3.5.4) doesn't have a "Shortcuts & Gestures" option in any of the menus, but you did point me in the right direction. Unfortunately I still can't add any shortcuts.

After some exploring I did find "Keyboard Shortcuts" in the "Control Center" (this is good)

* Main Menu -> Control Center
* In the left navigation panel expand "Regional & Accessibility" and select "Keyboard Shortcuts"

but there is still now way to add a shortcut (this is bad)

There is another entry under "Regional & Accessibility" called "Input Actions" that seems like it could be involved (it claims to the control configuring of various things including keyboard shortcuts), but I don't know what to do with it.

I hope this information helps you to help me.

Thanks
Wolf
User avatar
google01103
Manager
Posts
6668
Karma
25
arghhhhhh - my bad, assumed kde 4.x, missed the 3.5.4 and don't have it

does this help http://www.linuxquestions.org/questions ... cut-23282/ ?


OpenSuse Leap 42.1 x64, Plasma 5.x

wolf.
Registered Member
Posts
3
Karma
0
OS
Thanks for sticking with me google01103, that helped.

Details:
To spell out how that helped for anyone else looking for such a solution ...
(remember, I'm using kde 3.5.4)

You can edit the Kmenu to add a command and assign a shortcut to it. To edit the Kmenu use kmenuedit (comes with kdebase, so you already have it)
* Right click on the Kmenu button and choose Menu Editor OR Kmenu -> Settings -> Menu Editor
* Expand the navigation tree to the place where you want your command.
* Ctrl+N to create a new item (or right click, or use the tool bar)
* Give it a name that makes you happy
* uncheck the "Enable launch feedback" option (it's just annoying if you don't)
Interesting part - kde menu runs programs (and scripts), but not commands. But if you still want to run a raw command you can get bash to run it for you.
* bash -c 'yourCommand param whatever' <-- single quotes are important
In my case that equates to:
* bash -c 'dcop klipper klipper setClipboardContents `date +"%Y-%m-%d-%H:%M:%S-%Z"`'
* Click the shortcut button to assign your shortcut
* Save the configuration (Ctrl+S, or File -> save, etc)

Thanks
Wolf


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]