←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

Arrow keys wont work!

bigspaceballs's Photo bigspaceballs 08 Mar 2014

I am trying to work on a project in LuaIDE, but it is rather hard to edit it because my left and right arrow keys dont work.
I saw a simalar post before and I tried what was suggested, which was to type into the lua program
"while true do print(table.concat({os.pullEvent()}, ", ")) end" but when I press the up and down keys, it returns a value to me. Same with all the other keys on my laptop, except for the left and right ones, which don't work for any computer or turtle in computecraft, yet I very badly need. I have gotten those two keys to work for me on only two occasions, and no, I do not have an unusual keyboard on my laptop. I event tried to connect a new usb keyboard to it, but it still didn't work! What should I do?
Edited by jonbrozich, 08 March 2014 - 10:17 PM.
Quote

CometWolf's Photo CometWolf 08 Mar 2014

Do they work in Minecraft at all, eg. in the chat?
Quote

bigspaceballs's Photo bigspaceballs 08 Mar 2014

View PostCometWolf, on 08 March 2014 - 10:48 PM, said:

Do they work in Minecraft at all, eg. in the chat?
Yes, they work for everything else in minecraft. e.g: I had Zans minimap installed, and I bounded one of the keys to the left arrow key, and that worked. Like I said, It seems to be a hit or miss thing, it worked twice in the whole time I have had Computercraft. For what reason, I don't know, but I would like to figure it out.
Quote

TheOddByte's Photo TheOddByte 09 Mar 2014

What version of ComputerCraft are you using? And you should try to re-install computercraft to see if that solves anything.
Quote

bigspaceballs's Photo bigspaceballs 09 Mar 2014

I was using .1.5.7, and the arrows keys didn't work on that version. Then I went to the newest beta, and they haven't worked for me in that either. But I'll try reinstalling to see if that fixes anything anyways.
Quote

MKlegoman357's Photo MKlegoman357 09 Mar 2014

You could try a fresh install of Minecraft and ComputerCraft without any other mods. Maybe Zan's minimap is messing with arrow keys.
Quote

valithor's Photo valithor 09 Mar 2014

When you hit the arrow keys using that code you posted did nothing happen or did it return a nil value. If it did return a nil value it would just print a blank line and the program would end.

Computer craft has a Keys api and if it is returning a nil value then for some strange reason your laptop is most likely is pulling from a slot in the keys api table that is not normally used. I do not know why it would do this but that would explain it not working.
Quote

bigspaceballs's Photo bigspaceballs 09 Mar 2014

View Postvalithor, on 09 March 2014 - 10:49 PM, said:

When you hit the arrow keys using that code you posted did nothing happen or did it return a nil value. If it did return a nil value it would just print a blank line and the program would end.

Computer craft has a Keys api and if it is returning a nil value then for some strange reason your laptop is most likely is pulling from a slot in the keys api table that is not normally used. I do not know why it would do this but that would explain it not working.
Nothing would happen. Thats what was weird about it. I would press the up arrow key, and you would return some number, then I pressed the left arrow key, and nothing happened. I was still in the lua prompt. same with the right one. It is like they dont work when I open up the computer interface.
Quote