Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change shortcut key from CTRL to CMD on OSX #393

Merged
merged 1 commit into from
Dec 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Autoload/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ onready var current_version : String = ProjectSettings.get_setting("application/

func _ready() -> void:
randomize()
if OS.get_name() == "OSX":
use_osx_shortcuts()
if OS.has_feature("standalone"):
root_directory = OS.get_executable_path().get_base_dir()
# Load settings from the config file
Expand Down Expand Up @@ -551,3 +553,13 @@ func save_project_to_recent_list(path : String) -> void:
func update_recent_projects_submenu() -> void:
for project in Global.recent_projects:
recent_projects_submenu.add_item(project.get_file())

func use_osx_shortcuts() -> void:
var inputmap := InputMap

for action in inputmap.get_actions():
var event : InputEvent = inputmap.get_action_list(action)[0]

if event.control:
event.control = false
event.command = true