Alt-tab between windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
57 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Alt-tab between windows

Avdi Grimm
Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi
Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Nicolai Hess


2015-05-16 0:52 GMT+02:00 Avdi Grimm <[hidden email]>:
Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi

I miss this too.

This worked in Pharo 1.4 (alt + left arrow / alt+right arrow).

I don't know why this was removed.

I often wanted to look at this and try to bring it back, but didn't find the time.


nicolai

Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Avdi Grimm
Messing around, I've gotten the impression that Morphic doesn't really have the concept of a window manager. I've even played with the "Tiling Window Manager", but it isn't really a *manager* in the usual sense, it's more of a collection of shortcuts for manually resizing windows.

Without having dove into the implementation yet, it feels like Morphic is more a system where each window paints itself where it wants to be, and there isn't a centralized controller or manager of windows. Is that accurate?

On Fri, May 15, 2015 at 6:58 PM Nicolai Hess <[hidden email]> wrote:


2015-05-16 0:52 GMT+02:00 Avdi Grimm <[hidden email]>:
Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi

I miss this too.

This worked in Pharo 1.4 (alt + left arrow / alt+right arrow).

I don't know why this was removed.

I often wanted to look at this and try to bring it back, but didn't find the time.


nicolai

Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Carlo-2
In reply to this post by Avdi Grimm
Hi Avdi

Enjoyed listening to your ruby rogues podcasts and tapas and now finally Smalltalk;)

Regarding your pain points on keyboard vs mouse; I've seen this come up before. There has been lot's of improvement, but still a way to go.
I tested cycling between windows on Pharo 3 on mac and Alt-tab is working. Pharo 4 looks like someone put a 'self halt' message on the preview window; so I'm assuming there is a newer way to cycle through windows. Removing the 'self halt' still works though.
Oh the alt-tab will bring up a preview window which you need to select window by pressing any other key; so 'alt-tab' until window comes up, then let it go and press any key to select it.

Cheers
Carlo

On 16 May 2015, at 12:52 AM, Avdi Grimm <[hidden email]> wrote:

Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Avdi Grimm


On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 
Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Carlo-2
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi Grimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 

Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Carlo-2
In reply to this post by Avdi Grimm
As far as I know you are correct in assumption of morphic windows; especially considering experiences playing with Self where it originated from.
TWM is a way of managing the multiple open windows.

Morphic objects are cool though especially in Squeak or Lively Kernel (Pharo less so) e.g. rotate a workspace or editor and you can edit it while rotated, or resizing it. In Squeak you could start an mpeg video in a morph and then rotate the window or duplicate it while continuing playback. Gimmicky but still cool to see what a few concepts interacting can do.

On 16 May 2015, at 1:05 AM, Avdi Grimm <[hidden email]> wrote:

Messing around, I've gotten the impression that Morphic doesn't really have the concept of a window manager. I've even played with the "Tiling Window Manager", but it isn't really a *manager* in the usual sense, it's more of a collection of shortcuts for manually resizing windows.

Without having dove into the implementation yet, it feels like Morphic is more a system where each window paints itself where it wants to be, and there isn't a centralized controller or manager of windows. Is that accurate?

On Fri, May 15, 2015 at 6:58 PM Nicolai Hess <[hidden email]> wrote:


2015-05-16 0:52 GMT+02:00 Avdi Grimm <[hidden email]>:
Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi

I miss this too.

This worked in Pharo 1.4 (alt + left arrow / alt+right arrow).

I don't know why this was removed.

I often wanted to look at this and try to bring it back, but didn't find the time.


nicolai


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Avdi Grimm
In reply to this post by Carlo-2


On Fri, May 15, 2015 at 7:12 PM Carlo <[hidden email]> wrote:

Pressing Alt-Tab brings up a debugger. Debugging the method shows:


Thanks! Any idea where the keyboard shortcut is assigned? On the only systems I have handy to test this, the OS catches Alt-Tab before it ever gets to Pharo. 

