You'll need to store the locations in a list, I think. Player interact will only work to trigger one function.
As far as I know, we haven't figured out a way to programically detect in a mod what specific key a player presses on the keyboard, unless that key is wasd or shift maybe.
For example, you can detect if someone is 'sneaking'. This is usually set to the player's shift key. You can see what keys are tied to sneaking and walking, etc by checking your minecraft's options < settings menu.
(click to see more info)
Description: an example program to determine if a player is sneaking...