You should seriously learn about the search function it'd help a lot, but anyways...
Keystate is what youre looking for, it uses scancodes to locate keypresses. Scancodes are codes given to each key on the keyboard, for example:
W = 17
A = 30
S = 31
D = 32
Having the scancode lets you use keystate to do something like so:
DO
IF KEYSTATE(17)=1 THEN PRINT "W"
IF KEYSTATE(30)=1 THEN PRINT "A"
IF KEYSTATE(31)=1 THEN PRINT "S"
IF KEYSTATE(32)=1 THEN PRINT "D"
SYNC
LOOP
Replace the printing with the movement code. Here's a good reference for scancodes, forget who its created by but anyways:
Think it might have been CR that made that gem.