svelten
svelten

Reputation: 1479

How do I change the default cmd key for keyboard shortcuts in Pharo 3.0?

I'm trying to bind the cmd key in Pharo 3.0 to another key because my system (linux+xmonad) already uses the alt key for other things.

I am trying to bind cmd key, currently mapped to alt, to the win/super/meta key.

I changed method defaultModifier in UnixPlatform class, from:

defaultModifier
    ^KMModifier control

to:

defaultModifier
    ^KMModifier meta

But nothing changed. Should I do something else?

Upvotes: 1

Views: 296

Answers (2)

Peter Uhnak
Peter Uhnak

Reputation: 10217

There is no easy way to change it in the image short of manually rewriting the shortcuts, because there are many tools that define the shortcut explicitly for each platform by themselves plus there no consensus on what the default shortcut for linux should be (right now it is ctrl and alt).

However this is something that might be tackled in the next version (=5) (4 was released today).

I had to change my dwm (xmonad predecessor) keybinding to the "win" key because of it. (On the plus side it has freed alt, so I can now use alt for example to switch tabs in Chrome and many other.)

Upvotes: 1

Stephan Eggermont
Stephan Eggermont

Reputation: 15917

There are two places where you might want to make changes:

  • either at the vm level, where you could change the keyboard event handling (not recommended)
  • in the keymapping packages you'll find the code to deal with the different key combinations. The different packages then add shortcuts using this mechanism.

Upvotes: 0

Related Questions