Updated docs

There is still stuff to do
This commit is contained in:
Robert Jelic
2022-08-28 18:18:26 +02:00
parent 53d7b9f70c
commit 4d614372a1
207 changed files with 3868 additions and 3785 deletions

View File

@@ -0,0 +1,21 @@
# onKey
`onKey(self, event, key)`<br>
The computercraft event which triggers this method is `key` and `char`.
Here is a example on how to add a onKey event to your frame:
```lua
local basalt = require("basalt")
local main = basalt.createFrame()
local subFrame = main:addFrame()
:setPosition(3,3)
:setSize(18,6)
function openSubFrame(self, event, key)
if(key==keys.c)then
subFrame:show()
end
end
main:onKey(openSubFrame)
```