A follow-up:

I scanned the email threads mentioned in this thread.

I tried to use Keymapper and it seemed way too complicated for the
simple things I wanted to do. It wasn't obvious at all to me how to
proceed once I had the GUI displayed and I encountered numerous errors
while exploring it. After perusing the code a little, it seemed much
more invasive than what I had in mind -- extensions and overrides in
numerous classes. It seems to be a general approach for solving
keystroke mapping not only at the global level, but in
application-specific cases as well.

I have placed my own GlobalKeys package on SqueakSource
(http://www.squeaksource.com/GlobalKeys) It is much smaller and less
ambitious than Keymapper, it only works on Pharo, and it is much less
capable, but at least in my environment it does what I need without a
lot of complication. Maybe someone else will find it useful as well.

One of the joys of Smalltalk: if you don't like the way something
works, change it or write your own.

Regards,
TF

On Fri, Dec 3, 2010 at 8:19 PM, Tony Fleig <[email protected]> wrote:
> I find myself wanting global keyboard shortcuts for such things as
> invoking an external browser, switching focus between windows, opening
> new tool windows, executing various World menu options, executing my
> own scripts, etc.
>
> After working for years in corporations doing Windows-based
> development in Microsoft Visual Studio, I find the necessity of
> constantly reaching for the mouse in Pharo to be cumbersome and
> unproductive.
>
> I was able to add some shortcut keys to invoke commands that I
> prepared by sending messages like this:
>
>    World respondToCommand: $l bySending: #startExternalWebBrowser to:
> TFCommands.
>
> However, this only works when no window has the keyboard focus.
>
> I followed the keystroke handling path in the debugger and I think I
> can probably find a place to hook in some special handling for my
> globally-accessible keystrokes.
>
> My questions are:
>
> 1. Has somebody already done this?
>
> 2. Is there a "standard" or "best practice" way of accomplishing this?
>
> Regards,
> TF
>

Reply via email to