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

Input actions don't suppress keypresses to active window

Tags: None
(comma "," separated)
kupopo
Registered Member
Posts
4
Karma
0
Hi,

I've defined a number of input actions, both with the "Input Actions" setting and with the KWin component of "Global Keyboard Shortcuts". In both cases, when I use these hotkeys (such as Meta+P to run a command, and Ctrl+Alt+Down to switch desktops downward) the keypress gets sent to whatever the current active window is (i.e. a "p" is typed, or the cursor moves down as well). This is not the desirable behavior - is there any way I'm missing to turn it off?

Thanks,
steve
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Do other global shortcuts work? Also, can you confirm that "kglobalaccel" is running on your system?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kupopo
Registered Member
Posts
4
Karma
0
Sorry, I wasn't so clear. All the global shortcuts work, but they ALSO send the keypress that initiated them. So when I hit Ctrl-Alt-Down, the desktop changes but I also scroll my currently active window down by one line, which is what I don't want.

As for kglobalaccel,

$ ps -ef | grep kglobal
i 18930 18080 0 18:25 pts/7 00:00:00 grep kglobal
i 23477 1 0 Mar07 ? 00:00:03 kdeinit4: kglobalaccel [kdeinit]
$ kglobalaccel
<unknown program name>(18968)/ kdemain: kglobalaccel is already running!

So it looks like it's running, which is consistent with the fact that shortcuts *do* work.

Thanks,
steve
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I think this may be the desired behaviour of the global shortcuts framework.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kupopo
Registered Member
Posts
4
Karma
0
I'm pretty sure this can't be the intended behavior. It could possibly be reasonable as an option, but by and large the desired behavior one wants for a hotkey is that focused application *doesn't* get the keypress, since the key was chosen *not* for its relevance to whatever application might be focused, but for some mnemonic reason.

So just to make sure we're on the same page, here's what I'm seeing and how to reproduce it:
1. go to System Settings -> Input Actions
2. make a new Global Shortcut -> Command/URL input action
3. bind the trigger to Meta+M
4. bind the action to "amixer sset Master 0" (i.e. mute)
5. hit apply
6. select a terminal window
7. hit Meta+M
8. notice that in addition to the sound being muted, an "m" has been typed
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I used the Meta + A global shortcut provided by Amarok, which uses the same infrastructure as Input Actions. When I pressed Meta + A, no keys were entered into the KWrite window as I expected.

As additional confirmation, I setup the shortcut Meta + M, set to launch Konsole and still could not reproduce. In all cases, the command I asked it to execute was the performed successfully. This applied equally to launching an X application such as Konsole, or to launching a shell command.

This bug is likely caused by your keyboard layout.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kupopo
Registered Member
Posts
4
Karma
0
Thanks for the confirmation. Any idea how to track down what could be causing the problem, then? There used to be a tab in the keyboard configuration (in KDE 3.x) where it had details about the keyboard layout, but I can't seem to find that in the new control panel. All I've got under "keyboard and mouse" is "NumLock on KDE Startup" (unchanged) and "Keyboard Repeat" (enabled). Standard Keyboard Shortcuts and Global Keyboard Shortcuts are just lists, so nothing there.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Perhaps X detects your keyboard more than once? You can use "xinput list" to get this information.


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


Bookmarks



Who is online

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