From 5162c2868406a688a97ed57ce76ed2bceb94f55b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 8 Jul 2012 23:22:25 +0000 Subject: [PATCH] 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. --- aegisub/src/audio_display.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index c735aaa51..8272f46c3 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -783,6 +783,7 @@ BEGIN_EVENT_TABLE(AudioDisplay, wxWindow) EVT_SET_FOCUS(AudioDisplay::OnFocus) EVT_KILL_FOCUS(AudioDisplay::OnFocus) EVT_CHAR_HOOK(AudioDisplay::OnKeyDown) + EVT_KEY_DOWN(AudioDisplay::OnKeyDown) END_EVENT_TABLE()