[GOODIE] KeyBinder - SystemWindow Switcher

Adrian Lienhard adi at netstyle.ch
Sun Aug 8 11:09:28 UTC 2004


Hi Hernán,

Cool! I like it. Here some comments:


WindowSwitcherKeyBinding>>activeSystemWindow is never sent

if there are no windows open in the world, there does not exist an 
active window: return nil in this case.
currentWindow
	^self windows detect: [:ea | ea isActive] ifNone: [ nil ].

missing return statements in prevWindow and nextWindow:
	...
	w isEmpty
		ifTrue: [^nil].
	current
		ifNil: [^w first].
	...

the ivar last is never used.


On my mac keyboard I could not activate command-\ probably because the 
command key changes the character. I use control-. and control-, which 
I find convenient.

What could be useful is to move only through the windows of the same 
type like the currently active window - for example if additionally 
shift is pressed. If you have a code browser active then you would not 
get the workspaces, transcripts etc.

Cheers,
Adrian

On Aug 8, 2004, at 8:33 AM, Hernan Tylim wrote:

> Hi,
> 	A couple of days ago someone asked on this list if it was
> possible to switch between SystemWindows in squeak like you do in
> Windows.
>
> 	Well, before wasn't posible, now it is. I present to you
> KeyBinder.
>
> 	The idea behind KeyBinder is to provide a mechanism for
> assigning global key bindings. KeyBinder does this by changing the way
> Squeak handles Keyboard events, it basically adds to HandMorph the
> ability to manage more than 1 keyboard focus. The main advantage of 
> this
> approach is that it can capture any keyboard event that is generated on
> Squeak.
>
> 	As a proof on concept for KeyBinder I made a KeyBinding for
> switching between SystemWindows. With <cmd>-\ (backslash) you will be
> able to switch forward, while with <cmd>-| (pipe) you will be able to
> switch backwards.
>
> 	To test KeyBinder just file it in and from a Workspace evaluate:
> "KeyBinder new openInWorld". A tiny green rectangle will appear on the
> top left corner of the World. Click on the rectangle with the right
> mouse button and select: 'add Window Switcher' to enable the key 
> binding
> of window switching, and that's it. Try it and have fun.
>
> 	And please (please!) tell me what you think about it.
>
> Thanks
>
> ps: 3:32 am, time to go to sleep.
>
>
> Saludos,
> Hernán
> <KeyBinder-hpt.1.cs>
>
___________________
Adrian Lienhard
www.adrian-lienhard.ch
www.netstyle.ch




More information about the Squeak-dev mailing list