RetroFed Forum
Your home away from modern life.
Is it possible to map out keyboard shortcuts to emulate a click of certain tray icons?
Post Reply
AuthorMessage
Flagstaff programming.dev Flagstaff@programming.dev
Joined: 2025-02-18
Quote

For example, I'd love to be able to map Win Super+R to a click of the "Recent documents" tray icon (it looks like an analog clock), if not at least directly to the "Recent" sidebar section of Nemo. How could I do this, if it's even possible? Otherwise, I may have to try to emulate it through Keysharp...

10   Original
tomenzgg midwest.social tomenzgg@midwest.social
Joined: 2025-01-19
#2 · Quote Reply

I think Mint's still on X11 so you should be able to control the mouse with xdotool.

Assuming the tray icon is in the same place every time, you could write a command with xdotool that moves the mouse cursor over the tray icon and clicks it; then just map that command to the appropriate key binding through Mint's in-built key binding settings.

2
Flagstaff programming.dev Flagstaff@programming.dev
Joined: 2025-02-18
#3 · (edited) Quote Reply

I think Mint's still on X11 so you should be able to control the mouse with xdotool. Assuming the tray icon is in the same place every time, you could write a command with xdotool that moves the mouse cursor over the tray icon and clicks it; then just map that command to the appropriate key binding through Mint's in-built key binding settings.

That's pretty creative, though my tray icons switch around based on what's there. I suppose I could automate icon detection with screenshots of the icons and ImageSearch()ing via Keysharp... but I realize that I didn't describe what I was really hoping for accurately; aside from certain icons like the Wi-Fi icon (which I'd wanna interact with via Win+A), I'm also generally hoping to get the actual, manual box-highlighting feature and just arrow over to the one I want and smack Enter. Oh, well. I'll try to keep xdotool in mind for the future, though! Yes, Mint's definitely still on X11, as far as I know... I wonder what catastrophes await its Wayland shift...

2
Post Reply
Back to top