bsharper / atv-desktop-remote

A simple app to allow you to control an Apple TV from your desktop
MIT License
228 stars 14 forks source link

Request: configurable hotkey #13

Open naydichev opened 10 months ago

naydichev commented 10 months ago

Hello there!

Thanks for making a cool app.

I'd like to be able to configure the hot key used to open the applet. cmd + shift + r is also used in a few places (one being a hard refresh in the web browser, the other being to open airdrop).

I'd like to be able to pick something else instead.

sejmann commented 5 months ago

Yeah, I agree, this hotkey is annoying. It's the hotkey for reader mode in safari, too, which this hijacks. I'm trying to figure out where in the code the hotkey is setup so I can change it.

UPDATE: Well, I did the ridiculous thing of editing /Applications/ATV Remote.app/Contents/Resources/app.asar in a hex editor, searched for globalShortcut.registerAll, and changed the R to a different letter. I thought it might break some integrity check on relaunch, but it didn't.

iiiGerardoiii commented 5 months ago

I'm using a different keyboard layout (Colemak) and when I do cmd+shift+P the ATV UI pops up, quite annoying since it's a very used shortcut in lots of apps, and ATV stops the app from doing whatever that shortcut does (document setup in Affinity Designer, or command palette in Sublime Text, to name a few).

bsharper commented 5 months ago

I just pushed code to do this but still need to test it some more before I put up a new build. If you want to test custom hotkey, you can grab the current code from the Github and build it. Then under ~/Library/Application Support/ATV Remote create a file called hotkey.txt and put in a new accelerator key there and save it. More than one hotkey can be used, just separate with a comma. The current default hotkeys are Super+Shift+R and Command+Control+R. If you put, for example Super+Shift+U in the hotkeys.txt file it would use that instead.

This is obviously pretty rough around the edges but since it seems to work I thought I'd go ahead and mention it. I'll keep the issue open until a better way of doing this is implemented and it's in a proper build.