- // a translation table.
- //
-#if 0
- for (pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent() )
- {
- if (pMsg->msg == WM_CHAR)
- if (pWnd->OS2TranslateMessage(pWxmsg))
- return TRUE;
+ // a translation table. OS/2 has case sensative accels, so
+ // this block, coded by BK, removes that and helps make them
+ // case insensative.
+ //
+ if(pMsg->msg == WM_CHAR)
+ {
+ PBYTE pChmsg = (PBYTE)&(pMsg->msg);
+ USHORT uSch = CHARMSG(pChmsg)->chr;
+ bool bRc;
+
+ //
+ // Do not process keyup events
+ //
+ if(!(CHARMSG(pChmsg)->fs & KC_KEYUP))
+ {
+ if((CHARMSG(pChmsg)->fs & (KC_ALT | KC_CTRL)) && CHARMSG(pChmsg)->chr != 0)
+ CHARMSG(pChmsg)->chr = (USHORT)wxToupper((UCHAR)uSch);
+
+
+ for(pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent() )
+ {
+ if((bRc = pWnd->OS2TranslateMessage(pWxmsg)) == TRUE)
+ break;
+ }
+
+ if(!bRc) // untranslated, should restore original value
+ CHARMSG(pChmsg)->chr = uSch;
+ }