diff --git a/app/views/commands/_terminal.html.erb b/app/views/commands/_terminal.html.erb
index 62bd7ecbf..6efee7eff 100644
--- a/app/views/commands/_terminal.html.erb
+++ b/app/views/commands/_terminal.html.erb
@@ -4,7 +4,7 @@
terminal_confirmation_class: "terminal--confirmation",
terminal_help_class: "terminal--showing-help",
toggle_class_toggle_class: "terminal--open",
- action: "keydown->terminal#handleKeyPress keydown->navigable-list#navigate focusin->navigable-list#select keydown.esc->toggle-class#remove:stop keydown.esc->terminal#focus keydown.esc->navigable-list#selectLast" } do %>
+ action: "keydown->terminal#handleKeyPress keydown->navigable-list#navigate focusin->navigable-list#select keydown.esc->toggle-class#remove:stop keydown.esc->terminal#focus keydown.esc->navigable-list#selectLast keydown.esc@document->terminal#hideHelpMenu" } do %>
<%= turbo_frame_tag :recent_commands, src: commands_path, refresh: "morph" %>
<%= render "commands/form" %>