在Finder中为“显示路径栏”创建键盘快捷键


5

似乎Finder中没有“Show Path Bar”的内置键盘快捷键。我怎样才能创建一个?

Answers:


5

转到“系统偏好设置”中的“键盘”首选项面板,然后选择“键盘快捷键”选项卡在左侧列中,选择“应用程序快捷方式”,如下图所示。

enter image description here

单击加号按钮,为“显示路径栏”菜单项添加Finder的键盘快捷键条目。由于显示路径栏后“显示路径栏”菜单项的标题将更改为“隐藏路径栏”,因此您可能还想为其添加快捷方式。


谢谢,这是一个完美的解决方案。我为“隐藏路径栏”添加了另一个快捷键和相同的键,现在我可以使用相同的快捷方式来打开或关闭路径栏可见性。
Daniel Serodio

0

用一个 火花 这将允许您从AppleScript创建键盘快捷方式。然后,创建一个AppleScript,单击菜单中的“显示路径栏”。

tell application "System Events"
    set UI_enabled to UI elements enabled
end tell
-- Checks to see if UI scripting is enabled
if UI_enabled is false then
    tell application "System Preferences"
        activate
        set current pane to pane id "com.apple.preference.universalaccess"
        display dialog "This script utilizes the built-in Graphic User Interface Scripting architecture of Mac OS x which is currently disabled." & return & return & "You can activate GUI Scripting by selecting the checkbox \"Enable access for assistive devices\" in the Universal Access preference pane." with icon 1 buttons {"Cancel"} default button 1
    end tell
end if
if UI_enabled is true then
    -- Actual code that clicks the button
    tell application "Finder" to activate
    tell application "System Events"
        tell process "Finder"
            tell menu bar 1
                tell menu bar item "View"
                    tell menu "View"
                        click menu item 12
                    end tell
                end tell
            end tell
        end tell
    end tell
end if
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.