closed
Public

CURRENT_KEY_CODE and CTRL_KEY_STATE does not seem to work properly.

I have added this behaviour:

However, the value of the TextBox never changes, even though I press different keys on my keyboard.

The same goes for CTRL_KEY_STATE.

2 answers

Hi Ulrich,

This problem does exist. However I would say it is a limitation instead of bug. The CURRENT_KEY_CODE, CTRL_KEY_STATE, ALT_KEY_STATE and SHIFT_KEY_STATE properties are tightly connected to the current keyboard event. So when you try to get the value of these properties in the event handler of KEY_DOWN or KEY_UP event, you will get the correct result since the keyboard event is happening when the handler get called. However in your example, the loop doesn’t have the context of keyboard event, so it could not get the right value.

We will consider an enhancement for this, though. Hopefully we could figure it out. Thanks for raising this!

#1

Ok, I see. I would appreciate an anhancement for this.

#2

This question is now closed