Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api:keyboard [2015/01/14 23:40]
127.0.0.1 external edit
api:keyboard [2020/10/20 14:38]
grantlmul fix link to keyboard.lua
Line 3: Line 3:
 This API allows you to refer to key codes by name, using the `keyboard.keys` table. This is a two-directional table, for example, the value of `keyboard.keys.numpad0` is `0x52`, and the value of `keyboard.keys[0x52]` is the string `numpad0`. This API allows you to refer to key codes by name, using the `keyboard.keys` table. This is a two-directional table, for example, the value of `keyboard.keys.numpad0` is `0x52`, and the value of `keyboard.keys[0x52]` is the string `numpad0`.
  
-Please see [the Lua file containing the API's implementation](https://​github.com/​MightyPirates/​OpenComputers/​blob/​master-MC1.7.10/​src/​main/​resources/​assets/​opencomputers/​loot/​OpenOS/​lib/​keyboard.lua) for the list of available names.+Please see [the Lua file containing the API's implementation](https://​github.com/​MightyPirates/​OpenComputers/​blob/​master-MC1.7.10/​src/​main/​resources/​assets/​opencomputers/​loot/​openos/​lib/​keyboard.lua) for the list of available names.
  
 Additionally it registers event listeners to keep track of the state of individual keys. This internal state can be queried using the following functions: Additionally it registers event listeners to keep track of the state of individual keys. This internal state can be queried using the following functions:
 +
 - `keyboard.isAltDown():​ boolean`  ​ - `keyboard.isAltDown():​ boolean`  ​
   Checks if one of the Alt keys is currently being held by some user.   Checks if one of the Alt keys is currently being held by some user.
Line 16: Line 17:
 - `keyboard.isShiftDown():​ boolean`  ​ - `keyboard.isShiftDown():​ boolean`  ​
   Checks if one of the Shift keys is currently being held by some user.   Checks if one of the Shift keys is currently being held by some user.
- 
  
 [keyboard]: https://​github.com/​MightyPirates/​OpenComputers/​assets/​opencomputers/​lua/​rom/​lib/​keyboard.lua [keyboard]: https://​github.com/​MightyPirates/​OpenComputers/​assets/​opencomputers/​lua/​rom/​lib/​keyboard.lua