objective c - in scripting bridge how can i send shortcut with 2 modifiers? -


i trying replicate "take screenshot shortcut" (cmd+shift+3) via cocoa , scripting bridge

systemeventsapplication * sysevent = [sbapplication applicationwithbundleidentifier:@"com.apple.systemevents"]; [sysevent keycode:20 using:systemeventsemdscommanddown]; 

but can't send more 1 systemeventsemds method.
in applescript easy as

key code 20 using {command down, shift down} 

i kinda solved this. trying cmd+shift+3 serves, of know, take screenshot. shift+3 in italian keyboard = "£" so

[sysevent keystroke:@"£" using:systemeventsemdscommanddown]; 

does trick i'm still wondering how have done cmd+opt+something , how manage localization...


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -