disableSerialization;

if (_this) then 
{
	if (isNil {uiNamespace getVariable "bg_reloadblock"}) then 
	{
		_blockReload = ([] call BIS_fnc_displayMission) displayAddEventHandler
		[
			"KeyDown",
			{
				_reloadKeys = actionKeys "ReloadMagazine";
				
				if ((_this select 1) in _reloadKeys) then {true};
			}
		];

		uiNamespace setVariable ["bg_reloadblock", _blockReload];
	};
}
else
{
	if !(isNil {uiNamespace getVariable "bg_reloadblock"}) then 
	{
		([] call BIS_fnc_displayMission) displayRemoveEventHandler ['KeyDown', (uiNamespace getVariable "bg_reloadblock")];
		uiNamespace setVariable ["bg_reloadblock", nil];
		bg_reloadblock = nil;
	};
};