3 本指タップに応答して表示されるポップアップ辞書をブロックする必要がある OS X アプリケーションがあります。
当初、トラックパッド設定パネルの影響を受ける値を変更することを検討しましたが、これらの値を使用するものは変更された値を取得しません。設定パネルだけが何かに影響を与えるようです。試したコマンドは次のとおりです。
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerTapGesture -int 0
defaults -currentHost write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerTapGesture -int 0
defaults write -g com.apple.trackpad.threeFingerTapGesture -int 0
defaults -currentHost write -g com.apple.trackpad.threeFingerTapGesture -int 0
ログオフして再度ログインすると、設定が有効になります。これは私たちの選択肢ではありません。
次に考えたのは、アプリケーションのメイン ビューで 3 桁のタッチ イベントをオーバーライドすることでした。イベントを受け取ることはできますが、イベントをキャンセルするものはありません。例えば:
- (void)touchesBeganWithEvent:(NSEvent *)event {
NSSet *touches = [event touchesMatchingPhase:NSTouchPhaseTouching inView:nil];
if(3 == [touches count]) {
// Okay, now what?
}
}
考え?