Thanks for the advice. 

I have just tried to add my own key stroke handling and I face interesting 
issue. The first time I enter the package filter input field, everything works. 
When I press down-key, it change focus to package list. But since then whenever 
I enter again the filter, any key stroke change the focus back to package list. 
I do not see any glue right now. The code is like this:

buildPackageSearch
        "It is an search dialog which filters package list"

        searchWidget := SearchMorph new
                model: self;
                updateSelector: #packageSearchUpdate:;
                ghostText: 'Type: Pkg1|^Pkg2|Pk.*Core$';
                list: SharedValueHolder instance;
                useSelectionIndex: false;
                setIndexSelector: #packageSearchUpdate:;
                keystrokeSelector: #packageSearchKeyStroke:;
                yourself.
        ^ searchWidget

packageSearchKeyStroke: anEvent
        (anEvent keyCharacter = Character arrowDown)
                ifTrue: [ self giveFocusToPackage. ^ true ].
        ^ false

Thanks.
Jura

El 26-12-2013, a las 19:35, GOUBIER Thierry <[email protected]> escribió:

> Have you tried Ctrl+Tab in the filter? I remember that text fields would 
> catch the tab for themselves, and probably shift+tab as well, but we could 
> force that filter to switch by using an onKeyCombination: Character tab 
> asKeyCombination do: [ "setFocusToPackageListMorph" ] on the filter.
> 
> With this asKeyCombination: do: , we could also change the order for the 
> Package list and the class list (or just make sure the filter is added to the 
> main window before the package list). If you change the order by hand, make 
> sure you also correct the reverse order as well (Shift+tab and 
> Ctrl+Shift+tab).
> 
> I can't have a look at the code right now :(
> 
> Thierry
> 
> 
> ________________________________________
> De : Pharo-dev [[email protected]] de la part de Juraj 
> Kubelka [[email protected]]
> Date d'envoi : jeudi 26 décembre 2013 20:42
> À : Pharo Development List
> Objet : Re: [Pharo-dev] Nautilus: tab key change focus
> 
> Hi Thierry,
> 
> thank you. Actually I have started with an issue with package filter input. 
> When it has a focus, there is no way to change a focus with key press. Like 
> tab, or down arrow key, or anything. And I also find out the tab order is 
> strange. When package list has focus, tab change focus to the filter. I think 
> it should change to class list.
> 
> For some reasons it is possible to escape the filter input by pressing 
> shift+tab, but not by pressing tab. So I wanted to try to change the “tab" 
> order.
> 
> Thanks,
> Jura
> 
> El 26-12-2013, a las 16:34, GOUBIER Thierry <[email protected]> escribió:
> 
>> Hi Jura,
>> 
>> it's implemented at the Morphic level; it follow the chain of owners / 
>> submorphs and should correctly tab to all morphs in the window, except when 
>> going through text fields which will catch the tab for themselves (but 
>> Ctrl+tab should work).
>> 
>> To change the order, you may have a look at the order in which the morphs 
>> are added to the window.
>> 
>> Another thing which may be of interest to you, Spec has the necessary code 
>> to override the default Morphic tab navigation and force an application 
>> defined order.
>> 
>> What is the issue you are facing ?
>> 
>> Thierry
>> ________________________________________
>> De : Pharo-dev [[email protected]] de la part de Juraj 
>> Kubelka [[email protected]]
>> Date d'envoi : jeudi 26 décembre 2013 17:09
>> À : Pharo Development List
>> Objet : [Pharo-dev] Nautilus: tab key change focus
>> 
>> Hi,
>> 
>> Can someone give me any glue how tab-key-order and handling works in 
>> Nautilus? I am trying to fix the tab order in Nautilus but I do not see how 
>> it is implemented.
>> 
>> Thanks,
>> Jura
>> 
> 
> 
> 

Reply via email to