Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

def activate(self,shell):
  self.shell = shell
  self.copy_selected()
  self.action = gtk.Action ('foo','bar','baz',None)
  self.activate_id = self.action.connect ('activate', self.call_bk_fn,self.shell)
  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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.