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
Post a Comment