+// printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d\n",
+// key, m_lastKeyDownConsumed, evt.ControlDown(), evt.AltDown());
+
+ // AltGr keys???
+ // \|@#¬[]{}?£$~ ã,õ,Ã,Õ, ñ, Ñ
+
+ // On (some?) non-US keyboards the AltGr key is required to enter some
+ // common characters. It comes to us as both Alt and Ctrl down so we need
+ // to let the char through in that case, otherwise if only ctrl or only
+ // alt let's skip it.
+ bool ctrl = evt.ControlDown();
+ bool alt = evt.AltDown();
+ bool skip = ((ctrl || alt) && ! (ctrl && alt));
+
+ if (key <= 0xff && key >= 32 && !m_lastKeyDownConsumed && !skip) {