Nathanzheng
V2EX  ›  问与答

求一个关闭/打开 Fn 功能键的 Workflow,

  •  
  •   Nathanzheng · Mar 27, 2017 · 1834 views
    This topic created in 3336 days ago, the information mentioned may be changed or developed.

    或者告诉我怎么做也行

    4 replies    2017-03-27 18:43:43 +08:00
    minamike
        1
    minamike  
       Mar 27, 2017   ❤️ 1
    如果是 mac 的话可以用 AppleScript
    ```
    tell application "System Preferences"
    set current pane to pane "com.apple.preference.keyboard"
    end tell


    tell application "System Events"
    if UI elements enabled then
    tell tab group 1 of window "Keyboard" of process "System Preferences"
    click checkbox "Use F1, F2, etc. keys as standard function keys"
    end tell
    else
    tell application "System Preferences"
    set current pane ¬
    to pane "com.apple.preference.universalaccess"
    display dialog ¬
    "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
    end tell
    end if
    end tell

    tell application "System Preferences"
    quit
    end tell
    ```
    Alfredworkflow : https://github.com/packal/repository/blob/master/com.tanseycg.togglefunctionkeys/toggle_function_keys.alfredworkflow
    Nathanzheng
        2
    Nathanzheng  
    OP
       Mar 27, 2017
    @minamike 请问怎么用啊, Keyword 是什么
    minamike
        3
    minamike  
       Mar 27, 2017
    @Nathanzheng 你时用的 Alfred 的吗 keyword 就是运行这个命令的关键词啊
    你用快捷键呼出 alfred 窗口输入设定的 keyword 就可以运行这个命令
    也可以直接用快捷键啊 两者任选一个就可以
    Nathanzheng
        4
    Nathanzheng  
    OP
       Mar 27, 2017
    @minamike 没有用啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2898 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 11:55 · PVG 19:55 · LAX 04:55 · JFK 07:55
    ♥ Do have faith in what you're doing.