Screenshot 2015:05:16, 1:11 AM.png (57K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Nicolai Hess
In reply to this post by Carlo-2


2015-05-16 1:11 GMT+02:00 Carlo <[hidden email]>:
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

But this does not work for Pharo on Windows . On windows alt+tab always switches between active applications.
There was some code on older versions of pharo, that uses alt+left arrow/right arrow instead of alt+tab for
the windows vm

 

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi Grimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Avdi Grimm
I'd be totally cool with Alt-Left/Right. I just want *something* so I don't have to lift my hand just to switch from e.g. Browser to Playground and back.

On Fri, May 15, 2015 at 7:23 PM Nicolai Hess <[hidden email]> wrote:
2015-05-16 1:11 GMT+02:00 Carlo <[hidden email]>:
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

But this does not work for Pharo on Windows . On windows alt+tab always switches between active applications.
There was some code on older versions of pharo, that uses alt+left arrow/right arrow instead of alt+tab for
the windows vm

 

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi Grimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 

Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Carlo-2
Was taking a look in my image and followed references to Character alt or ctrl and found the hooks, but changing them wasn't working.

Remembered now that there is a Keymap Browser under World/System/Keymap Browser
You could try looking at that or wait until someone that knows responds...

Cheers
Carlo



On 16 May 2015, at 1:32 AM, Avdi Grimm <[hidden email]

wrote:

I'd be totally cool with Alt-Left/Right. I just want *something* so I don't have to lift my hand just to switch from e.g. Browser to Playground and back.

On Fri, May 15, 2015 at 7:23 PM Nicolai Hess <[hidden email]> wrote:
2015-05-16 1:11 GMT+02:00 Carlo <[hidden email]>:
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

But this does not work for Pharo on Windows . On windows alt+tab always switches between active applications.
There was some code on older versions of pharo, that uses alt+left arrow/right arrow instead of alt+tab for
the windows vm

 

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi G<Screenshot 2015:05:16, 1:11 AM.png>rimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Avdi Grimm

On Fri, May 15, 2015 at 8:21 PM, Carlo <[hidden email]> wrote:
Remembered now that there is a Keymap Browser under World/System/Keymap Browser
You could try looking at that or wait until someone that knows responds...

Yeah, there's no listing for Alt-Tab there, which was one of the things that flummoxed me in the first place.

--
Avdi Grimm
http://avdi.org

Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Carlo-2
In reply to this post by Avdi Grimm
Hi

See my earlier email was bounced.
...

Ok, hacked and debugged my pharo 4 image and I've got ctrl- left or right working on my mac.

Two changes needed 

TaskListMorph>>keyStroke: event  needs to change as per below to add the ctrl left or right.

TaskListMorph>>keyStroke: event 
"Process keys to switch task."
event keyCharacter = Character escape ifTrue: [^self delete].
event anyModifierKeyPressed ifFalse: [^self done].

event keyString =  '<Ctrl-left>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Ctrl-right>' ifTrue: [^self selectNextTask].
event keyString =  '<Opt-Shift-tab>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Opt-tab>' ifTrue: [^self selectNextTask]

Then TaskListMorph>>isNavigationEvent: aKeyboardEvent needs to change as per below:

isNavigationEvent: aKeyboardEvent
| validCombos |
validCombos := Array with: Character tab alt with: Character tab alt shift with: Character arrowLeft ctrl with: Character arrowRight ctrl .
^ validCombos contains: [:each | each = aKeyboardEvent asKeyCombination].

Ctrl-left or Ctrl-right works, and again you need to press any key to select the window on preview.

Cheers
Carlo



On 16 May 2015, at 1:32 AM, Avdi Grimm <[hidden email]> wrote:

I'd be totally cool with Alt-Left/Right. I just want *something* so I don't have to lift my hand just to switch from e.g. Browser to Playground and back.

On Fri, May 15, 2015 at 7:23 PM Nicolai Hess <[hidden email]> wrote:
2015-05-16 1:11 GMT+02:00 Carlo <[hidden email]>:
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

But this does not work for Pharo on Windows . On windows alt+tab always switches between active applications.
There was some code on older versions of pharo, that uses alt+left arrow/right arrow instead of alt+tab for
the windows vm

 

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi G<Screenshot 2015:05:16, 1:11 AM.png>rimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

carlo.t
In reply to this post by Avdi Grimm
Hi

I see my earlier email was bounced.
...

Ok, hacked and debugged my pharo 4 image and I've got ctrl- left or right working on my mac.

Two changes needed

TaskListMorph>>keyStroke: event  needs to change as per below to add the ctrl left or right.

TaskListMorph>>keyStroke: event
        "Process keys to switch task."
        event keyCharacter = Character escape ifTrue: [^self delete].
        event anyModifierKeyPressed ifFalse: [^self done].

        event keyString =  '<Ctrl-left>' ifTrue: [^self selectPreviousTask].
        event keyString =  '<Ctrl-right>' ifTrue: [^self selectNextTask].
               
        event keyString =  '<Opt-Shift-tab>' ifTrue: [^self selectPreviousTask].
        event keyString =  '<Opt-tab>' ifTrue: [^self selectNextTask]

Then TaskListMorph>>isNavigationEvent: aKeyboardEvent needs to change as per below:

isNavigationEvent: aKeyboardEvent
        | validCombos |
        validCombos := Array with: Character tab alt with: Character tab alt shift with: Character arrowLeft ctrl with: Character arrowRight ctrl .
        ^ validCombos contains: [:each | each = aKeyboardEvent asKeyCombination].

Ctrl-left or Ctrl-right works, and again you need to press any key to select the window on preview.

Cheers
Carlo
Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Carlo-2
In reply to this post by Avdi Grimm
Hi

I see my earlier email was bounced again...


Ok, hacked and debugged my pharo 4 image and I've got ctrl- left or right working on my mac.

Two changes needed 

TaskListMorph>>keyStroke: event  needs to change as per below to add the ctrl left or right.

TaskListMorph>>keyStroke: event 
"Process keys to switch task."
event keyCharacter = Character escape ifTrue: [^self delete].
event anyModifierKeyPressed ifFalse: [^self done].

event keyString =  '<Ctrl-left>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Ctrl-right>' ifTrue: [^self selectNextTask].
event keyString =  '<Opt-Shift-tab>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Opt-tab>' ifTrue: [^self selectNextTask]

Then TaskListMorph>>isNavigationEvent: aKeyboardEvent needs to change as per below:

isNavigationEvent: aKeyboardEvent
| validCombos |
validCombos := Array with: Character tab alt with: Character tab alt shift with: Character arrowLeft ctrl with: Character arrowRight ctrl .
^ validCombos contains: [:each | each = aKeyboardEvent asKeyCombination].

Ctrl-left or Ctrl-right works, and again you need to press any key to select the window on preview.

Cheers
Carlo

On 16 May 2015, at 1:05 AM, Avdi Grimm <[hidden email]> wrote:

Messing around, I've gotten the impression that Morphic doesn't really have the concept of a window manager. I've even played with the "Tiling Window Manager", but it isn't really a *manager* in the usual sense, it's more of a collection of shortcuts for manually resizing windows.

Without having dove into the implementation yet, it feels like Morphic is more a system where each window paints itself where it wants to be, and there isn't a centralized controller or manager of windows. Is that accurate?

On Fri, May 15, 2015 at 6:58 PM Nicolai Hess <[hidden email]> wrote:


2015-05-16 0:52 GMT+02:00 Avdi Grimm <[hidden email]>:
Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi

I miss this too.

This worked in Pharo 1.4 (alt + left arrow / alt+right arrow).

I don't know why this was removed.

I often wanted to look at this and try to bring it back, but didn't find the time.


nicolai


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

kilon.alios
In reply to this post by Carlo-2
does not work for me in macos. Ctrl+left/right is reserved by MACOS for switching workspaces but even other key combinations i tried do not work at all. Alt+Tab is also reserved in macos.

On Sat, May 16, 2015 at 9:14 AM Carlo <[hidden email]> wrote:
Hi

See my earlier email was bounced.
...

Ok, hacked and debugged my pharo 4 image and I've got ctrl- left or right working on my mac.

Two changes needed 

TaskListMorph>>keyStroke: event  needs to change as per below to add the ctrl left or right.

TaskListMorph>>keyStroke: event 
"Process keys to switch task."
event keyCharacter = Character escape ifTrue: [^self delete].
event anyModifierKeyPressed ifFalse: [^self done].

event keyString =  '<Ctrl-left>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Ctrl-right>' ifTrue: [^self selectNextTask].
event keyString =  '<Opt-Shift-tab>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Opt-tab>' ifTrue: [^self selectNextTask]

Then TaskListMorph>>isNavigationEvent: aKeyboardEvent needs to change as per below:

isNavigationEvent: aKeyboardEvent
| validCombos |
validCombos := Array with: Character tab alt with: Character tab alt shift with: Character arrowLeft ctrl with: Character arrowRight ctrl .
^ validCombos contains: [:each | each = aKeyboardEvent asKeyCombination].

Ctrl-left or Ctrl-right works, and again you need to press any key to select the window on preview.

Cheers
Carlo
On 16 May 2015, at 1:32 AM, Avdi Grimm <[hidden email]> wrote:

I'd be totally cool with Alt-Left/Right. I just want *something* so I don't have to lift my hand just to switch from e.g. Browser to Playground and back.

On Fri, May 15, 2015 at 7:23 PM Nicolai Hess <[hidden email]> wrote:
2015-05-16 1:11 GMT+02:00 Carlo <[hidden email]>:
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

But this does not work for Pharo on Windows . On windows alt+tab always switches between active applications.
There was some code on older versions of pharo, that uses alt+left arrow/right arrow instead of alt+tab for
the windows vm

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi G<Screenshot 2015:05:16, 1:11 AM.png>rimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 

Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

EstebanLM
my answer on stackoverflow: 

well... you hit one of our weaker spots :)

