Comments (3)
Turns out that makeFirstResponder
is not the problem. In the example app, you can reproduce this e.g. by holding shift ⇧ and type a letter, continue holding shift, and type another letter. The second letter will not be accepted.
The problem is that flagsChanged(_:)
will not be called when the user releases the modifier key, only when pressing it. So we have to reset inputModifiers
somewhere.
But resetting it with inputModifiers = NSEvent.ModifierFlags(rawValue: 0)
in endRecording
is not a good place. I'll experiment with calling flagsChanged
from keyUp
instead, and resetting when key view status is lost.
from keyholder.
Weirdly, hitting space is configured to always begin recording in performKeyEquivalent(with:)
. Why is that so?
// ...
} else if Int(theEvent.keyCode) == kVK_Space {
return beginRecording()
}
// ...
This allows one to reenable recording:
- hold shift (and never release)
- hit a key, e.g. "F" to change the shortcut
- hit another key, e.g. "D" and notice the beep
- hit space
- hit another key again to change the shortcut
I think this is not intentional?
from keyholder.
from keyholder.
Related Issues (17)
- Callback for shortcut change
- Support Mojave dark mode HOT 2
- Don't show the clear button when there's nothing to clear HOT 1
- Optionally allow recording of shortcuts without modifiers pressed HOT 3
- Support for Swift Package Manager HOT 2
- Trying to build KeyHolder - isMousePoint is flagged as error. HOT 4
- Custom varidator HOT 1
- SlidePad interferes with HotCorners…
- New release HOT 1
- Failed to render instance of RecordView HOT 4
- Make RecordView characters more prominent
- Function modifier
- Search engine
- Disable YouTube autoplaying HOT 1
- How to block ads with Adguard and other similar software?
- Carthage fails to build HOT 1
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 keyholder.