hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.15k stars 261 forks source link

capture shortcut commands when editor is not focused #167

Open micuat opened 2 years ago

micuat commented 2 years ago

maybe useful to avoid confusion - using library such as hotkey

ojack commented 2 years ago

I am a bit nervous as the shortcuts always seem to mess someone up / replace people's existing configurations.... but I agree this would be nice.

ojack commented 2 years ago

Also just to clarify, the browser tab with hydra itself has to be focused for this to work, but not the editor?

micuat commented 2 years ago

the browser tab with hydra itself has to be focused That’s my “expected” behavior! Perhaps we need to add a library like hotkeys to make this happen.

On Wed, Feb 9, 2022 at 14:38 Olivia Jack @.***> wrote:

Also just to clarify, the browser tab with hydra itself has to be focused for this to work, but not the editor?

— Reply to this email directly, view it on GitHub https://github.com/hydra-synth/hydra/issues/167#issuecomment-1033770745, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOAASPDM5FA235OXDSAYLDU2JU5TANCNFSM5NEBOEPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ojack commented 2 years ago

looping back to this...I am still confused! What scenarios/key commands in the editor do not work that could work differently?

micuat commented 2 years ago

For example when the tab is open but the editor is not focused, codemirror cannot capture the commands. A simple scenario is - open the editor, press X to close the dialogue, and then press ctrl+shift+enter - the code won't be executed because the editor is not focused.