Keybindings are not in his best shape, but:

- Actually, alt+tab is already set to "switch window" activity. The problem is that does not work all the time (for example, it does not work on Playground). 
- This is because there are some hardcoded logic there, who we are removing slowly from the system (some of those parts have more than 15yrs since they come from before Pharo has born). 
- Someone (probably in a failed attempt to fix the playground, or the hardcodes) forget a halt in the method who creates a new preview window... so even if you reach that part of the system, you will have a debugger. Of course, you will be able to restore correct behaviour by just removing the breakpoint, but that will not correct the fact "switch windows" will not be available everywhere. 
- I opened a bug entry for it: https://pharo.fogbugz.com/f/cases/15546, in case you want to follow the issue (you will need an account there, I'm sorry for that). 

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.)

Esteban

ps: I will like to have a solution for this, if anyone can help a bit in this area… but it has to be a solution using the keybindings framework. I will deny integration to any hardcoded solution :)

On 16 May 2015, at 10:59, Dimitris Chloupis <[hidden email]> wrote:

does not work for me in macos. Ctrl+left/right is reserved by MACOS for switching workspaces but even other key combinations i tried do not work at all. Alt+Tab is also reserved in macos.

On Sat, May 16, 2015 at 9:14 AM Carlo <[hidden email]> wrote:
Hi

