Repository navigation
The hotkey works, but the keys pass through #61
Answered
by
Empiree
AlexanderBlackman
asked this question in
Q&A
|
For example,the global hotkey works, but still leaves - - - in any text document I might be writing.
|
Answered by
Empiree
Oct 12, 2026
Replies: 1 comment 1 reply
|
Sorry for the very late answer. Right now combinations only listen and cant block keys. But you can get the same result with Prevent and a condition, and run your action in KeyPrevented. Something like this var listener = new KeyboardListener();
var keyboard = new KeyboardManipulator();
keyboard.Prevent(Key.OemMinus, () => listener.IsCtrlPressed && listener.IsShiftPressed);
keyboard.KeyPrevented += args =>
{
if (args.KeyPressed == Key.OemMinus && args.Event == KeyboardInputEvent.KeyDown)
SkipTask();
};The minus key is blocked only while Ctrl and Shift are held, so nothing gets typed. A built in option to block keys for a combination would be nice too, I'll think about it. |
1 reply
Answer selected by
AlexanderBlackman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for the very late answer. Right now combinations only listen and cant block keys. But you can get the same result with Prevent and a condition, and run your action in KeyPrevented. Something like this
The minus key is blocked only while Ctrl and Shift are held, so nothing gets typed. A built in option to block keys for a combination would be nice too, I'll think about it.