On Nov 30, 2012, at 10:25 AM, Goubier Thierry wrote: > Le 30/11/2012 09:57, Sebastian Nozzi a écrit : >> When we are at it... how do shortcuts in Pharo 2 currently work? > > Ouch. I can describe what I know about key event processing, and maybe you > will understand what's happening. It will be a good exercise for me to see if > I got that stuff right. > > From first to process to last to process, once the key event is generated and > given to the Morph which has the focus: > > 1 - The morph keymapping dispatch. > This one is multilevel in nature. Here, so it goes (simplified, I'm not > listing where platform differences are taken in account). The key event is > matched against shortcuts defined in keymaps (and a partial match is possible > if it is a multi-key shortcut). > 1.1 - Direct keymapping : shortcuts added by on: do: to the KMDispatcher of > the Morph instance. > 1.2 - Named keymaps. Keymaps defined elsewhere and attached to that morph > keymap dispatcher. > 1.3 - Global named keymaps. Keymaps associated with the morph Class or one of > it's superclass (i.e. a Morph class global keymap will apply to all morphs). > 1.4 - If no match, go to 1.1 with the owner of the morph and repeat. Do that > until you reach the World (Pharo top-level window). There, if keymapping > hasn't matched, go to 2. > > 2 - The morph keyStroke: handling. Normal keys, navigation keys, hardcoded > shortcuts (TextMorph for example). > -- In some cases (some! No, often :(!) keystrokes are sent to other objects > or Morphs: navigation, shortcuts, etc... > > 3 - The morph eventHandler : here a model can trap any key event or shortcut. > > If a match happen in any of those, the key event is usually said to be > processed and we go out of the processing loop (no more matches) > > So, for a given shortcut being processed, it may be hard to find where it has > been caught. Only the Keymapping dispatch has a debugging feature (with > KMLog). > >> In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find >> Class", but it has no effect in Pharo 2. > > This one is easier. In Nautilus, there is a shortcut browser which lists all > the defined shortcuts. I believe that the find class is a multi-key shortcut.
Indeed , cmd+f,c Ben :) > >> 2012/11/30 Goubier Thierry <[email protected]>: >>> Le 29/11/2012 20:52, ☈king a écrit : >>> >>>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was >>>> a way to make Pharo have vi-keys (or even better, vim-keys)? >>>> >>>> Thanks! >>>> —☈ >>> >>> >>> It's underway. The infrastructure is moving to a better (unified) way of >>> specifying and handling shortcuts, and then vi and vim-keys and emacs and >>> others should become available. >>> >>> Bad point: I should help with that effort, but given my deadlines for the >>> end of the year, not sure I'll be of much help :(. >>> >>> Thierry >>> -- >>> Thierry Goubier >>> CEA list >>> Laboratoire des Fondations des Systèmes Temps Réel Embarqués >>> 91191 Gif sur Yvette Cedex >>> France >>> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 >>> >> >> >> > > > -- > Thierry Goubier > CEA list > Laboratoire des Fondations des Systèmes Temps Réel Embarqués > 91191 Gif sur Yvette Cedex > France > Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 >
