Skip navigation.
 
mlRe: Detect modifier keys on launch
FROM : Ricky Sharp
DATE : Wed Jul 05 23:36:37 2006

On Jul 5, 2006, at 3:54 PM, Doug Knowles wrote:

> My app (by default) automatically re-opens files that were open the
> last time it quit.  I'd like to add the capability to temporarily
> suppress this behavior by holding down the shift key during launch.
> I've tried looking at the most recent event object, but since the app
> just launched, there is no such event.


if (([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) != 0)
    // shift is being held down

___________________________________________________________
Ricky A. Sharp        mailto:<email_removed>
Instant Interactive(tm)  http://www.instantinteractive.com

Related mailsAuthorDate
mlDetect modifier keys on launch Doug Knowles Jul 5, 22:54
mlRe: Detect modifier keys on launch Tom Harrington Jul 5, 23:14
mlRe: Detect modifier keys on launch Sean McBride Jul 5, 23:21
mlRe: Detect modifier keys on launch Ricky Sharp Jul 5, 23:36
mlRe: Detect modifier keys on launch Doug Knowles Jul 6, 17:10