MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / validShortcut

Method validShortcut

ij/src/main/java/ij/Menus.java:1700–1710  ·  view source on GitHub ↗
(String shortcut)

Source from the content-addressed store, hash-verified

1698 }
1699
1700 static boolean validShortcut(String shortcut) {
1701 int len = shortcut.length();
1702 if (shortcut.equals(""))
1703 return true;
1704 else if (len==1)
1705 return true;
1706 else if (shortcut.startsWith("F") && (len==2 || len==3))
1707 return true;
1708 else
1709 return false;
1710 }
1711
1712 /** Returns 'true' if this keyboard shortcut is in use. */
1713 public static boolean shortcutInUse(String shortcut) {

Callers 1

installPluginMethod · 0.95

Calls 3

startsWithMethod · 0.80
lengthMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected