--- a/HierarchicalListView.st Sat Mar 09 15:43:39 2019 +0100
+++ b/HierarchicalListView.st Mon Mar 11 11:49:22 2019 +0100
@@ -1204,33 +1204,36 @@
"
<resource: #keyboard( #CursorLeft #CursorRight )>
- |ev item lineNr isCursorLeft|
+ |ev item lineNr isCursorLeft sensor|
enabled ifFalse:[
super keyPress:aKey x:x y:y.
^ self
].
+ sensor := self sensor.
+
((aKey == #CursorDown)
or:[aKey == #CursorUp
or:[aKey == #FocusNext
or:[aKey == #FocusPrevious]]]
) ifTrue:[
- |isUp isDown|
+ |rawKey isUp isDown|
+
+ ev := WindowGroup lastEvent.
+ rawKey := ev rawKey.
- ev := WindowGroup lastEvent.
-
isUp := (aKey == #CursorUp)
- or:[ ev rawKey == #CursorUp
- or:[ ev rawKey == #AltCursorUp ]].
+ or:[ rawKey == #CursorUp
+ or:[ rawKey == #AltCursorUp ]].
isDown := (aKey == #CursorDown)
- or:[ ev rawKey == #CursorDown
- or:[ ev rawKey == #AltCursorDown ]].
+ or:[ rawKey == #CursorDown
+ or:[ rawKey == #AltCursorDown ]].
(isUp | isDown
- and:[ self sensor altDown
- or:[ self sensor metaDown
- or:[ (multipleSelectOk not and:[ self sensor shiftDown ])]]]
+ and:[ sensor altDown
+ or:[ sensor metaDown
+ or:[ (multipleSelectOk not and:[ sensor shiftDown ])]]]
) ifTrue:[
"/ select the next/prev child of the selected item's parent
lineNr := self selectedIndex.
@@ -1280,7 +1283,7 @@
isCursorLeft := (aKey == #CursorLeft).
item isExpanded == isCursorLeft ifTrue:[
- (self sensor ctrlDown or:[self sensor shiftDown]) ifTrue:[
+ (sensor ctrlDown or:[sensor shiftDown]) ifTrue:[
item recursiveToggleExpand.
] ifFalse:[
item toggleExpand.
@@ -1303,7 +1306,7 @@
].
"Modified: / 18-09-2007 / 23:02:09 / cg"
- "Modified: / 13-02-2019 / 15:35:41 / Claus Gittinger"
+ "Modified: / 10-03-2019 / 11:49:58 / Claus Gittinger"
! !
!HierarchicalListView methodsFor:'fetch resources'!