Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there anyway I can change a shortcut key that an application has under one of it's menus in Ubuntu. For example I'm running PyCrust and want it to clear the window when I press Ctrl+L.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Setting the gconf key /desktop/gnome/interface/can_change_accels to true will allow you to bind and unbind GTK+ menu items by hovering over the menu item and pressing the keystroke to bind, or Backspace to unbind.

share|improve this answer
add comment

Hard to say how you might accomplish that.

PyShell is a shell - a character-based application - so it runs in a terminal emulator. You don't say which terminal emulator you're using. It might be possible to get the Ctrl-L behavior from the terminal emulator itself rather than from PyShell.

Note that's not how bash and tcsh implement ^L handling - they handle it themselves internally.

So I guess I'm saying you'd have to start hacking on pyshell itself to implement this, and that there's no "end user" way to hook that up.

share|improve this answer
    
Oops my bad. I meant PyCrust. This is a GUI based program. –  Lucas McCoy Dec 11 '09 at 16:03
    
So then I guess your best bet might be to ask over on wxpython.org how you might do this. The source to pycrust is over there as well, so just dive in and take a look. –  pbr Dec 11 '09 at 20:55
    
I guess what I'm saying is, there's nothing "infrastructure-wise" in Ubuntu (well, in the Xwindow system, actually) for generically supporting adding keystroke handlers and such. It's done on an application by application basis. –  pbr Dec 11 '09 at 20:58
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.