See my earlier email was bounced.
...

Ok, hacked and debugged my pharo 4 image and I've got ctrl- left or right working on my mac.

Two changes needed 

TaskListMorph>>keyStroke: event  needs to change as per below to add the ctrl left or right.

TaskListMorph>>keyStroke: event 
"Process keys to switch task."
event keyCharacter = Character escape ifTrue: [^self delete].
event anyModifierKeyPressed ifFalse: [^self done].

event keyString =  '<Ctrl-left>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Ctrl-right>' ifTrue: [^self selectNextTask].
event keyString =  '<Opt-Shift-tab>' ifTrue: [^self selectPreviousTask].
event keyString =  '<Opt-tab>' ifTrue: [^self selectNextTask]

Then TaskListMorph>>isNavigationEvent: aKeyboardEvent needs to change as per below:

isNavigationEvent: aKeyboardEvent
| validCombos |
validCombos := Array with: Character tab alt with: Character tab alt shift with: Character arrowLeft ctrl with: Character arrowRight ctrl .
^ validCombos contains: [:each | each = aKeyboardEvent asKeyCombination].

Ctrl-left or Ctrl-right works, and again you need to press any key to select the window on preview.

Cheers
Carlo
On 16 May 2015, at 1:32 AM, Avdi Grimm <[hidden email]> wrote:

I'd be totally cool with Alt-Left/Right. I just want *something* so I don't have to lift my hand just to switch from e.g. Browser to Playground and back.

On Fri, May 15, 2015 at 7:23 PM Nicolai Hess <[hidden email]> wrote:
2015-05-16 1:11 GMT+02:00 Carlo <[hidden email]>:
On my 

Pharo4.0
Latest update: #40609

Pressing Alt-Tab brings up a debugger. Debugging the method shows:

But this does not work for Pharo on Windows . On windows alt+tab always switches between active applications.
There was some code on older versions of pharo, that uses alt+left arrow/right arrow instead of alt+tab for
the windows vm

newPreviewMorph
"Answer a new preview holder."
self halt.
^ Morph new
color: Color transparent;
extent: self defaultPreviewExtent;
yourself.


On 16 May 2015, at 1:09 AM, Avdi G<Screenshot 2015:05:16, 1:11 AM.png>rimm <[hidden email]> wrote:



On Fri, May 15, 2015 at 7:06 PM Carlo <[hidden email]> wrote:
Removing the 'self halt' still works though.

