You are not logged in.
sxkhd greets me with:
Could not grab key 24 with modfield 65: the combination is already grabbed.
The only setting in the config corresponding to keycode 24 (q) would be:
super + shift + q
pkill -x panel; bspc quit
I wonder, does super+shift correspond to modfield 65? How can I find that out?
Also, can I somehow find out what the X server executes upon seeing that key combination? I have no idea why sxhkd wouldn't be able to grab that combination.
Last edited by Stalafin (2014-06-24 11:07:43)
Offline
I wonder, does super+shift correspond to modfield 65?
How can I find that out?
Here's an excerpt from <xcb/xproto.h>:
typedef enum xcb_mod_mask_t {
XCB_MOD_MASK_SHIFT = 1,
XCB_MOD_MASK_LOCK = 2,
XCB_MOD_MASK_CONTROL = 4,
XCB_MOD_MASK_1 = 8,
XCB_MOD_MASK_2 = 16,
XCB_MOD_MASK_3 = 32,
XCB_MOD_MASK_4 = 64,
XCB_MOD_MASK_5 = 128,
XCB_MOD_MASK_ANY = 32768
} xcb_mod_mask_t;
super is generally on mod4, so, yes (65 = 64 + 1).
Offline
I seem to be having some issues getting my configuration to work correctly. I have a machine without Page Down, Page Up, and Super keys, and I would like to map 'Page Up' and 'Page Down' to 'alt + up' and 'alt + down' respectively.
sxhkdrc
{F6,F7}
xbacklight -{dec,inc} 10
F8
amixer set Master toggle
{F9,F10}
amixer set Master 10{-,+} unmute
alt + Up
xte 'key Page_Up'
alt + Down
xte 'key Page_Down'
However this configuration does not seem to work how I expected. When I run sxhkd from the command line, it does not output any errors when trying to use the bindings, but neither of them seem to work either. I have not set these bindings in any other program, and I'm not sure if this is something with sxhkd or xte.
Offline
I seem to be having some issues getting my configuration to work correctly.
Start with something simple:
F1
echo hello
I have a machine without Page Down, Page Up, and Super keys, and I would like to map 'Page Up' and 'Page Down' to 'alt + up' and 'alt + down' respectively.
You can do this with xmodmap (cf. Mode_switch).
Offline
I have problems using scrot -s:
# screenshot
Print
cd /tmp; \
scrot; \
cd -
ctrl + Print
cd /tmp; \
scrot -s; \
cd -
Print works fine. But ctrl + Print; nothing happens. Running sxhkd from terminal, I got this error when pressing ctrl + Print:
giblib error: couldn't grab keyboard:Resource temporarily unavailable
Offline
I'm having a weird issue with the toggle syntax, or I'm not using it correctly. I'm trying to switch between soundcards with the following command:
XF86WebCam
sed -i 's/card [0-9]/card {0,1}/' $HOME/.asoundrc
But it looks like after a few seconds, it forgets what I ran last. It looks like 1->0 requires one kepress, and 0->1 requires two rapid keypresses.
Offline
earsplit wrote:I'm having a weird issue with the toggle syntax, or I'm not using it correctly.
The following example works fine for me:
a echo {0,1}
This works fine for me too. I think the issue is with these special function keys that require a chord to trigger (in this case, XF86WebCam == FN + F6). For instance, this is the output I get when I pause briefly after the state is set to 0:
XF86WebCam
echo {0,1} >> ~/.test
> tail -f ~/.test
1
0
1
0
1
0
-- pause --
0
1
0
1
I don't know if this is related, but here is the output from XEV after disabling the bound sxhkd keys:
KeyRelease event, serial 32, synthetic NO, window 0x1c00001,
root 0xa1, subw 0x0, time 46176547, (132,283), root:(665,301),
state 0x0, keycode 220 (keysym 0x1008ff8f, XF86WebCam), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Is there anything else I can do to debug this? I've also tried binding it to the release event to no avail.
Offline
Offline
earsplit wrote:I'm having a weird issue with the toggle syntax
In a local sxhkd repository:
make clean debug ./sxhkd -c ~/foorc
Where ~/foorc has the following content:
XF86WebCam echo {0,1}
Then try to reproduce the problem, and post the output.
Startup:
keysym for 'Alt_L' is 0xFFE9.
keysym for 'Alt_R' is 0xFFEA.
keysym for 'Super_L' is 0xFFEB.
keysym for 'Super_R' is 0xFFEC.
keysym for 'Hyper_L' is 0xFFED.
keysym for 'Hyper_R' is 0xFFEE.
keysym for 'Mode_switch' is 0xFF7E.
keysym for 'Num_Lock' is 0xFF7F.
keysym for 'Scroll_Lock' is 0xFF14.
lock fields 16 2 0
key chord 65307 0
load configuration 'foorc'
XF86WebCam: echo 0
key chord 269025167 0
XF86WebCam: echo 1
key chord 269025167 0
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
Hitting fn+F6 once:
mapping notify 1 248
lock fields 16 2 0
reload
cleanup
load configuration 'foorc'
XF86WebCam: echo 0
key chord 269025167 0
XF86WebCam: echo 1
key chord 269025167 0
ungrab
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
key chord 65307 0
mapping notify 0 0
key press 220 0
key release 220 0
num active 0
0
Multiple rapid presses:
key press 220 0
key release 220 0
num active 0
1
key press 220 0
key release 220 0
num active 0
0
key press 220 0
key release 220 0
num active 0
1
key press 220 0
key release 220 0
num active 0
0
Pausing and hitting it again, lingering on the FN key a bit before hitting F6:
mapping notify 1 248
lock fields 16 2 0
reload
cleanup
load configuration 'foorc'
XF86WebCam: echo 0
key chord 269025167 0
XF86WebCam: echo 1
key chord 269025167 0
ungrab
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
key chord 65307 0
mapping notify 0 0
mapping notify 1 248
lock fields 16 2 0
reload
cleanup
load configuration 'foorc'
XF86WebCam: echo 0
key chord 269025167 0
XF86WebCam: echo 1
key chord 269025167 0
ungrab
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
grab key 220 0
grab key 220 16
grab key 220 2
grab key 220 18
key chord 65307 0
mapping notify 0 0
key press 220 0
key release 220 0
num active 0
0
Offline
Offline
Offline
Is there a better way to map a mouse button? I'm using this:
button9
xdotool keydown ISO_Level3_Shift
@button9 + {_,shift, ctrl, alt, shift + ctrl, shift + alt, shift + ctrl + alt, ctrl + alt, ISO_Level3_Shift, shift + ISO_Level3_Shift, ctrl + ISO_Level3_Shift, ctrl + shift + ISO_Level3_Shift}
xdotool keyup ISO_Level3_Shift
But it seems needlessly complex; I just want to say "for all modifiers". At least using nesting on the modifier combinations would help. But what I really want to do is hide button9 completely and pass all other modifiers.
Also, if I press mouse9 more than once, it tends to lock the modifier and then pass the mouse event through to applications: neither of which are desired.
EDIT:
This works better. I need to use the modifier name rather than key name, should not have spaces in the modifier list, and should put the modifiers before the button.
{_,shift} + button9
xdotool keydown ISO_Level3_Shift
{_,mod3,shift,shift + mod3} + @button9
xdotool keyup ISO_Level3_Shift
Is there any way to automatically generate all 256 permutations of modifiers (AutoHotKey has a * prefix, e.g., *Button9)?
Last edited by Konkorde (2014-10-06 01:42:59)
Offline
I was away from my computer all week & didn't see this until now: thanks!
Offline
The following keybindings do not do anything on my machine:
super + alt + {h,j,k,l}
bspc window -e {left -10,down +10,up -10,right +10}
And I do not understand why: if I execute the commands manually, everything works fine. And as far as I can tell, my system also detects the keys correctly; xev reports:
KeyRelease event, serial 32, synthetic NO, window 0x1600001,
root 0x80, subw 0x0, time 6281284, (-248,71), root:(360,1210),
state 0x48, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x1600001,
root 0x80, subw 0x0, time 6281292, (-248,71), root:(360,1210),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Any idea why sxhkd doesn't like those bindings?
Offline
super + alt + {h,j,k,l} bspc window -e {left -10,down +10,up -10,right +10}
Commands should begin with a space.
super + alt + {h,j,k,l}
bspc window -e {left -10,down +10,up -10,right +10}
Offline
Stalafin wrote:super + alt + {h,j,k,l} bspc window -e {left -10,down +10,up -10,right +10}
Commands should begin with a space.
super + alt + {h,j,k,l} bspc window -e {left -10,down +10,up -10,right +10}
Thank you for noticing that. All my bindings are correct, except that one. I have no idea how I overlooked that.
Offline
Hi everyone, i use the sxhkd with herbstluftwm and have a little problem. How increase the spawn speed? Its little bit slow the terminal and frame movements/spawn/actions.
Thanks, Stephan
Offline
The sxhkd package is now in community.
Woot! Congrats!
Offline
I have a button on my laptop's keyboard that correspond to Alt + F4, so in openbox this button is recognized in automatically and I use this to close the different windows. Can I set Alt + F4 to close the windows across the different wm with sxhkd?
Offline
I have a button on my laptop's keyboard that correspond to Alt + F4, so in openbox this button is recognized in automatically and I use this to close the different windows. Can I set Alt + F4 to close the windows across the different wm with sxhkd?
If you can find a shell command that works across different window managers.
$ wmctrl -c :ACTIVE:
# if that doesn't work, try one of these
$ xdo close
$ xdotool getactivewindow windowkill
Offline
pepib wrote:I have a button on my laptop's keyboard that correspond to Alt + F4, so in openbox this button is recognized in automatically and I use this to close the different windows. Can I set Alt + F4 to close the windows across the different wm with sxhkd?
If you can find a shell command that works across different window managers.
$ wmctrl -c :ACTIVE: # if that doesn't work, try one of these $ xdo close $ xdotool getactivewindow windowkill
thanks man, however I write this only for give to other users interested much info:
xdotool get active window kill
kill the window because kill the process
xdo close
kill only the window without kill the refer process.
Offline