diff --git a/SwaImageConfiguration.st b/SwaImageConfiguration.st index ebc8b2b..08b87b9 100644 --- a/SwaImageConfiguration.st +++ b/SwaImageConfiguration.st @@ -167,7 +167,28 @@ Utilities setAuthorInitials: 'hpi'. "changed at end" "-=-=-=-=-=" "w shortcut to delete windows - experimental for SWA WiSe 23/24" +(Smalltalk at: #SystemWindow) compile: 'filterEvent: aKeyboardEvent for: anObject + "Provide keyboard shortcuts." + aKeyboardEvent isKeystroke + ifFalse: [^ aKeyboardEvent]. + aKeyboardEvent hand halo ifNotNil: [ : halo | halo target isSystemWindow ifTrue: [ aKeyboardEvent hand removeHalo ] ]. + + aKeyboardEvent commandKeyPressed ifTrue: [ + aKeyboardEvent keyCharacter caseOf: { + [$\] -> [self class sendTopWindowToBack]. + [Character escape] -> [self class deleteTopWindow]. + [$w] -> [self class deleteTopWindow]. + [$/] -> [self class bringWindowUnderHandToFront]. + } otherwise: [^ aKeyboardEvent "no hit"]. + ^ aKeyboardEvent ignore "hit!!"]. + + aKeyboardEvent controlKeyPressed ifTrue: [ + aKeyboardEvent keyCharacter caseOf: { + [Character escape] -> [self world findWindow: aKeyboardEvent]. + } otherwise: [^ aKeyboardEvent "no hit"]. + ^ aKeyboardEvent ignore "hit!!"]. + ^ aKeyboardEvent "no hit"'. "-=-=-=-=-=" "Remove Git Updates from PreferenceWizard as we use a special git version"