{"action":"created","issue":{"url":"https://api.github.com/repos/uWebKit/uWebKit/issues/21","repository_url":"https://api.github.com/repos/uWebKit/uWebKit","labels_url":"https://api.github.com/repos/uWebKit/uWebKit/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/uWebKit/uWebKit/issues/21/comments","events_url":"https://api.github.com/repos/uWebKit/uWebKit/issues/21/events","html_url":"https://github.com/uWebKit/uWebKit/issues/21","id":153646893,"number":21,"title":"Mouse Input should be dependant on the OS","user":{"login":"fngryboi","id":5859538,"avatar_url":"https://avatars.githubusercontent.com/u/5859538?v=3","gravatar_id":"","url":"https://api.github.com/users/fngryboi","html_url":"https://github.com/fngryboi","followers_url":"https://api.github.com/users/fngryboi/followers","following_url":"https://api.github.com/users/fngryboi/following{/other_user}","gists_url":"https://api.github.com/users/fngryboi/gists{/gist_id}","starred_url":"https://api.github.com/users/fngryboi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fngryboi/subscriptions","organizations_url":"https://api.github.com/users/fngryboi/orgs","repos_url":"https://api.github.com/users/fngryboi/repos","events_url":"https://api.github.com/users/fngryboi/events{/privacy}","received_events_url":"https://api.github.com/users/fngryboi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T09:48:12Z","updated_at":"2016-05-12T10:29:52Z","closed_at":null,"body":"Right now it's based on Mac input which doesn't translate well to Windows (and probably Linux when support for that is added), Left Mouse button is correct but Right click is the middle mouse button and the middle mouse button is right click. Also if you happen to right click you can't interact with the WebView anymore because of the menu that comes up for some weird reason."},"comment":{"url":"https://api.github.com/repos/uWebKit/uWebKit/issues/comments/218719360","html_url":"https://github.com/uWebKit/uWebKit/issues/21#issuecomment-218719360","issue_url":"https://api.github.com/repos/uWebKit/uWebKit/issues/21","id":218719360,"user":{"login":"fngryboi","id":5859538,"avatar_url":"https://avatars.githubusercontent.com/u/5859538?v=3","gravatar_id":"","url":"https://api.github.com/users/fngryboi","html_url":"https://github.com/fngryboi","followers_url":"https://api.github.com/users/fngryboi/followers","following_url":"https://api.github.com/users/fngryboi/following{/other_user}","gists_url":"https://api.github.com/users/fngryboi/gists{/gist_id}","starred_url":"https://api.github.com/users/fngryboi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fngryboi/subscriptions","organizations_url":"https://api.github.com/users/fngryboi/orgs","repos_url":"https://api.github.com/users/fngryboi/repos","events_url":"https://api.github.com/users/fngryboi/events{/privacy}","received_events_url":"https://api.github.com/users/fngryboi/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T10:29:52Z","updated_at":"2016-05-12T10:29:52Z","body":"I checked out the code and could see that the UWKWebView is parsing the mouse input button as i, and that is then translated in the UWKWebPlugin into the corresponding .dll as shown here:\r\n\r\n`[DllImport(\"UWKPlugin\")]`\r\n`    public static extern void UWK_MsgMouseButton(uint browserID, int x, int y, int button, bool down);`\r\n\r\nAnd the `public void ProcessMouse(Vector3 mousePos)` passage in the UWKWebView script.\r\n\r\nI added the code `print (\"Mouse ID: \" + i);` inside the `if (Input.GetMouseButtonDown(i))` of the ProcessMouse function. And when I pressed Left mouse button it returns **0**, right mouse button returns as **1** and middle mouse button returns as **2**.\r\n\r\nThis is however translated differently with the dll as right click triggers the scroll button instead and allows me to move the mouse pointer up and down to scroll with it, and middle mouse button triggers the right click function which also locks any kind of input inside the game whenever it's used.\r\n\r\nTemporary fix for me is to add the following code between the `mouseStates[i] = true;` and `UWKPlugin.UWK_MsgMouseButton(ID, (int)mousePos.x, (int)mousePos.y, i, true);`:\r\n\r\n`#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN`\r\n`if (i == 1)`\r\n`    i = 2;`\r\n`else if (i == 2)`\r\n`    i = 1;`\r\n`#endif`"}}