This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
speedemon24's profile picture

Shift API

Started by speedemon24, 22 November 2012 - 09:48 AM
speedemon24 #1
Posted 22 November 2012 - 10:48 AM
I havea question is there an API that allows the shift button to be held and for the turtle to pick up a block while still holding shift?
Cranium #2
Posted 22 November 2012 - 10:51 AM
The os.pullEvent() will only detect when it is pressed. If a key is held down, it will just spam key events. You can do a little code-jiggery to add a timer to your own events. That way, you can gauge the time between key events, and if it's spamming key events, you can asume it's holding a key down.
No idea how to write that, but it's an idea.