You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been tinkering trying to get this to work for a while, and I can't find a good approach. I'm wanting a way to block_bind a particular key, but still have the is_pressed() method recognize the key is held down "in real life" even though it isn't being propagated onward.
// Do not propagate the Capslock key onward at all
CapsLockKey.block_bind(|| ());
LKey.bind(|| {
//This check will always return false due to the block_bind
if CapsLockKey.is_pressed() { }
});
The only way I've managed to get it working is to create a second "fake" keyboard and selectively emit synthetic keyboard events on it, then not emit ANY events on the main keyboard. Is there a cleaner way?
The text was updated successfully, but these errors were encountered:
Note When this callback function is called in response to a change in the state of a key, the callback function is called before the asynchronous state of the key is updated. Consequently, the asynchronous state of the key cannot be determined by calling GetAsyncKeyState from within the callback function.
I've been tinkering trying to get this to work for a while, and I can't find a good approach. I'm wanting a way to block_bind a particular key, but still have the is_pressed() method recognize the key is held down "in real life" even though it isn't being propagated onward.
The only way I've managed to get it working is to create a second "fake" keyboard and selectively emit synthetic keyboard events on it, then not emit ANY events on the main keyboard. Is there a cleaner way?
The text was updated successfully, but these errors were encountered: