apjcs Posted May 25, 2021 Share Posted May 25, 2021 I have a 4k screen (non retina) and when I have say a small window open at the bottom left hand corner of the monitor, it is a very very long mouse(or trackpad) movement to get to the file minuet the top left of the monitor. I would like to be able to assign a gesture, for example, double 4 finger tap to showing the menubar menus as a context menu (or not) right where my pointer is. If this is possible already and I have missed it, I apologise. I had a trial of BetterTouchtool which has this capability, but I love Alfred and don't really want to add another app just for one feature. Thanks Link to comment Share on other sites More sharing options...
deanishe Posted May 25, 2021 Share Posted May 25, 2021 Hi @apjcs, welcome to the forum. Alfred doesn't support gestures, I'm afraid, only hotkeys. Link to comment Share on other sites More sharing options...
apjcs Posted May 25, 2021 Author Share Posted May 25, 2021 A hotkey would be fine - it would still be quicker than mousing across the diagonal of a 40" monitor Link to comment Share on other sites More sharing options...
deanishe Posted May 25, 2021 Share Posted May 25, 2021 Create a workflow, add your Hotkey of choice, then connect it to a Run Script action with Language = /usr/bin/osascript (JS). Paste this code in the Script box: ObjC.import('CoreGraphics'); function run() { let ev = $.CGEventCreateMouseEvent(null, $.kCGEventMouseMoved, {x: 100, y:10}, $.kCGMouseButtonLeft); $.CGEventPost($.kCGHIDEventTap, ev); } That will move your cursor to 100 pixels from the left of the screen and 10 from the top. Should be close to the File menu, but that moves depending on how long the name of the application is. Link to comment Share on other sites More sharing options...
vitor Posted May 27, 2021 Share Posted May 27, 2021 If all you want is to show the menubar menus via hotkey, why not use the shortcut in System Preferences → Keyboard → Shortcuts → App Shortcuts → Show Help Menu? That puts you right into Help menu—which is even better because you can start typing what you want—but you can also use the arrow keys to navigate options. Link to comment Share on other sites More sharing options...
apjcs Posted May 27, 2021 Author Share Posted May 27, 2021 On 5/25/2021 at 10:48 PM, deanishe said: Create a workflow, add your Hotkey of choice, then connect it to a Run Script action with Language = /usr/bin/osascript (JS). Paste this code in the Script box: ObjC.import('CoreGraphics'); function run() { let ev = $.CGEventCreateMouseEvent(null, $.kCGEventMouseMoved, {x: 100, y:10}, $.kCGMouseButtonLeft); $.CGEventPost($.kCGHIDEventTap, ev); } That will move your cursor to 100 pixels from the left of the screen and 10 from the top. Should be close to the File menu, but that moves depending on how long the name of the application is. Thanks, I'm giving this a try. Ideally, I'd like to see the App menu as a context menu at the current mouse cursor position as opening the app menu in it's standard location is disruptive to my visual focus of the window I am working in. Link to comment Share on other sites More sharing options...
deanishe Posted May 27, 2021 Share Posted May 27, 2021 5 minutes ago, apjcs said: Ideally, I'd like to see the App menu as a context menu at the current mouse cursor position as opening the app menu in it's standard location is disruptive to my visual focus of the window I am working in. Right. Somehow I managed to completely miss the "context menu" part despite it being in your post and the thread title… Sorry. Alfred can't build you an arbitrary context menu. Closest you can get is one of the menu-search workflows. Link to comment Share on other sites More sharing options...
Chris Messina Posted May 28, 2021 Share Posted May 28, 2021 On 5/25/2021 at 12:03 PM, apjcs said: I would like to be able to assign a gesture, for example, double 4 finger tap to showing the menubar menus as a context menu (or not) right where my pointer is. You might want to check out Bartender. Link to comment Share on other sites More sharing options...
apjcs Posted May 28, 2021 Author Share Posted May 28, 2021 Bartender look great, but appears to only control the icons not the actually application menus Link to comment Share on other sites More sharing options...
Mr Pennyworth Posted May 28, 2021 Share Posted May 28, 2021 (edited) EDIT: the post below is a result of not reading the original post properly where the author clearly mentions they have seen BTT and don't want to use it. Take a look at BetterTouchTool. Here's forum thread discussing the same feature. Looks like exactly the thing you want: Edited May 29, 2021 by Mr Pennyworth Link to comment Share on other sites More sharing options...
vitor Posted May 28, 2021 Share Posted May 28, 2021 Because there have been a couple of app submissions, note the top post: On 5/25/2021 at 8:03 PM, apjcs said: I had a trial of BetterTouchtool which has this capability, but I love Alfred and don't really want to add another app just for one feature. So the only options are Alfred Workflows or macOS native features. None of those can do the requested feature exactly, only the mentioned approximations. Link to comment Share on other sites More sharing options...
deanishe Posted May 29, 2021 Share Posted May 29, 2021 I use BetterTouchTool just for triple-tap. Link to comment Share on other sites More sharing options...
Mr Pennyworth Posted May 29, 2021 Share Posted May 29, 2021 (edited) On 5/27/2021 at 5:57 PM, deanishe said: Right. Somehow I managed to completely miss the "context menu" part despite it being in your post and the thread title… Sorry. Hey @deanishe I see your "I missed 'context menu'" and I raise you to "I missed the whole paragraph about not wanting to use another app" 🤣 @vitor has a nice and gentle way of asking "have you even read the post fully?" Thanks! 😇 Edited May 29, 2021 by Mr Pennyworth vitor 1 Link to comment Share on other sites More sharing options...
vitor Posted May 29, 2021 Share Posted May 29, 2021 (edited) 4 hours ago, deanishe said: I use BetterTouchTool just for triple-tap. I used it exclusively for middle-click (open link in new tab) at first. Somewhere along the way I got the idea of extending that use to pinch in for closing tabs, pinch out for reopening closed tabs, rotate left to switch to the left tab and rotate right for the right tab. Though I get @apjcs‘s desire to not have multiple app’s running. I’m the same and go to great lengths to make Alfred be my one app as much as I can. Edited May 29, 2021 by vitor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now