Instance Method


Indicates whether a pen-down event should be treated as an ink event.


- (BOOL)shouldBeTreatedAsInkEvent:(NSEvent *)event;



An event object representing the event to be tested.

Return Value

Returns YES if the specified event should be treated as an ink event, NO if it should be treated as a mouse event.


This method provides the ability to distinguish when a pen-down event should start inking versus when a pen-down event should be treated as a mouse-down event. This allows for a write-anywhere model for pen-based input.

The default implementation in NSApplication sends the method to the NSWindow object under the pen. If the window is inactive, this method returns YES, unless the pen-down is in the window drag region. If the window is active, this method is sent to the NSView object under the pen.

The default implementation in NSView returns YES, and NSControl overrides and returns NO. This allows write-anywhere over most NSView objects, but allows the pen to be used to track in controls and to move windows.

A custom view should override this method to get the correct behavior for a pen-down in the view.