mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-23 04:20:56 +00:00
Fix Cmd+[ shortcut to go back in the file selector on macOS
This commit is contained in:
parent
33d6ffb73b
commit
422dcba69b
@ -198,8 +198,8 @@ protected:
|
||||
int unicode = keyMsg->unicodeChar();
|
||||
bool up = (msg->cmdPressed() && scancode == kKeyUp);
|
||||
bool enter = (msg->cmdPressed() && scancode == kKeyDown);
|
||||
bool back = (msg->cmdPressed() && msg->shiftPressed() && unicode == '[');
|
||||
bool forward = (msg->cmdPressed() && msg->shiftPressed() && unicode == ']');
|
||||
bool back = (msg->cmdPressed() && (unicode == '[' || scancode == kKeyOpenbrace));
|
||||
bool forward = (msg->cmdPressed() && (unicode == ']' || scancode == kKeyClosebrace));
|
||||
#else
|
||||
bool up = (msg->altPressed() && scancode == kKeyUp);
|
||||
bool enter = (msg->altPressed() && scancode == kKeyDown);
|
||||
|
@ -32,12 +32,11 @@ retry:;
|
||||
inMode:NSDefaultRunLoopMode
|
||||
dequeue:YES];
|
||||
if (event) {
|
||||
// Intercept Control+Tab and send it to the main NSView. Without
|
||||
// this, the NSApplication intercepts the key combination and
|
||||
// use it to go to the next key view.
|
||||
if (event.type == NSKeyDown &&
|
||||
event.modifierFlags & NSControlKeyMask &&
|
||||
event.keyCode == kVK_Tab) {
|
||||
// Intercept <Control+Tab>, <Cmd+[>, and other keyboard
|
||||
// combinations, and send them directly to the main
|
||||
// NSView. Without this, the NSApplication intercepts the key
|
||||
// combination and use it to go to the next key view.
|
||||
if (event.type == NSKeyDown) {
|
||||
[app.mainWindow.contentView keyDown:event];
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user