Nathanzheng
V2EX  ›  问与答

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

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

    或者告诉我怎么做也行

    4 replies  •  2017-03-27 18:43:43 +08:00
    minamike
    minamike
    Mar 27, 2017❤️1
    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
    Nathanzheng
    OP
    Mar 27, 2017
    2
    @minamike 请问怎么用啊, Keyword 是什么
    minamike
    minamike
    Mar 27, 2017
    3
    @Nathanzheng 你时用的 Alfred 的吗 keyword 就是运行这个命令的关键词啊
    你用快捷键呼出 alfred 窗口输入设定的 keyword 就可以运行这个命令
    也可以直接用快捷键啊 两者任选一个就可以
    Nathanzheng
    Nathanzheng
    OP
    Mar 27, 2017
    4
    @minamike 没有用啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3567 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 04:06 · PVG 12:06 · LAX 20:06 · JFK 23:06
    ♥ Do have faith in what you're doing.