76 posts
Location
Death City
Posted 17 September 2013 - 05:01 PM
Is there any way I can use Right control instead of left in computercraft? Myne is busted.
375 posts
Location
USA
Posted 17 September 2013 - 05:32 PM
You could detour the os.pullEvent function to have it return the left-control key code when it gets the right-control keycode. Something like this:
local oldPullEvent = os.pullEvent
function os.pullEvent(e)
local eventData = oldPullEvent(e)
if eventData[1] == "key" and eventData[2] == (whatever your leftctrl keycode is) then
eventData[2] = (whatever your rightctrl keycode is)
end
return unpack(eventData)
end
76 posts
Location
Death City
Posted 17 September 2013 - 05:57 PM
Oh you misunderstood, I mean in computer craft (eg when it says "press ctrl to open menu") it doesnt work with rctrl and I was wondering how i could fix it
375 posts
Location
USA
Posted 17 September 2013 - 06:39 PM
Oh you misunderstood, I mean in computer craft (eg when it says "press ctrl to open menu") it doesnt work with rctrl and I was wondering how i could fix it
I didn't. Running the code I gave you in
startup should change the key events to trick programs into thinking you are pressing lctrl, instead of rctrl. To my knowledge, the fact that
edit doesn't accept rctrl for the menu selection isn't a bug.
76 posts
Location
Death City
Posted 18 September 2013 - 06:29 PM
Oh, thanks.