Skip to content

Commit 388569e

Browse files
authored
Close window on ESC keypress (#3992)
1 parent 55a7a88 commit 388569e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/open3d/visualization/gui/Window.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,8 @@ void Window::OnKeyEvent(const KeyEvent& e) {
11741174
this_mod = int(KeyModifier::ALT);
11751175
} else if (e.key == KEY_META) {
11761176
this_mod = int(KeyModifier::META);
1177+
} else if (e.key == KEY_ESCAPE) {
1178+
Close();
11771179
}
11781180

11791181
if (e.type == KeyEvent::UP) {

0 commit comments

Comments
 (0)