links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FAQ: Keyboard shortcuts and bindings
Last updated at 7:25 pm UTC on 14 May 2010

Q: How do I change or add keyboard shortcuts/bindings?

For text-editing key commands/bindings:

See the method ParagraphEditor class>>initializeCmdKeyShortcuts (and also initializeShiftCmdKeyShortcuts). You can edit these methods to change text-editing key bindings. For example, if you want to have Emacs-like key bindings. See: Emacs key bindings if you want that.

After you edit/save the method, be sure to execute "ParagraphEditor initialize" to execute the method and have the changes go into effect.

(These are class-side methods, so you'll need to hit the "class" button in the browser to see them.)

If you're on an MS Windows platform and you want to switch the text editing keys (such as cut, copy, paste, save, etc.) from the Alt key over the to Ctrl key, there is a changeset which does that here. As of 3.2, Go to Preferences (via the World menu) and choose one of either: "swap control and alt keys" or "duplicate control and alt keys". The balloon help explains it.

For keyboard shortcuts out in the Morphic world:

(When your mouse is not inside any text-editing window.)

Look at the method PasteUpMorph.keystrokeInWorld:. (Morphic only)

The way cmd-t brings up a transcript should serve as a good model.

You may customize this method for your own convenienceso that your system let you get a change sorter, get a new Workspace, etc., very quickly, without having to touch the mouse.

Relevant SqueakMap Packages:

There are some packages on SqueakMap that allow you to manage your keybindings in Squeak:

KeyBinder modifies the way Squeak handles keyboard events and provides a framework for constructing keyboard bindings.

Provides a framework and UI for creating multi-key keybindings for TextMorphs. Key bindings can be mapped to methods in ParagraphEditor and too arbitrary Blocks of Smalltalk code.

This package provides extensive support for EMACS or VIM commands and modes. Includes fully remappable multi-key keybindings.

(You will still have to touch the mouse to get focus out of whatever morph you're currently typing in, won't you?)

Windows ALT keyS and Macintosh command key see FAQ: Modifier Keys

registry Windows XP switch keyboards when you hit alt-shift