yabai
yabai copied to clipboard
Bug: Holding down modifier key prevents default click behavior
I use option as my modifier key, which works fine for the most part. However, when I need to hold down option to click on an item in a context menu (e.g. the finder app's right click menu), the click fails to register. Since the only use case for the modifier keys is holding down click to drag while resizing/moving windows, would it be possible to differentiate clicks from dragging? Thanks.
👍 to this. I have ALT-click+drag to move windows in yadr, and this inhibits ALT-click on, say, menubar items (to show extended menus). It would be awesome to be able to differentiate these.
Probably best solved as explained in https://github.com/koekeishiya/yabai/issues/601
I've had similar weird interactions when I set my mouse_modifier to cmd
trying to cmd+click
links into new tabs. Not a specific fix for your problem, but I ended up using hidutil to remap right_control
to fn
and having yabai use fn
as the mouse_modifier since that seems to have the least undesired interactions.
gist here: https://gist.github.com/mattbailey/9429c7691467bf82d64e1900c99fb53b generated with this tool: https://hidutil-generator.netlify.app/
Wouldn't it be possible for yabai to capture the click only when the action is dragging (at least for windows move/resize) ?
It's not quite that simple.
"Dragging" in macOS can only take place when a mouse button is held/pressed/down. The feature in yabai is built around the events reported by macOS, which for any drag-operation first consists of a mouse-down event, followed by one or more mouse-drag events, until a mouse-up event takes place.
For "click anywhere" to work, yabai needs to intercept the initial click event that is reported before the drag events begin. These events are reported in the same thread, in sequence. yabai cannot side-step the click, wait for a drag event to come in, and then tell macOS to void (make a no-op out of) the previously performed mouse-click.
The best that I can think of would be to replicate the click if no drag-events occur in between the mouse-down and mouse-up event.
Thanks!
New change somehow randomly causes segfaults... Not completely sure why, code looks fine to me, but w/e easy fix.