What is the coding to program my F1 key to launch the Safari application using Karabiner?
Asked
Active
Viewed 294 times
2 Answers
1
Modify private.xml and add:
<item>
<name>F1 Safari</name>
<identifier>f1_safari</identifier>
<autogen>__KeyToKey__ KeyCode::F1, KeyCode::VK_OPEN_URL_APP_Safari</autogen>
</item>
Then enable it in Change Key. Depending on your settings (Consumer Keys or F1-F12 for the F-keys) in System Preferences -> Keyboard -> Keyboard -> F-key behavior you may have to hit the fn-key also.

klanomath
- 66,391
- 9
- 130
- 201
1
In Karabiner Elements, add a complex modification rule to /Users/username/.config/karabiner/karabiner.json
:
{
"description": "Launch Safari (F1)",
"manipulators": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"shell_command": "open -a '/Applications/Safari.app'"
}
],
"type": "basic"
}
]
},
Then Add Rule and pick this one from the list.

Noumenon
- 216