-
Notifications
You must be signed in to change notification settings - Fork 1
Creating configuration files
Configuration files for virtualbind follow an .INI-like format. You should first specify a section such as [init] and then use key=value pairs such as xlength=1600. White space before or after the equal sign is not allowed. All configuration files should reside on /etc/virtualbind/. You may refer to files in example-conf directory for guidance.
This file supports only 1 section: [init]. xlength and ylength should be filled in, mouse and keyboard may be omitted. If they are missing, virtualbind will try to find the correct file.
-
keyboard: The event file for your keyboard ie./dev/input/event6or/dev/input/by-id/usb-0461_HP_USB_Multimedia_Keyboard-event-kbd. -
mouseThe event file for your mouse. -
xlength: The vertical resolution of the virtual touchscreen to be created ie.1600. -
ylength: The horizontal resolution of the virtual touchscreen to be created ie.900. It is recommended set your display's resolution the values ofxlengthandylength.
This file supports only 1 section: [game]. You can use any name for this file as long as it has the .conf extension. You are expected to write 1 key=value pair:
-
profile: The number of profile file to be loaded.
This is where things get interesting. You can have as many profile files as you wish. Their names should follow the convention foo.#.conf where # is the profile number. For example, profile 1 should be named foo.1.conf. This file supports several sections and all of them are optional, although you are recommended to fill [profile] section. You can create multiple sections with the same name.
-
capturemouse: 1 to enable, 0 to disable. If you are going to play a game that needs you to pan the camera or viewport, enable this.
-
key: A letter, a number a modifier key or a punctiation mark.
Supported modifier keys:
-
lshift: Left shift -
rshift: Right shift -
lctrl: Left control -
rctrl: Right control -
lalt: Left alt -
ralt: Right alt -
lclick: Left click -
rclick: Right click -
mclick: Middle click -
space: Spacebar -
esc: Escape -
f1tof12 backspaceentertab-
up/down/left/right: Arrow keys
Supported punctuation marks:
-
.: Period -
,: Comma -
;: Semicolon -
/: Slash -
\: Backslash -
[and]: Square bracket -
*: Apostrophe -
-: Minus -
=: Equals -
": Grave
If you want to use a punctuation mark as a keybind, use the punc. mark itself instead of its name. If you have a Dvorak, AZERTY or other uncommon keyboard layout, fill in keys as if you have a keyboard with US layout.
-
locx: Tap location on the X axis. Left side of screen has value 0. Right side has highest value. -
locy: Tap location on the Y axis. Top side of screen has value 0. Bottom side has highest value.
-
key: 4 keys seperated by spaces ie.w a s d. -
locxandlocy: Same asbutton. -
offset: Determines how much the finger should move away from values inlocxandlocyie.60.
When any key in fjoystick is received, fjoystick initially touches the location indicated by locx and locy ignoring offset. Then the finger is moved by amount offset in a direction based on the key pushed. For example if key is w,a,s,d, locx and locy is 400 and offset is 60, when W key is pushed, a finger at location 400,400 will be pushed and then the finger will be moved to 400,340. This behaviour is necessary for some games (Block City Wars is one example) that center their movement joystick to initial contact location.
This is for 3D games in which you need to pan the camera. Only mouse movement can be used to pan camera, there is no key value.
-
locxandlocy: Same asbutton. -
speed: Indicates how fast the camera finger will move. The value will be divided by 100, so if you set this to100camera will move as your cursor does. A low value such as40is recommended, you may also consider lowering camera sensitivity in game.
-
key: seebutton. -
profileNumber of new profile to load. You can trigger a profile switch by configuring a hotkey and the profile to load. When a switch is triggered, all info from current profile is unloaded, all pushed fingers are lifted and mouse cursor is ungrabbed. New data from new profile is loaded and keybinding continues.