{bad habits] Squeak for Windows - Ctrl instead of Alt key

Doug Way dway at riskmetrics.com
Wed Oct 10 23:38:17 UTC 2001


Andreas Raab wrote:
> 
> > I think the ideal situation would be to have a single
> > Preference which lets you swap all Ctrl and Alt bindings.
> 
> This is extremely confusing and by no means "ideal". Believe me - I've tried
> before to live with a complete Alt-Ctrl swap and it's just a mess. I'm all
> in favour of making the keybindings more easily editable but not for just
> blindly swapping modifier keys.

Well yes, it is somewhat drastic, but at least you'd be consciously making the switch. :)  To get Windows-style key bindings in Squeak you'd have to swap at least the 8 that I mentioned (-z -x -c -v -a -s -f -g) anyway, which is a decent chunk of them.

Okay, maybe the Alt-Ctrl swap is too drastic.  But it'd still be nice to have a simple preference or setting built into the image to let someone easily switch at least these 8 bindings, without having to edit them all individually.  One possibility would be to add a ParagraphEditor class>>#remapCmdKeysAsMSWindows method or somesuch, which would remap just these 8.  Turning on a preference could trigger the method.  (you could also have a #remapCmdKeyAsEmacs method)  Yes, I know it's normally "bad" to have such platform-specific code in the image, but this stuff is fundamental enough that it seems pretty reasonable to me.

Phil Weichert wrote:
> 
>   Is there a provision in the Squeak image to find out what platform is being
> used?

Yes, try "Smalltalk platformName".

> If there was a provision to detect the platform, key bindings could be
> initialize on image startup based on a "policy" for that platform.  The policy
> would specify which key bindings to use based on the specific platform Squeak
> was running on.  Other than personal preference arguments then Squeak running on
> Windows would initialize its key binds to be ctrl-c, ctrl-x, etc for
> copy/cut/paste/etc.
> Phil

I think this might be going too far... the default key bindings should probably be the same for Squeak on all platforms, otherwise there'd be confusion when reading documentation, etc.  You should consciously change a setting to get different bindings.  (An end-user runtime is a different story... there it might make sense to detect the platform and set the key bindings appropriately.)

- Doug Way
  dway at riskmetrics.com




More information about the Squeak-dev mailing list