Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, n0pe Mar 20 '13 at 0:39

This question was marked as an exact duplicate of an existing question.

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.