Keymapping discussion

David Shaffer cdshaffer at acm.org
Sat Oct 1 19:33:49 UTC 2005


The current Keymapping package goes through an initialization process
that basically converts the existing TextMorph (and ParagraphEditor) and
World keyboard shortcuts to keymap entries.  I have listed the converted
keyboard shortcuts below.  If a TextMorph has focus it will consume any
of its keyboard shortcuts.  I generally use the "focus follows mouse"
preference but I know that a lot of people don't like this.  That means
that once you've edited some text in a browser, for example, you can
activate these shortcuts even if your mouse isn't over the TextMorph. 
<m-w> is my favorite example (and the one which prompted my choice of
preferences).  If you have a TextMorph in focus, it will delete a word,
otherwise it will close the topmost window.  An additional problem is
that, as we try to develop services and applications with more rich
keyboard shortcuts, we are immediately confronted with needing (or
wanting) to avoid the TextMorph's shortcuts in order to avoid the
problem above.  I see a couple solutions:

1) Try to limit the TextMorph's shortcuts to a smaller list possibly
only using the meta- or control- qualifiers (the choice could be
platform dependent, this is easy with Keymapping).
2) Somehow make TextMorph shortcuts "lower priority" than other morph's
shortcuts.  This seems hackish and the implementation would probably be
just that.

I am open for other ideas as well.  I think #1 is the better of the two
options.  I package Keymapping with three TextMorph keymaps:
"traditional" (the one we have now), "simple" (to be developed) and
"emacs" (because some of us old-timers still like twisting our fingers
in knots).  I am also open to hosting custom keymaps.  I need to develop
a way to save subsets of keymaps (the current UI saves entire keymaps at
once).  I'd like suggestions for the "simple" keymap.  So, have a look
at the list and make suggestions.  Keep in mind that I have no plans of
removing your favorite keyboard shortcut (it will always be in
"traditional") but I can't promise that it won't get eliminated in
"simple".  Something has to give.  If you like, just score the shortcuts
you actually use "2" = frequent use, "1" = occasional use.  Finally,
keep in mind that if you choose to load the "simple" keymap, you can
always add you own favorites back in...if they're missing, that is.

Stef has been talking about making Keymapping some kind of official
"package" for 3.9 (not included with "base" but maybe with full?
Stef?).  So, I'm working on commenting the classes and building these
packaged keymaps.

Thanks,

David



TextMorph:

