0

I would like to add a keyboard shortcut using sxhkd let me select a region of my desktop to screenshot using scrot. This should be accomplished by adding this section to my sxhkd file,

ctrl + alt + x
    scrot --select

but this doesn't work. The command scrot --select works fine when issued from a terminal, and this keyboard shortcut works fine if I change --select to something non-interactive like --focused, so I'm not sure why the above sxhkd entry is not working, but I suspect that it has to do with --select being interactive. Why doesn't this work?

0

1 Answer 1

2

According to this similar question the command scrot --select also grabs control of your keyboard (and will cancel the screenshot if a key is pressed). So you need to tell sxhkd to run the scrot command after the keys are released. This can be done by adding an @.

ctrl + alt + @x
    scrot --select

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.