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

CC Controllers

Started by Antelux, 19 November 2012 - 02:11 PM
Antelux #1
Posted 19 November 2012 - 03:11 PM
Basically, when you have a controller out and press a certain button, it will broadcast something along the lines of
button = a, – if the "a" key is pressed
button = upArrow, – if the "upArrow" key is pressed
Etc.

this can be used for games running on the monitor. Do if a game were running on the monitor and I pressed a key, it would do something. This would be great for the people making gaming consoles. If you wanted to play a game via the monitor from the computer, the computer screen would block the view of the monitor. The controller would not. A example:

while true do
button = rednet.receive()
if button = 1 then
mon.write("You pressed the 1 key!")
break
end
elseif button = 2 then
mon.write("You pressed the 2 key!")
break
end
end

And so on.
It can detect ANY key (a key like "a" pressed uppercase will be sent as "A" instead of "a")

Let me know what you guys think :(/>/>
Cranium #2
Posted 19 November 2012 - 05:56 PM
So you want to be able to attach to the GUI, but not bring up the GUI? That would definitely cause problems in my opinion…
Sceppie #3
Posted 19 November 2012 - 11:18 PM
not gonna happen. Read the sticky "WHAT NOT TO POST" . Last line:

"Do not suggest key_up/key_down, it can't be added because of it being confusing in a multiuser environment."
Cloudy #4
Posted 19 November 2012 - 11:38 PM
not gonna happen. Read the sticky "WHAT NOT TO POST" . Last line:

"Do not suggest key_up/key_down, it can't be added because of it being confusing in a multiuser environment."

This suggestion has nothing to do with that. If people start using that sticky as an excuse to shoot down other ideas then it will be removed.
Sebra #5
Posted 20 November 2012 - 02:59 AM
I suggest keyboard peripheral several times to allow key events without GUI. Drown in threads :(/>/>
There is a peripheral, able to control computer without GUI. Try it.