need help implementing Global Keyboard Shortcuts

I cut and pasted that code into a new project, and it worked fine to get to the lockScreen() method (I just have a log statement in there). Try putting a log statement in as the first line in lockScreen() and see if it gets executed. If it does, then the problem is with your do shell script.

Ric

I still get the same error…

But when do you get the error? Does the log statement in lockScreen() get executed?

Ric

Okay, I kinda sound stupid… but I don’t know how to activate the console in Xcode 4 :/. Sorry, could you tell me how to do that…

Also, I’m assuming that lockScreen() didn’t work because the build failed anyways, it wouldn’t run.

EDIT: Sorry, it DID run, it just wouldn’t work.

In the upper right hand corner of the Xcode window, there are three buttons with “View” written under them. The middle one toggles the display of the console window. But that’s probably not going to help if your build is failing. I didn’t realize you app wasn’t even running.

Ric

Could I send you my project? I am not explaining enough so maybe it would be more helpful to directly send you the project…

Sure. PM me.

Ric

Gosh… you know I’m a beginner when I can’t even find out how to attach an item to a PM. :stuck_out_tongue:

I don’t know that you can. Just PM me, I 'll respond and then you can attach it to my email

Ric

I am using TechExpertHD´s code in my app. Basically it works but in input or text fields the char that is part of the hotkey combination appears in those input fields. How can I avoid this annoying behavior. E.g. the hotkey alt + cmd + ‘A’ produces an ‘A’. Any hint is appreciated.