Keyboard.isKeyDown(keyboard.keys.space) and other variants are always returning nil and i'm not sure why!
here's my code
keyboard = require("keyboard")
while true do
print(keyboard.isKeyDown(keyboard.keys.space))
end
this returns nil over and over. no amount of button pressing changes the output for whatever reason
any ideas why?
I'm writing a custom OS for educational purposes and I'm having issues getting keyboard input.
Everything completely works in OpenOS so everything is hooked up correctly.
My init.lua code
Here is my keyboard code
I've copied the dofile function from OpenOS so it should work with my code.
Hi!
Here is key button receiver code:
type, _, char, _ = computer.pullSignal() --Receiving input
while true do
if type = "key_up" then
print(char)
end
end
And here is problem: when I dont touch keyboard it prints 116