You are not logged in.

#26 2013-01-10 10:36:18

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

skanky wrote:

If I use "super + F3" (and maybe some other combinations, I'd have to check) results in the following messages:

Could not grab key 69 with modfield 64: the combination is already grabbed.
Could not grab key 69 with modfield 66: the combination is already grabbed.
Could not grab key 69 with modfield 80: the combination is already grabbed.
Could not grab key 69 with modfield 82: the combination is already grabbed.

The error messages mean that F3 is already grabbed by another program.
But could you post all the F3 based hotkeys you have in your config?

skanky wrote:

Finally, it's not recognising the XF86 audio keys:

It does, but without the XF86 prefix (that's what I meant by minus the prefix if any in the manual).

So, instead of

XF86AudioRaiseVolume
    amixer sset Master 1+ unmute

XF86AudioLowerVolum
    amixer sset Master 1- unmute

You should write:

Audio{Raise,Lower}Volume
    amixer sset Master {1+,1-} unmute

gh · da · ds

Offline

#27 2013-01-10 10:59:46

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:
skanky wrote:

If I use "super + F3" (and maybe some other combinations, I'd have to check) results in the following messages:

Could not grab key 69 with modfield 64: the combination is already grabbed.
Could not grab key 69 with modfield 66: the combination is already grabbed.
Could not grab key 69 with modfield 80: the combination is already grabbed.
Could not grab key 69 with modfield 82: the combination is already grabbed.

The error messages mean that F3 is already grabbed by another program.
But could you post all the F3 based hotkeys you have in your config?

That's the only one. I've just done a quick grep of my configs and can't see anything else using it.

bloom wrote:
skanky wrote:

Finally, it's not recognising the XF86 audio keys:

It does, but without the XF86 prefix (that's what I meant by minus the prefix if any in the manual).

So, instead of

XF86AudioRaiseVolume
    amixer sset Master 1+ unmute

XF86AudioLowerVolum
    amixer sset Master 1- unmute

You should write:

Audio{Raise,Lower}Volume
    amixer sset Master {1+,1-} unmute

Ah right, thanks. I hadn't realised that the XF86 was a prefix. It seems obvious now.

EDIT:  sound keys work. smile

Last edited by skanky (2013-01-10 11:53:27)


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#28 2013-01-10 11:52:15

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: sxhkd — Simple X HotKey Daemon

Sorry, two things I missed.
I've swapped my Caps Lock and Esc keys, so keycode 66 is Escape.

I've not tried it with all my Fx keys but I get similar with at least "super + F1" and "super + F2" as well.

I'll keep looking to see what may have those key combinations.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#29 2013-01-10 13:16:47

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

skanky wrote:

Sorry, two things I missed.
I've swapped my Caps Lock and Esc keys, so keycode 66 is Escape.

This:

super + F3
    echo foo

works here, with the same combinations:

grab key 69 64
grab key 69 66
grab key 69 80
grab key 69 82

Regarding 66: you're confusing keycodes and modfields, in the error messages, 66 is a bit field (0b1000010 means lock + mod4).


gh · da · ds

Offline

#30 2013-01-10 13:35:29

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

works here, with the same combinations:

grab key 69 64
grab key 69 66
grab key 69 80
grab key 69 82

Okay, thanks for testing that. I'll keep looking.
Any idea why I might be getting the error messages twice?

bloom wrote:

Regarding 66: you're confusing keycodes and modfields, in the error messages, 66 is a bit field (0b1000010 means lock + mod4).

Ooops yes, you're right, sorry.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#31 2013-01-10 14:11:50

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

skanky wrote:

Any idea why I might be getting the error messages twice?

It is normal and harmless, I might force unique calls to minimize confusion though.


gh · da · ds

Offline

#32 2013-01-10 14:14:52

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:
skanky wrote:

Any idea why I might be getting the error messages twice?

It is normal and harmless, I might force unique calls to minimize confusion though.

Okay thanks.

If I don't find the reason before I get used to alt + Fx though, i may never work it out. wink


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#33 2013-01-10 14:26:02

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

skanky wrote:

If I don't find the reason before I get used to alt + Fx though, i may never work it out. wink

I think I may have found the reason:

    grep F3 spectrwm.c

yields

	setkeybinding(MODKEY_SHIFT,	XK_F3,		KF_MVWS_13,	NULL);
	setkeybinding(MODKEY,		XK_F3,		KF_WS_13,	NULL);

gh · da · ds

Offline

#34 2013-01-10 14:50:58

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: sxhkd — Simple X HotKey Daemon

Good find. The Fx keys are for workspaces > 10 (it's fairly new I think so I didn't notice the addition to the man page and see it there, now I look).
The issue is I limited my workspaces to 10 when that update was made, as I don't need more than that and it freed the Fx keys - or so i thought. It freed them up for xbindkeys, but I guess that doesn't make the check initially.

I might go and ask for spectrwm to not grab those key combinations if using ten workspaces or less.

Many thanks for your help and for sxhkd. smile


Edit, just for reference, I did the following in .sepctrwm.conf, which fixed it:

# clear unnecessary key bindings
bind[] = Mod+F1
bind[] = Mod+F2
bind[] = Mod+F3
bind[] = Mod+F4
bind[] = Mod+F5
bind[] = Mod+F6
bind[] = Mod+F7
bind[] = Mod+F8
bind[] = Mod+F9
bind[] = Mod+F10
bind[] = Mod+F11
bind[] = Mod+F12
bind[] = Mod+Shift+F1
bind[] = Mod+Shift+F2
bind[] = Mod+Shift+F3
bind[] = Mod+Shift+F4
bind[] = Mod+Shift+F5
bind[] = Mod+Shift+F6
bind[] = Mod+Shift+F7
bind[] = Mod+Shift+F8
bind[] = Mod+Shift+F9
bind[] = Mod+Shift+F10
bind[] = Mod+Shift+F11
bind[] = Mod+Shift+F12

Obviously, if you have more than 10 WS's, then you need to alter the keys unbound, accordingly.

Last edited by skanky (2013-01-11 09:36:12)


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#35 2013-01-11 11:32:41

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

I've restored the XF86 prefix, so now, the keysym names are exactly those you'll get from xev.

The reason for this is that there was at least one name collision (between Q and XF86Q).


gh · da · ds

Offline

#36 2013-01-13 10:34:59

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

If you care about the size of the executable you might want to modify locales.h: the only locales you shall not remove are XK_MISCELLANY and XK_LATIN1.

Most people will be fine with the latin1-xf86 or latin1 (if you have no XFree86 keys) branches.

Here's a correspondence between the different branches and the associated executable size:

master        76K
latin1-xf86   32K
latin1        28K

Last edited by bloom (2013-01-13 10:48:14)


gh · da · ds

Offline

#37 2013-01-20 01:23:16

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

Same problem here, it eats the win key when pressed alone. Filled an issue on github; this kills gnome shell/unity usage.

Tried this:

super
    xdotool key super

but it didn't like it:  ♪ sxhkd -c sxhkdrc 
Invalid hotkey: 'super'.

Offline

#38 2013-01-20 04:33:21

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

I can't get it to work with several things I tried: xdotool, pkill. It does launch nautilus.
I suspect there's something in gnome shell interferring with it. Can someone try xdotool in your env?

Offline

#39 2013-01-20 10:29:18

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

urlwolf wrote:

Same problem here

As whom?

urlwolf wrote:

this kills gnome shell/unity usage.

I know nothing about gnome shell or unity, could you elaborate?

urlwolf wrote:

Tried this:

super
    xdotool key super

Invalid hotkey: 'super'.

Of course the hotkey is invalid: super is not a keysym name (please see the general syntax in the manual).
The valid keysyms for the super keys are : Super_L and Super_R.
The following works fine for me:

Super_L
    xdotool getactivewindow windowmove 0 0

Last edited by bloom (2013-01-20 13:15:01)


gh · da · ds

Offline

#40 2013-01-21 00:49:08

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

Thanks bloom,

Why does this not work?

KP_9
    xdotool getactivewindow windowmove 0 0

Offline

#41 2013-01-21 01:35:41

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

Sorry, I didn't answer your question about gnome shell. It maps left meta to an overview where you can change desktops, launch apps, and change windows. It's pretty great.

I'd like to use Num_Lock with your tool too, but up to now no success...
What does the name stands for, btw?

Offline

#42 2013-01-21 10:05:59

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

urlwolf wrote:

Why does this not work?

KP_9
    xdotool getactivewindow windowmove 0 0

Works for me, do you get a warning?

Last edited by bloom (2013-01-21 13:48:36)


gh · da · ds

Offline

#43 2013-01-21 10:12:53

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

urlwolf wrote:

Sorry, I didn't answer your question about gnome shell. It maps left meta to an overview where you can change desktops, launch apps, and change windows. It's pretty great.

And left meta can still be used as a modifier?

urlwolf wrote:

I'd like to use Num_Lock with your tool too, but up to now no success...

Any error message?

urlwolf wrote:

What does the name stands for, btw?

First section of the manual ☺:

Simple X HotKey Daemon

gh · da · ds

Offline

#44 2013-01-21 12:53:31

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

That's the thing. No error, just the action doesn't happen. I suspect there's some other tool competing for the keys. Is there any way to debug this, ie list all the hotkeys that are 'taken'?

Gnome's wm is mutter. It can assign actions to numpad keys. I've checked that they are not taken by mutter, though.
Gnome has a gui to assign hotkeys on settings > keyboard > shortcuts > global shortcuts. They are not taken there either, because it cannot distingish numpad and normal numbers.

Offline

#45 2013-01-21 13:32:34

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

urlwolf wrote:

That's the thing. No error, just the action doesn't happen. I suspect there's some other tool competing for the keys.

When the grabbing fails, sxhkd outputs a warning, if you have no warnings, there's no competition.


gh · da · ds

Offline

#46 2013-01-21 14:23:25

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

Interesting; what could make ti fail?

Things I've tried:

Alt_R + F2
    gnome-terminal

Alt_R + F2
    xte 'keydown Control_L' 'key c' 'keyup Control_L'

Alt_R + F2
     xdotool key --clearmodifiers Control_L+c

Offline

#47 2013-01-21 15:09:09

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

urlwolf wrote:

Things I've tried:

Alt_R + F2
    gnome-terminal

Alt_R + F2
    xte 'keydown Control_L' 'key c' 'keyup Control_L'

Alt_R + F2
     xdotool key --clearmodifiers Control_L+c

This can't work: Alt_R is not a modifier name.
You shall replace Alt_R by alt in your examples.


gh · da · ds

Offline

#48 2013-01-21 15:41:13

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

Thanks, That made the first one work, but the other two fail.
Do the run on your system? If so, it's a gnome shell (mutter) bug.
I've filled one here:
https://bugzilla.gnome.org/show_bug.cgi?id=692074

Offline

#49 2013-01-21 15:53:29

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

urlwolf wrote:
Alt_R + F2
     xdotool key --clearmodifiers Control_L+c

The correct way to do this is:

alt + @F2
    xdotool key --clearmodifiers ctrl+c

Last edited by bloom (2013-01-21 15:54:11)


gh · da · ds

Offline

#50 2013-01-21 20:00:17

urlwolf
Member
Registered: 2008-03-25
Posts: 40

Re: sxhkd — Simple X HotKey Daemon

Thanks bloom,
Still the Control_L+C command doesn't work. The others do.

Offline

Board footer

Powered by FluxBB