report all ASCII keys, not just the US-ASCII ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
486ac2444d
commit
59db511380
@ -353,7 +353,6 @@ void TextWindow::LogEvent(const wxChar *name, wxKeyEvent& event)
|
||||
{
|
||||
wxString key;
|
||||
long keycode = event.KeyCode();
|
||||
{
|
||||
switch ( keycode )
|
||||
{
|
||||
case WXK_BACK: key = _T("BACK"); break;
|
||||
@ -461,11 +460,17 @@ void TextWindow::LogEvent(const wxChar *name, wxKeyEvent& event)
|
||||
|
||||
default:
|
||||
{
|
||||
if ( wxIsprint((int)keycode) )
|
||||
key.Printf(_T("'%c'"), (char)keycode);
|
||||
else if ( keycode > 0 && keycode < 27 )
|
||||
if ( keycode < 256 )
|
||||
{
|
||||
if ( keycode == 0 )
|
||||
key.Printf(_T("NUL"));
|
||||
else if ( keycode < 27 )
|
||||
key.Printf(_T("Ctrl-%c"), _T('A') + keycode - 1);
|
||||
else
|
||||
key.Printf(_T("'%c'"), (unsigned char)keycode);
|
||||
}
|
||||
else
|
||||
{
|
||||
key.Printf(_T("unknown (%ld)"), keycode);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user