Skip to content

Commit 7c29f28

Browse files
committed
Merge pull request #42 from paymand/23_revert
Revert "Fix for #23: Re-add 'keyevent' temporarily."
2 parents e6ef8c2 + 563ada8 commit 7c29f28

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

appium/webdriver/mobilecommand.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class MobileCommand(object):
3131
# Appium Commands
3232
GET_APP_STRINGS = 'getAppStrings'
3333
PRESS_KEYCODE = 'pressKeyCode'
34-
# TODO: remove when new Appium is out
35-
KEY_EVENT = 'keyEvent'
3634
LONG_PRESS_KEYCODE = 'longPressKeyCode'
3735
GET_CURRENT_ACTIVITY = 'getCurrentActivity'
3836
SET_IMMEDIATE_VALUE = 'setImmediateValue'

appium/webdriver/webdriver.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -350,23 +350,6 @@ def hide_keyboard(self, key_name=None, key=None, strategy=None):
350350
self.execute(Command.HIDE_KEYBOARD, data)
351351
return self
352352

353-
# TODO: remove when new Appium is out
354-
def keyevent(self, keycode, metastate=None):
355-
"""Sends a keycode to the device. Android only. Possible keycodes can be
356-
found in http://developer.android.com/reference/android/view/KeyEvent.html.
357-
358-
:Args:
359-
- keycode - the keycode to be sent to the device
360-
- metastate - meta information about the keycode being sent
361-
"""
362-
data = {
363-
'keycode': keycode,
364-
}
365-
if metastate is not None:
366-
data['metastate'] = metastate
367-
self.execute(Command.KEY_EVENT, data)
368-
return self
369-
370353
def press_keycode(self, keycode, metastate=None):
371354
"""Sends a keycode to the device. Android only. Possible keycodes can be
372355
found in http://developer.android.com/reference/android/view/KeyEvent.html.
@@ -657,9 +640,6 @@ def _addCommands(self):
657640
('POST', '/session/$sessionId/touch/multi/perform')
658641
self.command_executor._commands[Command.GET_APP_STRINGS] = \
659642
('POST', '/session/$sessionId/appium/app/strings')
660-
# TODO: remove when new Appium is out
661-
self.command_executor._commands[Command.KEY_EVENT] = \
662-
('POST', '/session/$sessionId/appium/device/keyevent')
663643
self.command_executor._commands[Command.PRESS_KEYCODE] = \
664644
('POST', '/session/$sessionId/appium/device/press_keycode')
665645
self.command_executor._commands[Command.LONG_PRESS_KEYCODE] = \

0 commit comments

Comments
 (0)