Giter VIP home page Giter VIP logo

Comments (7)

woth2k3 avatar woth2k3 commented on May 25, 2024

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.

Willy-Kimura avatar Willy-Kimura commented on May 25, 2024

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.

woth2k3 avatar woth2k3 commented on May 25, 2024

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.''

Untitled-1

Many thanks!

from hotkeylistener.

woth2k3 avatar woth2k3 commented on May 25, 2024

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.

Willy-Kimura avatar Willy-Kimura commented on May 25, 2024

Okay. I'll test a scenario with no modifiers and let you know.

from hotkeylistener.

Willy-Kimura avatar Willy-Kimura commented on May 25, 2024

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.

woth2k3 avatar woth2k3 commented on May 25, 2024

Great! Thanks!

from hotkeylistener.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.