Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch between open windows in Pharo

After search in the nautilus shortcut description:

enter image description here

I searched in the forums to find something about this, but doesn't work in Pharo v3.

I still looking for a shortcut that I can use to easily change between open windows such as alt + tab/cmd + tab in a SO.

Does anyone know how to do this?

like image 551
vmariano Avatar asked Jul 26 '13 16:07

vmariano


2 Answers

It is work in progress. Right now, it seems that the key combination has not yet been decided/implemented.
When I explore the key mapping attached to the world,

World kmDispatcher explore.

I only see CMD+K reported as part of directKeymaps bound to [ self openAndCommitToMonticello ].
If I browse senders of openAndCommitToMonticello, I discover some incantation:

Komitter class>>initialize
    World 
        bindKeyCombination: $k command
        toAction: [ self openAndCommitToMonticello ]

Apparently, CMD+K must be understood as lowercase $k... (?)

The message for navigating thru windows is SystemWindow class>>sendTopWindowToBack (don't ask how I discoverd this...).
There are two senders

  1. the old keymapping infrastructure PasteUpMorph>>defaultDesktopCommandKeyTriplets
  2. A window menu (triggered by upper right down triangle) WorldState class>>windowsOn:

It seems the assigned key was \... So we can try and hook this key binding again.
Since it is rather not convenient on my French mac keyboard (CMD+\ means holding four keys !!!), I'll do it with right arrow.

If you look at KMSingleKeyCombination class>>specialKeys, you see that code for right arrow is 29.

So let's try this:

World 
    bindKeyCombination: 29 command
    toAction: [ System sendTopWindowToBack ].

Et voila, you get a new shortcut for navigating.

like image 172
aka.nice Avatar answered Sep 30 '22 16:09

aka.nice


From Denis Kudriashov on the Pharo Slack,

https://github.com/juliendelplanque/Mirage

provides ergonomic support in Pharo 5.0.

Loadable from the Catalog.

like image 25
philippeback Avatar answered Sep 30 '22 16:09

philippeback