Sorry for digging this up…
On 18.01.2017, at 10:04, commits@source.squeak.org wrote:
Tim Felgentreff uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-tfel.1317.mcz
==================== Summary ====================
Name: Morphic-tfel.1317 Author: tfel Time: 18 January 2017, 10:03:40.884167 am UUID: 8a50cc7e-f401-4381-a1ce-97d0423370b1 Ancestors: Morphic-bp.1316
add Ctrl +, Ctrl -, and Ctrl = (as in Emacs) for quick font size changes
=============== Diff against Morphic-bp.1316 ===============
Item was changed: ----- Method: PasteUpMorph>>filterEvent:for: (in category 'events-processing') ----- filterEvent: aKeyboardEvent for: anObject "Provide keyboard shortcuts."
"Delegate keyboard shortcuts to my docking bars." self submorphsDo: [:ea | ea isDockingBar ifTrue: [ ea filterEvent: aKeyboardEvent for: anObject. "No support for converting events here!!" aKeyboardEvent wasIgnored ifTrue: [^ aKeyboardEvent "early out"]]].
aKeyboardEvent isKeystroke ifFalse: [^ aKeyboardEvent].
aKeyboardEvent commandKeyPressed ifTrue: [ aKeyboardEvent keyCharacter caseOf: { [$R] -> [Utilities browseRecentSubmissions]. [$L] -> [self findAFileList: aKeyboardEvent]. [$O] -> [self findAMonticelloBrowser]. [$P] -> [self findAPreferencesPanel: aKeyboardEvent]. "[$Z] -> [ChangeList browseRecentLog]." [$]] -> [Smalltalk snapshot: true andQuit: false]. } otherwise: [^ aKeyboardEvent "no hit"]. ^ aKeyboardEvent ignore "hit!!"].
- aKeyboardEvent controlKeyPressed ifTrue: [
aKeyboardEvent keyCharacter caseOf: {
[$+] -> [Preferences increaseFontSize].
[$-] -> [Preferences decreaseFontSize].
[$=] -> [Preferences restoreDefaultFonts].
I'd really love to use this but here are two problems: 1. I cannot hit cmd-+ on an us-layout, because it is cmd-shift-=, and interpreted as cmd-=, restoring the default font. 2. These shortcuts seem to be global and shadow the 'changeEmphasis' of Text/SmaltalkEditor:
'0123456789-=' do: [:char | cmdMap at: char asciiValue + 1 put: #changeEmphasis:].
#changeEmphasis: maps - to underlined and = to struckOut. Since the PasteUpMorph shortcuts seem to dominate the one in TextEditor, it is now impossible to mark text as undlerlined or struck out…
What can we do?
Best regards -Tobias
} otherwise: [^ aKeyboardEvent "no hit"].
^ aKeyboardEvent ignore "hit!!"].
- ^ aKeyboardEvent "no hit"!