Check for audio hotkeys in both key down and char hook

wx doesn't call the keyboard hook when a window has capture, which
results in hotkeys not working while a mouse button is held down. This
usually doesn't matter much, but in the audio display one might want to
play audio while moving a marker. In general checking for hotkeys in
keydown doesn't work, but in the specific cast of marker dragging
keyboard focus is guaranteed to be on the audio display so it works out.

Originally committed to SVN as r6931.
This commit is contained in:
Thomas Goyne 2012-07-08 23:22:25 +00:00
parent 4e53ab3eab
commit 5162c28684
1 changed files with 1 additions and 0 deletions

View File

@ -783,6 +783,7 @@ BEGIN_EVENT_TABLE(AudioDisplay, wxWindow)
EVT_SET_FOCUS(AudioDisplay::OnFocus) EVT_SET_FOCUS(AudioDisplay::OnFocus)
EVT_KILL_FOCUS(AudioDisplay::OnFocus) EVT_KILL_FOCUS(AudioDisplay::OnFocus)
EVT_CHAR_HOOK(AudioDisplay::OnKeyDown) EVT_CHAR_HOOK(AudioDisplay::OnKeyDown)
EVT_KEY_DOWN(AudioDisplay::OnKeyDown)
END_EVENT_TABLE() END_EVENT_TABLE()