[tomboy-list] Key bindings

Sandy Armstrong sanfordarmstrong at gmail.com
Thu Jan 21 09:05:20 PST 2010


On Wed, Jan 20, 2010 at 11:51 PM, Doug Johnston <doug.johnston at gmail.com> wrote:
> Hi All,
>
> One of Tomboy's greatest strengths is that as a desktop application it
> has unique hooks that a web app just can't replicate. One example of
> this is the system-wide hotkeys that are available. This inherently
> makes Tomboy a very "keyboard-centric", power-user kind of app. I've
> always wanted a bit more control with the various in app shortcuts and
> modifiers keys though, so I thought it would be nice to expose all the
> key binding that we have defined in the program.

Great idea, I know a ton of users want this.

> See http://img29.imageshack.us/img29/5215/bindings.png for
> how things would look. (obviously needs some tweaking)
>
> So, good idea? Bad idea? Improvements? Reasons why this just wont
> work? i18n issues? Does it make the preferences too messy?

Yes, I think it makes the preferences a bit messy, but it makes sense
to have a differentiation between global hotkeys (that work no matter
what app is on top) and in-app keybindings.  If we get the code in
shape soon enough, we should have enough time to focus on cleaning up
the UI.

> Code impact so far is fairly minimal due to similar code being in
> place for the system wide hot-key accelerators, but I still need to
> hook up the checks that are in there today to prevent bad key
> combinations, and go through all the accelerators and
> KeyPressEventArgs and switch out the defaults, which might add need a
> bit more passing on my mapping around. Not too much work though. I'll
> put the changes I've made somewhere once if adding this binding window
> seems like an acceptable thing to do. I'd also like to make the hot
> keys and bindings directly read from user input. As it is now, you
> have to manually type out "<control>". It'd be nice just to press the
> key combo you want, and have that end up in the box, but that would be
> a separate implementation step. Another natural step would be to add
> presets for Windows, Mac, Emacs, etc.

I think we might be able to borrow some code from MonoDevelop to make
this easier and more maintainable.  They have a giant list of actions
that map to keybindings, and a field where you just press your
keybinding and it translates it to the right format (without having to
manually type out "<control>", as you say).  Plus, I think they have
better handling of Mac keybindings.  I recommend looking at their
code, and if you need help, ask Michael Hutchinson (mhutch in IRC).

I'd love to see this in Tomboy 1.2.  If we have working code in a
branch before Monday that should be possible.

Sandy


More information about the Tomboy-list mailing list