🕹️ Emulate mouse and keyboard input with your gamepad in a quick, easy and highly customizable way.
LT and RT) do not work..ini file and the application will be started automatically after launching the game.[Toggle], [Turbo], [TurboToggle], [Execute], [Combo], [Sequence] and others) and more.Layer (with fallback support) and Set (without fallback).[Chord] a more advanced [MACRO] modifier.GamepadToKeyboard requires an Xinput controller (native or emulated via tools like DS4Windows, DualSenseX, x360ce, etc.).A standalone version is also available for users who don’t use Playnite: GamepadToKeyboard standalone
On|Off the program by clicking the 1st menu item. When Enabled, the program is automatically executed after launching the defined (activated) games.Gamelist.ini (with its name, id, source and/or platform). An assignment config (gameid.ini) for that game will be created.Edit game config.Gamelist.ini by clicking the 3rd menu item. Gamelist.ini contains the games for which GamepadToKeyboard will work. When a gameid is set to 1 the game is active; when set to 0 the game is not active and GamepadToKeyboard will not be launched.UseCustomIni = 1 (editing Gamelist.ini, or through the menu panel and specifying the file in FileIni).Select custom ini file (all games).QuickIniProfile.ini you can edit a list of “favourite” configs that can be switched through Quick ini profiles (all games) item menu. The sub-menu is dynamically built: its size varies with the number of elements.GamepadToKeyboard.exe. Make sure that GamepadToKeyboard is disabled in Playnite, or that the target game is deactivated.Gamelist.ini and activates all of them.[Toggle], [Turbo], [TurboToggle][Combo]: send multiple keys at once[Execute]: run programs (e.g. notepad, calc.exe, c:\yourfolder\yourprogram.exe)[ComboAsync]: send multiple keys with a delay (defined with ComboKeysDelay)[ToggleCombo], [TurboCombo], [TurboToggleCombo][Sequence]: send keys in sequence. Similar to [ComboAsync], but ComboAsync sends and holds the keys, [Sequence] sends simple presses.AnalogToMouse = 1 (enabled by default) to move the mouse with the analog stick defined in Stick (default: Stick = RS )Shift+Ctrl+5 by default) to instantly reload the current .ini, without restarting the application.GamepadToKeyboard.config.Values you can assign to the buttons:
A..Z, 0..9, F1..F12Enter, Space, Esc, Lalt, Lshift, Lctrl, LwinLBmouse, RBmouse, MBmouse, WheelUp, WheelDown
A = [Turbo]c).,. Extra spaces are ignored (e.g A = [COMBO] c,S, L,Lbmouse).[Turbo], [TURBO] and [turbo] are equivalent).[Turbo]k and [Turbo] k are both valid).[Sequence] supports up to 15. Any additional keys are ignored.Example syntax:
| Button | Assignment | Button | Assignment | | Button | Assignment | | |
|---|---|---|---|---|---|---|---|---|
A |
Enter | Back |
F1 | LSup |
Up | |||
B |
[Turbo] Space | Start |
Esc | LSdown |
Down | |||
X |
[ComboAsync] S, Space,r | LS |
[Toggle]LShift | LSleft |
Left | |||
Y |
[COMBO]A,x,F,LBmouse | RS |
[execute] calc.exe | LSright |
Right | |||
LB |
RBmouse | Dup |
Up | RSup |
||||
RB |
LBmouse | Ddown |
Down | RSdown |
||||
LT |
Wheelup | Dleft |
Left | RSleft |
||||
RT |
WheelDown | Dright |
Right | RSright |
||||
Home |
Lwin |
| Section | Option | Values / Description |
|---|---|---|
| Mouse | AnalogToMouse | 1/0 : Turn On/Off the mouse movement via analog sticks. |
| Stick | RS/LS : Analog to use. Button assignments ignored. |
|
| Deadzoneshape | 1/2/3 : Square/Rectangular,Circular,Circular (with rescale). |
|
| DeadzoneType | 1/2/4 : Both axis/ per axis/ per direction. |
|
| (Stick)AxisInverted | 1/0 : Turn On/off axis inversion. 4 options available. |
|
| Sensitivity | Value : Mouse movement speed. |
|
| Analogs | DeadzoneType | 1/2/4/8: Both sticks/ per stick/ per axis/ per direction. |
| (Stick)AxisInverted | 1/0 : Turn On/off axis inversion. 4 options available. |
|
| Other | SendKeysTypes | 1: Game mode; 2: Desktop (with windows-style keypress delay + repeat) |
### ⌨️ Hotkeys
The program supports several configurable hotkeys. They can be set in GamepadToKeyboard.config and disabled if needed.
Shift + Ctrl + 5 (enabled by default).Shift + Ctrl + 6 (enabled by default).ShiftModeCycle- (Shift + Ctrl + 7), ShiftModeCycle+ (Shift + Ctrl + 8), ShiftModeToggle (Shift + Ctrl + 9), disabled by default.LayerCycle- (Shift + Ctrl + 1), LayerCycle+ (Shift + Ctrl + 2), LayerToggle (Shift + Ctrl + 3), disabled by default.GamepadToKeyboard.config:
e.g. KeyboardShiftEnabled = False.Layer supports fallback (if a key doens’t have an assignment, the correspondent value is taken from the Button section), while Set does not.[inventorymenu]).layer: or set: to the name section set its initial type (Layer or Set) (e.g. [set:inventorymenu], [layer:inventorymenu]). Types can be overridden using the Layer/Set modifiers. If no prefix is added the default type is layer.[LayerMode], [SetMode], [LayerModeToggle], [SetModeToggle] followed by the Layer/Set name in button assignments to load that Layer/Set.LayerToCycle in Other section and switch between them using [LayerCycle+] and [LayerCycle-]. These can reference existing Layers/Sets already used by the mode modifiers, or completely different ones.LayerExample.ini to see how layers/set work.Hold: vibration continues while the button is held down.Single: send a single vibration each time the button is pressed (duration can be configured in ms using SingleDuration variable).Repeat: vibration is repeated while the button is held down with an interval time (RepeatDuration and RepeatInterval are available).[Vibration] section (e.g. VibrateButton1 = X, $VibrateButton2 = LB etc.) and specify the properties adding a dot and the variable to the name:
- VibrateButton2 = Y
- VibrateButton2.Style = 1
- VibrateButton2.LeftMotorStrength = 50
- VibrateButton2.SingleDuration = 300
Modifier buttons: the vibration only starts when this button is pressed together with a VibrateButton, e.g.:
- VibrateButton3 = X
- VibrateButton3.Modifier = LB
- VibrateButtonN.Style: (0, 1, 2)
- VibrateButtonN.Motor: (Left, Right, Both)
- VibrateButtonN.LeftMotorStrength: (Value), VibrateButtonN.RightMotorStrength: (Value)
- VibrateButtonN.SingleDuration, VibrateButtonN.RepeatDuration, VibrateButtonN.RepeatInterval
VibrateButtonN.LeftMotorStrength or VibrateButtonN.RightMotorStrength are not available, GamepadToKeyboard looks up the global variables LeftMotorStrength and RightMotorStrength. If UseSameStrengthVal = 1 then the Strength global variable is used.ProgressiveTrigger = 1 (in this mode, Style is ignored for analog triggers).GamepadTokeyboard.exe (or any associated flagged file) to your AV vendor asking for a false positive review request.If you enjoy GamepadToKeyboard, you can buy me a coffee. It will be very appreciated ;)
SPACE, ENTER, ALT, BACKSPACE, BS, DELETE, DEL, UP, DOWN, LEFT, RIGHT, HOME, END, ESCAPE, ESC, INSERT, INS, PGUP, PGDN, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TAB, PRINTSCREEN, LWIN, RWIN, NUMLOCK on, CAPSLOCK off, SCROLLLOCK toggle, BREAK, PAUSE, NUMPAD0, NUMPAD1, NUMPAD2, NUMPAD3, NUMPAD4, NUMPAD5, NUMPAD6, NUMPAD7, NUMPAD8, NUMPAD9, NUMPADMULT, NUMPADADD, NUMPADSUB, NUMPADDIV, NUMPADDOT, NUMPADENTER, APPSKEY, LALT, RALT, LCTRL, RCTRL, LSHIFT, RSHIFT, SLEEP, ASC nnnn, BROWSER_BACK, BROWSER_FORWARD, BROWSER_REFRESH, BROWSER_STOP, BROWSER_SEARCH, BROWSER_FAVORITES, BROWSER_HOME, VOLUME_MUTE, VOLUME_DOWN, VOLUME_UP, MEDIA_NEXT, MEDIA_PREV, MEDIA_STOP, MEDIA_PLAY_PAUSE, LAUNCH_MAIL, LAUNCH_MEDIA, LAUNCH_APP1, LAUNCH_APP2, OEM_102
This gamepad script was written in AutoIt.
The program makes use of a remodified version of the XInput UDF by Oxin8 (xoninx@gmail.com) to read Xinput states.