[squeak-dev] Re: Modifier key events
bert at freudenbergs.de
Thu Feb 25 13:06:32 UTC 2010
On 25.02.2010, at 13:43, Balázs Kósi wrote:
> pressing ctrl+` on mac produces the following keyboard events:
> [keyDown '<Ctrl-2>']
> [keystroke '<Ctrl-`>']
> [keyUp '2']
> on windows we get:
> [keyDown '<Cmd->']
> [keyDown '<Ctrl-À>']
> [keyUp '<Ctrl-À>']
> [keyUp '']
> So docking bar activation is not working under windows.
> What do you think about binding the docking bar menus to ctrl-<n> by
> position like:
> ctrl-1 squeak menu
> ctrl-2 Project menu
> And what do you think in general about using ctrl- keystrokes for
> image wide shortcuts?
> Like ctrl-w always closing the topmost window, not just when the World
> has the keyboard focus.
Not a bad idea.
However, I consider keyboard handling in general pretty broken. The VMs are inconsistent, and there is no proper translation layer in the image. That means keyboard handling code cannot be written in a platform-independent way.
Also IMHO shortcuts should match the platform's common usage. E.g. copy/paste should use Ctrl on Windows but Cmd on the Mac. In Etoys we simply enable swapCtrlAndAlt on startup if running on Windows or Unix, but that only goes so far ...
I think I heard that some of this was cleaned up in Pharo - maybe someone can take a peek?
- Bert -
More information about the Squeak-dev