Browse Source

Clarify key repeat behavior;

bjorn 1 year ago
parent
commit
cf27e8c322
2 changed files with 8 additions and 4 deletions
  1. 2 2
      api/init.lua
  2. 6 2
      api/lovr/system/setKeyRepeat.lua

+ 2 - 2
api/init.lua

@@ -38888,10 +38888,10 @@ return {
           name = "setKeyRepeat",
           tag = "system-keyboard",
           summary = "Enable or disable key repeat.",
-          description = "Enables or disables key repeat.",
+          description = "Enables or disables key repeat.  Key repeat affects whether `lovr.keypressed` will be fired multiple times while a key is held down.  The `repeat` parameter of the callback can be used to detect whether a key press comes from a \"repeat\" or not.",
           key = "lovr.system.setKeyRepeat",
           module = "lovr.system",
-          notes = "Key repeat is disabled by default.",
+          notes = "Key repeat is disabled by default.  `lovr.textinput` is not affected by key repeat.",
           related = {
             "lovr.keypressed"
           },

+ 6 - 2
api/lovr/system/setKeyRepeat.lua

@@ -1,7 +1,11 @@
 return {
   tag = 'system-keyboard',
   summary = 'Enable or disable key repeat.',
-  description = 'Enables or disables key repeat.',
+  description = [[
+    Enables or disables key repeat.  Key repeat affects whether `lovr.keypressed` will be fired
+    multiple times while a key is held down.  The `repeat` parameter of the callback can be used to
+    detect whether a key press comes from a "repeat" or not.
+  ]],
   arguments = {
     enable = {
       type = 'boolean',
@@ -15,7 +19,7 @@ return {
       returns = {}
     }
   },
-  notes = 'Key repeat is disabled by default.',
+  notes = 'Key repeat is disabled by default.  `lovr.textinput` is not affected by key repeat.',
   related = {
     'lovr.keypressed'
   }