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

Setting custom shorcut manually

Tags: None
(comma "," separated)
alphab
Registered Member
Posts
7
Karma
0

Setting custom shorcut manually

Sat Sep 21, 2013 9:07 am
Hi,

I need to have a command such as

Code: Select all
$shrtct "my_command"


That would directly link a key with my_command.

My idea was to use ksuperkey, map it to another key combination and then change the file ~/.kde/share/config/khotkeysrc. The problem is that I am unable to update this file.

Any idea,

Thanks
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re: Setting custom shorcut manually

Sat Sep 21, 2013 4:17 pm
This is only a guess, but I think you need to stop some service (Input Actions?) in order to make a change in that file, otherwise the change will just be overwritten.

Also I'm curious about why you use ksuperkey. Is the shortcut key a modifier key?

I don't know how to solve your problem, but another solution could be to use xbindkeys. In that case you can update ~/.xbindkeysrc and just restart the xbindkeys process.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
alphab
Registered Member
Posts
7
Karma
0

Re: Setting custom shorcut manually

Sun Sep 29, 2013 5:59 am
I have manage to use xmacroplay:

function rec(){ sleep 0.5; xmacrorec2 -k 9 > ~/keyboard 2&> /dev/null & sleep "$@"; for i in $(pgrep xmacro); do kill $i; done
}
function repl(){
xmacroplay "$DISPLAY" < ~/keyboard
}


That is fine when executing from terminal. If I link a shortcut with repl(), the key refuse to appear (though the mouse works perfectly)

Any idea?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Setting custom shorcut manually

Fri Oct 04, 2013 9:53 am
What command do you use to invoke xmacroplay? It could be any number of factors preventing it from working...


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]