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:
Marc Jessome
2021-07-03 19:03:03 -04:00
committed by Vadim Zeitlin
parent a37629b035
commit a052557af3
6 changed files with 23 additions and 1 deletions

View File

@@ -6303,6 +6303,8 @@ MSWInitAnyKeyEvent(wxKeyEvent& event,
event.m_rawCode = (wxUint32) wParam;
event.m_rawFlags = (wxUint32) lParam;
event.SetTimestamp(::GetMessageTime());
event.m_isRepeat = (HIWORD(lParam) & KF_REPEAT) == KF_REPEAT;
}
} // anonymous namespace