1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Change shortcut key from CTRL to CMD on OSX (#393)

This commit is contained in:
Laurenz Reinthaler 2020-12-06 01:10:40 +01:00 committed by GitHub
parent e0b010867a
commit da214efc53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
@ -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