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.

marked as duplicate by Gilles, peterph, jasonwryan, rahmu, n0pe 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.


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.

  • 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.