浏览代码

KeyNames: add/correct javadoc

Stephen Gold 4 年之前
父节点
当前提交
01053ac9e5
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      jme3-core/src/main/java/com/jme3/input/KeyNames.java

+ 8 - 1
jme3-core/src/main/java/com/jme3/input/KeyNames.java

@@ -36,7 +36,7 @@ import static com.jme3.input.KeyInput.*;
 /**
  * Translate key codes (from {@link KeyInput}) to descriptive names.
  *
- * This class has no static methods, yet it can be instantiated. Here's why:
+ * This class has only static methods, yet it can be instantiated. Here's why:
  *
  * It used to be that there was no static getName() method, so the only way to
  * get names was to instantiate a KeyNames. As a consequence, we have
@@ -189,6 +189,13 @@ public class KeyNames {
         KEY_NAMES[KEY_UNLABELED] = "Unlabeled";
     }
 
+    /**
+     * Obtain a descriptive name for the specified key code. Key codes are
+     * defined in {@link KeyInput}.
+     *
+     * @param keyId a key code (≥0, ≤255)
+     * @return the corresponding name, or null if not named
+     */
     public static String getName(int keyId) {
         return KEY_NAMES[keyId];
     }