diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-20 17:20:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-20 17:20:24 +0800 |
commit | 15e011e334099a9c0c6bc34399fb90769600210f (patch) | |
tree | bb05a8349a61d6e19d59c8582b5e9e5a965c336a /meta/3rd/love2d/library/love.keyboard.lua | |
parent | 002e0c1673fdc5bd76331aaa1359cbb0925dad2e (diff) | |
download | lua-language-server-15e011e334099a9c0c6bc34399fb90769600210f.zip |
update
Diffstat (limited to 'meta/3rd/love2d/library/love.keyboard.lua')
-rw-r--r-- | meta/3rd/love2d/library/love.keyboard.lua | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/meta/3rd/love2d/library/love.keyboard.lua b/meta/3rd/love2d/library/love.keyboard.lua index 87674b27..00cb9677 100644 --- a/meta/3rd/love2d/library/love.keyboard.lua +++ b/meta/3rd/love2d/library/love.keyboard.lua @@ -1,3 +1,5 @@ +---@meta + ---@class love.keyboard love.keyboard = {} @@ -8,8 +10,8 @@ love.keyboard = {} --- ---Scancodes are useful for creating default controls that have the same physical locations on on all systems. --- ----@param scancode love.keyboard.Scancode # The scancode to get the key from. ----@return love.keyboard.KeyConstant key # The key corresponding to the given scancode, or 'unknown' if the scancode doesn't map to a KeyConstant on the current system. +---@param scancode love.Scancode # The scancode to get the key from. +---@return love.KeyConstant key # The key corresponding to the given scancode, or 'unknown' if the scancode doesn't map to a KeyConstant on the current system. function love.keyboard.getKeyFromScancode(scancode) end --- @@ -19,8 +21,8 @@ function love.keyboard.getKeyFromScancode(scancode) end --- ---Scancodes are useful for creating default controls that have the same physical locations on on all systems. --- ----@param key love.keyboard.KeyConstant # The key to get the scancode from. ----@return love.keyboard.Scancode scancode # The scancode corresponding to the given key, or 'unknown' if the given key has no known physical representation on the current system. +---@param key love.KeyConstant # The key to get the scancode from. +---@return love.Scancode scancode # The scancode corresponding to the given key, or 'unknown' if the given key has no known physical representation on the current system. function love.keyboard.getScancodeFromKey(key) end --- @@ -44,7 +46,7 @@ function love.keyboard.hasTextInput() end --- ---Checks whether a certain key is down. Not to be confused with love.keypressed or love.keyreleased. --- ----@param key love.keyboard.KeyConstant # The key to check. +---@param key love.KeyConstant # The key to check. ---@return boolean down # True if the key is down, false if not. function love.keyboard.isDown(key) end @@ -53,10 +55,9 @@ function love.keyboard.isDown(key) end --- ---Unlike regular KeyConstants, Scancodes are keyboard layout-independent. The scancode 'w' is used if the key in the same place as the 'w' key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. --- ----@param scancode love.keyboard.Scancode # A Scancode to check. ----@param ... love.keyboard.Scancode # Additional Scancodes to check. +---@param scancode love.Scancode # A Scancode to check. ---@return boolean down # True if any supplied Scancode is down, false if not. -function love.keyboard.isScancodeDown(scancode, ...) end +function love.keyboard.isScancodeDown(scancode) end --- ---Enables or disables key repeat for love.keypressed. It is disabled by default. |