User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Linux x64?

26 Jun 2014, 12:15

Hmmm... yes, we have a dependency to that library to get stack traces. I though that library was standard. Let me see if we can avoid it. Meanwhile can you install it (binutils-dev package in this distro) in your system to verify that rest of things are working?
I've installed binutils-dev, but it doesn't contains libbfd-2.22-system.so.
Symbolic link seems to help. Testing now...
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Linux x64?

26 Jun 2014, 12:48

Oh no... keyboard input is not working :( ... I've tried some NoesisGUI samples and our game build also - and everywhere I was unable to print text into textboxes (only Enter/Escape works, but not symbol keys). Do you have same issue?
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Linux x64?

26 Jun 2014, 16:18

It is working fine in our test machine but discovered that it is failing in another setup machine (a VM). I don't know why but in this configuration Unity is sending us both Key and Char events in the same call. I would say that it is a bug in our code. The patch is very easy, in the file NoesisUIRenderer.cs, at line 240 change from:
                case UnityEngine.EventType.KeyDown:
                {
                    if (enableKeyboard)
                    {
                        if (ev.keyCode != UnityEngine.KeyCode.None)
                        {
                            int noesisKeyCode = NoesisKeyCodes.Convert(ev.keyCode);
                            if (noesisKeyCode != 0)
                            {
                                Noesis_KeyDown(_rendererId, noesisKeyCode);
                            }
                        }
                        else if (ev.character != 0)
                        {
                            Noesis_Char(_rendererId, ev.character);
                        }
                    }
                    break;
                }
to
                case UnityEngine.EventType.KeyDown:
                {
                    if (enableKeyboard)
                    {
                        if (ev.keyCode != UnityEngine.KeyCode.None)
                        {
                            int noesisKeyCode = NoesisKeyCodes.Convert(ev.keyCode);
                            if (noesisKeyCode != 0)
                            {
                                Noesis_KeyDown(_rendererId, noesisKeyCode);
                            }
                        }

                        if (ev.character != 0)
                        {
                            Noesis_Char(_rendererId, ev.character);
                        }
                    }
                    break;
                }
Yes, it is simply removing the else keyword.

Please, try and tell us.
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Linux x64?

26 Jun 2014, 17:40

It helps, but:
1. pressing "Enter" inputs � character into textbox. New line not added (with multiline textbox, so it should add newline when I press "Enter" key).
2. shortcuts Ctrl+C Ctrl+V not working.
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Linux x64?

27 Jun 2014, 05:31

I found that ev.character for Enter key is 13, but under other OS is 10. Also, Noesis_Char() for Tab and Shift+Tab keycodes (9 and 32) prints unicode unknown symbol under Linux.

For us, this code works perfect:
				case EventType.KeyDown:
				{
					if (enableKeyboard)
					{
						if (ev.keyCode != KeyCode.None)
						{
							int noesisKeyCode = NoesisKeyCodes.Convert(ev.keyCode);
							if (noesisKeyCode != 0)
							{
								Noesis_KeyDown(this._rendererId, noesisKeyCode);
							}
						}

						char character = ev.character;
						if (character != 0)
						{
							if (ev.keyCode == KeyCode.Return)
							{
								character = (char)10;
							}

							byte characterCode = (byte)character;

							if (characterCode >= 10
							    && (char.IsLetterOrDigit(character) || char.IsSymbol(character) || char.IsPunctuation(character)
							        || char.IsSeparator(character) || characterCode == 10))
							{
								Debug.Log("Char input: " + character + " (" + characterCode + ")");
								Noesis_Char(this._rendererId, character);
							}
							else
							{
								Debug.Log("Char ignored: " + characterCode);
							}
						}
					}
					break;
				}
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Linux x64?

27 Jun 2014, 11:19

Thanks for the patch! Will be fixed in the next version.

About the clipboard... it is not implemented in Linux. I have been trying to fix this but the clipboard in Linux is a hell to program! The implementation is not trivial without having access to the message loop of the main window (the window created by Unity) and Unity is not helping here.

It seems that the paste operation (copy from the clipboard) is easier and I think it is the important part for you (people pasting the password when login). At least this part will be implemented.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Linux x64?

27 Jun 2014, 12:15

Hi, for us everything (but the clipboard) is working fine with only removing the "else" keyword. Return works fine, and Tab,Shift+Tab do not output strange characters. Your patch is not needed. We are testing with the following XAML:
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <TextBox Width="200" Height="200" AcceptsReturn="True" TextWrapping="Wrap"/>
</Grid>
Could you please provide us with more information?
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Linux x64?

27 Jun 2014, 12:28

I've tested again with your patch, and it prints unicode "unknown symbol" when I press Enter (always, in multiline mode also) or Tab/Shift+Tab (when focus come back to textbox).
Screenshot attached.
Attachments
Screen.png
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Linux x64?

27 Jun 2014, 12:46

It is working fine here... :(

Could you debug the value of ev.character when ev.keyCode is KeyCode.Return? It cannot be 10 or 13 because we are already handing those cases.

The same for TAB, could dump the values please?
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Linux x64?

27 Jun 2014, 12:58

Looks like I found the issue.
I remember that char in C# is int (or ushort), not byte. That's what I get:
Enter is 65293
Tab is 65289
Shift+Tab is 65056
other characters read as normal. For example, Space=32, A=65, a=97...
AtomicTorch Studio Pte. Ltd. http://atomictorch.com

Who is online

Users browsing this forum: Google [Bot] and 1 guest