mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Batting 1000 tonight...make sure navigation works on Windows.
This commit is contained in:
parent
64e1136f06
commit
4cd7757cf4
@ -1123,7 +1123,6 @@ int AudacityApp::FilterEvent(wxEvent & event)
|
||||
((wxWindow *)e.GetEventObject())->SetFocus();
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
return Event_Skip;
|
||||
|
@ -1194,7 +1194,7 @@ void AudacityProject::CreateMenusAndCommands()
|
||||
c->AddCommand(wxT("TrackGainInc"), _("Increase gain on focused track"), FN(OnTrackGainInc), wxT("Alt+Shift+Up"));
|
||||
c->AddCommand(wxT("TrackGainDec"), _("Decrease gain on focused track"), FN(OnTrackGainDec), wxT("Alt+Shift+Down"));
|
||||
// use "wantevent" to eat the KEY_UP event...fixes a problem on Windows where the key up selects the "Mono" item
|
||||
c->AddCommand(wxT("TrackMenu"), _("Open menu on focused track"), FN(OnTrackMenu), wxT("Shift+M\twantevent"));
|
||||
c->AddCommand(wxT("TrackMenu"), _("Open menu on focused track"), FN(OnTrackMenu), wxT("Shift+M\tignoredown"));
|
||||
c->AddCommand(wxT("TrackMute"), _("Mute/Unmute focused track"), FN(OnTrackMute), wxT("Shift+U"));
|
||||
c->AddCommand(wxT("TrackSolo"), _("Solo/Unsolo focused track"), FN(OnTrackSolo), wxT("Shift+S"));
|
||||
c->AddCommand(wxT("TrackClose"), _("Close focused track"), FN(OnTrackClose), wxT("Shift+C"));
|
||||
|
@ -735,6 +735,7 @@ int CommandManager::NewIdentifier(wxString name,
|
||||
tmpEntry->mask = mDefaultMask;
|
||||
tmpEntry->enabled = true;
|
||||
tmpEntry->wantevent = (label.Find(wxT("\twantevent")) != wxNOT_FOUND);
|
||||
tmpEntry->ignoredown = (label.Find(wxT("\tignoredown")) != wxNOT_FOUND);
|
||||
tmpEntry->isMeta = false;
|
||||
|
||||
// Key from preferences overridse the default key given
|
||||
@ -985,14 +986,18 @@ bool CommandManager::HandleKey(wxKeyEvent &evt, wxUint32 flags, wxUint32 mask)
|
||||
{
|
||||
wxString keyStr = KeyEventToKeyString(evt);
|
||||
CommandListEntry *entry = mCommandKeyHash[keyStr];
|
||||
if (evt.GetEventType() == wxEVT_KEY_DOWN)
|
||||
{
|
||||
return HandleCommandEntry( entry, flags, mask, &evt );
|
||||
}
|
||||
|
||||
if (entry && entry->wantevent)
|
||||
if (entry)
|
||||
{
|
||||
return HandleCommandEntry( entry, flags, mask, &evt );
|
||||
if (evt.GetEventType() == wxEVT_KEY_DOWN && !entry->ignoredown)
|
||||
{
|
||||
return HandleCommandEntry( entry, flags, mask, &evt );
|
||||
}
|
||||
|
||||
if (evt.GetEventType() == wxEVT_KEY_UP && (entry->wantevent || entry->ignoredown))
|
||||
{
|
||||
return HandleCommandEntry( entry, flags, mask, &evt );
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -58,6 +58,7 @@ struct CommandListEntry
|
||||
int count;
|
||||
bool enabled;
|
||||
bool wantevent;
|
||||
bool ignoredown;
|
||||
bool isMeta;
|
||||
wxUint32 flags;
|
||||
wxUint32 mask;
|
||||
|
@ -418,9 +418,9 @@ void KeyConfigPrefs::OnHotkeyKeyDown(wxKeyEvent & e)
|
||||
// active, buttons on the Mac do not accept focus and all the
|
||||
// controls between this one and the tree control are buttons.
|
||||
if (e.GetKeyCode() == WXK_TAB) {
|
||||
Navigate(e.ShiftDown()
|
||||
? wxNavigationKeyEvent::IsBackward
|
||||
: wxNavigationKeyEvent::IsForward);
|
||||
NavigateIn(e.ShiftDown()
|
||||
? wxNavigationKeyEvent::IsBackward
|
||||
: wxNavigationKeyEvent::IsForward);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user