Sort of a starting hunch, but you could either approach it (or do both, very likely) with button presses and hitboxes (for interactive objects) and have certain keys do x, and have a variable checking each key check if an action with the object was already done, and if so, prevent it. The other method, for NPCs, is probably a textbox, where you'll have a textbox graphic and text set up to appear with it (and then disappear on key release) when talking to someone.
I'm not sure of the exact eventing logistics, but you could have multiple texts set, with each having an arrow pointing to it. Set the mouse up to use a cursor/hand icon to select an arrow or have the hand icon restricted to certain x/y positions (at your discretion) and use the down/up keys to move it next to an arrow, and do most of the jist I suggested for key presses (when arrow is clicked or when you hit enter, set a variable and then use that as a condition both for checking for future conditions and to prevent the same dialog from reoccurring) and that's it.