KeyboardProcessor.st
changeset 1445 50bf6580e064
parent 1443 fecba7db7523
child 1448 0c7834bd6c0f
--- a/KeyboardProcessor.st	Thu Dec 14 12:59:23 2000 +0100
+++ b/KeyboardProcessor.st	Fri Dec 15 17:05:59 2000 +0100
@@ -157,13 +157,14 @@
      (which lead to Accept & Cancel resp.)
      Finally, menu-shortcuts are handled."
 
-    |key topView app view action|
+    |key topView wg app view action|
 
     view := event view.
 
     event isKeyPressEvent ifTrue:[
         key := event key.
         topView := modalTopOrNil ? view topView.
+        wg := topView windowGroup.
         app := topView application.
 
         "/ how about global accelerators ?
@@ -189,7 +190,7 @@
         ].
         app notNil ifTrue:[
             topView isModal ifTrue:[
-                topView windowGroup explicitFocusView isNil ifTrue:[
+                (wg notNil and:[wg explicitFocusView isNil]) ifTrue:[
                     (returnIsOKInDialog and:[key == #Return]) ifTrue:[
                         self requestGlobalAutoAccept ifFalse:[^ true].
                         app doAccept.
@@ -205,13 +206,15 @@
         ].
 
         event rawKey isSymbol ifTrue:[
-            (self class isMnemonicKeyEvent:event) ifTrue:[
-                (topView windowGroup processMnemonic:event) ifTrue:[
+            wg notNil ifTrue:[
+                (self class isMnemonicKeyEvent:event) ifTrue:[
+                    (wg processMnemonic:event) ifTrue:[
+                        ^ true
+                    ]
+                ].
+                (wg processShortcut:event) ifTrue:[
                     ^ true
-                ]
-            ].
-            (topView windowGroup processShortcut:event) ifTrue:[
-                ^ true
+                ].
             ].
         ].        
     ].
@@ -258,5 +261,5 @@
 !KeyboardProcessor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/KeyboardProcessor.st,v 1.14 2000-12-08 15:02:41 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/KeyboardProcessor.st,v 1.15 2000-12-15 16:05:59 tm Exp $'
 ! !