[Mono-winforms-list] Has something changed with the way winforms interact with the keyboard?
Paul
paul at all-the-johnsons.co.uk
Mon Dec 8 05:12:09 EST 2008
Hi,
I have a very simple game which works fine on a Fedora 9 box (uses Mono
1.9.1) but completely fails under F10 (mono 2.0.1) and rawhide (2.2
preview 1).
The game starts fine, but completely fails to interact with any key
press. It's as if X is ignoring the mono window (or at least the events
generated from the window).
The key event code runs like this
private void cTrix_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.X: CurrentBlock.Right(); break;
case Keys.Z: CurrentBlock.Left(); break;
case Keys.K: CurrentBlock.Rotate(); break;
case Keys.M: CurrentBlock.Down(); break;
case Keys.Escape:
tmrGameClock.Enabled = !tmrGameClock.Enabled;
if (tmrGameClock.Enabled)
this.Text = "ctrix";
else
this.Text = "ctrix -- Press 'Esc' to Continue";
break;
default: break;
}
Invalidate();
}
Nothing unusual there, but I'm getting nothing from the game window. Can
anyone else verify this behaviour? It makes no difference if the code is
written in VB.NET or C#, no response from the game.
TTFN
Paul
--
Sie können mich aufreizen und wirklich heiß machen!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20081208/663d6c71/attachment.bin
More information about the Mono-winforms-list
mailing list