A Hat in Time

A Hat in Time

Not enough ratings
Keyboard and Mouse Rebinding
By fractile81
Learn how to customize your PC controls for this colorful 3D platformer.
2
   
Award
Favorite
Favorited
Unfavorite
Changelog
March 3, 2019
  • Updated Badge binds in ESDF section
Finding Keyboard.ini
The Keyboard.ini configuration file specifies all of your PC bindings in one place. This includes your mouse bindings.

You can find the Keyboard.ini in:

<HatinTime>\HatinTimeGame\Config\Gamepads\Keyboard.ini

For Steam, the full path may look something like this on a PC:

C:\Program Files\Steam\steamapps\common\HatinTime\HatinTimeGame\Config\Gamepads\Keyboard.ini

TIP: save a copy of your original Keyboard.ini file before your make any modifications!
Keyboard.ini Structure
The Keyboard.ini file is broken up into different sections to help group together relevant information.

Backup your Keyboard.ini file before making any changes!

The sections are:
  1. Identification
  2. Buttons
  3. Binds
    1. Actions
    2. Menus
    3. Badges
    4. Hotkeys
    5. Movement and Camera

Identification
Identifies what this controller-type this file represents within the game. Do not change!

Buttons
Defines all of the possible buttons available for binding. Even if a key isn't used, it is still listed in this section. The below section Key Bind Codes provides a table of all the button codes available, as defined within this file.

Do not change!

Binds
This is where in-game controls are associated with button codes. The basic composition of these binds are as follows:

+Bind = <Hat_Game_Control> ButtonID = <Button_Code>

With this as the basic template, the following placeholders are replaced:

  • <Hat_Game_Control> - A code of a control within the game. Creating your own won't do anything, and removing a bind can cause unintended consequences.
  • <Button_Code> - The code associated with the key to use, and outlined in the Key Bind Codes section below.

With every bind you can have one or more ButtonID codes defined. This is especially inportant with the Movement and Camera bindings. Out of the box, the game supports WASD and the arrow keys for player movement, as defined by the Hat_Player_MoveX and Hat_Player_MoveY bindings.

The Movement and Camera bindings have a special way to identify keys for moving in the negative/opposite direction. This is done by adding a minus(-) before the ButtonID definition.

This code shows how to define moving forward and backward using just the arrow keys:

+Bind = Hat_Player_MoveY ButtonID = 38 -ButtonID = 40

Here, button code 38 is arrow up, and code 80 is arrow down.
Key Bind Codes
Mouse

Name
Code
Left Mouse Button (LMB)
1
Right Mouse Button (RMB)
2
Middle Mouse Button (MOUSE3)
4
X1 Mouse Button
5
X2 Mouse Button
6
Mouse Wheel Up
256
Mouse Wheel Down
257

Numbers

Note that the number keys are different from those found on the Numpad.

Name
Number Code
Numpad Code
0
48
96
1
49
97
2
50
98
3
51
99
4
52
100
5
53
101
6
54
102
7
55
103
8
56
104
9
59
105

Alphabet

Name
Code
A
65
B
66
C
67
D
68
E
69
F
70
G
71
H
72
I
73
J
74
K
75
L
76
M
77
N
78
O
79
P
80
Q
81
R
82
S
83
T
84
U
85
V
86
W
87
X
88
Y
89
Z
90

Navigation

Name
Code
Arrow Up
38
Arrow Down
40
Arrow Left
37
Arrow Right
39
Page Up
33
Page Down
34
Home
36
End
35

Punctuation/Symbols

Name
Character
Code
Add
+ on Numpad
107
Subtract
- on Numpad
109
Multiply
* on Numpad
106
Divide
/ on Numpad
111
Decimal
. on Numpad
110
Semicolon (;)
;
186
Equals
=
187
Comma
,
188
Minus
-
189
Period
.
190
Slash
/
191
Backslash
\
220
Tilde
~
192
Left Bracket
219
Right Bracket
]
221
Quote
'
222

Function Keys

Name
Code
F1
112
F2
113
F3
114
F4
115
F5
116
F6
117
F7
118
F8
119
F9
120
F10
121
F11
122
F12
123

Other

Name
Code
Enter
13
Space
32
Escape
27
Tab
9
Backspace
8
Pause
19
Caps Lock
20
Num Lock
144
Scroll Lock
145
Left Shift
160
Right Shift
161
Left Control
162
Right Control
163
Left Alt
164
Right Alt
167
Insert
45
Delete
46
My ESDF Setup
Below is the entire "Binds" section in my Keyboards.ini file. In addition to using ESDF for movement...

  • Menu paging uses W and R for left and right, respectively.
  • Interact is the Q key.
  • Mousewheel zooming was swapped so that mousewheel up zooms in, and vice versa for mousewheel down. This has the unfortunate effect of inverting the scroll direction in menus.
  • The C key can be used for crouching in addition to the original binding.

[Binds] ; Actions +Bind = Hat_Player_Jump ButtonID = 32 +Bind = Hat_Player_Attack ButtonID = 1 +Bind = Hat_Player_Interact ButtonID = 81 +Bind = Hat_Player_Crouch ButtonID = 162 ButtonID = 67 +Bind = Hat_Player_Share ButtonID = 87 +Bind = Hat_Player_CameraSnap ButtonID = 4 +Bind = Hat_Player_ZoomIn ButtonID = 256 +Bind = Hat_Player_ZoomOut ButtonID = 257 ; Menus +Bind = Hat_Menu_Confirm ButtonID = 1 +Bind = Hat_Menu_Cancel ButtonID = 2 +Bind = Hat_Menu_Start ButtonID = 27 +Bind = Hat_Menu_PageRight ButtonID = 82 +Bind = Hat_Menu_PageLeft ButtonID = 87 ; Badges +Bind = Hat_Player_Ability ButtonID = 65 ButtonID = 160 +Bind = Hat_Player_AbilitySwap ButtonID = 2 ; Hotkeys +Bind = Hat_Hotkey_Up ButtonID = 49 +Bind = Hat_Hotkey_Down ButtonID = 52 +Bind = Hat_Hotkey_Left ButtonID = 50 +Bind = Hat_Hotkey_Right ButtonID = 51 ; Movement and Camera +Bind = Hat_Player_MoveX ButtonID = 70 ButtonID = 39 -ButtonID = 83 -ButtonID = 37 +Bind = Hat_Player_MoveY ButtonID = 69 ButtonID = 38 -ButtonID = 68 -ButtonID = 40

If you copy and paste this into your own Keyboard.ini file, make sure you only replace the [Binds] section!

As always, may sure to backup your Keyboard.ini file befoer you make any changes.
Invert The Mouse Y-axis
You may have noticed that using the "Invert Y-axis" option within the game's input settings doesn't do anything. This is due to that only applying to controllers and not the mouse. So how can we invert the mouse?

It may seem complicated, but the steps are fairly straight forward:

  1. Enable the Developer Console under Games Settings > System Settings.
  2. Start or continue a game.
  3. Press the ` key to pull down the Developer Console.
  4. Enter
    invertmouse
    and hit Enter.
  5. Close the Developer Console and your mouse's Y-axis should now be inverted!
2 Comments
Kay Sep 22, 2018 @ 2:26am 
pressing left control to dive/crouch was so annoying, thanks
LC-DDM Sep 21, 2018 @ 5:29pm 
It'd be nice if there were a way to remap the console key.