Whole other debate on keyboard mappings

Lex Spoon lex at cc.gatech.edu
Thu Jun 6 17:53:07 UTC 2002


On Thu, Jun 06, 2002 at 09:38:44AM -0700, Tim Rowledge wrote:
> > > Surely this is all something that should be tackled im the image with a
> > > sensibly configurable keymap
> > 
> > A couple of people are suggesting this, but let me disagree here. 
> > First, images should remain portable -- let's not end image portability
> > just to have different key mappings.  I'd hate to download a windows
> > image from someone and have it use control instead of alt.
> There is no need at all to have to do this and it's not at all what I
> was proposing.
> 
> For BrouHaHa we implemented a very simple and effective mechanism that
> was completely portable. As part of the startup sequence (though I kinda
> hate to add anything more to the ludicrous amount of cruft in the squeak
> startup dance) the platform ID was checked (we already do that for
> filedirectory et al.) and the appropriate SystemDescription object
> installed. This encoded the right filename class, keyboard map, external
> interface class and some other stuff I think, in a quite intelligable
> manner. One could add a trivial extension to check for an external file
> version to provide for user local overrides.


Oh, I see.  That's very nice.  It does mean that the image must have
an appropriate SystemDescription object available, though, doesn't it?
What if I port Squeak to some new system and try to use an existing
image?

Just like with FileDirectory....

> Come to that, it surely ought to fit into a module world quite nicely.
> Choose the platform appropriate module during startup.

I agree!  There can be a project or module on every system that has
platform-specific stuff at the image level.  This can be loaded during
startup.  The VM might supply some default locations to look (e.g.,
on Unix, the current dirrectory followed by the home directory followed
by /usr/share/squeak).

Unfortunately it will open the floodgates for ever more
platform-specific stuff.  :)

> 
> > Second, this
> > is trivial to do in the VM: the VM's already have a mapping from keys to
> > Squeak modifiers, and we can easily set those mappings to anything we
> > like.
> But we can't easily change them to suit personal taste and it's simply
> something I don't think a VM should spend time and storage on.

Well it's true you can't fiddle with it easily.  Not that all that
many people would do so.

But it's also true that no time or effort or storage is necessary --
there already has to be a mapping, anyway.  It seems like we may as
well go ahead and translate in the fashion appropriate for the platform.
Especially since the canonical form is imaginary anyway.  Why translate
alt to command -- which doesn't even exist on a PC keyboard -- and then
translate command to control in the image?  The VM could just as easily
translate alt to control (or whatever) directly.

Also there's the whole "virtual machine" strategy.  It's nice if the
image sees the same sort of machine no matter what platform you are
running on.



Lex



More information about the Squeak-dev mailing list