-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18c2f27
commit 460ab2f
Showing
4 changed files
with
41 additions
and
43 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
repository/OpenPonk-Roassal3/OPRSKeyNavigationCanvasInteraction.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Class { | ||
#name : #OPRSKeyNavigationCanvasInteraction, | ||
#superclass : #RSKeyNavigationCanvasInteraction, | ||
#category : #'OpenPonk-Roassal3-Interactions' | ||
} | ||
|
||
{ #category : #events } | ||
OPRSKeyNavigationCanvasInteraction >> processKeyDown: evt [ | ||
|
||
| keyName | | ||
keyName := evt keyName. | ||
keyName = #I ifTrue: [ ^ self ]. | ||
keyName = #O ifTrue: [ ^ self ]. | ||
(#( #+ #PLUS #KP_ADD ) includes: keyName) ifTrue: [ | ||
^ self zoomIn: evt canvas ]. | ||
(#( #- #MINUS #KP_SUBTRACT ) includes: keyName) ifTrue: [ | ||
^ self zoomOut: evt canvas ]. | ||
^ super processKeyDown: evt | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters