|
@@ -6,8 +6,7 @@ A keyboard module for LÖVR.
|
|
Usage
|
|
Usage
|
|
---
|
|
---
|
|
|
|
|
|
-Copy `lovr-keyboard.lua` to your project and require it. I like to put it on the `lovr` global so
|
|
|
|
-I can treat it like any other module:
|
|
|
|
|
|
+Copy `lovr-keyboard.lua` to your project and require it. I like to put it on the `lovr` global like this:
|
|
|
|
|
|
```lua
|
|
```lua
|
|
lovr.keyboard = require 'lovr-keyboard'
|
|
lovr.keyboard = require 'lovr-keyboard'
|
|
@@ -20,8 +19,8 @@ end
|
|
API
|
|
API
|
|
---
|
|
---
|
|
|
|
|
|
-- `keyboard.isDown(key)` Returns whether or not the specified key is down. Currently letters,
|
|
|
|
- numbers, and 'space' are supported.
|
|
|
|
|
|
+- `keyboard.isDown(key, ...)` Returns whether any of the specified keys are held down. The names of
|
|
|
|
+ all the supported keys can be found [here](https://github.com/bjornbytes/lovr-keyboard/blob/master/lovr-keyboard.lua#L15).
|
|
- `lovr.keypressed(key)` Called when a key is pressed.
|
|
- `lovr.keypressed(key)` Called when a key is pressed.
|
|
- `lovr.keyreleased(key)` Called when a key is released.
|
|
- `lovr.keyreleased(key)` Called when a key is released.
|
|
|
|
|