Remove esc to quit key bind #298. Remove ctrl+x (cmd+x on mac) to quit key bind #334. Remove FilterEvent app method, it is no longer being used anyway as key binds work correctly.
This commit is contained in:
parent
6462ce59b5
commit
f6ad9a8ca7
|
@ -45,8 +45,13 @@ const wxAcceleratorEntry default_accels[] = {
|
||||||
// maybe make alt-f4 universal as well...
|
// maybe make alt-f4 universal as well...
|
||||||
// FIXME: ctrl-Q does not work on wxMSW
|
// FIXME: ctrl-Q does not work on wxMSW
|
||||||
// FIXME: esc does not work on wxMSW
|
// FIXME: esc does not work on wxMSW
|
||||||
wxAcceleratorEntry(wxMOD_NONE, WXK_ESCAPE, wxID_EXIT),
|
|
||||||
wxAcceleratorEntry(wxMOD_CMD, wxT('X'), wxID_EXIT),
|
// this was annoying people A LOT #334
|
||||||
|
//wxAcceleratorEntry(wxMOD_NONE, WXK_ESCAPE, wxID_EXIT),
|
||||||
|
|
||||||
|
// this was annoying people #298
|
||||||
|
//wxAcceleratorEntry(wxMOD_CMD, wxT('X'), wxID_EXIT),
|
||||||
|
|
||||||
wxAcceleratorEntry(wxMOD_CMD, wxT('Q'), wxID_EXIT),
|
wxAcceleratorEntry(wxMOD_CMD, wxT('Q'), wxID_EXIT),
|
||||||
// FIXME: ctrl-W does not work on wxMSW
|
// FIXME: ctrl-W does not work on wxMSW
|
||||||
wxAcceleratorEntry(wxMOD_CMD, wxT('W'), wxID_CLOSE),
|
wxAcceleratorEntry(wxMOD_CMD, wxT('W'), wxID_CLOSE),
|
||||||
|
|
|
@ -1048,23 +1048,23 @@ void MainFrame::IdentifyRom()
|
||||||
// ctrl-w does not work for close). It's possible another entity is
|
// ctrl-w does not work for close). It's possible another entity is
|
||||||
// grabbing those keys, but I can't track it down.
|
// grabbing those keys, but I can't track it down.
|
||||||
// FIXME: move this to MainFrame
|
// FIXME: move this to MainFrame
|
||||||
int wxvbamApp::FilterEvent(wxEvent& event)
|
//int wxvbamApp::FilterEvent(wxEvent& event)
|
||||||
{
|
//{
|
||||||
//if(frame && frame->IsPaused(true))
|
// //if(frame && frame->IsPaused(true))
|
||||||
return -1;
|
// return -1;
|
||||||
|
//
|
||||||
if (event.GetEventType() == wxEVT_KEY_DOWN) {
|
// if (event.GetEventType() == wxEVT_KEY_DOWN) {
|
||||||
wxKeyEvent& ke = (wxKeyEvent&)event;
|
// wxKeyEvent& ke = (wxKeyEvent&)event;
|
||||||
|
//
|
||||||
for (int i = 0; i < accels.size(); i++) {
|
// for (int i = 0; i < accels.size(); i++) {
|
||||||
if (accels[i].GetKeyCode() == ke.GetKeyCode() && accels[i].GetFlags() == ke.GetModifiers()) {
|
// if (accels[i].GetKeyCode() == ke.GetKeyCode() && accels[i].GetFlags() == ke.GetModifiers()) {
|
||||||
wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED, accels[i].GetCommand());
|
// wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED, accels[i].GetCommand());
|
||||||
ev.SetEventObject(this);
|
// ev.SetEventObject(this);
|
||||||
frame->GetEventHandler()->ProcessEvent(ev);
|
// frame->GetEventHandler()->ProcessEvent(ev);
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return -1;
|
// return -1;
|
||||||
}
|
//}
|
||||||
|
|
|
@ -102,7 +102,7 @@ public:
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
// without this, global accels don't always work
|
// without this, global accels don't always work
|
||||||
int FilterEvent(wxEvent& event);
|
//int FilterEvent(wxEvent& event);
|
||||||
wxAcceleratorEntry_v accels;
|
wxAcceleratorEntry_v accels;
|
||||||
|
|
||||||
// the main configuration
|
// the main configuration
|
||||||
|
|
Loading…
Reference in New Issue