Comments (3)
found a solution with the undocumented hs.hotkey.getLogLevel
and hs.hotkey.setLogLevel
(#3492)
local previousLogLevel = hs.hotkey.getLogLevel()
hs.hotkey.setLogLevel(0)
hotkeyhandler:disable()
hs.hotkey.setLogLevel(previousLogLevel)
I created a helper so that i can use it:
hotkeySilence(function() hotkeyHandler:disable() end)
or just a:
hotkeyDisableSilent(hotkeyHandler)
see my commit where I implemented it:
muescha/dot_hammerspoon@6e8f2d3
from hammerspoon.
since I found a workaround we should close the feature request?
or should there be methods with an boolean option? like :disable(silent)
and :enable(silent)
from hammerspoon.
For what it's worth, entering or exiting an hs.hotkey.modal
doesn't print anything unless one of the hotkeys it's enabling/disabling shadows one that was already enabled before you entered the modal (or you setLogLevel
to 4 (debug) or higher). That fact isn't exactly documented, but the modal API itself is.
There actually is an isModal
parameter to both :enable()
and :disable()
which is used to implement that, but it's even more private than getLogLevel
/setLogLevel
(and it's in a different position in each method's signature), so it's probably not a good idea to use that directly:
hammerspoon/extensions/hotkey/hotkey.lua
Lines 54 to 56 in 8ea7d10
hammerspoon/extensions/hotkey/hotkey.lua
Line 91 in 8ea7d10
from hammerspoon.
Related Issues (20)
- hs.space.watcher always returns "-1"
- hs.application.launchOrFocus(name) -> boolean should have an optional parameter allWindows like the hs.application:activate(allWindows)
- UTF8/Styledtext and Precomposed Characters
- Feature Request: Portable option to use XDG HOT 2
- hs.application:selectMenuItem() sometimes selects wrong menu item
- Build Issue - pygments~=2.11.2 distribution was not found HOT 11
- Support handoff when set as the default Browser HOT 1
- Question: find currently playing media app HOT 1
- Bug in build_docs.py when using --standalone ? HOT 2
- Add argument for opening doc files via BBEdit when lint failure
- Feature Request: spoons.bindHotkeysToSpec(def, map) should have pressed, released,repeat HOT 1
- `hs.hotkey.modal` works differently from `hs.hotkey` when binding hotkeys with the same shortcuts
- Window Filter doesn't recognize Firefox until focused
- Window filter doesn't recognize second Firefox Profile
- Question: hotkey trigger another hotkey HOT 2
- Bind capslock to hotkey HOT 6
- failing to trigger keybinding of another app with keyStroke HOT 1
- Signals are not handled
- hs.midi:callback not working with some System CommandTypes
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 hammerspoon.