2016-09-01 18:17:43 +08:00
|
|
|
package joystick
|
|
|
|
|
|
|
|
const (
|
|
|
|
// left X joystick event
|
|
|
|
LeftX = "left_x"
|
|
|
|
// left Y joystick event
|
|
|
|
LeftY = "left_y"
|
|
|
|
// right X joystick event
|
|
|
|
RightX = "right_x"
|
|
|
|
// right Y joystick event
|
|
|
|
RightY = "right_y"
|
|
|
|
// L1 button joystick event
|
|
|
|
L1 = "l1"
|
2017-05-17 22:40:51 +08:00
|
|
|
// L1 button press event
|
|
|
|
L1Press = "l1_press"
|
|
|
|
// L1 button release event
|
|
|
|
L1Release = "l1_release"
|
2016-09-01 18:17:43 +08:00
|
|
|
// L2 joystick event
|
|
|
|
L2 = "l2"
|
2017-05-17 22:40:51 +08:00
|
|
|
// L2 button press event
|
|
|
|
L2Press = "l2_press"
|
|
|
|
// L2 button release event
|
|
|
|
L2Release = "l2_release"
|
2018-05-08 14:25:37 +08:00
|
|
|
// L3 button press event
|
|
|
|
L3Press = "l3_press"
|
|
|
|
// L3 button release event
|
|
|
|
L3Release = "l3_release"
|
2016-09-01 18:17:43 +08:00
|
|
|
// R1 button joystick event
|
|
|
|
R1 = "r1"
|
2017-05-17 22:40:51 +08:00
|
|
|
// R1 button press event
|
|
|
|
R1Press = "r1_press"
|
|
|
|
// R1 button release event
|
|
|
|
R1Release = "r1_release"
|
2016-09-01 18:17:43 +08:00
|
|
|
// R2 joystick event
|
|
|
|
R2 = "r2"
|
2017-05-17 22:40:51 +08:00
|
|
|
// R2 button press event
|
|
|
|
R2Press = "r2_press"
|
|
|
|
// R1 button release event
|
|
|
|
R2Release = "r2_release"
|
2018-05-08 14:25:37 +08:00
|
|
|
// R3 button press event
|
|
|
|
R3Press = "r3_press"
|
|
|
|
// R1 button release event
|
|
|
|
R3Release = "r3_release"
|
2018-04-18 18:12:07 +08:00
|
|
|
// up gamepad press event
|
|
|
|
UpPress = "up_press"
|
|
|
|
// up gamepad release event
|
|
|
|
UpRelease = "up_release"
|
|
|
|
// down gamepad press event
|
|
|
|
DownPress = "down_press"
|
|
|
|
// down gamepad release event
|
|
|
|
DownRelease = "down_release"
|
|
|
|
// left gamepad press event
|
|
|
|
LeftPress = "left_press"
|
|
|
|
// left gamepad release event
|
|
|
|
LeftRelease = "left_release"
|
|
|
|
// right gamepad press event
|
|
|
|
RightPress = "right_press"
|
|
|
|
// right gamepad release event
|
|
|
|
RightRelease = "right_release"
|
2016-09-01 18:17:43 +08:00
|
|
|
// square button press event
|
|
|
|
SquarePress = "square_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// square button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
SquareRelease = "square_release"
|
|
|
|
// circle button press event
|
|
|
|
CirclePress = "circle_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// circle button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
CircleRelease = "circle_release"
|
|
|
|
// triangle button press event
|
|
|
|
TrianglePress = "triangle_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// triangle button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
TriangleRelease = "triangle_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// X button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
XPress = "x_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// X button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
XRelease = "x_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// share button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
SharePress = "share_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// share button relase event
|
2016-09-01 18:17:43 +08:00
|
|
|
ShareRelease = "share_release"
|
|
|
|
// options button press event
|
|
|
|
OptionsPress = "options_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// options button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
OptionsRelease = "options_release"
|
|
|
|
// home button press event
|
|
|
|
HomePress = "home_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// home button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
HomeRelease = "home_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// start button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
StartPress = "start_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// start button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
StartRelease = "start_release"
|
2017-05-17 22:40:51 +08:00
|
|
|
// select button press event
|
|
|
|
SelectPress = "select_press"
|
|
|
|
// select button release event
|
|
|
|
SelectRelease = "select_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// rt button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
RTPress = "rt_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// rt button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
RTRelease = "rt_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// lt button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
LTPress = "lt_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// lt button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
LTRelease = "lt_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// Y button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
YPress = "y_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// Y button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
YRelease = "y_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// A button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
APress = "a_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// A button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
ARelease = "a_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// B button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
BPress = "b_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// B button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
BRelease = "b_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// rb button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
RBPress = "rb_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// rb button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
RBRelease = "rb_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// lb button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
LBPress = "lb_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// lb button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
LBRelease = "lb_release"
|
2016-09-01 19:32:40 +08:00
|
|
|
// back button press event
|
2016-09-01 18:17:43 +08:00
|
|
|
BackPress = "back_press"
|
2016-09-01 19:32:40 +08:00
|
|
|
// back button release event
|
2016-09-01 18:17:43 +08:00
|
|
|
BackRelease = "back_release"
|
2018-05-08 05:46:17 +08:00
|
|
|
// red pad press event
|
|
|
|
RedPress = "red_press"
|
|
|
|
// red pad release event
|
|
|
|
RedRelease = "red_release"
|
|
|
|
// yellow pad press event
|
|
|
|
YellowPress = "yellow_press"
|
|
|
|
// yellow pad release event
|
|
|
|
YellowRelease = "yellow_release"
|
|
|
|
// blue pad press event
|
|
|
|
BluePress = "blue_press"
|
|
|
|
// blue pad release event
|
|
|
|
BlueRelease = "blue_release"
|
|
|
|
// green pad press event
|
|
|
|
GreenPress = "green_press"
|
|
|
|
// green pad release event
|
|
|
|
GreenRelease = "green_release"
|
|
|
|
// pedal press event
|
|
|
|
PedalPress = "pedal_press"
|
|
|
|
// pedal release event
|
|
|
|
PedalRelease = "pedal_release"
|
2016-09-01 18:17:43 +08:00
|
|
|
)
|