[MonoDevelop] Implemented Configurable Key Bindings

Balaji Rao balajirrao at gmail.com
Thu Jul 12 06:27:47 EDT 2007


On Wed, Jul 11, 2007 at 06:13:40PM -0400, Jeffrey Stedfast wrote:
> On Thu, 2007-07-12 at 00:06 +0530, Balaji Rao wrote:
> > On Wed, Jul 11, 2007 at 02:24:20PM -0400, Jeffrey Stedfast wrote:
> > > On Wed, 2007-07-11 at 23:47 +0530, Balaji Rao wrote:
> > > > On Wed, Jul 11, 2007 at 01:19:58PM -0400, Jeffrey Stedfast wrote:
> > > > > On Wed, 2007-07-11 at 22:17 +0530, Balaji Rao wrote:
> > > > > > On Fri, Jul 06, 2007 at 01:06:44PM +0200, Lluis Sanchez wrote:
> > > > > > > Hey, it looks like a good start ;)
> > > > > > > The only comment I can make now is that you should use Stetic instead of
> > > > > > > Glade for new windows.
> > > > > > > 
> > > > > > > Lluis.
> > > > > > > 
> > > > > > Hello, included as attachment is a patch whch implements conf key
> > > > > > bindings. I have used stetic for it. and now its almost stable. I
> > > > > > have fixed some bugs.
> > > > > > 
> > > > > > One question is that, should commands, which by default dont have a
> > > > > > shortcut, be allowed be assigned a shortcut?
> > > > > 
> > > > > yes, absolutely.
> > > > > 
> > > > > 
> > > > > Also, you should know I'm working on some key binding stuff as well -
> > > > > allowing emacs-like multi-state key bindings (should be relatively easy
> > > > > to get working with your code - and I'll probably be the one to make the
> > > > > adjustments if needed, so don't worry too much about that).
> > > > > 
> > > > > I've also got some additional ideas for your key binding UI stuff:
> > > > > 
> > > > > 1. the key-binding editor UI should probably allow setting of multiple
> > > > > shortcuts for each command
> > > > > 
> > > > I dont think this will be a difficult one..
> > > 
> > > Lluis is probably right that this is overly complex, we'll just skip
> > > this as Lluis suggested.
> > > 
> > > > > (I'll probably have to modify the Command class to allow this?)
> > > > > 
> > > > > 2. if the user tries to register a key binding for a command that
> > > > > conflicts with some other commands' key binding, then you should warn
> > > > > the user, allowing them to continue with the overriding (which would
> > > > > remove that binding from the other command) - or allow them to cancel.
> > > > > 
> > > > Eclipse does this nicely. It shows a treeview which contains the
> > > > Commands the entered shortcut is bound to. And, what should be prevented is
> > > > that, no two commands in the same context, (state, or  wahtever..) can be bound to one key.
> > > > The idea is that the shortcut + state has to be unique.
> > > > This would avoid conflicts.
> > > > 
> > > > right?
> > > 
> > > I believe you are right - I think having this would be nice (or a
> > > similar idea, not necessarily implemented the same as Eclipse).
> > > 
> > For this to be done, we should take along with the shortcut, the context
> > in which it is expected to work.. right ?
> 
> looks like this isn't gonna be easy - lets skip it for now. this is all
> "figured out" on-the-fly, there's no pre-defined states :(
> 
Cant the current implementation be comitted? 

How about having a new Codon called ContextCodon which has ID and a Name
as its attributes? Addin writers can create new contexts and also can
use the existing ones. For example, in a pad codon, we can include an
attribute which would contain the ID of the  context that would would exist when that
pad was in focus , or something like that..

What do you think about it?

> Jeff
> 
> 
Balaji Rao


More information about the Monodevelop-list mailing list