chabou / hyper-broadcast

Extension for Hyper.app to broadcast user inputs to multiple terms.
MIT License
22 stars 5 forks source link

Changing hotkeys + fixing Windows compatibility #5

Closed Herrox closed 5 years ago

Herrox commented 5 years ago

Hello,

I found an issue using this plugin on Windows (an probably Linux): hotkeys are not working because they are declared with Command key. As explain on the following documentation https://github.com/electron/electron/blob/master/docs/api/accelerator.md#platform-notice, Command key is specific to MacOS and has no effect on both Windows and Linux. So, I replace Command with CommandOrControl to make them work on all platforms.

I also had to change hotkeys for selectCurrentPane and toggleCurrentPane hotkeys otherwise it was the same shortcut. So, I totally redefined hotkeys with random keys (u, i,o and p) but I am totally open to better ones.

Waiting for your feedback.

Regards, Herrox.

Herrox commented 5 years ago

@chabou :)

Herrox commented 5 years ago

@chabou up :)

Herrox commented 5 years ago

@chabou up up again, for this PR :)

chabou commented 5 years ago

Sorry for the delay. I was not very confortable to introduce a breaking change. But I haven't a smart solution to fix this issue in a different way.

Herrox commented 5 years ago

@chabou I agree breaking changes is sometimes not a good solution, but I haven't any other solution too and seems to be the better here. Or if someone has a better one...

Otherwise, do you know if this feature will/could be included in Hyper core? Maybe that's a better way to do it

chabou commented 5 years ago

Ideally, Hyper-core could make easier for plugins to have different keymap per OS. But for now, we can implement it on plugin space. But I think it doesn't worth the overhead. Let's do this breaking change.

Users will restore their keymap in their config if needed.

I will merge your PR and make a major release ASAP.

Thank you for your help and your gentle reminder :pray:

Herrox commented 5 years ago

Well noted for hyper-core. Super, can't wait for that major release !

Pas de soucis pour le reminder ;-) Au plaisir d'avoir pu aider.

chabou commented 5 years ago

Published as v2.0.0 I had to change your chosen hotkeys because cmd+alt+i opens chrome dev tools on macOS.

Merci again for your help @Herrox 🙏