Search Results

Search found 3 results on 1 pages for 'yangumi'.

Page 1/1 | 1 

  • How can I check whether Exposé is being activated or not?

    - by yangumi
    Hi, I'm creating an application that emulates MacBook's multi-touch Trackpad. As you may know, on MacBook's trackpad if you swipe 4 fingers up, it triggers the Show Desktop. if you swipe 4 fingers down, it shows the Exposé. However, if the Show Desktop is being activated and you swipe 4 fingers down, it will come back to the normal mode. The same goes with the Exposé: if the Exposé is being activated and you swipe 4 fingers up, it will also come back to the normal mode. Here is the problem: I use the keyboard shortcut F3 to show the Exposé and F11 to show the Show Desktop. The problem is, when the Show Desktop is being activated, if I press F3, it will go straight to the Exposé. And when the Exposé is being activated, if I press F11 it will go straight to the Show Desktop. But I want it to behave like Trackpad, which I guess its code may look like this - FourFingersDidSwipeUp { if (isExposeBeingActivated() || isShowDesktopBeingActivated()) { pressKey("Esc"); } else { pressKey("F11"); } } But I don't know how to implement the "isExposeBeingActivated()" and "isShowDesktopBeingActivated()" methods. I've tried creating a window and check whether its size has changed (on assumption that if the Expose is being activated, its size should be smaller), but the system always returns the same size. I tried monitoring the background processes during the Expose, but nothing happened. Does anyknow have any suggestions on this? (I'm sorry if my English sounds weird.)

    Read the article

  • How to know a device's name from its device ID in OS X?

    - by yangumi
    Hi all, I'm writing a program in OS X that receives click events from a mouse and a touchpad. When the user clicks at somewhere, the OS sends the device ID, which is just an int, and the position of the cursor to my callback function. I want to know if the click event comes from mouse or touchpad. So, how can I know the device's name from its device ID? Thank you! (I'm sorry for my poor English.)

    Read the article

  • Can't edit IORegistryEntry

    - by yangumi
    Hi, I am creating a software on Mac and I would like to change the value of an IORegistryEntry. I can view it on the IORegistryExplorer, but I can't edit it. So it's my understanding that I have to edit it via code. Here is my code: CFMutableDictionaryRef matchingDict = IOServiceNameMatching("AppleUSBMultitouchDriver"); io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, matchingDict); if(service) { CFStringRef manufacturer = IORegistryEntryCreateCFProperty(service, CFSTR("Manufacturer"), kCFAllocatorDefault,0); NSLog(@"%@", (NSString*)manufacturer); kern_return_t err = IORegistryEntrySetCFProperty(service, CFSTR("Manufacturer"), CFSTR("test")); NSLog(@"error = %d", err); } This will output 2010-04-10 16:09:09.015 Test[41548:a0f] Apple Inc. 2010-04-10 16:09:09.015 Test[41548:a0f] error = 0 But after I check the value in the IORegistryExplorer, it still doesn't change. Does anybody have any suggestions? Thank you

    Read the article

1