-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modal keybinding implementation inquery #115
Comments
Cool! Have you tried implementing this? There’s at least two strategies you could apply here:
Or you could:
|
Thanks, I will try you suggestion. I have taken a look at a modal config. However, it was for a previous version. I was wondering if there is any new stuff that would make it easier to implement. |
@khalidchawtany Let me know how it goes! |
@kasper I have found that bound keys are not repeated when pressed and hold. You have to press and release each time to make it trigger :( You can test it using this: var counter = 0;
Key.on('p', [], function() { alert(counter++); }); alert is modal showing the passed message. |
@khalidchawtany That is by design ( |
I want to micro-manage window movements and resizes. I want to move a window 10 pixels to the left on pressing |
@khalidchawtany Let me see if this is an easy fix. |
I really appreciate your hard work 👍 |
@khalidchawtany Unfortunately, there is no automated way and it seems this has to be implemented with a timer. 😭 |
@kasper if it's any comfort, I might have some uses for this as well. I've ran into this a couple of times but thought I'd just live with it :). And like @khalidchawtany said, your work is appreciated, you've been on fire lately ^_^. |
@mafredri @khalidchawtany Oh well. What would be a suitable interval? 60 times per second? You could then throttle that to your needs with for example |
That would be awesome :) |
That would be more than enough in my opinion. How fast do we think Phoenix needs to be able to respond? I think a suitable range would be between 20 - 50ms, with 20, it would be On the other hand, how precise would the timing be, this being JS and all, would other operations block, etc? |
@mafredri I’ll first try with 0,05 seconds. |
Actually, you can get it from the system with |
Issue #119. |
First of all this is not an issue.
I want to have a modal keybinding to operate Phoenix. Ultimately, I wan to have a mode which could be activated with a HYPER and then terminated with ESC. When inside that mode, pressing single letters should be enough to trigger phoenix actions (No HYPER press needed till ESC is pressed).
Any help is appreciated.
The text was updated successfully, but these errors were encountered: