Highlighted

android mouse right_click support

Participant ,
Apr 06, 2016

Copy link to clipboard

Copied

Hi

When plugging in a mouse on an android device all mouse buttons are detected as left click. Is it possible that right click can also be supported ? The android base operating system supports right-click;

TOPICS
Air beta

Views

2.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

android mouse right_click support

Participant ,
Apr 06, 2016

Copy link to clipboard

Copied

Hi

When plugging in a mouse on an android device all mouse buttons are detected as left click. Is it possible that right click can also be supported ? The android base operating system supports right-click;

TOPICS
Air beta

Views

2.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 06, 2016 0
Adobe Employee ,
Apr 06, 2016

Copy link to clipboard

Copied

Could you please let us know which Android device you are using and the application type for which you want to enable mouse events?

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 06, 2016 0
Participant ,
Apr 06, 2016

Copy link to clipboard

Copied

Android device you are using

Testing on an android tablet running android kitkat 4.4, but would want greater support (for google play store)


application type for which you want to enable mouse events

away3D

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 06, 2016 0
Adobe Employee ,
Apr 06, 2016

Copy link to clipboard

Copied

Hi,

If all the mouse events are properly handled in your code?

We have different mouse events for every button pressed or click on mouse.

Please follow the below link:

MouseEvent - Adobe ActionScript® 3 (AS3 ) API Reference

Please let us know if you still face the problem.

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 06, 2016 0
Participant ,
Apr 07, 2016

Copy link to clipboard

Copied

Hi

If all the mouse events are properly handled in your code?

Lets use this as an example in animate cc

import flash.text.TextField;

var myText:TextField = new TextField;

myText.width = 200;

myText.height = 20;

addChild(myText);

stage.doubleClickEnabled = true;

stage.addEventListener(MouseEvent.RIGHT_CLICK, f_rightClick);

stage.addEventListener(MouseEvent.CLICK, f_leftClick);

stage.addEventListener(MouseEvent.MOUSE_DOWN, f_MOUSE_DOWN);

stage.addEventListener(MouseEvent.RIGHT_MOUSE_DOWN, f_RIGHT_MOUSE_DOWN);

stage.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, f_MIDDLE_MOUSE_DOWN);

stage.addEventListener(MouseEvent.MIDDLE_CLICK, f_middleClick);

stage.addEventListener(MouseEvent.DOUBLE_CLICK, f_doubleClick);

stage.addEventListener(MouseEvent.MOUSE_WHEEL, f_wheel);

function f_MOUSE_DOWN(event: MouseEvent): void

{

  myText.text = String("Mouse Down");

}


function f_RIGHT_MOUSE_DOWN(event: MouseEvent): void

{

  myText.text = String("Right Mouse Down");

}


function f_MIDDLE_MOUSE_DOWN(event: MouseEvent): void

{

  myText.text = String("Middle Mouse Down");

}

function f_doubleClick(event: MouseEvent): void

{

  myText.text = String("Double Click");

}

function f_rightClick(event: MouseEvent): void

{

  myText.text = String("Right Click");

}

function f_leftClick(event: MouseEvent): void

{

  myText.text = String("Left Click");

}

function f_middleClick(event: MouseEvent): void

{

  myText.text = String("Middle Click");

}

function f_wheel(event: MouseEvent): void

{

  myText.text = String("Wheel");

}

The above code behaves normally in the debugger.


When I install the example onto an android tablet using a mouse here is the outcome

- Left Mouse button click - myText = Left Click //Correct

- Left Mouse button click hold - myText = Mouse Down //Correct

- Left Mouse button Double click - myText = Double Click //Correct


- Right Mouse button click - myText = Left Click  //error should be Right Click

- Right Mouse button click hold - myText = Mouse Down //error should be Right Mouse Down

- Right Mouse button Double click - myText =Double Click //there is no Right Double Click


- Mouse Wheel scroll - myText = is blank //error nothing shows

- Mouse Wheel click - myText = Left Click //error should be Middle Click

- Mouse Wheel click hold - myText = Mouse Down //error should be Mouse Wheel Down


Please test the above code on an android device with a mouse and tell me if you get the same output.


Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 07, 2016 0
Adobe Employee ,
Apr 08, 2016

Copy link to clipboard

Copied

Hi,

I tried reproducing the issue using Animate CC and i observed the same problem.

