added several other accel strings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
510d156fc5
commit
e8c504562f
@ -178,7 +178,7 @@ void wxMenu::Append(wxMenuItem *pItem)
|
|||||||
keyCode = wxToupper(current[0U]);
|
keyCode = wxToupper(current[0U]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// it should be a function key
|
// is it a function key?
|
||||||
if ( current[0U] == 'f' && isdigit(current[1U]) &&
|
if ( current[0U] == 'f' && isdigit(current[1U]) &&
|
||||||
(current.Len() == 2 ||
|
(current.Len() == 2 ||
|
||||||
(current.Len() == 3 && isdigit(current[2U]))) ) {
|
(current.Len() == 3 && isdigit(current[2U]))) ) {
|
||||||
@ -187,12 +187,25 @@ void wxMenu::Append(wxMenuItem *pItem)
|
|||||||
|
|
||||||
keyCode = VK_F1 + n - 1;
|
keyCode = VK_F1 + n - 1;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// several special cases
|
||||||
|
current.MakeUpper();
|
||||||
|
if ( current == wxT("DEL") ) {
|
||||||
|
keyCode = VK_DELETE;
|
||||||
|
}
|
||||||
|
else if ( current == wxT("PGUP") ) {
|
||||||
|
keyCode = VK_PRIOR;
|
||||||
|
}
|
||||||
|
else if ( current == wxT("PGDN") ) {
|
||||||
|
keyCode = VK_NEXT;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
wxLogDebug(wxT("Unrecognized accel key '%s', accel "
|
wxLogDebug(wxT("Unrecognized accel key '%s', accel "
|
||||||
"string ignored."), current.c_str());
|
"string ignored."), current.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( keyCode ) {
|
if ( keyCode ) {
|
||||||
// do add an entry
|
// do add an entry
|
||||||
|
Loading…
Reference in New Issue
Block a user