経緯🏞️
Mac純正のマウスではなく、バッファローのマウスを使用したいと思い、今回Karabiner-Elementsを使って実装したのでその内容を展開します。
実装内容🗒️
BUFFALOのマウスのサイドボタンを使ってSafariでブラウザバック、進むを設定する。
実装コード✏️
{
"description": "Button 4: BrowserBack, Button 5: BrowserForward for Safari",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.Safari$"
],
"type": "frontmost_application_if"
}
],
"description": "button4",
"from": { "pointing_button": "button4" },
"to": [
{
"key_code": "close_bracket",
"modifiers": ["command"]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.apple\\.Safari$"
],
"type": "frontmost_application_if"
}
],
"description": "button5",
"from": { "pointing_button": "button5" },
"to": [
{
"key_code": "non_us_pound",
"modifiers": ["command"]
}
],
"type": "basic"
}
]
}
参考📕
公式Documentation
https://karabiner-elements.pqrs.org/docs/
Karabiner-Elementsで特定アプリの使用時のみキーバインドを変更する
https://www.870labo.com/posts/change-key-bind-with-karabiner-elements/
最後に
よかったら👍いただけると励みになります!