Can you give me a little more detail about where to find this? Thanks! 


Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

laurent laffont
In reply to this post by Avdi Grimm
Hi Avdi,

you may be interested in http://smalltalkhub.com/#!/~LaurentLaffont/TilingWindowManager that offers more keyboard control (Emacs inspired) on window management.

Regards,

Laurent Laffont 

Le sam. 16 mai 2015 à 0:52, Avdi Grimm <[hidden email]> a écrit :
Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)

I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.

That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.

I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.

So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?

Many thanks,

--
Avdi
Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

Sean P. DeNigris
Administrator
In reply to this post by Avdi Grimm
Avdi Grimm wrote
Messing around, I've gotten the impression that Morphic doesn't really have
the concept of a window manager.
Hee hee. Like most things in Smalltalk, there is much more here than meets the eye! While pharo's main window looks like a desktop with windows, it is actually a world of living objects. Morphic is in fact a simulation framework based on the values of liveness and directness [1], which we are using to simulate a window system :)

Two quick initial explorations:

Create a morph:
1. DoIt: Morph new openInWorld
2. Click on the Morph while pressing (on Mac) shift+alt to bring up the Morph's "halo" (like a circular menu). From here, clicking the wrench (right side, second from the top) and then "inspect morph" will open an inspector on the object, and you can manipulate it like any other object. For example, `self color: Color white` immediately turns it white.

As this doesn't seems to be your first rodeo, I'm sure you can quickly imagine the power of having all one's live UI objects immediately responsive on the same level as any other object without any context switch.

Treat a window as a Morph:
Repeat #2 above to get the same halos around the window. This is especially cool when hacking on the IDE because you can bring up the halos on a button, see what it's action is, and duplicate/modify it. One of the easiest cool demos, which is actually so easy that it's extremely hard to grok the implications of it, is to bring up the World menu, hover over a deeply nested item, bring up the halos on the item, pick it up [2], drop it in the world, and then click it. Of course it continues to work as if you had clicked it right in the menu.

[1] http://web.media.mit.edu/~jmaloney/papers/DirectnessAndLivenessInMorphic.pdf
[2] black button, middle-top, looks like a picker arm in one of those toy grabbing games they have at diners
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Alt-tab between windows

stepharo
In reply to this post by Carlo-2


Le 16/5/15 01:05, Carlo a écrit :
> Hi Avdi
>
> Enjoyed listening to your ruby rogues podcasts and tapas and now finally Smalltalk;)
>
> Regarding your pain points on keyboard vs mouse; I've seen this come up before. There has been lot's of improvement, but still a way to go.
> I tested cycling between windows on Pharo 3 on mac and Alt-tab is working. Pharo 4 looks like someone put a 'self halt' message on the preview window; so I'm assuming there is a newer way to cycle through windows. Removing the 'self halt' still works though.
> Oh the alt-tab will bring up a preview window which you need to select window by pressing any other key; so 'alt-tab' until window comes up, then let it go and press any key to select it.

Can you open a bug entry with a nice description if there is something
that we should do?

Stef

>
> Cheers
> Carlo
>
> On 16 May 2015, at 12:52 AM, Avdi Grimm <[hidden email]> wrote:
>
> Hey folks! I've dabbled with smalltalk here and there over the years, but recently I've settled in to learn Pharo in earnest. A few of you might have seen the videos I've been putting up; they seem to be making the rounds on Twitter. I just want to say I've felt really welcomed by all the people who have commented with helpful tips, or offered to help with my exploration :-)
>
> I've run into my first big blocker as a newcomer. Like many programmers I'm a fan of keeping my hands on the keyboard. Now, I'm more flexible on this than some. I recognize that Pharo is a visual environment, and it makes sense to explore it with a mouse. And some interactions just make more sense with a mouse.
>
> That said, no matter what windowing environment I'm in, I find the ability to quickly cycle between windows without leaving the keyboard pretty crucial. One Windows or Ubuntu I would normally do this with Alt-Tab or Super-Tab. On MacOS it's Cmd-Tab.
>
> I've been trying to figure out how to do this in Pharo. I've looked for answers with Google, SO, and on IRC, and I've come up blank. I'm starting to think it can't be done.
>
> So, I've come here for your help. Is there a way to cycle between windows? Or is anyone working on it? Or, perhaps, am I missing an element of the Pharo programming workflow which renders it unneeded?
>
> Many thanks,
>
> --
> Avdi
>
>
>


123