Jump to content
Sneax x

Combine DIK KeyCodes

Recommended Posts

/*
 *  Combination keys
 */
#define INPUT_CTRL_OFFSET	512
#define INPUT_SHIFT_OFFSET	1024
#define INPUT_ALT_OFFSET	2048

+ the DIK for the key 0x23

A little confused as you are posting in the config forum. The above would be used only in specific situations, like decoding action keys.

 

How are you activating? You say in SQF, but are you not using a keyDown/Up event? Of which should already provide you whether shift, ctrl or alt are held.

#include "\a3\ui_f\hpp\definedikcodes.inc"

findDisplay 46 displayAddEventHandler [ "KeyDown", {
	params[
		"_display",
		"_keyCode",
		"_shft",
		"_ctr",
		"_alt"
	];
	
	if ( _shft && { _keyCode isEqualTo DIK_H } ) then {
		hint "Shift & H pressed";
	};
}];

 

  • Like 1

Share this post


Link to post
Share on other sites
On 8/7/2019 at 8:33 AM, Larrow said:

The above would be used only in specific situations, like decoding action keys.

I guess they are used in config UserActions too.

 

Some more details about what OP is trying to do would be very helpful.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×