@@ -373,7 +373,7 @@ GMTEEditor >> brushButtons: anObject [
373
373
374
374
{
375
375
#category : #building ,
376
- #' squeak_changestamp' : ' TW 7/9 /2024 18 :15'
376
+ #' squeak_changestamp' : ' mcjj 7/11 /2024 16 :15'
377
377
}
378
378
GMTEEditor >> buildWith: builder [
379
379
" builds the editor with ToolBuilder"
@@ -393,7 +393,9 @@ GMTEEditor >> buildWith: builder [
393
393
self createInspectorSpecWithBuilder: builder};
394
394
closeAction: #onClose ;
395
395
minimumExtent: GMTEEditor editorMinimumExtent).
396
-
396
+
397
+ newMorph addKeyboardCaptureFilter: self .
398
+
397
399
self commandBar: (newMorph submorphNamed: ' command bar' ).
398
400
" self commandBar vResizing: #rigid."
399
401
self tileStore: (newMorph submorphNamed: ' tile store' ).
@@ -1022,6 +1024,36 @@ GMTEEditor >> exportMenu [
1022
1024
builder open: aMenuSpec
1023
1025
]
1024
1026
1027
+ {
1028
+ #category : #' input handling' ,
1029
+ #' squeak_changestamp' : ' mcjj 7/11/2024 15:57'
1030
+ }
1031
+ GMTEEditor >> filterEvent: aKeyboardEvent for: anObject [
1032
+ | key |
1033
+
1034
+ aKeyboardEvent isKeystroke
1035
+ ifFalse: [^ aKeyboardEvent].
1036
+
1037
+ key := aKeyboardEvent key.
1038
+
1039
+ aKeyboardEvent commandKeyPressed ifTrue: [
1040
+ aKeyboardEvent shiftPressed
1041
+ ifTrue: [
1042
+ key caseOf: {
1043
+ [$Z ] - > [self redo].
1044
+ } otherwise: [^ aKeyboardEvent " no hit" ].
1045
+ ^ aKeyboardEvent ignore " hit" ]
1046
+ ifFalse: [
1047
+ key caseOf: {
1048
+ [$Z ] - > [self undo].
1049
+ [$Y ] - > [self redo].
1050
+ [$R ] - > [self rotateSelectedTile].
1051
+ } otherwise: [^ aKeyboardEvent " no hit" ].
1052
+ ^ aKeyboardEvent ignore " hit" ]].
1053
+
1054
+ ^ aKeyboardEvent " no hit"
1055
+ ]
1056
+
1025
1057
{
1026
1058
#category : #accessing ,
1027
1059
#' squeak_changestamp' : ' TW 7/9/2024 17:14'
0 commit comments