Support Board
Date/Time: Sat, 23 Nov 2024 21:51:18 +0000
Post From: Keyboard Shortcut: Ctrl + Number
[2022-12-22 23:29:08] |
ondafringe - Posts: 283 |
Anyone know why this doesn't work? if (sc.SetDefaults)
{ sc.ReceiveKeyboardKeyEvents = true; sc.ReceiveCharacterEvents = true; sc.SupportKeyboardModifierStates = true; return; } int pressedCharacter = sc.CharacterEventCode; if (sc.IsKeyPressed_Control && pressedCharacter == 52) // number 4 { //some code } pressedCharacter = 0; If I just check for sc.IsKeyPressed_Control, it works. If I just check for pressedCharacter, it works. But if I check for both, it doesn't work. I've tried using different characters instead of a number, but still can't get it to work. Any ideas? |