From 39e7c443dbbd1aac8e90d3133d1cc6e94cccb534 Mon Sep 17 00:00:00 2001
From: Owen <owenca@users.noreply.github.com>
Date: Thu, 3 Aug 2017 22:51:29 +0000
Subject: [PATCH] Make Esc and Alt-Up keys work for file panels.
Fixes #11979 and #13151
---
src/kits/tracker/FilePanelPriv.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/kits/tracker/FilePanelPriv.cpp b/src/kits/tracker/FilePanelPriv.cpp
index 59cc80d..803e722 100644
a
|
b
|
key_down_filter(BMessage* message, BHandler** handler, BMessageFilter* filter)
|
129 | 129 | |
130 | 130 | int32 modifier = 0; |
131 | 131 | message->FindInt32("modifiers", &modifier); |
| 132 | |
| 133 | if (modifier & B_COMMAND_KEY && key == B_UP_ARROW) { |
| 134 | filter->Looper()->PostMessage(kOpenParentDir); |
| 135 | return B_SKIP_MESSAGE; |
| 136 | } |
| 137 | |
132 | 138 | if (!modifier && key == B_ESCAPE) { |
133 | 139 | if (view->ActivePose()) |
134 | 140 | view->CommitActivePose(false); |
135 | 141 | else if (view->IsFiltering()) |
136 | 142 | filter->Looper()->PostMessage(B_CANCEL, *handler); |
137 | | else |
138 | | filter->Looper()->PostMessage(kCancelButton); |
139 | 143 | |
| 144 | filter->Looper()->PostMessage(kCancelButton); |
140 | 145 | return B_SKIP_MESSAGE; |
141 | 146 | } |
142 | 147 | |