MenuView.st
changeset 521 b8c979a06e4a
parent 520 1d73d1cc23ed
child 543 a18d346f1585
--- a/MenuView.st	Tue Mar 26 16:26:53 1996 +0100
+++ b/MenuView.st	Tue Mar 26 16:28:48 1996 +0100
@@ -2148,57 +2148,25 @@
     "/ but want to show the untranslated (inverse keyBoardMapped) key & modifier
     "/
 
-    untranslatedKey := device keyboardMap keyAtValue:aSymbolicKey ifAbsent:nil.
-    untranslatedKey notNil ifTrue:[
-        "/
-        "/ some modifier-key combination ?
-        "/
-        (untranslatedKey startsWith:#Cmd) ifTrue:[
-            ^ (self shortKeyPrefixFor:#Cmd) , (untranslatedKey copyFrom:4)
-        ].
-        (untranslatedKey startsWith:#Alt) ifTrue:[
-            ^ (self shortKeyPrefixFor:#Alt) , (untranslatedKey copyFrom:4)
-        ].
-        (untranslatedKey startsWith:#Meta) ifTrue:[
-            ^ (self shortKeyPrefixFor:#Meta) , (untranslatedKey copyFrom:5)
-        ].
-        (untranslatedKey startsWith:#Ctrl) ifTrue:[
-            ^ (self shortKeyPrefixFor:#Ctrl) , (untranslatedKey copyFrom:5)
-        ].
-        "/
-        "/ a function key ?
-        "/
-        (untranslatedKey startsWith:'F') ifTrue:[
-            (untranslatedKey size > 1) ifTrue:[
-                (untranslatedKey at:2) isDigit ifTrue:[
-                    ^ untranslatedKey
-                ]
-            ]
-        ].
-        "/
-        "/ some other special key ?
-        "/
-        untranslatedKey isSymbol ifTrue:[
-            ^ untranslatedKey
-        ]
+    untranslatedKey := device keyboardMap keyAtValue:aSymbolicKey ifAbsent:aSymbolicKey.
+
+    "/
+    "/ some modifier-key combination ?
+    "/
+    (untranslatedKey startsWith:#Cmd) ifTrue:[
+        ^ (self shortKeyPrefixFor:#Cmd) , (untranslatedKey copyFrom:4)
     ].
-    "/
-    "/ explicit modifier-key combination ?
-    "/
-    (aSymbolicKey startsWith:#Cmd) ifTrue:[
-        ^ (self shortKeyPrefixFor:#Cmd) , (aSymbolicKey copyFrom:4)
+    (untranslatedKey startsWith:#Alt) ifTrue:[
+        ^ (self shortKeyPrefixFor:#Alt) , (untranslatedKey copyFrom:4)
     ].
-    (aSymbolicKey startsWith:#Alt) ifTrue:[
-        ^ (self shortKeyPrefixFor:#Alt) , (aSymbolicKey copyFrom:4)
+    (untranslatedKey startsWith:#Meta) ifTrue:[
+        ^ (self shortKeyPrefixFor:#Meta) , (untranslatedKey copyFrom:5)
     ].
-    (aSymbolicKey startsWith:#Meta) ifTrue:[
-        ^ (self shortKeyPrefixFor:#Meta) , (aSymbolicKey copyFrom:5)
+    (untranslatedKey startsWith:#Ctrl) ifTrue:[
+        ^ (self shortKeyPrefixFor:#Ctrl) , (untranslatedKey copyFrom:5)
     ].
-    (aSymbolicKey startsWith:#Ctrl) ifTrue:[
-        ^ (self shortKeyPrefixFor:#Ctrl) , (aSymbolicKey copyFrom:5)
-    ].
-
-    ^ aSymbolicKey
+
+    ^ untranslatedKey
 
     "Created: 28.2.1996 / 18:20:09 / cg"
     "Modified: 20.3.1996 / 17:03:18 / cg"
@@ -2458,5 +2426,5 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.67 1996-03-26 15:26:53 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.68 1996-03-26 15:28:48 ca Exp $'
 ! !