^-- that's... not what was requested.
Anyway here's a way to do it (assuming you have RMXP):
If someone want to do a picture-version it'll be welcome.
inside the event (not a common event, but the person you want to talk/kill/perhaps something else)
Go to the conditional branch making dialog or whatever (Somewhere on page 1 in
Event Commands)
Go to page 4 and check the Key radiobutton.
Now select the button you want pressed.
In the dropdown menu (with the keys) is with their standard keyboard buttons:
Down, Left, Right, Up <-- selfexplanary
A:
Shift,
ZB:
Escape,
XC:
Space,
Enter,
CX:
AY:
SZ:
DR:
Page Down,
WL:
Page Up,
QYou selected your key... now what?
You will quickly notice that it's hard to communicate with the person by other keys than
C, so you have to choose how you want it done.
You could do it with
Hero Touch, you just had to keep walking into them while pressing the desired key.
You could also use
Action Key, where you would hold down the desired key while press
C (the normal action button).
Let's say you want the user to hold
Shift to attack.
It would then look something like this:
<>Conditional Branch: Key A pushed
<>Enemy Encounter: Butcher
<>
Else Handler
<>Message: Butcher:
What do you want?
<>
End
<>
I hope this will help you create wonderful games I can enjoy immensely.
Edit:I forgot to tell that you also could make a solution with the
Key Input Processing, but I think it would be more complex.
You could of course also script your way out of it.