Skip to content

Configuration Methods

nephitejnf edited this page Feb 5, 2016 · 1 revision
`evm.setButtonAction(btn, key_event)`

This is a straight controller button to which ever button we want to emulate

evm.setPadButtons(pos, key_events[, deadzone=0.6, clicked=False])

This merely sets whichever pad we specify in pos (see Control Modes) to the desired buttons. deadzone and clicked (determines if input is made on click) are optional parameters. deadzone sets a deadzone in the center of the pad of the radius specified. key_events is a list of buttons we want to map, [top,left,botton,right], it only accepts four buttons.

evm.setPadAxesAsButtons(pos, abs_events[, deadzone=0.6, clicked=False, revert=True])

Basically the same as setPadButtons, but is emulates a joystick and maps it like buttons. abs_events is a list of two entries , input things like hat axes. revert determines if it centers back like a mechanical joystick.

evm.setPadMouse(pos[, trackball=True, friction=sui.Mouse.DEFAULT_FRICTION, xscale=sui.Mouse.DEFAULT_XSCALE,
yscale=sui.Mouse.DEFAULT_XSCALE])

pos should be self-explanatory. trackball determines trackball emulation. friction ranges from 0.0 (your mouse is in space) to 100.0. xscale and yscale set the sensitivity.

evm.setPadScroll(pos[, trackball=True, friction=sui.Mouse.DEFAULT_SCR_FRICTION,
xscale=sui.Mouse.DEFAULT_SCR_XSCALE,
yscale=sui.Mouse.DEFAULT_SCR_XSCALE])

Basically the same as setPadMouse, but in a scroll wheel setting.

evm.setPadAxes(pos, abs_x_event, abs_y_event[, revert=True])

You can use this to set the pad to emulate a joystick. the abs events note the axis you want to map. pos is for left or right.

evm.setTrigButton(pos, key_event)

This sets the trigger button to an event. pos denotes left or right trigger. key_event you should already know.

evm.setTrigAxis(pos, abs_event)

This sets what the trigger soft pull does, it uses an axis event, possibly able to use a key as well.

evm.setStickAxes(abs_x_event, abs_y_event[, revert=True])

This maps the stick to the axis events. and whether you want it to revert back after letting go.

evm.setStickButtons(key_events)

You can set the stick to do key inputs instead as well, maps as [top, left, botton, right].

Clone this wiki locally