Revert "runelite-client: Don't use system specific modifier key names"

This reverts commit 962bc58178.
This commit is contained in:
Adam
2021-01-31 12:34:00 -05:00
parent cdba2ef297
commit ab4bb3bc97

View File

@@ -159,7 +159,7 @@ public class Keybind
String mod = "";
if (modifiers != 0)
{
mod = getModifiersExText(modifiers);
mod = InputEvent.getModifiersExText(modifiers);
}
if (mod.isEmpty() && key.isEmpty())
@@ -177,33 +177,6 @@ public class Keybind
return mod;
}
public static String getModifiersExText(int modifiers)
{
StringBuilder buf = new StringBuilder();
if ((modifiers & InputEvent.META_DOWN_MASK) != 0)
{
buf.append("Meta+");
}
if ((modifiers & InputEvent.CTRL_DOWN_MASK) != 0)
{
buf.append("Ctrl+");
}
if ((modifiers & InputEvent.ALT_DOWN_MASK) != 0)
{
buf.append("Alt+");
}
if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0)
{
buf.append("Shift+");
}
if (buf.length() > 0)
{
buf.setLength(buf.length() - 1); // remove trailing '+'
}
return buf.toString();
}
@Nullable
public static Integer getModifierForKeyCode(int keyCode)
{