-
Notifications
You must be signed in to change notification settings - Fork 13
3. Mouses
The controller patcher provides support for USB mouses.
In order be write a config file for a mouse, it must contains the following line as first line (case insensitive):
[Mouse]
An attached mouse has 2 different modes. In one mode it acts like a cursor, like you have it on your computer and in the other its emulating a stick and 2 buttons.
You can switch between these to mode via a attached keyboard. Simply attach a mouse and keyboard and press F1 to enable aimmode. Press it again to switch back to cursormode.
In this mode, a cursor is rendered on to the screen. Hopefully on both screen, but in some games/apps it will just appear in one of them.
When you press the left mouse button, a touch input at the drawn position is emulated.
In this mode the cursor disappears and the left/right mouse button will be mapped to a gamepad button. When you move your mouse upwards, a stick being pushed up is emulated.
The button mapping is just for the aim mode.
You can either complety overwrite the default configuration or just modifying parts of it. When you put the following as the **second **line in the config, the default values will be ignored.
[IgnoreDefault]
In default in the mouse is emulation the RIGHT stick, but you can change it the left stick with the following line:
EMULATED_STICK=VPAD_L_STICK
For mapping the mouse buttons, you can use the following settings:
Left mouse click = LEFT_CLICK
Right mouse click = RIGHT_CLICK
Each mouse button can be set to one of the following values:
A = VPAD_BUTTON_A
B = VPAD_BUTTON_B
X = VPAD_BUTTON_X
Y = VPAD_BUTTON_Y
Plus = VPAD_BUTTON_PLUS
Minus = VPAD_BUTTON_MINUS
Home = VPAD_BUTTON_HOME
Sync = VPAD_BUTTON_SYNC
TV = VPAD_BUTTON_TV
DPAD:
DPAD left = VPAD_BUTTON_LEFT
DPAD left = VPAD_BUTTON_RIGHT
DPAD left = VPAD_BUTTON_UP
DPAD left = VPAD_BUTTON_DOWN
Trigger:
ZR = VPAD_BUTTON_ZR
ZL = VPAD_BUTTON_ZL
L = VPAD_BUTTON_L
R = VPAD_BUTTON_R
Sticks:
Stick press left = VPAD_BUTTON_STICK_L
Stick press right = VPAD_BUTTON_STICK_R
When you provide no extra config file, the following config will be used:
left click = ZR
right click = R
emulated stick = right stick
Here some examples of full config files:
Mouse emulating the right stick, left click is X and right click is Y (Overwriting the default):
[Mouse]
[IgnoreDefault]
LEFT_CLICK=VPAD_BUTTON_X
RIGHT_CLICK=VPAD_BUTTON_Y
Mouse emulating the left stick, left click is A and right click is B (Overwriting the default):
[Mouse]
[IgnoreDefault]
LEFT_CLICK=VPAD_BUTTON_A
RIGHT_CLICK=VPAD_BUTTON_B
EMULATED_STICK=VPAD_L_STICK
Mouse emulating the left stick, left click is disabled and right click is B (Overwriting the default):
[Mouse]
[IgnoreDefault]
RIGHT_CLICK=VPAD_BUTTON_B
EMULATED_STICK=VPAD_L_STICK
In this case nothing will happen when you click on the left button. Default configuration will be ignored.
Mouse emulating the right stick, left click is ZR (default) and right click is B (Overwriting the default):
[Mouse]
RIGHT_CLICK=VPAD_BUTTON_B
In this case you only need to add the config for the right click. The remainig buttons will be default configuration.
- Adding an option to adjust the sensitivity of the mouse.
- Support for all mouse buttons.