diff --git a/lib/I18n.php b/lib/I18n.php index 287e2a00..14c109bf 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -297,6 +297,19 @@ class I18n return in_array(self::$_language, array('ar', 'he')); } + /** + * get OS-specific copy hotkey modifier key name based on user agent + * + * @access public + * @static + * @return string 'Cmd' on macOS, 'Ctrl' otherwise + */ + public static function getCopyHotkey() + { + return isset($_SERVER['HTTP_USER_AGENT']) && + strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false ? 'Cmd' : 'Ctrl'; + } + /** * set the default language * diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 9a542234..4a60b534 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -626,8 +626,7 @@ endif;
diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 6ea9c209..a1ac5600 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -483,8 +483,7 @@ endif;