Login Page - Create Account

Support Board


Date/Time: Mon, 16 Sep 2024 19:13:54 +0000



Post From: Keyboard Shortcut: Ctrl + Number

[2022-12-22 23:29:08]
ondafringe - Posts: 276
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?