Comments (4)
Good idea. We do get the Key Up / Key Down events for the Power Key. And there is a small window where the system power key behavior does not activate, to reduce accidental presses.
PowerKey could be changed to only activate the replacement keystroke if the measured delay between key up / key down is less than the system's power key delay.
Before Implementing I'd like to find the exact millisecond delay used by the system. Does anyone know?
from powerkey.
I can only assume, that there is 1000ms delay before laptop goes to sleep mode.
from powerkey.
Through a bit of testing it looks like 0.35
seconds is our magic number.
Testing in OS X 10.11.1 shows: a power key Key Up > Key Down timeframe of 0.342775
seconds no-ops. A press of 0.366125
causes the screen to go black.
from powerkey.
In the new version of PowerKey I've enabled modifier keys to work alongside the power key, and that will cause some issues with this proposed "key up" behavior. When modifier keys are held, the system does not send the "key up / key down" event pair that is needed for this to work.
So we have no choice but to send the event on key down when using modifier keys. Inputing the character on key down also feels more natural.
Due to the above I'm going to close this issue, but thanks for the suggestion. If you'd like you could enable it on your copy of the app by changing the place in which the replacement key is inputted.
from powerkey.
Related Issues (20)
- Appears to be broken for Mojave 10.14. Easy fix here. HOT 1
- Sleep button
- Bug in event monitoring HOT 1
- Remap PowerKey to another key not emulate other keys behaviour HOT 3
- Update to 1.6? HOT 1
- Where is the option menu ? HOT 1
- Fn not one of the choices? Can it be? HOT 4
- Does Powerkey work with an old Mac Pro HOT 1
- Does it disable the power key? HOT 1
- Make Delete Key "Move to Trash" in Finder HOT 1
- Does not work with high sierra (10.13.6) on MBP 2015 HOT 1
- Forward Delete Key to delete items HOT 2
- DELETED
- Can't load apple script HOT 3
- Install
- Reinstalled PowerKey in new Catalina install... Not triggering shutdown HOT 1
- Bind to F13 unstable.
- Apple Silicon Support
- Silicon M2 MacBook
- Map POWER KEY to another key combo?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerkey.