Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

I used xev to find the key code for fn-f5 and came up with a little script to toggle the bluetooth on or off. My question is whether it's possible to bind fn-f5 (keycode 246) to my shell script (bttoggle) using, preferably, xmodmap.

share|improve this question

marked as duplicate by Gilles, peterph, jasonwryan, rahmu, maxmackie Mar 20 '13 at 0:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

Not with xmodmap, which only changes keyboard mappings (what symbols should be produced by what keys). Binding a command to a key combination is task for the window manager (since that is usually the application that receives all X events) - hence it depends on what environment are you using. See Gilles answer at Mapping key combination with xmodmap.

share|improve this answer
Thanks then. But then this is entirely possible to do with xbindkeys, no? –  MiguelHawk Mar 19 '13 at 23:43
Should be, but I haven't tried that. :) –  peterph Mar 19 '13 at 23:44

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