Comments (7)
And one more question: why am I restricted to two modifiers and one key? I it possible to set only one modifier and one key?
from hotkeylistener.
Hello,
For your first question, yes it's very possible to add a hotkey without modifiers. Simply set a hotkey's modifiers to Keys.None
. Here's an example:
[C#]
Hotkey hotkey1 = new Hotkey(Keys.None, Keys.T);
[VB]
Dim hotkey1 As New Hotkey(Keys.None, Keys.T)
For your second question, there is no restriction to setting modifiers and keys. If you may have noticed in the documentation, there are also some examples with only one modifier and a key.
from hotkeylistener.
I don't know what I was doing, but it's working with only one modifier, that's correct.
However, with "Keys. None" I have 'System.Exception: 'No hotkey registered.''
Many thanks!
from hotkeylistener.
For your second question, there is no restriction to setting modifiers and keys. If you may have noticed in the documentation, there are also some examples with only one modifier and a key.
Well, actually, if it's only Shift+Key, there is an error, the hot key is not registered. Control+Key and Alt+Key, Control+Shift+Key and so on are working fine.
from hotkeylistener.
Okay. I'll test a scenario with no modifiers and let you know.
from hotkeylistener.
You can now checkout the latest release.
I've added support for registering hotkeys without modifiers.
Example:
var hotkey1 = new Hotkey(Keys.Q);
hkl.Add(hotkey1);
Have fun!
from hotkeylistener.
Great! Thanks!
from hotkeylistener.
Related Issues (20)
- Selections don't work in Firefox Browser HOT 3
- WPF support for HotkeySelector HOT 1
- Question: Sending an hotkey stored class Hotkey to windows application HOT 1
- Creation of HotKey Class instance using a string only works if correct upper/lowercase is used HOT 1
- save hotkey in settings HOT 6
- .net 5.0 support HOT 1
- Having trouble using hotkeys with a console app
- Strange behavior of Google Chrome HOT 2
- AccessViolationException on Windows 11 HOT 5
- KeyNotFoundException when hotkey is pressed twice and suspending HOT 1
- ScrollLock based combo's HOT 1
- Win32Exception thrown in even the most basic program
- How do I change hotkeys HOT 3
- key PageDown
- Win Key Exception
- Screen resizes
- Exception raised in UIAutomationClientsideProviders.dll (see GetTextFromAutomationElement) HOT 3
- Prevent RegisterHotKey from stopping the default key action? HOT 7
- Issues with single key hotkey HOT 3
- Compile Error in VS 2019 HOT 2
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 hotkeylistener.