Gamepad in Android

Материал из Toshiba AC100 wiki
Перейти к: навигация, поиск

Список Андроид игр с поддержкой геймпада http://www.videomap.it/forum/viewtopic.php?f=14&t=4 Дока для девелоперов http://docs.nvidia.com/tegra/data/How_To_Support_Android_Game_Controllers.html

9: PS(R) Gamepad
      Classes: 0x80000141
      Path: /dev/input/event0
      Descriptor: 4cbe1e239ac8042f8a65c26ec8df1e6182b62322
      Location: usb-tegra-ehci.2-1.3/input0
      UniqueId:
      Identifier: bus=0x0003, vendor=0x0e8f, product=0x3075, version=0x0111
      KeyLayoutFile: /system/usr/keylayout/Generic.kl
      KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
      ConfigurationFile:
      HaveKeyboardLayoutOverlay: false
Верх 0003 0011 FFFFFFFF
Низ 0003 0011 00000001
Влево 0003 0010 FFFFFFFF
Право 0003 0010 00000001
Треугольник 0004 0004 00090001
Крестик 0004 0004 00090003
Квадрат 0004 0004 00090004
Круг 0004 0004 00090002
Левый курок 0004 0004 00090007
Правый курок 0004 0004 00090008
Левый шифт 0004 0004 00090005
Правый шифт 0004 0004 00090006
Select 0004 0004 00090009
Start 0004 0004 0009000A
Левый стик (нажатие) 0003 0004 0009000B
Верх 0003 0011 FFFFFFFF
Низ 0003 0011 00000000
Влево 0003 0010 FFFFFFFF
Право 0003 0010 00000000
Правый стик (нажатие) 0003 0004 0009000C
Верх 0003 0005 00000000
Низ 0003 0005 000000FF
Влево 0003 0002 00000000
Право 0003 0002 000000FF
Включение 0003 0001 00000082
#
# Speedlink Strike gamepad
#

key 0x120    BUTTON_Y
key 0x121    BUTTON_B
key 0x122    BUTTON_A
key 0x123    BUTTON_X
key 0x124    BUTTON_L1
key 0x125    BUTTON_R1
key 0x126    BUTTON_L2
key 0x127    BUTTON_R2
key 0x128    BACK
key 0x129    BUTTON_START
key 0x12a    BUTTON_THUMBL
key 0x12b    BUTTON_THUMBR

# Left (0x00, 0x01) and right (0x03, 0x05) analog control stick.
# (Each axis has range from 0 to 255.)
axis 0x00 X
axis 0x01 Y
#axis 0x02 value changes if L thumb stick or R thumb stick moves, dont map
axis 0x03 Z
axis 0x05 RZ

# Hat.
# (D-pad is reported as analog. Each axis has range from -1 to 1.)
axis 0x10    HAT_X
axis 0x11    HAT_Y
#
# Logitech Wireless Gamepad F710 (DirectInput)
#
 
key 0x130    BUTTON_X
key 0x131    BUTTON_A
key 0x132    BUTTON_B
key 0x133    BUTTON_Y
key 0x134    BUTTON_L1
key 0x135    BUTTON_R1
key 0x136    BUTTON_L2
key 0x137    BUTTON_R2
key 0x138    BACK
key 0x139    BUTTON_START
key 0x13a    BUTTON_THUMBL
key 0x13b    BUTTON_THUMBR
 
 
# Left (0x00, 0x01) and right (0x03, 0x05) analog control stick.
# (Each axis has range from 0 to 255.)
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x05 RZ
 
# Hat.
# (D-pad is reported as analog. Each axis has range from -1 to 1.)
axis 0x10    HAT_X
axis 0x11    HAT_Y