Pressing android menu button


i run my test using Appium with RemoteWebDriver.

I try to press Android Menu button with the following java code:

HashMap<String, String> params = new HashMap<String, String>();
params.put("keycode", Integer.toString(AndroidKeyCode.MENU));
((JavascriptExecutor) driver).executeScript("mobile: keyevent", AndroidKeyCode.MENU);

Which returns me “Not yet implemented” error. Is there any way to press menu button? Please note i use RemoteWebDriver not AndroidDriver. Unfortunately RemoteWebDriver can not be casted to AndroidDriver.