Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Hotkey doesn't work after waking from sleep #15

Closed
Qard opened this issue Aug 12, 2016 · 14 comments · Fixed by #27
Closed

Hotkey doesn't work after waking from sleep #15

Qard opened this issue Aug 12, 2016 · 14 comments · Fixed by #27

Comments

@Qard
Copy link

Qard commented Aug 12, 2016

I've noticed that the hotkey seems to not work anymore after waking OSX from sleep. The other hotkeys in hyperterm for stuff like interacting with tabs still work, so I think it has something to do with how hyperterm-visor is setting up the hotkey bindings.

@ericclemmons
Copy link

I was wondering if I was the only one! Is this something fixable by the author or something we'd be able to test/fix in the community?

@CWSpear
Copy link
Owner

CWSpear commented Nov 14, 2016

Is there a way you can more consistently reproduce this? I tried shutting my laptop for a while and opening it back up, and I also tried Apple Menu > Sleep, but the hotkey was working after both of those.

I have seen this very occasionally, so I do think something fishy is going on, but it doesn't appear to be triggered by sleep (or at least not by only going to sleep...).

Either way, finding a consistent cause will definitely help in debugging.

@philwade
Copy link

I've been seeing this about once a day during my work day, so far have been unable to figure out a consistent way to reproduce. Seems to happen after being idle as well.

I left open developer tools to try and catch something when it happens, no errors or anything 😞

@dieggsy
Copy link

dieggsy commented Nov 20, 2016

I've noticed the same issue. I can't quite pinpoint what it is, but the hotkey definitely stops working for me every so often.

@dcalhoun
Copy link
Contributor

dcalhoun commented Apr 17, 2017

From my experience, hyperterm-summon does not suffer from this issue. I know it utilizes hyperterm-register-shortcut (a library created by the same author).

It may be worth exploring using hyperterm-register-shortcut for hyperterm-visor or, at the very least, comparing the approaches used to bind the global shortcut.

Hope this helps some. 😊

@philwade
Copy link

it looks like hyperterm-register-shortcut uses the same mechanism, namely:
const { globalShortcut } = require('electron');

Although it is called a little different:
https://github.com/soutar/hyperterm-register-shortcut/blob/master/index.js#L10
vs
https://github.com/CWSpear/hyperterm-visor/blob/master/visor.js#L34

@philwade
Copy link

philwade commented Apr 18, 2017

Just to see if it will resolve the issues, I implemented hyperterm-register-shortcut on this branch: https://github.com/philwade/hyperterm-visor/tree/try-hyperterm-register-shortcut

It would still need cleanup to get released, but if some people experiencing this issue could test and see if it fixes things, that would be handy.

Note: This branch requires you to add a different config setting for the hotkey

config: {
    hotkeys: {
        hotkey: 'CommandOrControl+Z',
    }
}

@RTSchriner
Copy link

RTSchriner commented Apr 18, 2017

@philwade: Testing it now! I'll let you know if I continue to have issues. Thanks for your work! 👍

@RTSchriner
Copy link

@philwade: I haven't had any issues yet. Seems to be working.

@philwade
Copy link

@RTSchriner cool, I haven't either, going to test it out again for the rest of today and if everything looks good I'll clean it up and put together a PR

You were able to figure out the new config setting even though I failed to put it my original comment? 🙃

@RTSchriner
Copy link

@philwade Hmmmm... config setting!? 🙃 Haha If I did it was accidental.

Note: Your fix is still working great! Great work! 👍

@CWSpear
Copy link
Owner

CWSpear commented Apr 20, 2017

Released on npm as v0.3.2.

Special thanks to @philwade for the fix and thanks to the rest of you for help testing and stuff!

@CWSpear
Copy link
Owner

CWSpear commented Apr 21, 2017

The people in this thread has been especially helpful... think I could get your help with a non-sleep issue?

Need help testing the new anchor (replaces position) option in the forthcoming 1.0: #5 (comment)

@revelt
Copy link

revelt commented Jul 6, 2017

I can confirm it is still happening (as has been since the beginning). The scenario is simple, after the day I drag the mouse to activate one of the hotcorners on my screen to put display to sleep. Next morning the visor's shortcut does not work any more, I have to restart Hyper, then all is ok again. Visor always works until I put display to sleep, after that Hyper's restart is needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants