Dying Light 2
0 of 0

File information

Last updated

Original upload

Created by

Minty Fresh Death

Uploaded by

MintyFreshDeath

Virus scan

Safe to use

Tags for this mod

About this mod

Allows the changing of keyboard bindings that cannot be changed through the options menu.

Permissions and credits
Changelogs
Are you, fellow PC user, frustrated by certain actions in Dying Light 2 being automatically mapped to your keyboard for you?

Do you want your "O" key to open the map, but always end up looking at the crafting menu?

Are you cursing Techland for not telling you that the binoculars were hardmapped to "B" all along, and now you have them in your inventory you can no longer kick zombies?

Well, worry no more! It turns out that the same method we used to overcome this problem in Dying Light 1 works perfectly for its sequel, and here's how to do it!

1. Download this mod and extract data3.pak from the .rar file.
2. Open up the data3.pak file using your choice of zip extractor (I recommend 7-Zip).
3. Extract the file labelled "inputs_keyboard.scr".
4. Open up this file using your choice of text editor (I recommend Notepad++).
5. Scroll down to the section beginning with "sub Keyboard()" (it's near the very top of the file).
6. Find the key binding you wish to change. (Example: Toggle Binoculars begins with "AddAction(_ACTION_TOGGLE_BINOCULARS")
7. Scroll across toward the end of the line until you reach  "EKey__[Keybinding]".
8. Change the letter that follows to the keybinding of your choice.
9. Save the .scr file once you have made all the changes you want.
10. Insert the .scr back into the .pak file, making sure to overwrite the original .scr file (your new file MUST go back into the "scripts/inputs/" folder inside the .pak to work).
11. Place the data3.pak file into the "\ph\source" folder of your Dying Light 2 installation folder.
11a. NOTE - If you already have a data3.pak, rename this file to data4 / 5 / 6 etc, depending on how many other pak files you have.
12. You're all set! Start the game and enjoy the freedom of your new keybindings!

UPDATE: I have uploaded a new version of this mod (1.01) to coincide with Patch 1.06, in which Techland updated inputs_keyboards.scr with more options. If you are having any problems with your configs I recommend downloading the latest version of this mod.

NOTE: If you wish to change your keybinds to mouse buttons, this can be done but one extra part of the line has to be changed: Locate the part that reads "EInputDevice_keyboard" and change this to "EInputDevice_Mouse". Thanks to runnez for pointing this out! Be advised though that only mouse buttons 1, 2 and 3 (left, right and middle) will work at the moment - any other mouse buttons will not register and some users have reported losing mouse control entirely when they've tried to assign commands to other mouse buttons. Sadly we'll have to wait until Techland release a patch to fix this.

NOTE 2: If you find that you can no longer move your mouse or use your keyboard in Dying Light 2 after making changes to your key settings, then you have made a typo somewhere in the file. Make sure you use the EXACT keybind names from the list in the note below. This is very important if you want to bind anything to the spacebar, as it is listed as "EKey__SPACE_ ". Make sure to include that end underscore!

NOTE 3: A full list of the correct names for the keybinds is available below. This can also be found in the file "inputenums.def" in the pak files. Thanks to CoNzz97 for providing the list!

Spoiler:  
Show
//namespace EKey
export int EKey__NONE           = 0x00;
export int EKey__ESCAPE         = 0x01;
export int EKey__1              = 0x02;
export int EKey__2              = 0x03;
export int EKey__3              = 0x04;
export int EKey__4              = 0x05;
export int EKey__5              = 0x06;
export int EKey__6              = 0x07;
export int EKey__7              = 0x08;
export int EKey__8              = 0x09;
export int EKey__9              = 0x0A;
export int EKey__0              = 0x0B;
export int EKey__MINUS          = 0x0C;         // '-' on main keyboard
export int EKey__EQUALS         = 0x0D;
export int EKey__BACK           = 0x0E;         // backspace
export int EKey__TAB            = 0x0F;
export int EKey__Q              = 0x10;
export int EKey__W              = 0x11;
export int EKey__E              = 0x12;
export int EKey__R              = 0x13;
export int EKey__T              = 0x14;
export int EKey__Y              = 0x15;
export int EKey__U              = 0x16;
export int EKey__I              = 0x17;
export int EKey__O              = 0x18;
export int EKey__P              = 0x19;
export int EKey__LBRACKET       = 0x1A;
export int EKey__RBRACKET       = 0x1B;
export int EKey__RETURN         = 0x1C;         // Enter on main keyboard
export int EKey__LCONTROL       = 0x1D;         // on x360 left and right CONTROL are the same
export int EKey__A              = 0x1E;
export int EKey__S              = 0x1F;
export int EKey__D              = 0x20;
export int EKey__F              = 0x21;
export int EKey__G              = 0x22;
export int EKey__H              = 0x23;
export int EKey__J              = 0x24;
export int EKey__K              = 0x25;
export int EKey__L              = 0x26;
export int EKey__SEMICOLON      = 0x27;
export int EKey__APOSTROPHE     = 0x28;
export int EKey__GRAVE          = 0x29;         // Accent grave
export int EKey__LSHIFT         = 0x2A;         // on x360 left and right SHIFT are the same
export int EKey__BACKSLASH      = 0x2B;
export int EKey__Z              = 0x2C;
export int EKey__X              = 0x2D;
export int EKey__C              = 0x2E;
export int EKey__V              = 0x2F;
export int EKey__B              = 0x30;
export int EKey__N              = 0x31;
export int EKey__M              = 0x32;
export int EKey__COMMA          = 0x33;
export int EKey__PERIOD         = 0x34;         // '.' on main keyboard
export int EKey__SLASH          = 0x35;         // '/' on main keyboard
export int EKey__RSHIFT         = 0x36;
export int EKey__MULTIPLY       = 0x37;         // '*' on numeric keypad
export int EKey__LMENU          = 0x38;         // left Alt
export int EKey__SPACE_         = 0x39;
export int EKey__CAPITAL        = 0x3A;
export int EKey__F1             = 0x3B;
export int EKey__F2             = 0x3C;
export int EKey__F3             = 0x3D;
export int EKey__F4             = 0x3E;
export int EKey__F5             = 0x3F;
export int EKey__F6             = 0x40;
export int EKey__F7             = 0x41;
export int EKey__F8             = 0x42;
export int EKey__F9             = 0x43;
export int EKey__F10            = 0x44;
export int EKey__NUMLOCK        = 0x45;
export int EKey__SCROLL         = 0x46;         // Scroll Lock
export int EKey__NUMPAD7        = 0x47;
export int EKey__NUMPAD8        = 0x48;
export int EKey__NUMPAD9        = 0x49;
export int EKey__SUBTRACT       = 0x4A;         // '-' on numeric keypad
export int EKey__NUMPAD4        = 0x4B;
export int EKey__NUMPAD5        = 0x4C;
export int EKey__NUMPAD6        = 0x4D;
export int EKey__ADD            = 0x4E;         // '+' on numeric keypad
export int EKey__NUMPAD1        = 0x4F;
export int EKey__NUMPAD2        = 0x50;
export int EKey__NUMPAD3        = 0x51;
export int EKey__NUMPAD0        = 0x52;
export int EKey__DECIMAL        = 0x53;         // '.' on numeric keypad
export int EKey__OEM_102        = 0x56;         // < > | on UK/Germany keyboards
export int EKey__F11            = 0x57;
export int EKey__F12            = 0x58;
export int EKey__F13            = 0x64;
export int EKey__F14            = 0x65;
export int EKey__F15            = 0x66;
export int EKey__KANA           = 0x70;         // (Japanese keyboard) 
export int EKey__ABNT_C1        = 0x73;         // / ? on Portugese (Brazilian) keyboards
export int EKey__CONVERT        = 0x79;         // Japanese keyboard
export int EKey__NOCONVERT      = 0x7B;         // Japanese keyboard
export int EKey__YEN            = 0x7D;         // Japanese keyboard
export int EKey__ABNT_C2        = 0x7E;         // Numpad '.' on Portugese (Brazilian) keyboards
export int EKey__NUMPADEQUALS   = 0x8D;         // '=' on numeric keypad (NEC PC98)
export int EKey__PREVTRACK      = 0x90;         // Previous Track (_CIRCUMFLEX on Japanese keyboard)
export int EKey__AT             = 0x91;
export int EKey__COLON          = 0x92;
export int EKey__UNDERLINE      = 0x93;
export int EKey__KANJI          = 0x94;         // Japanese keyboard
export int EKey__STOP           = 0x95;
export int EKey__AX             = 0x96;
export int EKey__UNLABELED      = 0x97;
export int EKey__NEXTTRACK      = 0x99;         // Next Track
export int EKey__NUMPADENTER    = 0x9C;         // Enter on numeric keypad
export int EKey__RCONTROL       = 0x9D;
export int EKey__MUTE           = 0xA0;         // Mute
export int EKey__CALCULATOR     = 0xA1;         // Calculator
export int EKey__PLAYPAUSE      = 0xA2;         // Play / Pause 
export int EKey__MEDIASTOP      = 0xA4;         // Media Stop 
export int EKey__VOLUMEDOWN     = 0xAE;         // Volume - 
export int EKey__VOLUMEUP       = 0xB0;         // Volume + 
export int EKey__WEBHOME        = 0xB2;         // Web home 
export int EKey__NUMPADCOMMA    = 0xB3;         // ';' on numeric keypad (NEC PC98) 
export int EKey__DIVIDE         = 0xB5;         // '/' on numeric keypad 
export int EKey__SYSRQ          = 0xB7;
export int EKey__RMENU          = 0xB8;         // right Alt 
export int EKey__PAUSE          = 0xC5;         // Pause 
export int EKey__HOME           = 0xC7;         // Home on arrow keypad 
export int EKey__UP_            = 0xC8;         // UpArrow on arrow keypad 
export int EKey__PRIOR          = 0xC9;         // PgUp on arrow keypad 
export int EKey__LEFT           = 0xCB;         // LeftArrow on arrow keypad 
export int EKey__RIGHT          = 0xCD;         // RightArrow on arrow keypad 
export int EKey__END            = 0xCF;         // End on arrow keypad 
export int EKey__DOWN           = 0xD0;         // DownArrow on arrow keypad 
export int EKey__NEXT           = 0xD1;         // PgDn on arrow keypad 
export int EKey__INSERT         = 0xD2;         // Insert on arrow keypad 
export int EKey__DELETE         = 0xD3;         // Delete on arrow keypad 
export int EKey__LWIN           = 0xDB;         // Left Windows key 
export int EKey__RWIN           = 0xDC;         // Right Windows key 
export int EKey__APPS           = 0xDD;         // AppMenu key 
export int EKey__POWER          = 0xDE;         // System Power 
export int EKey__SLEEP          = 0xDF;         // System Sleep 
export int EKey__WAKE           = 0xE3;         // System Wake 
export int EKey__WEBSEARCH      = 0xE5;         // Web Search 
export int EKey__WEBFAVORITES   = 0xE6;         // Web Favorites 
export int EKey__WEBREFRESH     = 0xE7;         // Web Refresh 
export int EKey__WEBSTOP        = 0xE8;         // Web Stop 
export int EKey__WEBFORWARD     = 0xE9;         // Web Forward 
export int EKey__WEBBACK        = 0xEA;         // Web Back 
export int EKey__MYCOMPUTER     = 0xEB;         // My Computer 
export int EKey__MAIL           = 0xEC;         // Mail 
export int EKey__MEDIASELECT    = 0xED;         // Media Select 
export int EKey__MOUSE_BUTTON1  = 0xF000;       // Mouse Button1
export int EKey__MOUSE_BUTTON2  = 0xF001;       // Mouse Button2
export int EKey__MOUSE_BUTTON3  = 0xF002;       // Mouse Button3
export int EKey__MOUSE_BUTTON4  = 0xF003;       // Mouse Button4
export int EKey__MOUSE_BUTTON5  = 0xF004;       // Mouse Button5
export int EKey__MOUSE_BUTTON6  = 0xF005;       // Mouse Button6
export int EKey__MOUSE_BUTTON7  = 0xF006;       // Mouse Button7
export int EKey__MOUSE_BUTTON8  = 0xF007;       // Mouse Button8
export int EKey__MOUSE_WHEEL_UP = 0x00F1;
export int EKey__MOUSE_WHEEL_DN = 0x00F2;
//namespace EJoy
export int EJoy__AXIS_X         = 0x0000;
export int EJoy__AXIS_Y         = 0x0001;
export int EJoy__AXIS_Z         = 0x0002;
export int EJoy__AXIS_RX        = 0x0003;
export int EJoy__AXIS_RY        = 0x0004;
export int EJoy__AXIS_RZ        = 0x0005;
export int EJoy__AXIS_SLIDER_0  = 0x0006;
export int EJoy__AXIS_SLIDER_1  = 0x0007;
export int EJoy__AXIS_POV_0     = 0x0008;
export int EJoy__AXIS_POV_1     = 0x0009;
export int EJoy__AXIS_POV_2     = 0x000A;
export int EJoy__AXIS_POV_3     = 0x000B;
export int EJoy__BUTTON_1       = 0x0F00;
export int EJoy__BUTTON_2       = 0x0F01;
export int EJoy__BUTTON_3       = 0x0F02;
export int EJoy__BUTTON_4       = 0x0F03;
export int EJoy__BUTTON_5       = 0x0F04;
export int EJoy__BUTTON_6       = 0x0F05;
export int EJoy__BUTTON_7       = 0x0F06;
export int EJoy__BUTTON_8       = 0x0F07;
export int EJoy__BUTTON_9       = 0x0F08;
export int EJoy__BUTTON_10      = 0x0F09;
export int EJoy__BUTTON_11      = 0x0F0A;
export int EJoy__BUTTON_12      = 0x0F0B;
export int EJoy__BUTTON_13      = 0x0F0C;
export int EJoy__BUTTON_14      = 0x0F0D;
export int EJoy__BUTTON_15      = 0x0F0E;
export int EJoy__BUTTON_16      = 0x0F0F;
export int EJoy__AXIS_LEFTTRIGGER       = 2;
export int EJoy__AXIS_RIGHTTRIGGER      = 5;
export int EJoy__AXIS_THUMBLX           = 0;
export int EJoy__AXIS_THUMBLY           = 1;
export int EJoy__AXIS_THUMBRX           = 3;
export int EJoy__AXIS_THUMBRY           = 4;
export int EJoy__BUTTON_A             = 0x0F00;     //_BUTTON_1
export int EJoy__BUTTON_B             = 0x0F01;     //_BUTTON_2
export int EJoy__BUTTON_X             = 0x0F02;     //_BUTTON_3
export int EJoy__BUTTON_Y             = 0x0F03;     //_BUTTON_4
export int EJoy__BUTTON_LEFTSHOULDER  = 0x0F04;     //_BUTTON_5
export int EJoy__BUTTON_RIGHTSHOULDER = 0x0F05;     //_BUTTON_6
export int EJoy__BUTTON_START         = 0x0F07;     //_BUTTON_7
export int EJoy__BUTTON_BACK          = 0x0F06;     //_BUTTON_8
export int EJoy__BUTTON_LEFTTHUMB     = 0x0F08;     //_BUTTON_9
export int EJoy__BUTTON_RIGHTTHUMB    = 0x0F09;     //_BUTTON_10
export int EJoy__BUTTON_DPADUP        = 0x0F0A;     //_BUTTON_11
export int EJoy__BUTTON_DPADDOWN      = 0x0F0B;     //_BUTTON_12
export int EJoy__BUTTON_DPADLEFT      = 0x0F0C;     //_BUTTON_13
export int EJoy__BUTTON_DPADRIGHT     = 0x0F0D;     //_BUTTON_14
export int EJoy__BUTTON_TOUCHPAD      = 0x0F0E;     //EJoy__BUTTON_15
//namespace EMouse
export int EMouse__AXIS_X          = 0x0000;
export int EMouse__AXIS_Y          = 0x0001;
export int EMouse__AXIS_Z          = 0x0002;
export int EMouse__AXIS_RX         = 0x0003;
export int EMouse__AXIS_RY         = 0x0004;
export int EMouse__AXIS_RZ         = 0x0005;
export int EMouse__BUTTON_1        = 0x0000 + 0xF000;
export int EMouse__BUTTON_2        = 0x0001 + 0xF000;
export int EMouse__BUTTON_3        = 0x0002 + 0xF000;