Computer Science Canada

how do i use different keys for things?

Author:  Genisis [ Tue Nov 01, 2005 10:23 am ]
Post subject:  how do i use different keys for things?

for my pong program

i want to us W and S keys how would i put that in?

Author:  Tony [ Tue Nov 01, 2005 10:28 am ]
Post subject: 

Turing:

var chars : array char of boolean
loop
    Input.KeyDown (chars)
    if chars ('w') then
        put "The W key is pressed"
    end if
    if chars ('s') then
        put "The S key is pressed"
    end if
end loop

Author:  [Gandalf] [ Tue Nov 01, 2005 4:51 pm ]
Post subject: 

Why not look at our tutorials instead of asking every question that comes to mind.

http://www.compsci.ca/v2/viewtopic.php?t=8808

Author:  Genisis [ Tue Nov 01, 2005 5:26 pm ]
Post subject: 

because it takes to long

Author:  MysticVegeta [ Tue Nov 01, 2005 7:04 pm ]
Post subject: 

*hint* search button

Author:  Cervantes [ Tue Nov 01, 2005 9:00 pm ]
Post subject: 

Genisis wrote:
because it takes to long

We try our best to help students, but we can only do so if they help themselves. Besides, Tony's short reply is far less than you would get if you read Tony's tutorial on the same topic. Wink


: