Skip to content

Commit c53d19e

Browse files
committed
Add OPTION+ENTER key combination to send DPAD_CENTER.
- Added run configurations for Pycharm.
1 parent 807d98b commit c53d19e

3 files changed

Lines changed: 56 additions & 7 deletions

File tree

.idea/runConfigurations/Unittests_for_tests_com_dtmilano_android_adb_dumpsystests2_DumpsysTests.xml

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/dump__h.xml renamed to .idea/runConfigurations/culebra__Guc___concertina_config_1___scale_0_5.xml

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/com/dtmilano/android/culebron.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
'''
3-
Copyright (C) 2012-2018 Diego Torres Milano
3+
Copyright (C) 2012-2019 Diego Torres Milano
44
Created on oct 6, 2014
55
66
Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,7 +30,7 @@
3030
from com.dtmilano.android.concertina import Concertina
3131
from com.dtmilano.android.viewclient import ViewClient
3232

33-
__version__ = '15.5.1'
33+
__version__ = '15.6.0'
3434

3535
import sys
3636
import threading
@@ -987,13 +987,18 @@ def onKeyPressed(self, event):
987987
self.printOperation(None, Operation.LONG_PRESS, 'MOVE_HOME', 0.1, d, 0x700e3, 50)
988988
else:
989989
self.command(Culebron.KEYSYM_TO_KEYCODE_MAP[keysym])
990-
elif char == '\r':
991-
self.command('ENTER')
992990
# ALT-M
993991
elif keysym == 'm' and event.state == 24:
994992
if DEBUG_KEY:
995993
print >> sys.stderr, "Sending MENU"
996994
self.command('MENU')
995+
# OPTION-ENTER (mac)
996+
elif keysym == 'Return' and event.state == 16:
997+
if DEBUG_KEY:
998+
print >> sys.stderr, "Sending DPAD_CENTER"
999+
self.command('DPAD_CENTER')
1000+
elif char == '\r':
1001+
self.command('ENTER')
9971002
elif char == '':
9981003
# do nothing
9991004
pass

0 commit comments

Comments
 (0)