I have read that in Pharo it's possible to switch between windows using Alt-Tab. But I've never been able to test this, because both OSes I commonly use capture Alt-Tab and use it for their own window switching.
I can't find a listing for Alt-Tab in the system Keymap Browser. Where is the key to switch windows defined, and how can I change it?
EDIT: I'd also love a "here's how you could have found out for yourself" type answer.
well... you hit one of our weaker spots :)
Keybindings are not in his best shape, but:
In any case, we are moving out this hardcode stuff, and you can check all currently available settings going to World Menu/System/Keymap Browser (they are a lot, we are also playing with ideas on how to show better this combinations... emacs style, popup notifications, etc.)
I got this working by editing the "Basic, general navigation shortcuts among morphs" in package Morhpic-Core>>Kernel edit Morph class>>#morphNavigationShortcutsOn:
There you can create shortcuts for "World navigateWindowForward"
etc. Took me a while to find keys that worked ok, most don't work well when in a textfield. I'm using the following:
<keymap>
(aBuilder shortcut: #navigateFocusForwardCtrl)
category: #MorphFocusCtrlNavigation
default: $j ctrl asKeyCombination
do: [ :target :morph :event | morph navigateFocusForward ].
(aBuilder shortcut: #navigateFocusBackwardCtrl)
category: #MorphFocusCtrlNavigation
default: $k ctrl asKeyCombination
do: [ :target :morph :event | morph navigateFocusBackward ].
(aBuilder shortcut: #navigateVisibleWindowForward)
category: #MorphFocusCtrlNavigation
default: Character tab ctrl asKeyCombination
do: [ :target :morph :event | World navigateVisibleWindowForward ].
(aBuilder shortcut: #navigateWindowForward)
category: #MorphFocusCtrlNavigation
default: $l ctrl asKeyCombination
do: [ :target :morph :event | World navigateWindowForward ].
(aBuilder shortcut: #navigateWindowBackward)
category: #MorphFocusCtrlNavigation
default: $; ctrl asKeyCombination
do: [ :target :morph :event | World navigateWindowBackward ]
although the category probably isn't correct, it works... (whereas #MorphFocusNavigation doesn't!)
Using the hallo menu bring up an inspector on a window object. Then in the inspector switch to the 'Keys' tab. There you can see all the shortcuts associated with the morph. Selecting the one that you are interested in (Alt+TAB) will open a new inspector pane to the right. The 'Source code' shows and highlights the source code where the keybinding is defined. Browse the method, edit it, save it, reset the key mappings (KMRepository reset) and you should be done.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.