Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

def activate(self,shell): = shell
  self.action = gtk.Action ('foo','bar','baz',None)
  self.activate_id = self.action.connect ('activate', self.call_bk_fn,
  self.action_group = gtk.ActionGroup ('hot_key_action_group')
  self.action_group.add_action_with_accel (self.action, "<control>E")

  uim = shell.get_ui_manager ()
  uim.insert_action_group (self.action_group, 0)
  uim.ensure_update ()
def call_bk_fn():
                print('hello world')

I am using the above code in a plugin for Rhythmbox and here I am trying to register the key Ctrl+E so that the call_bk_fn gets called whenever the key combination is pressed but its not working.

Why is that so ?

share|improve this question
This answer basically applies here too. Also, you may have a better chance of a good answer on Stack Overflow. – dv3500ea Jan 5 '11 at 18:05
up vote 0 down vote accepted

I have no Knowledge about the plugin your using.

However Ubuntu has another solution for this:-)

Go to: System>Preferences>Keyboard Shortcuts

right at the top under "sound" you can set action keys including a next track, play, pause, volume down, etc.

share|improve this answer
i figured that out , made a plugin for it .. you can download it as well . who knows may be you might like it . – Bunny Rabbit Mar 4 '12 at 13:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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