UE4中正在模擬/預覽遊戲時,預設的關閉模擬按鍵是ESC。
但是當遊戲中需要用到ESC按鍵時(例如開啟遊戲選單、取消等等指令),就會和原先的按鍵相衝。
此時若要更改預設按鍵時則 :
- 到該專案的資料夾內找Config / DefaultInput.ini
- 開啟後再最上面增加
[/Script/Engine.PlayerInput]
-DebugExecBindings=(Key=Escape,Command="CloseEditorViewport")
存檔後重新開啟UE4就會生效。
-DebugExecBindings=(Key=Escape,Command="CloseEditorViewport")是代表刪除特定指令按鍵,也可以重新更改按鍵,例如:
[/Script/Engine.PlayerInput]
-DebugExecBindings=(Key=Escape,Command="CloseEditorViewport")
+DebugExecBindings=(Key=F12,Command="CloseEditorViewport")
將原先的ESC會停止模擬的功能刪除,再增加按F12會停止模擬功能。