Release Mono RunTime


Ok, found an (ugly, as usual) way to fix that...

I finish the patch and put here how I have done....

monodevelop1.png
 
So, the problem is around a function called ToUnicode that is inside mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs (around line 430, depending on the version).

By putting some trace like


Console.WriteLine("ToUnicode({0},{1}, buffer) called, res={2}, keysym={3}, e.keycode={4}", vkey, scan, res, keysym, e.KeyEvent.keycode);

 

I have seen that all non-working keys are just not recognise, and have a vkey = 252 (i.e. NONAME).

I could try to fully understand how it works and fix it the right way, or do it the quick and ugly way.

So I choose the 2nd  :p ...

I get all "scan" code for the non-recognises keys, using the keysym value from the X11/keysymdef.h, and add a switch just after the last check


Code:
if (e.KeyEvent.keycode == 0 && vkey != (int) VirtualKeys.VK_NONAME) {
// And I couldn't find the keycode so i returned the vkey and was like whatever
Console.Error.WriteLine ("unknown virtual key {0:X}", vkey);
buffer = String.Empty;
return vkey;
}
 
// Special case for Pandora!
if (vkey == 252) {
int pandora = 0;
switch(scan) {
case 16582:
pandora = 0x0040; //@
break;
case 16418:
pandora = 0x0028; //(
break;
case 16419:
pandora = 0x0029; //)
break;
case 16579:
pandora = 0x0021; //!
break;
case 16577:
pandora = 0x005f; //_
break;
case 16581:
pandora = 0x0022; //"
break;
case 16470:
pandora = 0x002b; //+
break;
case 16575:
pandora = 0x00b4; //acute accent
break;
case 16580:
pandora = 0x00a3; //£
break;
case 16516:
pandora = 0x00a5; //yen
break;
case 16583:
pandora = 0x003a; //:
break;
case 16606:
pandora = 0x003f; //?
break;
case 16578:
pandora = 0x0023; //#
break;
case 16576:
pandora = 0x007c; //|
break;
case 16584:
pandora = 0x0024; //$
break;
case 16585:
pandora = 0x20ac; //€
break;
}
if (pandora!= 0)
e.KeyEvent.keycode = XKeysymToKeycode(display, pandora);
}
 

And it seems to works...

 

Now, I backport that to mono 3.2.8 that just finished compiling.

I'll think I'll update Mono RunTime PND tomorrow.

monodevelop2.png
 
Last edited by a moderator:
New build on the repo.

Quite a lot of change, as I updated mono itself to latest version, added basic compiler, and fixed the Window.Forms input problem.

I hope I didn't break anything in the process...

Build 03

-----------

  • Fixed Windows.Form EditBox, so brackets and other caracters can be entered
  • Added mono-basic 2.10
  • Updated mono from 3.2.6 to 3.2.8
 
Thanks for those fixes! I'll let you know if I run into anything else :)
 
Hello,

I have a .NET application I use under WinXP. Is it too optimistic to expect it to run on Pandora? Just in case, I have collected an error log I get when I try to run it. Could you tell me what's wrong?
 

Attachments

  • monolog.txt.gz
    1.2 KB · Views: 360
Last edited by a moderator:
Looks like the SplashScreen of your app, that use libgdiplus to show, crash at the LoadImage... Is the bitmap used in the spash accessible? Maybe it's a simple file not found?
 
Thanks for the clue. The bitmap is probably hidden inside a resource dll, so it's hard to say what the problem is. I will get back to you if I have more questions.
 
The forward-tick (´), pound (£), euro (€), and yen (¥) keys don't register in the textboxes. The tick key isn't very important, but I would like to be able to write monetary values.

Thanks
 
Last edited by a moderator:
You mean Fn-j Fn-k Fn-l and Fn-m ?
I just rechecked and they do work on my Pandora. I tested all keys and they all works. Even composed keys works on my side.
 
Last edited by a moderator:
@pmprog: can you try to first launch codeblocks command line, and then launch monort and try to enter the offending keys, to see if need to copy more libs from codeblocks to monort (I'm thinking of a few x11 libs maybe)...
 
@pmprog: can you try to first launch codeblocks command line, and then launch monort and try to enter the offending keys, to see if need to copy more libs from codeblocks to monort (I'm thinking of a few x11 libs maybe)...
Yes, if I mount CodeBlocks first, they work.
 
@pmprog: can you try to first launch codeblocks command line, and then launch monort and try to enter the offending keys, to see if need to copy more libs from codeblocks to monort (I'm thinking of a few x11 libs maybe)...
Yes, if I mount CodeBlocks first, they work.
Ok, good. I'll update monort with a few more libs soon...
 
What other apps will work with this?
Most .NET or Mono apps that doesn't use native code, and (for now) that doesn't use MonoGame/XNA (as I havn't ported it yet).

Most games I tried either used XNA/MonoGame, or OpenGL with shader, so didn't work :(
 
Last edited by a moderator:
Finally got the specials characters working on MonoRT.

I had to hack libX11 so it search it's locale file releative to the library (and not using some hardocded absolute path).

also, GTK has been updated to 2.24 (not much visible effect) and Pango (font drawing used but GTK) to 1.29.5. This one was very tricky too, and I also had to hack the source to make it load it's module relative to lib path...

I hope everything works now (and that I havn't broken anything in the process).

Build 04

-----------

  • Hack on libs (X11, GTK, Pango) to make them PNDable
  • Updated GTK to 2.24 and Pango to 1.29.5
  • All characters can now be entered on Windows.Form.EditBox
 
Last edited by a moderator:
Back
Top