I'm trying to make moving object using controls. I'm trying to do this using Buttons. The code is
diskPosition = {50, 50}; left = False; right = False; up = False; down = False;
Manipulate[
Graphics[Dynamic[
If[left, diskPosition[[1]] += -.01];
If[right, diskPosition[[1]] += .01];
If[up, diskPosition[[2]] += .01];
If[down, diskPosition[[2]] += -.01];
{Yellow, Disk[diskPosition, 3]}],
PlotRange -> {{0, 100}, {0, 140}}, Background -> Black
],
Row[{Button["\[LongLeftArrow]", left = True;
right = up = down = False],
Column[{Button["\[UpArrow]", up = True;
right = left = down = False],
Button["\[DownArrow]", down = True; right = up = left = False]}],
Button["\[LongRightArrow]", right = True;
left = up = down = False]}]
]
I wonder if I can use random keys on the keyboard? I know how to get "Shift", "Ctrl" and "Alt" with CurrentValue[] but not how to get random keys from keyboard. Some suggestions?