Registered Member
|
Hello, I am using KDE 4.10.2 under Fedora 17 (among others), and have my desktop set to "folder view".
While I can place a "show desktop" entry in the "Alt - Tab" menu, I cannot navigate around the desktop with my keyboard without first clicking on it with the mouse. Being a keyboard-oriented person, it is rather cumbersome to have to reach up to use the mouse just to click on the desktop to be able to use it with the keyboard. Is there any way to establish focus on the desktop without having to click on it with the mouse? Thanks. |
Administrator
|
I'm not sure if there is a built in way between KWin and Plasma Desktop to ensure the folder view receives focus. However, you could try simulating a mouse click.
You could setup a custom shortcut, and then invoke this shortcut, which should then trigger a change of focus to the desktop.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks cooks, it looks like that is part of the "xautomation" package, which is available for my system. I'll play around with that and see if something works. One thing though, is there a command for the "show desktop" (besides the one on "Alt-Tab"? I will need some way to have the desktop shown before xte can click on it (figuring this will all be done in a small bash script).
I can set a shortcut to "Show Desktop" in the KWin shortcuts menu, but what command would one use in a script for this? The odd part about the focus is that it goes to the desktop if I go back to the desktop after using an open window (desktop in focus -> use open window --> return to desktop with desktop retaining focus), but it seems that opening up a new window kills the focus and I have to re-click on the desktop. So it looks like there is something about opening up a new window that kills the desktop focus. |
Administrator
|
Hmm. I've just checked and unfortunately it seems that this is not scriptable as such.
You might be best to set the KWin shortcut for "Show Desktop" and simulate a keypress for this using your script as well.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks cooks, I was able to make a script using the xte package to get my focus onto the desktop. I used xdotool for the mouseclicks, but xte did the same thing.
The script is called through the application launcher, which points to the script in the Command line, and is activated with a keyboard shortcut. "Alt_R+F9" is the KWIN shortcut for "Show Desktop" The sleep command was necessary in order to get it to work reliably, and one second is the smallest value permitted. I don't know why it requires two seperate mouse moving and clicking events, but without the second one it would only get to the desktop but not focus. |
Administrator
|
Not a problem. Thanks for publishing your script so others can use it.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]