Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. class xboc_ctrl():
  2.  
  3. def __init__(self):
  4. self.control_model = {
  5. #LT
  6. 'X1' : 0,
  7. 'Y1' : 0,
  8.  
  9. #RT
  10. 'X2' : 0,
  11. 'Y2' : 0,
  12.  
  13. #Dpad
  14. 'north' : 0,
  15. 'west' : 0,
  16. 'east' : 0,
  17. 'south' : 0,
  18.  
  19. 'STleft' : 0,
  20. 'STrigth' : 0,
  21.  
  22. 'HTleft' : 0.0,
  23. 'HTrigth' : 0.0,
  24.  
  25. 'A' : 0,
  26. 'B' : 0,
  27. 'X' : 0,
  28. 'Y' : 0,
  29.  
  30. 'start' : 0,
  31. 'back' : 0,
  32. }
  33.  
  34.  
  35. def code2key(code):
  36. return {
  37. 0:'X1',
  38. 1:'Y1',
  39.  
  40. 3:'X2',
  41. 4:'Y2',
  42.  
  43. 9:'STrigth',
  44. 10:'STleft',
  45.  
  46. 16:'DX',
  47. 17:'DY',
  48.  
  49. 310:'HTleft',
  50. 311:'HTrigth',
  51.  
  52. 304:'A',
  53. 305:'B',
  54. 307:'X',
  55. 308:'Y',
  56.  
  57. 314:'select',
  58. 315:'start',
  59. 316:'xbox',
  60.  
  61. # Stick pushdown
  62. 317:'LS',
  63. 318:'RS'
  64.  
  65. }.get(code,None)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement