1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-07 20:22:13 +01:00

Handle Alt key down events, specifically for draw tool.

This commit is contained in:
v.audacity
2013-08-09 01:03:34 +00:00
parent 9d87ecd13f
commit 7a4a3e3951
3 changed files with 13 additions and 0 deletions

View File

@@ -1650,6 +1650,9 @@ void AudacityProject::OnScroll(wxScrollEvent & event)
bool AudacityProject::HandleKeyDown(wxKeyEvent & event)
{
if (event.GetKeyCode() == WXK_ALT)
mTrackPanel->HandleAltKey(true);
// Allow the zoom cursor to change to a zoom out cursor
if (event.GetKeyCode() == WXK_SHIFT)
mTrackPanel->HandleShiftKey(true);
@@ -1689,6 +1692,9 @@ bool AudacityProject::HandleChar(wxKeyEvent & event)
bool AudacityProject::HandleKeyUp(wxKeyEvent & event)
{
if (event.GetKeyCode() == WXK_ALT)
mTrackPanel->HandleAltKey(false);
// Allow the Zoom Out cursor back to Zoom In
if (event.GetKeyCode() == WXK_SHIFT)
mTrackPanel->HandleShiftKey(false);