- if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
- {
- wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
- event.SetEventObject( this );
- if ( !GetEventHandler()->ProcessEvent(event) )
- event.Skip();
- }
- else
- event.Skip();
+ // Fix by Marcel Rasche to allow Alt-Ctrl insertion of special characters
+ switch(event.KeyCode())
+ {
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case '|':
+ case '~':
+ case '\\':
+ {
+ char c=(char)event.KeyCode();
+ *this << c;
+ }
+ break;
+ }
+ if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
+ {
+ wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
+ event.SetEventObject( this );
+ if ( GetEventHandler()->ProcessEvent(event) )
+ return;
+ }
+ else if ( event.KeyCode() == WXK_TAB ) {
+ wxNavigationKeyEvent event;
+ event.SetDirection(!(::GetKeyState(VK_SHIFT) & 0x100));
+ event.SetWindowChange(FALSE);
+ event.SetEventObject(this);
+
+ if ( GetEventHandler()->ProcessEvent(event) )
+ return;
+ }
+
+ event.Skip();