From 1cd9f2dcf2fdae1874a7e46c889d6f629d1318ba Mon Sep 17 00:00:00 2001
From: Thomas Goyne <plorkyeran@aegisub.org>
Date: Thu, 4 Oct 2012 16:56:02 -0700
Subject: [PATCH] Add a default hotkey for "audio/play/line"

---
 aegisub/src/hotkey.cpp                       | 8 ++++++++
 aegisub/src/libresrc/default_hotkey.json     | 6 ++++++
 aegisub/src/libresrc/osx/default_hotkey.json | 6 ++++++
 3 files changed, 20 insertions(+)

diff --git a/aegisub/src/hotkey.cpp b/aegisub/src/hotkey.cpp
index 06e5a0a51..fb115ac0d 100644
--- a/aegisub/src/hotkey.cpp
+++ b/aegisub/src/hotkey.cpp
@@ -49,6 +49,12 @@ namespace {
 		{ 0 }
 	};
 
+	const char *removed_commands_7035[] = { 0 };
+	const char *added_hotkeys_7035[][4] = {
+		{ "audio/play/line", "Audio", "R", 0 },
+		{ 0 }
+	};
+
 	void migrate_hotkeys(const char *removed[], const char *added[][4]) {
 		agi::hotkey::Hotkey::HotkeyMap hk_map = hotkey::inst->GetHotkeyMap();
 
@@ -119,6 +125,8 @@ void init() {
 		migrate_hotkeys(removed_commands_6294, added_hotkeys_6294);
 	if (last_version < 6933)
 		rename_commands();
+	if (last_version < 7035)
+		migrate_hotkeys(removed_commands_7035, added_hotkeys_7035);
 }
 
 void clear() {
diff --git a/aegisub/src/libresrc/default_hotkey.json b/aegisub/src/libresrc/default_hotkey.json
index ff7c6371a..a839be806 100644
--- a/aegisub/src/libresrc/default_hotkey.json
+++ b/aegisub/src/libresrc/default_hotkey.json
@@ -293,6 +293,12 @@
 	},
 
 	"Audio" : {
+		"audio/play/line" : [
+			{
+				"modifiers" : [],
+				"key" : "R"
+			}
+		],
 		"audio/play/selection" : [
 			{
 				"modifiers" : [],
diff --git a/aegisub/src/libresrc/osx/default_hotkey.json b/aegisub/src/libresrc/osx/default_hotkey.json
index ea0dc0df2..64a2ee90d 100644
--- a/aegisub/src/libresrc/osx/default_hotkey.json
+++ b/aegisub/src/libresrc/osx/default_hotkey.json
@@ -303,6 +303,12 @@
 	},
 
 	"Audio" : {
+		"audio/play/line" : [
+			{
+				"modifiers" : [],
+				"key" : "R"
+			}
+		],
 		"audio/play/selection" : [
 			{
 				"modifiers" : [],
-- 
GitLab