[Cuis-dev] Update: Alt+Return as a full screen toggle shortcut
ken.dickey at whidbey.com
ken.dickey at whidbey.com
Sun Dec 20 15:39:00 PST 2020
On 2020-12-20 21:25, Mauro Rizzi wrote:
..
> shouldOverride := aMorph shouldOverride: self
I am suggesting that if the Morph processes the keystroke, it _has_
overriden and _does NOT need_ a #shouldOverride method.
So
vvv============vvv
KeyBoardEvent>>
sentTo: aMorph localPosition: positionInAMorph
"Dispatch the receiver into anObject"
type == #keystroke ifTrue: [
self isFindClassShortcut
ifTrue: [ ^ BrowserWindow findClass].
self isCloseWindowShortcut
ifTrue: [ ^ self closeCurrentWindowOf: aMorph ].
^ aMorph processKeystroke: self
localPosition: positionInAMorph ].
type == #keyDown ifTrue: [
^ aMorph
processKeyDown: self
localPosition: positionInAMorph ].
type == #keyUp ifTrue: [
^ aMorph
processKeyUp: self
localPosition: positionInAMorph ].
(self wasHandled)
ifTrue: [^aMorph] "done"
ifFalse: [<globaldefaultKeyHandler> handleKeyEvent: self]
^^^============^^^
Note: I am not an expert here. Just a guess..
Prototype is best.
-KenD
More information about the Cuis-dev
mailing list