"Jazzing it up" is how you learn. : )
Actually... now that I've had a chance to think about what you're doing a little bit, that "Open()" function probably does not belong in a process(delta) loop. Instead, you could have that function triggered when an action is taken.
So... in that process(delta) function above, I'd change it to:
func _process(_delta):
pass
In your main key event object (referring to "keyboard" keys, not key-for-lock keys):
func process_key_event(event):
if(event.is_action_pressed("ui_accept")):
print("ui_accept triggered")
emit_signal("ui_accept_signal")
In your chest object (beware pseudocode below -- the interpreter will fail if you use this literally):
self.connect( "ui_accept_signal", self, "_on_ui_accept_signal")
func _on_ui_accept_signal():
if <character_proximity_to_chest_with_id_condition_is_true>:
Open()
Note that this differs from your current logic for determining proximity, so you may need to shift things around a bit. If the idea I propose sounds interesting... use it; if you have another approach that you'd like to try, then feel free to do that instead.