Browse Source

rm input tag from iskeyDown;

bjorn 3 years ago
parent
commit
eb46ad68ef
2 changed files with 25 additions and 1 deletions
  1. 25 0
      api/init.lua
  2. 0 1
      api/lovr/system/isKeyDown.lua

+ 25 - 0
api/init.lua

@@ -25070,6 +25070,31 @@ return {
             }
           }
         },
+        {
+          name = "isKeyDown",
+          summary = "Get the state of a key.",
+          description = "Returns whether a key on the keyboard is pressed.",
+          key = "lovr.system.isKeyDown",
+          module = "lovr.system",
+          variants = {
+            {
+              arguments = {
+                {
+                  name = "key",
+                  type = "KeyCode",
+                  description = "The key."
+                }
+              },
+              returns = {
+                {
+                  name = "down",
+                  type = "boolean",
+                  description = "Whether the key is currently pressed."
+                }
+              }
+            }
+          }
+        },
         {
           name = "requestPermission",
           summary = "Request permission to use a feature.",

+ 0 - 1
api/lovr/system/isKeyDown.lua

@@ -1,5 +1,4 @@
 return {
-  tag = 'input',
   summary = 'Get the state of a key.',
   description = 'Returns whether a key on the keyboard is pressed.',
   arguments = {