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

Arrow Keys Not Working

Started by yoyosamo, 26 July 2013 - 10:59 PM
yoyosamo #1
Posted 27 July 2013 - 12:59 AM
Hello,

When in a ComputerCraft computer (Not minecraft chat, etc.) it doesn't allow me to use the left or right arrow keys (Up and down still work).
I have tried restarting my game. Also, I read this post and tried using

while true do print(table.concat({os.pullEvent()}, ", ")) end
in the lua console and when pressing the Left and Right keys it doesn't work and if another key is pressed it does work.

Thanks in advance :)/>/>
~ Yoyosamo
Lyqyd #2
Posted 29 July 2013 - 10:43 AM
Split into new topic.
Bubba #3
Posted 29 July 2013 - 10:47 AM
Edit: Nevermind, you said they work for other applications. Weird. Have you tried re installing Computercraft?
Thib0704 #4
Posted 29 July 2013 - 12:13 PM
Try To use an other code :

running = true
while running do
evt,key = os.pullEvent("key")
print(key)
end
running = false

and tell us if that will work.
Bubba #5
Posted 29 July 2013 - 12:34 PM
Try To use an other code :

running = true
while running do
evt,key = os.pullEvent("key")
print(key)
end
running = false

and tell us if that will work.

That's the same exact code as what he already ran. Just in a different form.

@OP Could you please go to this website and copy/paste the result of hitting those keys in a response?
ValorCat #6
Posted 18 August 2013 - 09:26 PM
Why did this thread die? I'm having this problem too, exactly the same as the OP.

@Bubba, here's the results from that site:

LEFT ARROW:

keydown keyCode=37 (%) which=37 (%) charCode=0
keyup keyCode=37 (%) which=37 (%) charCode=0

RIGHT ARROW:


keydown keyCode=39 (') which=39 (') charCode=0
keyup keyCode=39 (') which=39 (') charCode=0

If anyone can help, that would be awesome. Because of this, I can't print or close programs (without CTRL + T, that is), so it's a bit of a nuisance.

Thanks!
Bubba #7
Posted 18 August 2013 - 10:35 PM
Hmm. Well the keys seem to be sending the correct events, so it must have something to do with either Minecraft or ComputerCraft.

Can you bind a movement or inventory to the arrow keys and see if they work in Minecraft?