Below is the output i got after debugging using traces in between the code.

[MouseEvent type="click" bubbles=true cancelable=false eventPhase=3 localX=25.777780532836914 localY=8.905557632446289 stageX=25.75 stageY=8.9 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=false delta=0 commandKey=false controlKey=false clickCount=0]left click

[MouseEvent type="mouseDown" bubbles=true cancelable=false eventPhase=2 localX=432.4444885253906 localY=373.35003662109375 stageX=432.4 stageY=373.35 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=true delta=0 commandKey=false controlKey=false clickCount=1]mouse down

For Android Devices, Mouse Event type is always "Click"  and "Mouse Down"  in respect of any button we click.

Though, we will further investigate it at our side.

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 08, 2016 0
Participant ,
Apr 08, 2016

Copy link to clipboard

Copied

Thank you, looking forward to this fix.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 08, 2016 0
Adobe Employee ,
Apr 11, 2016

Copy link to clipboard

Copied

Hi,

Could you please provide us a native sample project that identifies the mouse_right_click and mouse_left_click separately on android device?

It will be helpful to investigate the bug further.

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 11, 2016 0
Participant ,
Apr 11, 2016

Copy link to clipboard

Copied

package

{

  import flash.display.MovieClip;

  import flash.text.TextField;

  import flash.events.MouseEvent;

  public class mouseMove extends MovieClip

  {

  private var myText: TextField;

  public function mouseMove()

  {

  myText = new TextField;

  myText.width = 200;

  myText.height = 20;

  addChild(myText);

  stage.doubleClickEnabled = true;

  stage.addEventListener(MouseEvent.RIGHT_CLICK, f_rightClick);

  stage.addEventListener(MouseEvent.CLICK, f_leftClick);

  stage.addEventListener(MouseEvent.MOUSE_DOWN, f_MOUSE_DOWN);

  stage.addEventListener(MouseEvent.RIGHT_MOUSE_DOWN, f_RIGHT_MOUSE_DOWN);

  stage.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, f_MIDDLE_MOUSE_DOWN);

  stage.addEventListener(MouseEvent.MIDDLE_CLICK, f_middleClick);

  stage.addEventListener(MouseEvent.DOUBLE_CLICK, f_doubleClick);

  stage.addEventListener(MouseEvent.MOUSE_WHEEL, f_wheel);

  }

  private function f_MOUSE_DOWN(event: MouseEvent): void

  {

  myText.text = String("Mouse Down");

  }

  private function f_RIGHT_MOUSE_DOWN(event: MouseEvent): void

  {

  myText.text = String("Right Mouse Down");

  }

  private function f_MIDDLE_MOUSE_DOWN(event: MouseEvent): void

  {

  myText.text = String("Middle Mouse Down");

  }

  private function f_doubleClick(event: MouseEvent): void

  {

  myText.text = String("Double Click");

  }

  private function f_rightClick(event: MouseEvent): void

  {

  myText.text = String("Right Click");

  }

  private function f_leftClick(event: MouseEvent): void

  {

  myText.text = String("Left Click");

  }

  private function f_middleClick(event: MouseEvent): void

  {

  myText.text = String("Middle Click");

  }

  private function f_wheel(event: MouseEvent): void

  {

  myText.text = String("Wheel");

  }

  }

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 11, 2016 0
Participant ,
Apr 28, 2016

Copy link to clipboard

Copied

Any update on this issue?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2016 0
Participant ,
May 27, 2016

Copy link to clipboard

Copied

I submitted the bug to bugbase 4158454

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 27, 2016 0
Participant ,
Jun 17, 2016

Copy link to clipboard

Copied

Any updates?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2016 0
Adobe Employee ,
Jun 17, 2016

Copy link to clipboard

Copied

Hi,

We have added this bug for our internal backlogs.

We will start looking into it once we get the considerable number of votes on the below bug:

Bug#4158454 - android mouse right_click support

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2016 0
Participant ,
Nov 17, 2016

Copy link to clipboard

Copied

Is this a simple bug that is causing the issue (right click, mouse wheel not working as it should) or does it need major implementation in order for it to work?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2016 0
Participant ,
Feb 08, 2017

Copy link to clipboard

Copied

Can the right mouse button and mouse wheel bug be fixed in air 25?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 08, 2017 0