Revert "runelite-client: Don't use system specific modifier key names"
This reverts commit 962bc58178.
This commit is contained in:
@@ -159,7 +159,7 @@ public class Keybind
|
|||||||
String mod = "";
|
String mod = "";
|
||||||
if (modifiers != 0)
|
if (modifiers != 0)
|
||||||
{
|
{
|
||||||
mod = getModifiersExText(modifiers);
|
mod = InputEvent.getModifiersExText(modifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.isEmpty() && key.isEmpty())
|
if (mod.isEmpty() && key.isEmpty())
|
||||||
@@ -177,33 +177,6 @@ public class Keybind
|
|||||||
return mod;
|
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
|
@Nullable
|
||||||
public static Integer getModifierForKeyCode(int keyCode)
|
public static Integer getModifierForKeyCode(int keyCode)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user