Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit fd57957

Browse files
committed
Use a switch block in commandkeydown for more clarity
1 parent d9e3276 commit fd57957

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Toolset/palettes/dictionary/behaviors/revdictionarybehavior.livecodescript

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ end showUpgradeOptions
9393

9494
# bug 17819 enable cmd+c in dictionary
9595
on commandKeyDown pWhich
96-
if pWhich is not "C" and pWhich is not "A" then
97-
if pWhich is "W" then
96+
switch pWhich
97+
case "A"
98+
-- trap Cmd + A for select all
99+
case "C"
100+
-- trap Cmd + C for copy
101+
break
102+
case "W"
98103
close me
99-
else
104+
break
105+
default
100106
pass commandKeyDown
101-
end if
102-
end if
107+
end switch
103108
end commandKeyDown

0 commit comments

Comments
 (0)