X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5b208a1796ecf1b9ab267d200705b4f3b4d10e3..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/common/uiactioncmn.cpp diff --git a/src/common/uiactioncmn.cpp b/src/common/uiactioncmn.cpp index 18dcbb7d82..bfd5135e0c 100644 --- a/src/common/uiactioncmn.cpp +++ b/src/common/uiactioncmn.cpp @@ -80,6 +80,51 @@ void wxUIActionSimulator::SimulateModifiers(int modifiers, bool isDown) bool wxUIActionSimulator::Char(int keycode, int modifiers) { + switch(keycode) + { + case '0': + keycode = '0'; + break; + case '1': + keycode = '1'; + break; + case '2': + keycode = '2'; + break; + case '3': + keycode = '3'; + break; + case '4': + keycode = '4'; + break; + case '5': + keycode = '5'; + break; + case '6': + keycode = '6'; + break; + case '7': + keycode = '7'; + break; + case '8': + keycode = '8'; + break; + case '9': + keycode = '9'; + break; + case '+': + keycode = '+'; + break; + case '-': + keycode = '-'; + break; + case '.': + keycode = '.'; + break; + default: + break; + }; + Key(keycode, modifiers, true); Key(keycode, modifiers, false); @@ -91,9 +136,6 @@ bool wxUIActionSimulator::Text(const char *s) while ( *s != '\0' ) { const char ch = *s++; - - wxASSERT_MSG( ch, "Only letters are allowed" ); - if ( !Char(ch, isupper(ch) ? wxMOD_SHIFT : 0) ) return false; }