Add wxKeyEvent::IsAutoRepeat()
The new method is currently supported in Qt, Cocoa, MSW ports (i.e. all major ones except for wxGTK). Keyboard example updated with a "Repeat" column. Closes https://github.com/wxWidgets/wxWidgets/pull/2414
This commit is contained in:
committed by
Vadim Zeitlin
parent
a37629b035
commit
a052557af3
@@ -235,7 +235,7 @@ MyFrame::MyFrame(const wxString& title)
|
||||
wxTE_READONLY);
|
||||
headerText->SetValue(
|
||||
" event key KeyCode mod UnicodeKey "
|
||||
" RawKeyCode RawKeyFlags Position");
|
||||
" RawKeyCode RawKeyFlags Position Repeat");
|
||||
|
||||
|
||||
m_logText = new wxTextCtrl(this, wxID_ANY, "",
|
||||
@@ -538,6 +538,7 @@ void MyFrame::LogEvent(const wxString& name, wxKeyEvent& event)
|
||||
" not-set not-set"
|
||||
#endif
|
||||
" (%5d,%5d)"
|
||||
" %s"
|
||||
"\n",
|
||||
name,
|
||||
GetKeyName(event),
|
||||
@@ -556,6 +557,7 @@ void MyFrame::LogEvent(const wxString& name, wxKeyEvent& event)
|
||||
#endif
|
||||
, event.GetX()
|
||||
, event.GetY()
|
||||
, event.IsAutoRepeat() ? "Yes" : "No"
|
||||
);
|
||||
|
||||
m_logText->AppendText(msg);
|
||||
|
Reference in New Issue
Block a user