<m-home> -> #cursorHome:
<m-end> -> #cursorEnd:
<m-bs> -> #backspace:
<m-pgup> -> #cursorPageUp:
<m-pgdn> -> #cursorPageDown:
<m-cr> -> #crWithIndent:
<m-esc> -> #offerMenuFromEsc:
<m-left> -> #cursorLeft:
<m-right> -> #cursorRight:
<m-up> -> #cursorUp:
<m-down> -> #cursorDown:
<m-space> -> #selectWord:
<ms-"> -> #enclose:
<m-'> -> #enclose:
<ms-(> -> #enclose:
<m-,> -> #shiftEnclose:
<m--> -> #changeEmphasis:
<m-0> -> #changeEmphasis:
<m-1> -> #changeEmphasis:
<m-2> -> #changeEmphasis:
<m-3> -> #changeEmphasis:
<m-4> -> #changeEmphasis:
<m-5> -> #changeEmphasis:
<m-6> -> #changeEmphasis:
<m-7> -> #changeEmphasis:
<m-8> -> #changeEmphasis:
<m-9> -> #changeEmphasis:
<ms-\<> -> #enclose:
<m-=> -> #changeEmphasis:
<m-[> -> #enclose:
<m-a> -> #selectAll:
<m-b> -> #browseIt:
<m-c> -> #copySelection:
<m-d> -> #doIt:
<m-e> -> #exchange:
<m-f> -> #find:
<m-g> -> #findAgain:
<m-h> -> #setSearchString:
<m-i> -> #inspectIt:
<m-j> -> #doAgainOnce:
<m-k> -> #offerFontMenu:
<m-l> -> #cancel:
<m-m> -> #implementorsOfIt:
<m-n> -> #sendersOfIt:
<m-o> -> #spawnIt:
<m-p> -> #printIt:
<m-q> -> #querySymbol:
<m-r> -> #recognizer:
<m-s> -> #save:
<m-t> -> #tempCommand:
<m-u> -> #align:
<m-v> -> #paste:
<m-x> -> #cut:
<m-y> -> #swapChars:
<m-z> -> #undo:
<ms-{> -> #enclose:
<m-del> -> #forwardDelete:
<home> -> #cursorHome:
<end> -> #cursorEnd:
<bs> -> #backspace:
<pgup> -> #cursorPageUp:
<pgdn> -> #cursorPageDown:
<esc> -> #offerMenuFromEsc:
<left> -> #cursorLeft:
<right> -> #cursorRight:
<up> -> #cursorUp:
<down> -> #cursorDown:
<del> -> #forwardDelete:
<ms-A> -> #argAdvance:
<ms-B> -> #browseItHere:
<ms-C> -> #compareToClipboard:
<ms-D> -> #duplicate:
<ms-E> -> #methodStringsContainingIt:
<ms-F> -> #displayIfFalse:
<ms-G> -> #fileItIn:
<ms-H> -> #cursorTopHome:
<ms-I> -> #exploreIt:
<ms-J> -> #doAgainMany:
<ms-K> -> #changeStyle:
<ms-L> -> #outdent:
<ms-M> -> #selectCurrentTypeIn:
<ms-N> -> #referencesToIt:
<ms-P> -> #makeProjectLink:
<ms-R> -> #indent:
<ms-S> -> #search:
<ms-T> -> #displayIfTrue:
<ms-U> -> #changeLfToCr:
<ms-V> -> #pasteInitials:
<ms-W> -> #methodNamesContainingIt:
<ms-X> -> #makeLowercase:
<ms-Y> -> #makeUppercase:
<ms-Z> -> #makeCapitalized:
<c-home> -> #argAdvance:
<c-c> -> #compareToClipboard:
<c-end> -> #duplicate:
<c-bs> -> #cursorTopHome:
<c-pgdn> -> #outdent:
<c-esc> -> #offerMenuFromEsc:
<c-left> -> #cursorLeft:
<c-right> -> #cursorRight:
<c-up> -> #cursorUp:
<c-down> -> #cursorDown:
<c-del> -> #forwardDelete:

World:

<esc> -> [:evt :tgt | tgt putUpWorldMenuFromEscapeKey]
<m-b> -> Open class browser
<m-k> -> Workspace class>>#open
<m-m> -> #putUpNewMorphMenu
<m-o> -> #activateObjectsTool
<m-r> -> #restoreMorphicDisplay
<m-t> -> #findATranscript:
<m-w> -> SystemWindow class>>#closeTopWindow
<m-z> -> #undoOrRedoCommand
<ms-C> -> #findAChangeSorter:
<ms-F> -> CurrentProjectRefactoring class>>#currentToggleFlapsSuppressed
<ms-L> -> #findAFileList:
<ms-N> -> #toggleClassicNavigatorIfAppropriate
<ms-P> -> #findAPreferencesPanel:
<ms-R> -> #openRecentSubmissionsBrowser:
<ms-W> -> #findAMessageNamesWindow:
<ms-Z> -> ChangeList class>>#browseRecentLog
<m-\\> -> SystemWindow class>>#sendTopWindowToBack
<ms-K> -> KeymapEditor class>>#open
<home> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<end> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<bs> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<left> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<right> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<up> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<down> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]
<space> -> [:evt :tgt | WorldState addDeferredUIMessage: [tgt
keyboardNavigationHandler navigateFromKeystroke: evt keyCharacter] fixTemps]






More information about the Squeak-dev mailing list