Skip to content

Commit

Permalink
Fix Finder shortcuts to use keydown
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep committed Dec 18, 2020
1 parent c686f2c commit 21c7df7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Tool-Finder/FinderClassNode.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ FinderClassNode >> childrenItems [
]

{ #category : #'event handling' }
FinderClassNode >> keyStroke: anEvent [
FinderClassNode >> keyDown: anEvent [
(anEvent controlKeyPressed or: [ anEvent commandKeyPressed ]) ifFalse: [ ^ false ].
anEvent keyCharacter == $h ifTrue: [ ^ self browseHierarchy ].
anEvent keyCharacter == $N ifTrue: [ ^ self browseReferences ].
^ super keyStroke: anEvent
^ super keyDown: anEvent
]

{ #category : #'event handling' }
Expand Down
4 changes: 2 additions & 2 deletions src/Tool-Finder/FinderMethodNode.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ FinderMethodNode >> isSingle [
]

{ #category : #'event handling' }
FinderMethodNode >> keyStroke: anEvent [
FinderMethodNode >> keyDown: anEvent [
(anEvent controlKeyPressed or: [ anEvent commandKeyPressed ]) ifFalse: [ ^ false ].
anEvent keyCharacter == $n ifTrue: [ ^ self browseSenders ].
anEvent keyCharacter == $m ifTrue: [ ^ self browseImplementors ].
^ super keyStroke: anEvent
^ super keyDown: anEvent
]

{ #category : #'event handling' }
Expand Down
2 changes: 1 addition & 1 deletion src/Tool-Finder/FinderNode.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FinderNode >> inspectItem [
]

{ #category : #'event handling' }
FinderNode >> keyStroke: anEvent [
FinderNode >> keyDown: anEvent [
(anEvent controlKeyPressed or: [ anEvent commandKeyPressed ]) ifFalse: [ ^ false ].
anEvent keyCharacter == $b ifTrue: [ ^ self browse ].
anEvent keyCharacter == $i ifTrue: [ ^ self inspectItem ]
Expand Down
4 changes: 2 additions & 2 deletions src/Tool-Finder/FinderPragmaNode.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ FinderPragmaNode >> inspectItem [
]

{ #category : #'event handling' }
FinderPragmaNode >> keyStroke: anEvent [
FinderPragmaNode >> keyDown: anEvent [
(anEvent controlKeyPressed or: [ anEvent commandKeyPressed ]) ifFalse: [ ^ false ].
anEvent keyCharacter == $h ifTrue: [ ^ self browseHierarchy ].
anEvent keyCharacter == $N ifTrue: [ ^ self browseReferences ].
^ super keyStroke: anEvent
^ super keyDown: anEvent
]

{ #category : #'event handling' }
Expand Down
11 changes: 5 additions & 6 deletions src/Tool-Finder/FinderUI.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,9 @@ FinderUI >> defaultTreeMorph [
hResizing: #spaceFill;
vResizing: #spaceFill;
resizerWidth: 0;
columnInset: 0;
columnInset: 0;
rowInset: 2;
keystrokeActionSelector: #keyStroke:;
"preferedPaneColor: Color white;"
keyDownActionSelector: #keyDown:;
multiSelection: self multiSelection;
autoMultiSelection: self autoMultiSelection;
isCheckList: self isCheckList;
Expand Down Expand Up @@ -754,9 +753,9 @@ FinderUI >> isSourceSymbol [
^self finder isSourceSymbol
]

{ #category : #'events handling' }
FinderUI >> keyStroke: event [
self selectedNode ifNotNil: [:node | node keyStroke: event]
{ #category : #private }
FinderUI >> keyDown: event [
self selectedNode ifNotNil: [:node | node keyDown: event]
]

{ #category : #private }
Expand Down

0 comments on commit 21c7df7

Please sign in to comment.