Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollLock based combo's #23

Open
LAB02-Admin opened this issue Jan 19, 2022 · 1 comment
Open

ScrollLock based combo's #23

LAB02-Admin opened this issue Jan 19, 2022 · 1 comment
Labels
enhancement New feature or request feature available

Comments

@LAB02-Admin
Copy link

Hi @Willy-Kimura,

Would it be possible to catch ScrollLock based keycombo's with your codebase? Currently ScrollLock is detected, but as soon as a second key is pressed, the ScrollLock part disappears.

I've had some users (HASS.Agent) ask for it, and thought I'd ask you first before trying myself.

Thanks again for sharing your amazing library :)

@Willy-Kimura
Copy link
Owner

Willy-Kimura commented Jan 20, 2022

Hey @LAB02-Admin

On detecting the ScrollLock key, I believe the method Control.IsKeyLocked([key]) can do the trick very easily. You can also conditionally combine the key lock's detection with your already registered key combo without registering the ScrollLock key as part of your registered hotkey.

Here's an example you can try:

if ((e.Hotkey == myHotkey) && Control.IsKeyLocked(Keys.Scroll))
{
    // Your actions here...
}

This though is definitely a worthwhile feature request I'll be eyeing out for a future release.

@Willy-Kimura Willy-Kimura added the enhancement New feature or request label Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature available
Projects
None yet
Development

No branches or pull requests

2 participants