More than 5 years have passed since last update.
Karabiner-Elements が超絶怒濤に進化している。今も!
Sierraにしたときの後悔
macOS Sierraにして最も後悔したのが、Karabinerが動かなかったこと。
Karabiner-Elementsの開発は始まっていましたが、Karabinerを置き換えるのはちょっと難しい状況でした。
しかし、ここにきて一気に私が欲しかった機能が追加されました。
- Version 0.91.1
- 複数キーのリマップに対応
- Version 0.91.6
- 特定のアプリケーションだけに有効なリマップ(frontmost_application_if)、特定のアプリケーション以外に有効なリマップ(frontmost_application_unless)に対応
- Version 0.91.7
- ちょっと予想しなかった「Shell command execution」が追加
結果として、Karabiner時代と全く同一またはそれ以上の操作性をGetすることができ本当に満足しております👁 :thumbsup_tone2:
👁 :thumbsup_tone2:
👁 :thumbsup_tone2:
。これは寄付しなければ。
というわけで、誰かのお役に立てればと思い、上記の機能を使ったjsonのサンプルを置きます。
設定サンプル
「Command + L」でスクリーンセーバー起動
0.91.1で追加された、複数キーにリマップ対応と、0.91.7で追加された「shell_command」を使って「Command + L」でスクリーンセーバー起動。
(スクリーンをロックするのが目的です👁 :relaxed:
)
{"description":"Command + L で スクリーンセーバーを起動する","manipulators":[{"from":{"key_code":"l","modifiers":{"mandatory":["left_command"],"optional":["any"]}},"to":[{"shell_command":"open /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app"}],"type":"basic"}]}2017/09/27 追記
macOS High Sierraでは ScreenSaverEngine.app が以下のパスに移動していました。修正が必要になります
/System/Library/CoreServices/ScreenSaverEngine.app
Chromeにて「F5」キーひとつでページリロード
0.91.6で追加された、指定アプリケーションのみに有効とする「frontmost_application_if」を用いてChromeにて「F5」キーひとつでページリロードする
{"description":"F5でページリロード(chrome)","manipulators":[{"from":{"key_code":"f5","modifiers":{"optional":["any"]}},"to":[{"key_code":"r","modifiers":["command"]}],"conditions":[{"type":"frontmost_application_if","bundle_identifiers":["^com\\.google\\.Chrome"]}],"type":"basic"}]}「Command + E」でFinderを表示(RDC除く)
ちなみに「frontmost_application_unless」を指定すると指定したアプリを除外する形になります。
以下の例では、「Command + E」でFinderを表示しますが、リモートデスクトップではWindowsのエクスプローラーが開いて欲しいので除外しています。
{"description":"Command + E で Finderを起動する(RDC除く)","manipulators":[{"from":{"key_code":"e","modifiers":{"mandatory":["left_command"],"optional":["any"]}},"to":[{"shell_command":"open ~"}],"conditions":[{"type":"frontmost_application_unless","bundle_identifiers":["^com\\.microsoft\\.rdc\\.osx","^com\\.microsoft\\.rdc\\.macos"]}],"type":"basic"}]}2017/11/30 追記
RDCの新しいバージョン「10.0.823」では Bundle Identifierが「com.microsof.rdc.macos」 に変更されていたので追加や修正が必要になります
最後に
最後になりますが作者のtekezo様、本当にありがとうございます。
このソフトがなかったら、REALFORCE(JIS)をMacBookで使う事はできませんでした。
感謝しかありません。
書いた直後に、Version 0.91.9がでてる!変数が使えるようになった模様👁 :wink:
variable_if and variable_unless has been added to conditions. You can use set_variable to change the variables.
マウスも!
[ついにマウスも対応開始です!マウス対応辺はこちら]
(https://qiita.com/hanamiche/items/9623847014a1d6020760)
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
