• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Hotkey/Cursor/Windowing questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hotkey/Cursor/Windowing questions


  • Subject: Hotkey/Cursor/Windowing questions
  • From: Sloan Kahsen <email@hidden>
  • Date: Tue, 12 Oct 2004 00:51:31 -0700

Hello everyone,

Thanks to some code I've been cobbling together from here and various online sources, I've been able to get somewhat close to what I'm trying to do... My goal is to have a hotkey be hit, then the cursor change, an invisible (transparent) window appear above all others, and then I'm going to do an action on that window. Here is my hotkey code:

- (IBAction)hitHotKey: (id)sender
{
[NSApp activateIgnoringOtherApps: YES];

if (fingerCursor == nil)
{
fingerCursor = [[NSCursor alloc] initWithImage: [NSImage imageNamed: @"myPic"]
hotSpot: NSMakePoint (0, 0)];
[fingerCursor set];
}
else
[fingerCursor set];
}

Problem 1) If I *don't* have the activateIgnoringOtherApps, I can't get the custom cursor to appear, however when I do have it, it brings my app frontmost, but I don't get the cursor (though I see it for a second). The cursor remains an arrow until I activate the key sequence again.

Problem 2) Actually I want to *not* have my app come frontmost when I activate this hotkey. I suppose if my cursor could simply change and then if I could put a transparent window above all others, I would be set (similar to the functionality of Quicksilver for example - hit a hotkey, window comes up but you are still in your frontmost app even though QS is taking your keystrokes). My hang up is the cursor change while the app is in the background. The Finder can do it if you perform the key sequence command-shift-4-space for example (camera) even while in the background (or is it a function of the dock?) Any tips or insight on this would be greatly appreciated!

Thanks.

Sloan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Setting Cursor from Background (Re: Hotkey/Cursor/Windowing questions)
      • From: daniel <email@hidden>
  • Prev by Date: Re: toolbar menu erro
  • Next by Date: Re: toolbar menu erro
  • Previous by thread: Re: WebView Content from String?
  • Next by thread: Setting Cursor from Background (Re: Hotkey/Cursor/Windowing questions)
  • Index(es):
    • Date
    • Thread